| | |
| | | ContractInvoicePaymentQueryCriteria invoicePaymentQueryCriteria = new ContractInvoicePaymentQueryCriteria(); |
| | | invoicePaymentQueryCriteria.setPaymentId(payment.getPaymentId()); |
| | | List<ContractInvoicePayment> invoicePaymentList = contractInvoicePaymentRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,invoicePaymentQueryCriteria,criteriaBuilder)); |
| | | for (ContractInvoicePayment invoicePayment : invoicePaymentList) { |
| | | ContractInvoice invoice = contractInvoiceRepository.getById(invoicePayment.getInvoiceId()); |
| | | invoiceList.add(invoice); |
| | | if (invoicePaymentList.size() > 0) { |
| | | for (ContractInvoicePayment invoicePayment : invoicePaymentList) { |
| | | ContractInvoice invoice = contractInvoiceRepository.getById(invoicePayment.getInvoiceId()); |
| | | invoiceList.add(invoice); |
| | | } |
| | | } else { |
| | | invoiceList.add(new ContractInvoice()); |
| | | } |
| | | } else { |
| | | invoiceList.add(new ContractInvoice()); |
| | |
| | | e.printStackTrace(); |
| | | throw new BadRequestException("数据保存失败"); |
| | | } finally { |
| | | reader.close(); |
| | | if (uploadFile.exists()) { |
| | | uploadFile.deleteOnExit(); |
| | | } |