| | |
| | | List<Voucher> voucherList = this.selectVoucher(state); |
| | | if (!Cools.isEmpty(voucherList)) { |
| | | for (Voucher voucher : voucherList) { |
| | | VoucherDto dto = new VoucherDto(); |
| | | dto.setVoucher(voucher); |
| | | List<VoucherDetail> voucherDetails = this.selectVoucherDetail(voucher.getVoucherID()); |
| | | if (!Cools.isEmpty(voucherDetails)) { |
| | | VoucherDto dto = new VoucherDto(); |
| | | list.add(dto); |
| | | dto.setVoucher(voucher); |
| | | dto.setDetails(voucherDetails); |
| | | } else { |
| | | log.error("{}单据找不到明细,请注意检查", voucher.getVoucherID()); |
| | | } |
| | | list.add(dto); |
| | | } |
| | | } |
| | | return list; |