|
|
@ -546,18 +546,18 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
PageList<JSONObject> logs = clearingDetailMapper.listClientSettlementLog(params,
|
|
|
|
PageList<JSONObject> logs = clearingDetailMapper.listClientSettlementLog(params,
|
|
|
|
new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("report_date.desc")));
|
|
|
|
new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("report_date.desc")));
|
|
|
|
logs.forEach(log -> log.put("total_charge", log.getBigDecimal("total_charge").add(log.getBigDecimal("tax_amount"))));
|
|
|
|
logs.forEach(log -> log.put("total_charge", log.getBigDecimal("total_charge").add(log.getBigDecimal("tax_amount"))));
|
|
|
|
JSONObject result = PageListUtils.buildPageListResult(logs);
|
|
|
|
|
|
|
|
if (appQueryBean.getPage() == 1) {
|
|
|
|
if (appQueryBean.getPage() == 1) {
|
|
|
|
if (!logs.isEmpty() && logs.size() > 0) {
|
|
|
|
if (!logs.isEmpty() && logs.size() > 0) {
|
|
|
|
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("report_date"));
|
|
|
|
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("report_date"));
|
|
|
|
if (sendMailLog == null) {
|
|
|
|
if (sendMailLog == null) {
|
|
|
|
result.put("padding", true);
|
|
|
|
logs.remove(0);
|
|
|
|
}
|
|
|
|
}else if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) {
|
|
|
|
if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) {
|
|
|
|
logs.remove(0);
|
|
|
|
result.put("padding", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject result = PageListUtils.buildPageListResult(logs);
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|