| | |
| | | } |
| | | String noByKey = systemDataNoService.getNoByKey(SystemDataNoEnum.YF); |
| | | payableFeeManagement.setSystemNo(noByKey); |
| | | |
| | | payableFeeManagement.setCreateBy(SecurityUtils.getUsername()); |
| | | // 保存主实体 |
| | | int result = payableFeeManagementMapper.insertPayableFeeManagement(payableFeeManagement); |
| | | Integer payableFeeId = payableFeeManagement.getId(); |
| | |
| | | |
| | | return result; |
| | | } |
| | | /** |
| | | * 根据关联账单编号批量更新应付费用管理记录 |
| | | * 清除关联账单编号并将状态改为0(待生成账单) |
| | | * 使用场景:当应付账单被删除或作废时,需要将关联的应付费用记录恢复为待生成账单状态 |
| | | * |
| | | * @param relatedBillNo 关联账单编号 |
| | | * @return 影响的行数 |
| | | */ |
| | | @Override |
| | | public int updatePayableFeeManagementByRelatedBillNo(String relatedBillNo) |
| | | { |
| | | // 调用Mapper层方法执行批量更新 |
| | | int result = payableFeeManagementMapper.updatePayableFeeManagementByRelatedBillNo(relatedBillNo); |
| | | |
| | | return result; |
| | | } |
| | | /** |
| | | * 作废应付费用管理记录 |
| | | * |
| | |
| | | Map<String, BigDecimal> currencyAmountMap = new HashMap<>(); |
| | | for (PayableFeeDetail detail : detailList) { |
| | | String currency = detail.getCurrency(); |
| | | BigDecimal billingAmount = detail.getBillingAmount(); |
| | | BigDecimal billingAmount = detail.getActualAmount(); |
| | | |
| | | if (currency != null && billingAmount != null) { |
| | | currencyAmountMap.merge(currency, billingAmount, BigDecimal::add); |
| | |
| | | |
| | | // 根据币种显示对应的货币名称 |
| | | String currency = entry.getKey(); |
| | | if ("CNY".equals(currency)) { |
| | | if ("RMB".equals(currency)) { |
| | | sb.append("人民币"); |
| | | } else if ("HKD".equals(currency)) { |
| | | sb.append("港币"); |