@Test public void testListTransactionLogsByRegistrationId() throws Exception { }
@Override public CommonResult listTransactionLogsByRegistrationId(Integer registrationId) { List<HashMap> invoiceCollection = transactionLogMapper.listInvoiceCodeAndStatusByRegistrationId(registrationId); for(HashMap invoice: invoiceCollection){ String invoiceCode = invoice.get("invoiceCode").toString(); List<TransactionLog> logs = transactionLogMapper.listLogsByInvoiceCode(invoiceCode); invoice.put("logs", logs); } List<HashMap> logs = new ArrayList<>(); logs.addAll(transactionLogMapper.listLogsByTableName("inspection", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("examination", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("treatment", registrationId)); logs.addAll(transactionLogMapper.listRecipeLogs(registrationId)); JSONObject jsonObject = new JSONObject(); jsonObject.put("invoiceCollection", invoiceCollection); jsonObject.put("transactionLogs", logs); return CommonResult.success(jsonObject); }
PaymentServiceImpl implements PaymentService { @Override public CommonResult listTransactionLogsByRegistrationId(Integer registrationId) { List<HashMap> invoiceCollection = transactionLogMapper.listInvoiceCodeAndStatusByRegistrationId(registrationId); for(HashMap invoice: invoiceCollection){ String invoiceCode = invoice.get("invoiceCode").toString(); List<TransactionLog> logs = transactionLogMapper.listLogsByInvoiceCode(invoiceCode); invoice.put("logs", logs); } List<HashMap> logs = new ArrayList<>(); logs.addAll(transactionLogMapper.listLogsByTableName("inspection", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("examination", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("treatment", registrationId)); logs.addAll(transactionLogMapper.listRecipeLogs(registrationId)); JSONObject jsonObject = new JSONObject(); jsonObject.put("invoiceCollection", invoiceCollection); jsonObject.put("transactionLogs", logs); return CommonResult.success(jsonObject); } }
PaymentServiceImpl implements PaymentService { @Override public CommonResult listTransactionLogsByRegistrationId(Integer registrationId) { List<HashMap> invoiceCollection = transactionLogMapper.listInvoiceCodeAndStatusByRegistrationId(registrationId); for(HashMap invoice: invoiceCollection){ String invoiceCode = invoice.get("invoiceCode").toString(); List<TransactionLog> logs = transactionLogMapper.listLogsByInvoiceCode(invoiceCode); invoice.put("logs", logs); } List<HashMap> logs = new ArrayList<>(); logs.addAll(transactionLogMapper.listLogsByTableName("inspection", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("examination", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("treatment", registrationId)); logs.addAll(transactionLogMapper.listRecipeLogs(registrationId)); JSONObject jsonObject = new JSONObject(); jsonObject.put("invoiceCollection", invoiceCollection); jsonObject.put("transactionLogs", logs); return CommonResult.success(jsonObject); }  }
PaymentServiceImpl implements PaymentService { @Override public CommonResult listTransactionLogsByRegistrationId(Integer registrationId) { List<HashMap> invoiceCollection = transactionLogMapper.listInvoiceCodeAndStatusByRegistrationId(registrationId); for(HashMap invoice: invoiceCollection){ String invoiceCode = invoice.get("invoiceCode").toString(); List<TransactionLog> logs = transactionLogMapper.listLogsByInvoiceCode(invoiceCode); invoice.put("logs", logs); } List<HashMap> logs = new ArrayList<>(); logs.addAll(transactionLogMapper.listLogsByTableName("inspection", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("examination", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("treatment", registrationId)); logs.addAll(transactionLogMapper.listRecipeLogs(registrationId)); JSONObject jsonObject = new JSONObject(); jsonObject.put("invoiceCollection", invoiceCollection); jsonObject.put("transactionLogs", logs); return CommonResult.success(jsonObject); }  @Override CommonResult listTransactionLogsByRegistrationId(Integer registrationId); @Override CommonResult listTransactionLogsByInvoiceCode(String invoiceCode); @Override CommonResult listTransactionLogsByCollectionAndProjectId(Integer collectionId, Integer projectId); @Override @Transactional CommonResult updateTransactionLogsAsPaid(List<TransactionParam> transactionParams); @Override CommonResult updateTransactionLogsAsReturned(List<TransactionParam> transactionLogParams); @Override CommonResult reprintTransactionLog(String invoiceCode, Integer newCashierId); @Override CommonResult listLogsByRegistrationIdAndDate(Integer registrationId, String beginDateStr, String endDateStr); }
PaymentServiceImpl implements PaymentService { @Override public CommonResult listTransactionLogsByRegistrationId(Integer registrationId) { List<HashMap> invoiceCollection = transactionLogMapper.listInvoiceCodeAndStatusByRegistrationId(registrationId); for(HashMap invoice: invoiceCollection){ String invoiceCode = invoice.get("invoiceCode").toString(); List<TransactionLog> logs = transactionLogMapper.listLogsByInvoiceCode(invoiceCode); invoice.put("logs", logs); } List<HashMap> logs = new ArrayList<>(); logs.addAll(transactionLogMapper.listLogsByTableName("inspection", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("examination", registrationId)); logs.addAll(transactionLogMapper.listLogsByTableName("treatment", registrationId)); logs.addAll(transactionLogMapper.listRecipeLogs(registrationId)); JSONObject jsonObject = new JSONObject(); jsonObject.put("invoiceCollection", invoiceCollection); jsonObject.put("transactionLogs", logs); return CommonResult.success(jsonObject); }  @Override CommonResult listTransactionLogsByRegistrationId(Integer registrationId); @Override CommonResult listTransactionLogsByInvoiceCode(String invoiceCode); @Override CommonResult listTransactionLogsByCollectionAndProjectId(Integer collectionId, Integer projectId); @Override @Transactional CommonResult updateTransactionLogsAsPaid(List<TransactionParam> transactionParams); @Override CommonResult updateTransactionLogsAsReturned(List<TransactionParam> transactionLogParams); @Override CommonResult reprintTransactionLog(String invoiceCode, Integer newCashierId); @Override CommonResult listLogsByRegistrationIdAndDate(Integer registrationId, String beginDateStr, String endDateStr);  }