@Test public void testCheckDailySummary() throws Exception { }
public CommonResult checkDailySummary(DailySummaryParam dailySummaryParam){ Integer cashierId = dailySummaryParam.getCashierId(); String beginDateStr = dailySummaryParam.getBeginDateStr(); String endDateStr = dailySummaryParam.getEndDateStr(); JSONObject jsonObject = new JSONObject(); DailySummaryLog dailySummaryLog = dailySummaryLogMapper.getSummaryLog(cashierId, beginDateStr, endDateStr); String invoiceCodeBegin = dailySummaryLog.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryLog.getInvoiceCodeEnd(); for(int i = 1; i <= 5; i++) { List<String> invoiceCollection = transactionLogMapper.listInvoiceCodeByStatus(cashierId, invoiceCodeBegin, invoiceCodeEnd, (byte) i); jsonObject.put(String.valueOf(i), invoiceCollection); } List<HashMap> summary = transactionLogMapper.listTotalMoneyByType(cashierId, invoiceCodeBegin, invoiceCodeEnd); for(HashMap s: summary){ jsonObject.put((String) s.get("type"), s.get("total_money")); } return CommonResult.success(jsonObject); }
CheckDailyServiceImpl implements CheckDailyService { public CommonResult checkDailySummary(DailySummaryParam dailySummaryParam){ Integer cashierId = dailySummaryParam.getCashierId(); String beginDateStr = dailySummaryParam.getBeginDateStr(); String endDateStr = dailySummaryParam.getEndDateStr(); JSONObject jsonObject = new JSONObject(); DailySummaryLog dailySummaryLog = dailySummaryLogMapper.getSummaryLog(cashierId, beginDateStr, endDateStr); String invoiceCodeBegin = dailySummaryLog.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryLog.getInvoiceCodeEnd(); for(int i = 1; i <= 5; i++) { List<String> invoiceCollection = transactionLogMapper.listInvoiceCodeByStatus(cashierId, invoiceCodeBegin, invoiceCodeEnd, (byte) i); jsonObject.put(String.valueOf(i), invoiceCollection); } List<HashMap> summary = transactionLogMapper.listTotalMoneyByType(cashierId, invoiceCodeBegin, invoiceCodeEnd); for(HashMap s: summary){ jsonObject.put((String) s.get("type"), s.get("total_money")); } return CommonResult.success(jsonObject); } }
CheckDailyServiceImpl implements CheckDailyService { public CommonResult checkDailySummary(DailySummaryParam dailySummaryParam){ Integer cashierId = dailySummaryParam.getCashierId(); String beginDateStr = dailySummaryParam.getBeginDateStr(); String endDateStr = dailySummaryParam.getEndDateStr(); JSONObject jsonObject = new JSONObject(); DailySummaryLog dailySummaryLog = dailySummaryLogMapper.getSummaryLog(cashierId, beginDateStr, endDateStr); String invoiceCodeBegin = dailySummaryLog.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryLog.getInvoiceCodeEnd(); for(int i = 1; i <= 5; i++) { List<String> invoiceCollection = transactionLogMapper.listInvoiceCodeByStatus(cashierId, invoiceCodeBegin, invoiceCodeEnd, (byte) i); jsonObject.put(String.valueOf(i), invoiceCollection); } List<HashMap> summary = transactionLogMapper.listTotalMoneyByType(cashierId, invoiceCodeBegin, invoiceCodeEnd); for(HashMap s: summary){ jsonObject.put((String) s.get("type"), s.get("total_money")); } return CommonResult.success(jsonObject); }  }
CheckDailyServiceImpl implements CheckDailyService { public CommonResult checkDailySummary(DailySummaryParam dailySummaryParam){ Integer cashierId = dailySummaryParam.getCashierId(); String beginDateStr = dailySummaryParam.getBeginDateStr(); String endDateStr = dailySummaryParam.getEndDateStr(); JSONObject jsonObject = new JSONObject(); DailySummaryLog dailySummaryLog = dailySummaryLogMapper.getSummaryLog(cashierId, beginDateStr, endDateStr); String invoiceCodeBegin = dailySummaryLog.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryLog.getInvoiceCodeEnd(); for(int i = 1; i <= 5; i++) { List<String> invoiceCollection = transactionLogMapper.listInvoiceCodeByStatus(cashierId, invoiceCodeBegin, invoiceCodeEnd, (byte) i); jsonObject.put(String.valueOf(i), invoiceCollection); } List<HashMap> summary = transactionLogMapper.listTotalMoneyByType(cashierId, invoiceCodeBegin, invoiceCodeEnd); for(HashMap s: summary){ jsonObject.put((String) s.get("type"), s.get("total_money")); } return CommonResult.success(jsonObject); }  CommonResult checkDailySummary(DailySummaryParam dailySummaryParam); @Override CommonResult confirmResult(DailySummaryParam dailySummaryParam); }
CheckDailyServiceImpl implements CheckDailyService { public CommonResult checkDailySummary(DailySummaryParam dailySummaryParam){ Integer cashierId = dailySummaryParam.getCashierId(); String beginDateStr = dailySummaryParam.getBeginDateStr(); String endDateStr = dailySummaryParam.getEndDateStr(); JSONObject jsonObject = new JSONObject(); DailySummaryLog dailySummaryLog = dailySummaryLogMapper.getSummaryLog(cashierId, beginDateStr, endDateStr); String invoiceCodeBegin = dailySummaryLog.getInvoiceCodeBegin(); String invoiceCodeEnd = dailySummaryLog.getInvoiceCodeEnd(); for(int i = 1; i <= 5; i++) { List<String> invoiceCollection = transactionLogMapper.listInvoiceCodeByStatus(cashierId, invoiceCodeBegin, invoiceCodeEnd, (byte) i); jsonObject.put(String.valueOf(i), invoiceCollection); } List<HashMap> summary = transactionLogMapper.listTotalMoneyByType(cashierId, invoiceCodeBegin, invoiceCodeEnd); for(HashMap s: summary){ jsonObject.put((String) s.get("type"), s.get("total_money")); } return CommonResult.success(jsonObject); }  CommonResult checkDailySummary(DailySummaryParam dailySummaryParam); @Override CommonResult confirmResult(DailySummaryParam dailySummaryParam);  }