| | |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.HfTemplateCategoryEnum; |
| | | import org.jeecg.modules.eam.constant.TechnicalStatusEvaluationApplicationStatusEnum; |
| | | import org.jeecg.modules.eam.entity.EamBaseHFCode; |
| | | import org.jeecg.modules.eam.entity.EamEquipment; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationApplication; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrderChange; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationApplicationMapper; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationApplicationQuery; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationApplicationRequest; |
| | | import org.jeecg.modules.eam.service.IEamBaseHFCodeService; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationApplicationService; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderRequest; |
| | | import org.jeecg.modules.eam.service.*; |
| | | 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; |
| | |
| | | private IFlowTaskService flowTaskService; |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationStandardService evaluationStandardService; |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationStandardDetailService evaluationStandardDetailService; |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationOrderService evaluationOrderService; |
| | | |
| | | @Override |
| | | public IPage<EamTechnicalStatusEvaluationApplication> queryPageList(Page<EamTechnicalStatusEvaluationApplication> page, EamTechnicalStatusEvaluationApplicationQuery query) { |
| | |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设备信息不存在,操作失败!"); |
| | | } |
| | | EamTechnicalStatusEvaluationStandard standard = evaluationStandardService.queryEnableStandard(request.getEquipmentId()); |
| | | if(standard == null) { |
| | | throw new JeecgBootException("设备未配置技术状态鉴定规范,操作失败!"); |
| | | } |
| | | List<EamTechnicalStatusEvaluationStandardDetail> standardDetailList = evaluationStandardDetailService.queryList(standard.getId()); |
| | | if(CollectionUtil.isEmpty(standardDetailList)) { |
| | | throw new JeecgBootException("设备未配置技术状态鉴定规范,操作失败!"); |
| | | } |
| | | //用户数据权限 |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (sysUser == null) { |
| | |
| | | throw new JeecgBootException("只有待提交状态才可编辑!"); |
| | | } |
| | | entity.setRemark(request.getRemark()); |
| | | entity.setEvaluationDate(request.getEvaluationDate()); |
| | | this.getBaseMapper().updateById(entity); |
| | | return true; |
| | | } |
| | |
| | | if(BusinessCodeConst.APPROVED.equals(request.getProductionSupportSignatureResult())) { |
| | | //通过 |
| | | entity.setApplicationStatus(TechnicalStatusEvaluationApplicationStatusEnum.COMPLETED.name()); |
| | | //生成工单 |
| | | EamTechnicalStatusEvaluationStandard standard = evaluationStandardService.queryEnableStandard(request.getEquipmentId()); |
| | | if(standard == null) { |
| | | throw new JeecgBootException("设备未配置技术状态鉴定规范,操作失败!"); |
| | | } |
| | | EamTechnicalStatusEvaluationOrderRequest orderRequest = new EamTechnicalStatusEvaluationOrderRequest(); |
| | | orderRequest.setEquipmentId(equipment.getId()); |
| | | orderRequest.setEvaluationDate(entity.getEvaluationDate()); |
| | | orderRequest.setStandardId(standard.getId()); |
| | | orderRequest.setRemark(entity.getRemark()); |
| | | boolean b = evaluationOrderService.addTechnicalStatusEvaluationOrder(orderRequest); |
| | | if(!b) { |
| | | throw new JeecgBootException("生成技术状态鉴定工单失败!"); |
| | | } |
| | | }else { |
| | | //驳回 |
| | | entity.setApplicationStatus(TechnicalStatusEvaluationApplicationStatusEnum.REJECTED.name()); |