diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java index 0e45e01f..d56dc188 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java @@ -1072,6 +1072,10 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { try { int result = 0; LeaseApplyInfo leaseApplyInfo = leaseApplyRequestVo.getLeaseApplyInfo(); + TmTaskAgreement taskAgreement = mapper.getAgreementInfo(leaseApplyInfo); + if (taskAgreement == null) { + return AjaxResult.error("该协议已结算,无法发布,请重新选择其他领用单位发布"); + } List leaseApplyDetailsList = leaseApplyRequestVo.getLeaseApplyDetailsList(); Long parentId = leaseApplyDetailsList.get(0).getParentId(); int thisMonthMaxOrder = mapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth()); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml index b2f82b47..8832f65b 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml @@ -1152,12 +1152,16 @@