| | |
| | | billManagement.setExchangeRate(statisticsVo.getRate()); |
| | | billManagement.setStatus("0"); // 默认草稿状态 |
| | | billManagement.setCreateTime(DateUtils.getNowDate()); |
| | | |
| | | billManagement.setBillName(billCreateVo.getBillName()); |
| | | billManagement.setCustomerName(billCreateVo.getCustomerName()); |
| | | billManagement.setIsInternalSettlement(billCreateVo.getIsInternalSettlement()); |
| | | billManagement.setInternalSettlementUnit(billCreateVo.getInternalSettlementUnit()); |
| | | // 3. 根据账单类型设置币种和总金额 |
| | | if (billType == 0) { |
| | | // 人民币账单 |
| | |
| | | String billSystemNo = billManagement.getSystemNo(); |
| | | |
| | | // 批量更新应收费用主表的关联账单编号 |
| | | List<ReceivableFeeManagement> feeManagements = new ArrayList<>(); |
| | | for (Integer feeId : statisticsVo.getIds()) { |
| | | ReceivableFeeManagement feeManagement = new ReceivableFeeManagement(); |
| | | feeManagement.setId(feeId); |
| | | feeManagement.setRelatedBillNo(billSystemNo); |
| | | feeManagements.add(feeManagement); |
| | | feeManagement.setStatus("1"); |
| | | receivableFeeManagementMapper.updateReceivableFeeManagement(feeManagement); |
| | | } |
| | | |
| | | // 调用批量更新方法 |
| | | updateReceivableFeeManagementBatch(feeManagements); |
| | | |
| | | } |
| | | |
| | | return i; |