From 654f7d7f98615bc9b1e0fe7e7f13942c89492c11 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期三, 10 九月 2025 18:44:20 +0800
Subject: [PATCH] 设备归还流程审批调整

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java
index dcca6a6..36890f0 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentLeanOutServiceImpl.java
@@ -86,8 +86,6 @@
             //娌℃湁閫夋嫨璁惧锛屾牴鎹溅闂磋繃婊よ澶�
             queryWrapper.exists("select 1 from mdc_user_production t where t.user_id={0} and t.pro_id=e.org_id ", sysUser.getId());
         }
-        //鎺у埗寰呮彁浜ょ姸鎬佺殑鏁版嵁鍙兘鏈汉鏌ョ湅
-        queryWrapper.and(i -> i.ne("wmo.lean_status", EquipmentLeanOutStatusEnum.WAIT_SUBMIT).or().eq("wmo.lean_person", sysUser.getUsername()));
         //鏌ヨ鏉′欢杩囨护
         if (query != null) {
             if (StringUtils.isNotBlank(query.getEquipmentId())) {
@@ -366,6 +364,8 @@
                         entity.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_APPROVAL_IN.name());
                     } else {
                         entity.setLeanStatus(EquipmentLeanOutStatusEnum.REJECT.name());
+                        equipment.setAssetStatus(AssetStatusEnum.NORMAL.name());
+                        eamEquipmentService.updateById(equipment);
                     }
                     break;
                 case WAIT_APPROVAL_IN:
@@ -377,6 +377,8 @@
                         entity.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_RETURN.name());
                     } else {
                         entity.setLeanStatus(EquipmentLeanOutStatusEnum.REJECT.name());
+                        equipment.setAssetStatus(AssetStatusEnum.NORMAL.name());
+                        eamEquipmentService.updateById(equipment);
                     }
                     break;
                 case WAIT_CONFIRM_RETURN:

--
Gitblit v1.9.3