From 21cbdad6f59a045910b22bb3bf771e47d56c096f Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期五, 13 六月 2025 11:36:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java
index fbcf6a5..bf8ebff 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java
@@ -41,7 +41,6 @@
import org.jeecg.modules.flowable.apithird.service.FlowCommonService;
import org.jeecg.modules.flowable.service.IFlowDefinitionService;
import org.jeecg.modules.flowable.service.IFlowTaskService;
-import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.IMdcUserProductionService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -50,7 +49,6 @@
import javax.annotation.Resource;
import java.util.*;
-import java.util.stream.Collectors;
/**
* @Description: 鐐规宸ュ崟
@@ -197,8 +195,7 @@
} else {
eamInspectionOrder.setEquipmentCode(equipment.getEquipmentCode());
}
- System.out.println("璁惧鐐规锛�" + eamInspectionOrder.getId());
- flowCommonService.initActBusiness("宸ュ崟鍙凤細" + eamInspectionOrder.getOrderNum() + "璁惧缂栧彿" + eamInspectionOrder.getEquipmentCode() + "杩涜璁惧鐐规",
+ flowCommonService.initActBusiness("宸ュ崟鍙�: " + eamInspectionOrder.getOrderNum() + ";璁惧缂栧彿: " + eamInspectionOrder.getEquipmentCode() + ";瀹夎浣嶇疆: " + equipment.getInstallationPosition(),
eamInspectionOrder.getId(), "IEamInspectionOrderService", "eam_inspection", null);
Map<String, Object> variables = new HashMap<>();
variables.put("dataId", eamInspectionOrder.getId());
@@ -394,17 +391,13 @@
Map<String, Object> values = new HashMap<>();
if (InspectionStatus.UNDER_INSPECTION.name().equals(order.getInspectionStatus()) && user.getUsername().equals(order.getOperator())) {
// 鐐规浜虹偣妫�缁撴潫
- String orgId = Optional.ofNullable(iEamEquipmentService.getById(order.getEquipmentId()))
- .map(equipment -> equipment.getOrgId())
+ String manager = Optional.ofNullable(iEamEquipmentService.getById(order.getEquipmentId()))
+ .map(EamEquipment::getEquipmentManager)
.orElse(null);
- if (orgId == null) {
- throw new IllegalArgumentException("鏈壘鍒拌澶囩殑缁勭粐 ID");
+ if (manager == null) {
+ throw new IllegalArgumentException("璁惧绠$悊鍛樻湭閰嶇疆");
}
- List<SysUser> sysUserList = mdcUserProductionService.queryByPostAndProId("PCR0003", orgId);
- List<String> usernameList = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList());
- if (usernameList.isEmpty()) {
- throw new IllegalArgumentException("鏈壘鍒拌璁惧瀵瑰簲杞﹂棿鐨勭彮缁勯暱锛岃鑱旂郴绠$悊鍛樺鐞�");
- }
+ List<String> usernameList = Collections.singletonList(manager);
values.put("dataId", order.getId());
values.put("organization", "鐐规浜虹偣妫�缁撴潫");
values.put("comment", "鐐规浜虹偣妫�缁撴潫");
--
Gitblit v1.9.3