|
|
|
@ -11,10 +11,7 @@ import au.com.royalpay.payment.manage.cashback.core.CashbackService;
|
|
|
|
|
import au.com.royalpay.payment.manage.customers.core.CouponValidateService;
|
|
|
|
|
import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl;
|
|
|
|
|
import au.com.royalpay.payment.manage.management.clearing.core.CleanService;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailAnalysisMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.*;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
@ -167,6 +164,8 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
private ClientMapper clientMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientModifySupport clientModifySupport;
|
|
|
|
|
@Resource
|
|
|
|
|
private ClearingLogMapper clearingLogMapper;
|
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
private final String fileName[] = { "client_bank_file", "client_id_file", "client_company_file" };
|
|
|
|
@ -547,18 +546,18 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
PageList<JSONObject> logs = clearingDetailMapper.listClientSettlementLog(params,
|
|
|
|
|
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"))));
|
|
|
|
|
JSONObject result = PageListUtils.buildPageListResult(logs);
|
|
|
|
|
if (appQueryBean.getPage() == 1) {
|
|
|
|
|
if (!logs.isEmpty() && logs.size() > 0) {
|
|
|
|
|
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("report_date"));
|
|
|
|
|
if (sendMailLog == null) {
|
|
|
|
|
logs.remove(0);
|
|
|
|
|
}else if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) {
|
|
|
|
|
logs.remove(0);
|
|
|
|
|
JSONObject clearingDetail = clearingDetailMapper.findByDetailId(logs.get(0).getIntValue("clearing_order"));
|
|
|
|
|
if (clearingDetail!=null){
|
|
|
|
|
JSONObject clearingLog = clearingLogMapper.findById(clearingDetail.getIntValue("clearing_id"));
|
|
|
|
|
if(clearingLog.getBooleanValue("editable")){
|
|
|
|
|
result.put("padding", true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
JSONObject result = PageListUtils.buildPageListResult(logs);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|