hyingbo
6 天以前 418d29b85d943f57b5600d84acf9cf6ca0ce9173
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java
@@ -28,6 +28,9 @@
import org.jeecg.modules.dnc.utils.file.FileUtilS;
import org.jeecg.modules.dncFlow.entity.DispatchFile;
import org.jeecg.modules.dncFlow.service.IDispatchFileService;
import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness;
import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService;
import org.jeecg.modules.flowable.service.IFlowTaskService;
import org.jeecg.modules.mdc.entity.MdcEquipment;
import org.jeecg.modules.mdc.service.IMdcEquipmentService;
import org.jeecg.modules.system.entity.SysParams;
@@ -78,6 +81,10 @@
    @Autowired
    @Lazy
    private IGuideCardBatchService guideCardBatchService;
    @Autowired
    private IFlowMyBusinessService flowMyBusinessService;
    @Autowired
    private IFlowTaskService flowTaskService;
    /*备份处理*/
    @Override
@@ -472,6 +479,14 @@
        b = docRelativeService.deleteByDocId(id);
        if(!b)
            ExceptionCast.cast(CommonCode.FAIL);
        //强制结束流程 删除用户的此待办任务
        List<DispatchFile> dispatchFiles=dispatchFileService.list(new QueryWrapper<DispatchFile>().eq("doc_id",id));
        if (dispatchFiles != null && !dispatchFiles.isEmpty()) {
            FlowMyBusiness flowMyBusiness = flowMyBusinessService.selectByDataId(dispatchFiles.get(0).getId());
            if (flowMyBusiness != null) {
                flowTaskService.end(flowMyBusiness.getProcessInstanceId(), "删除文档");
            }
        }
        return super.removeById(id);
    }