| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.HfTemplateCategoryEnum; |
| | | import org.jeecg.modules.eam.constant.OrderCreationMethodEnum; |
| | | import org.jeecg.modules.eam.constant.TechnicalStatusEvaluationOrderStatusEnum; |
| | | import org.jeecg.modules.eam.constant.*; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationOrderMapper; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderQuery; |
| | |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationStandardService standardService; |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationStandardDetailService standardDetailService; |
| | | @Autowired |
| | | private IEamBaseHFCodeService hfCodeService; |
| | | @Autowired |
| | |
| | | if (standard == null) { |
| | | throw new JeecgBootException("技术状态鉴定规范不存在,添加失败!"); |
| | | } |
| | | if (!TechnicalStatusEvaluationStandardStatusEnum.ENABLE.name().equals(standard.getStandardStatus())) { |
| | | throw new JeecgBootException("技术状态鉴定规范未启用,添加失败!"); |
| | | } |
| | | List<EamTechnicalStatusEvaluationStandardDetail> standardDetailList = standardDetailService.queryList(standard.getId()); |
| | | if (CollectionUtil.isEmpty(standardDetailList)) { |
| | | throw new JeecgBootException("技术状态鉴定规范检查项为空,添加失败!"); |
| | | } |
| | | EamTechnicalStatusEvaluationOrder order = new EamTechnicalStatusEvaluationOrder(); |
| | | order.setOrderNum(request.getOrderNum()); |
| | | order.setEquipmentId(request.getEquipmentId()); |
| | |
| | | order.setHfCodeC(eamBaseHFCode.getHfCode()); |
| | | this.getBaseMapper().insert(order); |
| | | //处理明细数据 |
| | | if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { |
| | | request.getTableDetailList().forEach(tableDetail -> { |
| | | tableDetail.setId(null); |
| | | tableDetail.setCreateBy(null); |
| | | tableDetail.setCreateTime(null); |
| | | tableDetail.setUpdateBy(null); |
| | | tableDetail.setUpdateTime(null); |
| | | tableDetail.setOrderId(order.getId()); |
| | | }); |
| | | orderDetailService.saveBatch(request.getTableDetailList()); |
| | | } |
| | | List<EamTechnicalStatusEvaluationOrderDetail> orderDetailList = standardDetailList.stream().map(item -> new EamTechnicalStatusEvaluationOrderDetail(item, order.getId())).collect(Collectors.toList()); |
| | | orderDetailService.saveBatch(orderDetailList); |
| | | return true; |
| | | } |
| | | |
| | |
| | | variables.put("other_check", userApprovalList); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_0); |
| | | } else { |
| | | variables.put("hasOtherCheck ", CommonConstant.STATUS_0); |
| | | variables.put("hasOtherCheck", CommonConstant.STATUS_0); |
| | | variables.put("other_check", userApprovalList); |
| | | } |
| | | Result<?> result = flowDefinitionService.startProcessInstanceByKey("technical_status_evaluation_process", variables); |
| | |
| | | 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()); |
| | |
| | | } |
| | | if ("safety_equipment_check".equals(flowMyBusiness.getTaskNameId())) { |
| | | //执行安全检查 |
| | | if(CommonConstant.STATUS_1.equals(entity.getSafetyCheckCompleted())) { |
| | | values.put("safetyEquipmentCheckFlag", request.getSafetyCheckConfirmResult()); |
| | | entity.setSafetyCheckConfirmResult(request.getSafetyCheckConfirmResult()); |
| | | entity.setSafetyCheckConfirm(user.getUsername()); |
| | | entity.setSafetyCheckConfirmTime(new Date()); |
| | | entity.setSafetyCheckConfirmComment(request.getSafetyCheckConfirmComment()); |
| | | //维修室主任审批 |
| | | if(!CommonConstant.STATUS_1.equals(request.getSafetyCheckConfirmResult())) { |
| | | //驳回 给监察人 |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | }else { |
| | | //安全装置检查结果填报 |
| | | if(CollectionUtil.isNotEmpty(request.getTableDetailList())) { |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : request.getTableDetailList()) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(request.getTableDetailList()); |
| | | } |
| | | //安全装置检查结果填报 |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.SAFETY_EQUIPMENT_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if (CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("安全装置检查项明细为空!"); |
| | | } |
| | | //结果项检查 |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.SAFETY_EQUIPMENT_CHECK); |
| | | //添加操作人信息 |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_1); |
| | | } else if ("safety_equipment_check_confirm".equals(flowMyBusiness.getTaskNameId()) && CommonConstant.STATUS_1.equals(entity.getSafetyCheckCompleted())) { |
| | | values.put("safetyEquipmentCheckFlag", request.getSafetyCheckConfirmResult()); |
| | | entity.setSafetyCheckConfirmResult(request.getSafetyCheckConfirmResult()); |
| | | entity.setSafetyCheckConfirm(user.getUsername()); |
| | | entity.setSafetyCheckConfirmTime(new Date()); |
| | | entity.setSafetyCheckConfirmComment(request.getSafetyCheckConfirmComment()); |
| | | //维修室主任审批 |
| | | if (!CommonConstant.STATUS_1.equals(request.getSafetyCheckConfirmResult())) { |
| | | //驳回 给监察人 |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_1); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } else if ("equipment_precision_check".equals(flowMyBusiness.getTaskNameId())) { |
| | | //处理精度检验 |
| | | if(CommonConstant.STATUS_1.equals(entity.getPrecisionCheckCompleted())) { |
| | | values.put("precisionCheckFlag", request.getPrecisionCheckConfirmResult()); |
| | | entity.setPrecisionCheckConfirmResult(request.getPrecisionCheckConfirmResult()); |
| | | entity.setPrecisionCheckConfirm(user.getUsername()); |
| | | entity.setPrecisionCheckConfirmTime(new Date()); |
| | | entity.setPrecisionCheckConfirmComment(request.getPrecisionCheckConfirmComment()); |
| | | //维修室主任审批 |
| | | if(!CommonConstant.STATUS_1.equals(request.getPrecisionCheckConfirmResult())) { |
| | | //驳回 给监察人 |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | }else { |
| | | //设备精度检查结果填报 |
| | | if(CollectionUtil.isNotEmpty(request.getTableDetailList())) { |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : request.getTableDetailList()) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(request.getTableDetailList()); |
| | | } |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_1); |
| | | //设备精度检查结果填报 |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.PRECISION_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if (CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("设备精度检查项明细为空!"); |
| | | } |
| | | |
| | | } else if("other_check".equals(flowMyBusiness.getTaskNameId())) { |
| | | //处理其他检查 |
| | | if(CommonConstant.STATUS_1.equals(entity.getOtherCheckCompleted())) { |
| | | values.put("otherCheckFlag", request.getOtherCheckResult()); |
| | | entity.setOtherCheckResult(request.getOtherCheckConfirmResult()); |
| | | entity.setOtherCheckConfirm(user.getUsername()); |
| | | entity.setOtherCheckConfirmTime(new Date()); |
| | | entity.setOtherCheckConfirmComment(request.getOtherCheckConfirmComment()); |
| | | //维修室主任审批 |
| | | if(!CommonConstant.STATUS_1.equals(request.getOtherCheckConfirmResult())) { |
| | | //驳回 给监察人 |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | }else { |
| | | //其他检查结果填报 |
| | | if(CollectionUtil.isNotEmpty(request.getTableDetailList())) { |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : request.getTableDetailList()) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(request.getTableDetailList()); |
| | | } |
| | | //结果项检查 |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.PRECISION_CHECK); |
| | | //添加操作人信息 |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_1); |
| | | } else if ("equipment_precision_check_confirm".equals(flowMyBusiness.getTaskNameId()) && CommonConstant.STATUS_1.equals(entity.getPrecisionCheckCompleted())) { |
| | | values.put("precisionCheckFlag", request.getPrecisionCheckConfirmResult()); |
| | | entity.setPrecisionCheckConfirmResult(request.getPrecisionCheckConfirmResult()); |
| | | entity.setPrecisionCheckConfirm(user.getUsername()); |
| | | entity.setPrecisionCheckConfirmTime(new Date()); |
| | | entity.setPrecisionCheckConfirmComment(request.getPrecisionCheckConfirmComment()); |
| | | //维修室主任审批 |
| | | if (!CommonConstant.STATUS_1.equals(request.getPrecisionCheckConfirmResult())) { |
| | | //驳回 给监察人 |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_1); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } else if ("other_check".equals(flowMyBusiness.getTaskNameId())) { |
| | | //处理其他检查 |
| | | //其他检查结果填报 |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.OTHER_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if (CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("其他检查项明细为空!"); |
| | | } |
| | | //结果项检查 |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.OTHER_CHECK); |
| | | //添加操作人信息 |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | values.put("NextAssignee", userApprovalList); |
| | | 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.setOtherCheckConfirmResult(request.getOtherCheckConfirmResult()); |
| | | entity.setOtherCheckConfirm(user.getUsername()); |
| | | entity.setOtherCheckConfirmTime(new Date()); |
| | | entity.setOtherCheckConfirmComment(request.getOtherCheckConfirmComment()); |
| | | //维修室主任审批 |
| | | if (!CommonConstant.STATUS_1.equals(request.getOtherCheckConfirmResult())) { |
| | | //驳回 给监察人 |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } |
| | | break; |
| | | case REPAIRER_SIGNING: |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(),equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008); |
| | | //维修工签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给维修室主任,无法进入下级审批!"); |
| | | } |
| | | //维修工签字 |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", "维修工签字完成"); |
| | |
| | | entity.setOtherCheckResult(request.getOtherCheckResult()); |
| | | break; |
| | | case REPAIR_MANAGER_SIGNING: |
| | | // values.put("dataId", entity.getId()); |
| | | // values.put("organization", request.getLeaderConfirmComment()); |
| | | // values.put("comment", request.getLeaderConfirmComment()); |
| | | // request.setComment(request.getLeaderConfirmComment()); |
| | | // //设置entity |
| | | // entity.setMaintenanceStatus(ThirdMaintenanceStatusEnum.COMPLETE.name()); |
| | | // entity.setConfirmLeader(user.getUsername()); |
| | | // entity.setLeaderConfirmComment(request.getLeaderConfirmComment()); |
| | | // entity.setLeaderConfirmTime(new Date()); |
| | | //维修室主任签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0007); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给工艺员,无法进入下级审批!"); |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getRepairManagerComment()); |
| | | values.put("comment", request.getRepairManagerComment()); |
| | | request.setComment(request.getRepairManagerComment()); |
| | | values.put("repairManagerApprovalFlag", request.getRepairManagerSignatureResult()); |
| | | entity.setRepairManagerSignature(user.getUsername()); |
| | | entity.setRepairManagerSignatureTime(new Date()); |
| | | entity.setRepairManagerComment(request.getRepairManagerComment()); |
| | | //设置entity |
| | | if (BusinessCodeConst.APPROVED.equals(request.getRepairManagerSignatureResult())) { |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.PROCESS_TECHNICIAN_SIGNING.name()); |
| | | } else { |
| | | userApprovalList = Collections.singletonList(entity.getRepairerSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.REPAIRER_SIGNING.name()); |
| | | } |
| | | // //更新设备保养状态 |
| | | // eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.NORMAL.name()); |
| | | break; |
| | | case PROCESS_TECHNICIAN_SIGNING: |
| | | //工艺员签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0010); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给使用单位技术主管,无法进入下级审批!"); |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getProcessTechnicianComment()); |
| | | values.put("comment", request.getProcessTechnicianComment()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | request.setComment(request.getProcessTechnicianComment()); |
| | | //设置entity |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.DEPART_TECHNICAL_LEADER_SIGNING.name()); |
| | | entity.setProcessTechnicianSignature(user.getUsername()); |
| | | entity.setProcessTechnicianSignatureTime(new Date()); |
| | | entity.setSampleCheckResult(request.getSampleCheckResult()); |
| | | entity.setProcessTechnicianComment(request.getProcessTechnicianComment()); |
| | | break; |
| | | case DEPART_TECHNICAL_LEADER_SIGNING: |
| | | //使用单位技术主管签字 |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0003); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("设备未分配给设备检验员,无法进入下级审批!"); |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getDepartTechnicalLeaderComment()); |
| | | values.put("comment", request.getDepartTechnicalLeaderComment()); |
| | | request.setComment(request.getDepartTechnicalLeaderComment()); |
| | | values.put("technicalLeaderApprovalFlag", request.getDepartTechnicalLeaderSignatureResult()); |
| | | entity.setDepartTechnicalLeaderSignature(user.getUsername()); |
| | | entity.setDepartTechnicalLeaderSignatureTime(new Date()); |
| | | entity.setDepartTechnicalLeaderComment(request.getDepartTechnicalLeaderComment()); |
| | | //设置entity |
| | | if (BusinessCodeConst.APPROVED.equals(request.getDepartTechnicalLeaderSignatureResult())) { |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.PROCESS_TECHNICIAN_SIGNING.name()); |
| | | } else { |
| | | userApprovalList = Collections.singletonList(entity.getProcessTechnicianSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.INSPECTOR_SIGNING.name()); |
| | | } |
| | | break; |
| | | case INSPECTOR_SIGNING: |
| | | //设备检察员签字 |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", request.getInspectorComment()); |
| | | values.put("comment", request.getInspectorComment()); |
| | | request.setComment(request.getInspectorComment()); |
| | | //设置entity |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.COMPLETED.name()); |
| | | entity.setInspectorSignature(user.getUsername()); |
| | | entity.setInspectorSignatureTime(new Date()); |
| | | entity.setInspectorComment(request.getInspectorComment()); |
| | | entity.setEvaluationResult(request.getEvaluationResult()); |
| | | entity.setEvaluationReason(request.getEvaluationReason()); |
| | | break; |
| | | } |
| | | request.setValues(values); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean updateEvaluationStatus(String orderId, String evaluationStatus) { |
| | | UpdateWrapper<EamTechnicalStatusEvaluationOrder> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.eq("order_id", orderId); |
| | | updateWrapper.set("evaluation_status", evaluationStatus); |
| | | updateWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0); |
| | | updateWrapper.eq("evaluation_status", TechnicalStatusEvaluationOrderStatusEnum.WAIT_EVALUATION.name()); |
| | | int update = this.getBaseMapper().update(null, updateWrapper); |
| | | return update > 0; |
| | | } |
| | | |
| | | private void checkDetailResult(List<EamTechnicalStatusEvaluationOrderDetail> detailList, TechnicalStatusEvaluationCheckCategoryEnum checkCategory) { |
| | | boolean b; |
| | | switch (checkCategory) { |
| | | case SAFETY_EQUIPMENT_CHECK: |
| | | b = detailList.stream().allMatch(item -> StringUtils.isNotBlank(item.getSafetyEquipmentCheckResult())); |
| | | if (!b) { |
| | | throw new JeecgBootException("有安全装置检查结果未填写!"); |
| | | } |
| | | break; |
| | | case PRECISION_CHECK: |
| | | b = detailList.stream().allMatch(item -> item.getPrecisionCheckResult() != null); |
| | | if (!b) { |
| | | throw new JeecgBootException("有设备精度检查结果未填写!"); |
| | | } |
| | | break; |
| | | case OTHER_CHECK: |
| | | b = detailList.stream().allMatch(item -> StringUtils.isNotBlank(item.getOtherCheckResult())); |
| | | if (!b) { |
| | | throw new JeecgBootException("有其他检查结果未填写!"); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void afterFlowHandle(FlowMyBusiness business) { |
| | | business.getTaskNameId();//接下来审批的节点 |
| | | business.getValues();//前端传进来的参数 |