| | |
| | | switch (status) { |
| | | case UNDER_MAINTENANCE: |
| | | //执行完成 |
| | | //设备管理员确认 |
| | | String equipmentManager = equipment.getEquipmentManager(); |
| | | if(StringUtils.isBlank(equipmentManager)) { |
| | | throw new JeecgBootException("设备未分配设备管理员,无法进入下级审批!"); |
| | | //车间设备管理员确认 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getOrgId(), BusinessCodeConst.PCR0004); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给车间设备管理员,无法进入下级审批!"); |
| | | } |
| | | userApprovalList = Collections.singletonList(equipmentManager); |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", "二保执行结束"); |
| | | values.put("comment", "二保执行结束"); |
| | |
| | | eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.SECOND_MAINTENANCE_WAIT_CONFIRM.name()); |
| | | break; |
| | | case WAIT_CONFIRM: |
| | | // 维修主任确认 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getOrgId(), BusinessCodeConst.PCR0003); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给车间班组长,无法进入下级审批!"); |
| | | throw new JeecgBootException("设备未分配给维修主任,无法进入下级审批!"); |
| | | } |
| | | //班组长确认 |
| | | //维修主任确认 |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getConfirmComment()); |