| | |
| | | @RequiredArgsConstructor |
| | | public class PaymentConfirmServiceImpl extends ServiceImpl<PaymentConfirmMapper, PaymentConfirm> implements PaymentConfirmService { |
| | | |
| | | |
| | | @Value("${dept.smj}") |
| | | private String smj; |
| | | |
| | | @Value("${dept.smjhw}") |
| | | private String smjhw; |
| | | |
| | | private final ContractService contractService; |
| | | private final BusinessCustomerService businessCustomerService; |
| | | private final ContractPaymentScheduleMapper contractPaymentScheduleMapper; |
| | |
| | | } |
| | | paid = paid.add(addDTO.getTransationAmount()); |
| | | contract.setPaidAmount(paid); |
| | | if (paid.compareTo(contract.getAmount().subtract(contract.getDropAmount())) >= 0&&contract.getBillingAmout().compareTo(contract.getAmount())==0) { |
| | | if (paid.compareTo(contract.getAmount().subtract(contract.getDropAmount())) >= 0&&contract.getBillingAmout().compareTo(contract.getAmount())==0&& |
| | | StrUtil.isBlank(contract.getNextScheduleName())) { |
| | | contract.setContractStatus(3); |
| | | contract.setPaidAmount(contract.getAmount().subtract(contract.getDropAmount())); |
| | | } |
| | |
| | | } |
| | | paid = paid.add(addDTO.getTransationAmount()); |
| | | contract.setPaidAmount(paid); |
| | | if (contract.getBillingAmout().compareTo(contract.getAmount())==0&&paid.compareTo(contract.getAmount().subtract(contract.getDropAmount())) >= 0) { |
| | | if (contract.getBillingAmout().compareTo(contract.getAmount())==0&&paid.compareTo(contract.getAmount().subtract(contract.getDropAmount())) >= 0&& |
| | | StrUtil.isBlank(contract.getNextScheduleName())) { |
| | | contract.setContractStatus(3); |
| | | contract.setPaidAmount(contract.getAmount()); |
| | | } |
| | |
| | | slip.setPaymentAmount(addDTO.getTransationAmount()); |
| | | slip.setPayType(addDTO.getPayType()); |
| | | slip.setContractId(contract.getId()); |
| | | slip.setPaymentNumber(addDTO.getPaymentCode()); |
| | | paymentSlipMapper.insert(slip); |
| | | } |
| | | |
| | |
| | | log.info("==================开始处理银行流水信息==================="); |
| | | recordList.stream().forEach(obj -> { |
| | | JSONObject record = (JSONObject) obj; |
| | | BusinessCustomer customer = businessCustomerService.getOne(Wrappers.<BusinessCustomer>lambdaQuery() |
| | | // Long compId = null; |
| | | // if (StrUtil.contains(record.getString("to_acct_name"),"石家庄煤矿机械有限责任公司")){ |
| | | // compId = 2089995177814495234L; |
| | | // }else { |
| | | // compId = dept.getDeptId(); |
| | | // } |
| | | // BusinessCustomer customer = businessCustomerService.getOne(Wrappers.<BusinessCustomer>lambdaQuery() |
| | | // .eq(BusinessCustomer::getCompanyName, record.getString("to_acct_name")) |
| | | // .eq(BusinessCustomer::getCompId,compId)); |
| | | BusinessCustomer customer = null; |
| | | if (StrUtil.equals(record.getString("to_acct_name"),"石家庄煤矿机械有限责任公司")){ |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjhw); |
| | | customer = businessCustomerService.getOne(Wrappers.<BusinessCustomer>lambdaQuery() |
| | | .eq(BusinessCustomer::getCompanyName, record.getString("to_acct_name")) |
| | | .in(BusinessCustomer::getCompId, smjList) |
| | | .last("limit 1")); |
| | | }else { |
| | | customer = businessCustomerService.getOne(Wrappers.<BusinessCustomer>lambdaQuery() |
| | | .eq(BusinessCustomer::getCompanyName, record.getString("to_acct_name")) |
| | | .eq(BusinessCustomer::getCompId,dept.getDeptId()) |
| | | ); |
| | | .last("limit 1")); |
| | | } |
| | | //保存付款单 |
| | | Boolean codeFlag = saveBankStatement(customer, record,dept); |
| | | if (!codeFlag) { |