| | |
| | | eamThirdMaintenanceOrderMapper.updateById(entity); |
| | | |
| | | //启动流程 |
| | | flowCommonService.initActBusiness("工单号:" + entity.getOrderNum() + ";设备编号: " + equipment.getEquipmentCode() + (equipment.getInstallationPosition() == null ? "" : ";安装位置: " + equipment.getInstallationPosition()), |
| | | flowCommonService.initActBusiness("工单号:" + entity.getOrderNum() + ";设备编号: " + equipment.getEquipmentCode(), |
| | | entity.getId(), "IEamThirdMaintenanceOrderService", "third_maintenance_process", null); |
| | | Map<String, Object> variables = new HashMap<>(); |
| | | variables.put("dataId", entity.getId()); |
| | |
| | | values.put("dataId", order.getId()); |
| | | values.put("organization", "技术状态鉴定结束"); |
| | | values.put("comment", "技术状态鉴定结束"); |
| | | if (CommonConstant.YN_O.equals(request.getFullyFunctional()) && CommonConstant.YN_O.equals(request.getRunningNormally())) { |
| | | if (CommonConstant.YN_1.equals(request.getFullyFunctional()) && CommonConstant.YN_1.equals(request.getRunningNormally())) { |
| | | values.put("confirmation", "1"); |
| | | // 获取下一步执行人 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0002); |
| | |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | request.setComment("检查人检查结束"); |
| | | //更新设备保养状态 |
| | | eamEquipmentExtendService.updateEquipmentMaintenanceStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_THIRD_MAINTENANCE.name()); |
| | | } else { |
| | | values.put("confirmation", "2"); |
| | | } |
| | | request.setComment("检查人检查结束"); |
| | | break; |
| | | case UNDER_MAINTENANCE: |
| | | // 保养结束 |
| | |
| | | values.put("organization", "保养人保养结束"); |
| | | values.put("comment", "保养人保养结束"); |
| | | // 获取下一步执行人 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0002); |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0003); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给维修工,无法进入下级审批!"); |
| | | throw new JeecgBootException("设备未分配给设备检验员,无法进入下级审批!"); |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("NextAssignee", userApprovalList); |
| | |
| | | order.setFullyFunctional(request.getFullyFunctional()); |
| | | order.setRunningNormally(request.getRunningNormally()); |
| | | order.setInspectTime(new Date()); |
| | | if (CommonConstant.YN_O.equals(request.getFullyFunctional()) && CommonConstant.YN_O.equals(request.getRunningNormally())) { |
| | | if (CommonConstant.YN_1.equals(request.getFullyFunctional()) && CommonConstant.YN_1.equals(request.getRunningNormally())) { |
| | | // 鉴定通过 |
| | | order.setMaintenanceStatus(ThirdMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); |
| | | } else { |