From 40bf019f0b348378385ed0a819b5b06e1708d558 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期六, 09 八月 2025 00:19:37 +0800 Subject: [PATCH] 工作流代码 --- lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java index 21645f0..47ff53c 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java @@ -294,15 +294,27 @@ values.put("comment", eamReportProductHazardsDto.getDeputyDepartmentComment()); values.put("deputyDepartmentResult", eamReportProductHazardsDto.getDeputyDepartmentResult()); eamReportProductHazardsDto.setComment(eamReportProductHazardsDto.getDeputyDepartmentComment()); - eamReportProductHazards.setDeputyDepartment(user.getUsername()); - eamReportProductHazards.setDeputyDepartmentTime(new Date()); - eamReportProductHazards.setDeputyDepartmentResult(eamReportProductHazardsDto.getDeputyDepartmentResult()); - eamReportProductHazards.setDeputyDepartmentComment(eamReportProductHazardsDto.getDeputyDepartmentComment()); + if ("2".equals(eamReportProductHazardsDto.getDeputyDepartmentResult())){ - //鍓儴绾ч瀵兼嫆缁� - eamReportProductHazards.setConfirmStatus(EamReportProductHazardsEnum.REJECTED.name()); + userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0024); + if (CollectionUtil.isEmpty(userSelectors)) { + throw new JeecgBootException("璁惧鏈瓨鍦ㄤ富绠″伐鑹猴紝鏃犳硶杩涘叆椹冲洖鎿嶄綔锛�"); + }else { + userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); + values.put("NextAssignee", userApprovalList); + //鍓儴绾ч瀵兼嫆缁� + eamReportProductHazards.setConfirmStatus(EamReportProductHazardsEnum.PENDING_SUPERIOR_TECHNICAL_CONFIRMATION.name()); + eamReportProductHazards.setTechnologist(null); + eamReportProductHazards.setTechnologistTime(null); + eamReportProductHazards.setTechnologistResult(null); + eamReportProductHazards.setTechnologistComment(null); + } }else { eamReportProductHazards.setConfirmStatus(EamReportProductHazardsEnum.REPAIR_COMPLETED.name()); + eamReportProductHazards.setDeputyDepartment(user.getUsername()); + eamReportProductHazards.setDeputyDepartmentTime(new Date()); + eamReportProductHazards.setDeputyDepartmentResult(eamReportProductHazardsDto.getDeputyDepartmentResult()); + eamReportProductHazards.setDeputyDepartmentComment(eamReportProductHazardsDto.getDeputyDepartmentComment()); } break; default: -- Gitblit v1.9.3