gongdecai 3 anni fa
parent
commit
f3b9e95b02

+ 7 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.winsea.svc.base.base.entity.CommonDepartment;
 import com.winsea.svc.base.base.util.DateUtils;
 import com.winsea.svc.base.workflow.entity.Workflow;
+import com.winsea.svc.notice.entity.base.BaseNotice;
+import com.winsea.svc.notice.service.INoticeService;
 import com.yh.saas.common.support.util.IdGenerator;
 import com.yh.saas.plugin.base.service.ICommonBillOperateHisService;
 import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
@@ -72,6 +74,8 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
     @Autowired
     private INewWorkflowService workflowService;
     @Autowired
+    private INoticeService noticeService;
+    @Autowired
     private IPriceConfirmationSheetService priceConfirmationSheetService;
     @Value("${file-root-path}")
     private String localPath;
@@ -691,6 +695,9 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
         if (contractManagementInfo != null) {
             //合同信息
             this.deleteById(contractManagementInfo.getId());
+            // 先删除任务
+            noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "BUY-CONTRACT-APPROVE",
+                    contractManagementInfo.getId(), null);
             //货物信息
             ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>().eq(ContractGoodsInfo.QueryFiles.CONTRACT_ID, id));
             //流程信息