| | |
| | | import org.jeecg.modules.system.service.IBaseFactoryUserService; |
| | | import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.jeecg.modules.system.vo.UserSelector; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | if(sysUser == null) { |
| | | throw new JeecgBootException("不是维修工,无法领取此工单!"); |
| | | } |
| | | List<UserSelector> userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0002); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给车间班组长,无法进入下级审批!"); |
| | | } |
| | | |
| | | entity.setEvaluator(sysUser.getUsername()); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.UNDER_EVALUATION.name()); |
| | | entity.setActualStartTime(new Date()); |
| | |
| | | variables.put("organization", entity.getRemark()); |
| | | variables.put("comment", entity.getRemark()); |
| | | } |
| | | // variables.put("proofreading", true); |
| | | // List<String> usernames = new ArrayList<>(); |
| | | // usernames.add(entity.getOperator()); |
| | | // variables.put("NextAssignee", usernames); |
| | | variables.put("proofreading", true); |
| | | List<String> usernames = new ArrayList<>(); |
| | | usernames.add(entity.getEquipmentCode()); |
| | | variables.put("NextAssignee", usernames); |
| | | // Result result = flowDefinitionService.startProcessInstanceByKey("second_maintenance_process", variables); |
| | | // if (result != null) { |
| | | // //更新设备保养状态 |