| | |
| | | throw new JeecgBootException("技术状态鉴定规范检查项为空,添加失败!"); |
| | | } |
| | | EamTechnicalStatusEvaluationOrder order = new EamTechnicalStatusEvaluationOrder(); |
| | | order.setOrderNum(request.getOrderNum()); |
| | | order.setEquipmentId(request.getEquipmentId()); |
| | | order.setStandardId(request.getStandardId()); |
| | | order.setEvaluationDate(request.getEvaluationDate()); |
| | |
| | | List<UserSelector> userSelectors; |
| | | switch (status) { |
| | | case UNDER_EVALUATION: |
| | | if(CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | throw new JeecgBootException("检查明细信息为空!"); |
| | | } |
| | | boolean parallelCompletion = flowTaskService.checkParallelCompletion(flowMyBusiness.getTaskId()); |
| | | //执行完成 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008); |
| | |
| | | values.put("comment", "技术状态鉴定执行结束"); |
| | | request.setComment("技术状态鉴定执行结束"); |
| | | //设置entity |
| | | if (parallelCompletion) { |
| | | if (CommonConstant.STATUS_1.equals(entity.getSafetyCheckCompleted()) |
| | | && CommonConstant.STATUS_1.equals(entity.getPrecisionCheckCompleted()) |
| | | && CommonConstant.STATUS_1.equals(entity.getOtherCheckCompleted()) |
| | | && parallelCompletion) { |
| | | //多个任务都已完成且维修室主任都已审批通过,会签完成,进行维修工签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0002); |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_1); |
| | | } else if ("other_check_confirm".equals(flowMyBusiness.getTaskNameId()) && CommonConstant.STATUS_1.equals(entity.getOtherCheckCompleted())) { |
| | | values.put("otherCheckFlag", request.getOtherCheckConfirmResult()); |
| | | entity.setOtherCheckResult(request.getOtherCheckConfirmResult()); |
| | | entity.setOtherCheckConfirmResult(request.getOtherCheckConfirmResult()); |
| | | entity.setOtherCheckConfirm(user.getUsername()); |
| | | entity.setOtherCheckConfirmTime(new Date()); |
| | | entity.setOtherCheckConfirmComment(request.getOtherCheckConfirmComment()); |
| | |
| | | entity.setRepairManagerSignature(user.getUsername()); |
| | | entity.setRepairManagerSignatureTime(new Date()); |
| | | entity.setRepairManagerComment(request.getRepairManagerComment()); |
| | | entity.setRepairManagerSignatureResult(request.getRepairManagerSignatureResult()); |
| | | //设置entity |
| | | if (BusinessCodeConst.APPROVED.equals(request.getRepairManagerSignatureResult())) { |
| | | values.put("NextAssignee", userApprovalList); |
| | |
| | | entity.setDepartTechnicalLeaderSignature(user.getUsername()); |
| | | entity.setDepartTechnicalLeaderSignatureTime(new Date()); |
| | | entity.setDepartTechnicalLeaderComment(request.getDepartTechnicalLeaderComment()); |
| | | entity.setDepartTechnicalLeaderSignatureResult(request.getDepartTechnicalLeaderSignatureResult()); |
| | | //设置entity |
| | | if (BusinessCodeConst.APPROVED.equals(request.getDepartTechnicalLeaderSignatureResult())) { |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.PROCESS_TECHNICIAN_SIGNING.name()); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.INSPECTOR_SIGNING.name()); |
| | | } else { |
| | | userApprovalList = Collections.singletonList(entity.getProcessTechnicianSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.INSPECTOR_SIGNING.name()); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.PROCESS_TECHNICIAN_SIGNING.name()); |
| | | } |
| | | break; |
| | | case INSPECTOR_SIGNING: |