diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java index 074ec99c..fd2c14f3 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java @@ -389,10 +389,19 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { if(countTwo!=1){ throw new ServiceException("bm_agreement_info修改失败"); } - sltAgreementInfoMapper.insertSltAgreementDetailLease(sltInfoVo.getLeaseList(),newId); - sltAgreementInfoMapper.insertSltAgreementDetailRepair(sltInfoVo.getRepairList(),newId); - sltAgreementInfoMapper.insertSltAgreementDetailScrap(sltInfoVo.getScrapList(),newId); - return sltAgreementInfoMapper.insertSltAgreementDetailLose(sltInfoVo.getLoseList(),newId); + if(sltInfoVo.getLeaseList().size()>0){ + sltAgreementInfoMapper.insertSltAgreementDetailLease(sltInfoVo.getLeaseList(),newId); + } + if(sltInfoVo.getRepairList().size()>0){ + sltAgreementInfoMapper.insertSltAgreementDetailRepair(sltInfoVo.getRepairList(),newId); + } + if(sltInfoVo.getScrapList().size()>0){ + sltAgreementInfoMapper.insertSltAgreementDetailScrap(sltInfoVo.getScrapList(),newId); + } + if(sltInfoVo.getLoseList().size()>0){ + sltAgreementInfoMapper.insertSltAgreementDetailLose(sltInfoVo.getLoseList(),newId); + } + return 1; } catch (Exception e) { throw new ServiceException("错误信息描述");