| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.flowable.common.engine.api.FlowableException; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.identitylink.api.IdentityLink; |
| | | import org.flowable.task.api.Task; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | |
| | | import org.jeecg.modules.dncFlow.mapper.AssignEquipmentFileStreamMapper; |
| | | import org.jeecg.modules.dncFlow.service.IAssignEquipmentFileStreamService; |
| | | import org.jeecg.modules.dncFlow.vo.AssignEquipmentFileStreamVo; |
| | | import org.jeecg.modules.dncFlow.vo.DispatchFileFlowTaskVo; |
| | | import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; |
| | | import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; |
| | |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | | import org.jeecg.modules.system.service.IMdcProductionService; |
| | | import org.jeecg.modules.system.service.ISysUserRoleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Lazy; |
| | |
| | | if(productDocInfo==null){ |
| | | return Result.error("未发现该产品结构树对应文档"); |
| | | } |
| | | if (productDocInfo.getDocDispatchStatus()==5){ |
| | | return Result.error("已被定型的文档不能进行升版"); |
| | | } |
| | | //是否又进行的升版 |
| | | AssignEquipmentFileStream productAssignEquipmentFileStream = this.getOne( |
| | | new QueryWrapper<AssignEquipmentFileStream>().eq("doc_id", productDocInfo.getDocId()) |
| | | .isNull("audit_type")); |
| | | if(productAssignEquipmentFileStream!=null){ |
| | | return Result.error("该文档已经进行过升版"); |
| | | } |
| | | //获取产品文档信息对应最新程序加工确认表 |
| | | List<GuideCardBatch> batches = iGuideCardBatchService.list( |
| | | new QueryWrapper<GuideCardBatch>() |
| | |
| | | if(productDocInfo==null){ |
| | | return Result.error("未发现该产品结构树对应文档"); |
| | | } |
| | | //是否又进行的升版 |
| | | AssignEquipmentFileStream productAssignEquipmentFileStream = this.getOne( |
| | | new QueryWrapper<AssignEquipmentFileStream>().eq("doc_id", productDocInfo.getDocId()) |
| | | .isNull("audit_type")); |
| | | if(productAssignEquipmentFileStream!=null){ |
| | | return Result.error("该文档已经进行过升版"); |
| | | } |
| | | //获取设备 |
| | | MdcEquipment mdcEquipment =mdcEquipmentService.getById(assignEquipmentFileStream.getEquipmentId()); |
| | | if (mdcEquipment==null){ |
| | |
| | | values.put("comment", assignEquipmentFileStreamVo.getComment()); |
| | | values.put("organization", assignEquipmentFileStreamVo.getComment()); |
| | | assignEquipmentFileStreamVo.setValues(values); |
| | | assignEquipmentFileStream.setAuditType(assignEquipmentFileStreamVo.getAuditType()); |
| | | assignEquipmentFileStream.setAuditReason(assignEquipmentFileStream.getAuditReason()); |
| | | // 完成流程任务 |
| | | Result result = flowTaskService.complete(assignEquipmentFileStreamVo); |
| | | if (result.isSuccess()) { |