|
|
@ -194,13 +194,21 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa |
|
|
|
finPaymentapply.setCreateOrgSid(createOrgSid); |
|
|
|
finPaymentapply.setUseOrgSid(createOrgSid); |
|
|
|
List<FinPaymentapplyDetailDto> detailsList = dto.getDetailsList(); |
|
|
|
if (detailsList != null && detailsList.size() > 0) { |
|
|
|
String i = finPaymentapplyDetailsService.saveDetailsList(detailsList, finPaymentapply.getSid()); |
|
|
|
finPaymentapply.setPaymentTotal(new BigDecimal(i)); |
|
|
|
} |
|
|
|
|
|
|
|
if ("1".equals(dto.getIsVeh())) { |
|
|
|
List<FinPaymentapplyVehicleDto> vehicleDtoList = dto.getVehicleList(); |
|
|
|
if (vehicleDtoList != null && vehicleDtoList.size() > 0) { |
|
|
|
String j = finPaymentapplyVehicleService.saveVehicleList(vehicleDtoList, finPaymentapply.getSid()); |
|
|
|
finPaymentapply.setCarTotal(new BigDecimal(j)); |
|
|
|
} else { |
|
|
|
return rb.setMsg("请添加车辆信息"); |
|
|
|
} |
|
|
|
finPaymentapply.setPaymentTotal(new BigDecimal(i)); |
|
|
|
} |
|
|
|
|
|
|
|
baseMapper.insert(finPaymentapply); |
|
|
|
dtoSid = finPaymentapply.getSid(); |
|
|
|
} else { |
|
|
@ -211,15 +219,21 @@ public class FinPaymentapplyService extends MybatisBaseService<FinPaymentapplyMa |
|
|
|
BeanUtil.copyProperties(dto, finPaymentapply, "orgSidPath"); |
|
|
|
|
|
|
|
List<FinPaymentapplyDetailDto> detailsList = dto.getDetailsList(); |
|
|
|
if (detailsList != null && detailsList.size() > 0) { |
|
|
|
String i = finPaymentapplyDetailsService.saveDetailsList(detailsList, finPaymentapply.getSid()); |
|
|
|
finPaymentapply.setPaymentTotal(new BigDecimal(i)); |
|
|
|
} |
|
|
|
|
|
|
|
if ("1".equals(dto.getIsVeh())) { |
|
|
|
List<FinPaymentapplyVehicleDto> vehicleDtoList = dto.getVehicleList(); |
|
|
|
if (vehicleDtoList != null && vehicleDtoList.size() > 0) { |
|
|
|
String j = finPaymentapplyVehicleService.saveVehicleList(vehicleDtoList, finPaymentapply.getSid()); |
|
|
|
finPaymentapply.setCarTotal(new BigDecimal(j)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
finPaymentapplyVehicleService.deleteVehicle(dtoSid); |
|
|
|
} |
|
|
|
finPaymentapply.setPaymentTotal(new BigDecimal(i)); |
|
|
|
|
|
|
|
baseMapper.updateById(finPaymentapply); |
|
|
|
} |
|
|
|
return rb.success().setData(dtoSid); |
|
|
|