From 5c3742eca3b35c96f66c53b8dfabcb6848e03a7d Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期三, 13 十二月 2023 16:46:19 +0800
Subject: [PATCH] 修改

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentMapper.java            |    1 +
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java |    1 +
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml         |    3 +++
 lxzn-module-system/lxzn-system-start/src/main/resources/db/2023_12_11(lnl)/lnl.sql            |   24 ++++++++++++++++++++++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java    |    9 ++++++++-
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/Equipment.java                     |    2 ++
 6 files changed, 39 insertions(+), 1 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
index 9b570d0..5f74945 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
@@ -788,6 +788,8 @@
 										 .setPropertyStatus(equipmentImportVo.getPropertyStatus())
 										 .setWarrantyStart(equipmentImportVo.getWarrantyStart())
 										 .setWarrantyEnd(equipmentImportVo.getWarrantyEnd())
+										 .setIsLineEquip("no")
+										 .setIsLine("no")
 										 .setNextTechnologyStatusQualificationTime(equipmentImportVo.getNextTechnologyStatusQualificationTime())
 										 .setGpo(equipmentImportVo.getGpo());
 								 if(equipmentCategory.getEquipmentCategoryUda1().equals("weldingMachine")){
@@ -860,6 +862,7 @@
 	 @Transactional(rollbackFor = {Exception.class})
 	 public Result<?> addLine(@RequestBody Equipment equipment){
 	 	 equipment.setIsLineEquip("no");
+	 	 equipment.setIsLine("yes");
 	 	 equipmentService.save(equipment);
 	 	 List<Equipment> equipmentList = equipment.getEquipmentOfLineTable();
 	 	 for(Equipment equipment1:equipmentList){
@@ -874,7 +877,11 @@
 	 @Transactional(rollbackFor = {Exception.class})
 	 public Result<?> editLine(@RequestBody Equipment equipment){
 		 equipmentService.updateById(equipment);
-		 equipmentService.update(new UpdateWrapper<Equipment>().eq("line_id",equipment.getId()).set("line_id",null).set("is_meta",null));
+		 equipmentService.update(new UpdateWrapper<Equipment>()
+				 .eq("line_id",equipment.getId())
+				 .set("line_id",null)
+				 .set("is_meta",null)
+				 .set("is_line_equip","no"));
 		 List<Equipment> equipmentList = equipment.getEquipmentOfLineTable();
 		 for(Equipment equipment1:equipmentList){
 			 equipment1.setLineId(equipment.getId());
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/Equipment.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/Equipment.java
index 6e1dd19..e4adf94 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/Equipment.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/Equipment.java
@@ -394,6 +394,8 @@
     private String isLineEquip;
     @Dict(dicCode = "is_product")
     private String isJudging;
+    @Dict(dicCode = "is_product")
+    private String isLine;
 
 
 }
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentMapper.java
index 410caae..c23dbac 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentMapper.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentMapper.java
@@ -80,6 +80,7 @@
                                        @Param("warrantyEnd")Date warrantyEnd,
                                         @Param("lineId")String lineId,
                                         @Param("isLineEquip")String isLineEquip,
+                                       @Param("isLine")String isLine,
                                        @Param("sql")String sql
     );
     List<DailyInspectionStandardDetail>  getStandardList(Page<DailyInspectionStandardDetail> page,@Param("mainId") String mainId,@Param("type")String type);
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml
index 8622ac1..7026233 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml
@@ -292,6 +292,9 @@
         <if test="isLineEquip != null and  isLineEquip != ''">
             and t1.is_line_equip = #{isLineEquip}
         </if>
+        <if test="isLine != null and  isLine != ''">
+            and t1.is_line = #{isLine}
+        </if>
         <if test="specificEquipment != null and  specificEquipment != ''">
             and t1.specific_equipment = #{specificEquipment}
         </if>
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java
index a7d291d..63e1fc0 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java
@@ -117,6 +117,7 @@
                 equipment.getWarrantyEnd(),
                 equipment.getLineId(),
                 equipment.getIsLineEquip(),
+                equipment.getIsLine(),
                 sql
         ));
     }
diff --git "a/lxzn-module-system/lxzn-system-start/src/main/resources/db/2023_12_11\050lnl\051/lnl.sql" "b/lxzn-module-system/lxzn-system-start/src/main/resources/db/2023_12_11\050lnl\051/lnl.sql"
index 5de1d5c..6c223d6 100644
--- "a/lxzn-module-system/lxzn-system-start/src/main/resources/db/2023_12_11\050lnl\051/lnl.sql"
+++ "b/lxzn-module-system/lxzn-system-start/src/main/resources/db/2023_12_11\050lnl\051/lnl.sql"
@@ -32,3 +32,27 @@
     'SCHEMA', N'dbo',
     'TABLE', N'mom_eam_equipment',
     'COLUMN', N'is_judging'
+-- 鏄惁鐢熶骇绾�
+ALTER TABLE [dbo].[mom_eam_equipment] ADD [is_line] nvarchar NULL
+    GO
+
+    EXEC sp_addextendedproperty
+    'MS_Description', N'鏄惁鐢熶骇绾匡紙鏄細yes锛屽惁锛歯o锛�',
+    'SCHEMA', N'dbo',
+    'TABLE', N'mom_eam_equipment',
+    'COLUMN', N'is_line'
+-- 淇敼瀛楁闀垮害
+ALTER TABLE [dbo].[mom_eam_equipment] ALTER COLUMN [is_line] nvarchar(32) COLLATE Chinese_PRC_CI_AS NULL
+-- 鐢熶骇绾挎柊澧炵紪杈戝垹闄ゆ寜閽潈闄�
+INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734844168171163649', N'1726425666842873858', N'鐢熶骇绾挎柊澧炵紪杈戝垹闄�', NULL, NULL, NULL, NULL, 2, N'line:add&edit&delete', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 15:54:16.2070000', NULL, NULL, 0, NULL, N'1', 0);
+-- 鏁呴殰鎶ヤ慨鎸夐挳鏉冮檺
+INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734845810551558146', N'1647845301102936065', N'鏁呴殰鎶ヤ慨鏂板缂栬緫鎸夐挳鏉冮檺', NULL, NULL, NULL, NULL, 2, N'report:add&edit', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:00:47.7700000', NULL, NULL, 0, NULL, N'1', 0);
+INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734846510299877378', N'1647845301102936065', N'鏁呴殰鎶ヤ慨楠屾敹鎸夐挳鏉冮檺', NULL, NULL, NULL, NULL, 2, N'report:accept', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:03:34.6030000', NULL, NULL, 0, NULL, N'1', 0);
+-- 缁翠慨灞ュ巻鎸夐挳鏉冮檺
+INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734847324137459714', N'1650423515662295042', N'缁翠慨灞ュ巻棰嗗彇鎸夐挳鏉冮檺', NULL, NULL, NULL, NULL, 2, N'repair:accept', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:06:48.6370000', NULL, NULL, 0, NULL, N'1', 0);
+INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734847789482905601', N'1650423515662295042', N'缁翠慨灞ュ巻鎵ц鎸夐挳鏉冮檺', NULL, NULL, NULL, NULL, 2, N'repair:excute', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:08:39.5970000', NULL, NULL, 0, NULL, N'1', 0);
+-- 浜嬫晠鐧昏鎸夐挳鏉冮檺
+INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734851460430041089', N'1723876722224013314', N'纭鎸夐挳鏉冮檺', NULL, NULL, NULL, NULL, 2, N'quanlity:confirm', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:23:14.8040000', NULL, NULL, 0, NULL, N'1', 0);
+INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734851932285046785', N'1723878256194232322', N'纭鎸夐挳鏉冮檺', NULL, NULL, NULL, NULL, 2, N'fault:confirm', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:25:07.3090000', NULL, NULL, 0, NULL, N'1', 0);
+INSERT INTO [dbo].[sys_permission] ([id], [parent_id], [name], [url], [component], [component_name], [redirect], [menu_type], [perms], [perms_type], [sort_no], [always_show], [icon], [is_route], [is_leaf], [keep_alive], [hidden], [hide_tab], [description], [create_by], [create_time], [update_by], [update_time], [del_flag], [rule_flag], [status], [internal_or_external]) VALUES (N'1734852409726865409', N'1723878256194232322', N'褰曞叆鎸夐挳鏉冮檺', NULL, NULL, NULL, NULL, 2, N'fault:update', N'1', NULL, 0, NULL, 1, 1, 0, 0, 0, NULL, N'admin', '2023-12-13 16:27:01.1330000', NULL, NULL, 0, NULL, N'1', 0);
+

--
Gitblit v1.9.3