From f3a7d211a4a616d8ed2a08b103d8d162f06d389e Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 07 八月 2025 17:23:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml |   65 +++++++++++++++++---------------
 1 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml b/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml
index b629b67..c51a68b 100644
--- a/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml
+++ b/lxzn-module-tms/src/main/java/org/jeecg/modules/tms/mapper/xml/BaseToolsMapper.xml
@@ -13,6 +13,7 @@
             t.standard_code standardCode,
             t.tool_model toolModel,
             t.parama_table_name paramaTableName,
+            t.tool_picture toolPicture,
             t1.application_type applicationType,
             t1.supplier_id supplierId,
             t1.province_city provinceCity,
@@ -81,6 +82,7 @@
             t.standard_code standardCode,
             t.tool_model toolModel,
             t.parama_table_name paramaTableName,
+            t.tool_picture toolPicture,
             t1.application_type applicationType,
             t1.supplier_id supplierId,
             t1.province_city provinceCity,
@@ -113,6 +115,7 @@
             t.standard_code standardCode,
             t.tool_model toolModel,
             t.parama_table_name paramaTableName,
+            t.tool_picture toolPicture,
             t1.application_type applicationType,
             t1.supplier_id supplierId,
             t1.province_city provinceCity,
@@ -171,6 +174,7 @@
             t.standard_code standardCode,
             t.tool_model toolModel,
             t.parama_table_name paramaTableName,
+            t.tool_picture toolPicture,
             t1.application_type applicationType,
             t1.supplier_id supplierId,
             t1.province_city provinceCity,
@@ -238,6 +242,7 @@
             t.standard_code standardCode,
             t.tool_model toolModel,
             t.parama_table_name paramaTableName,
+            t.tool_picture toolPicture,
             t1.application_type applicationType,
             t1.supplier_id supplierId,
             t1.province_city provinceCity,
@@ -309,6 +314,7 @@
             t.standard_code standardCode,
             t.tool_model toolModel,
             t.parama_table_name paramaTableName,
+            t.tool_picture toolPicture,
             t1.application_type applicationType,
             t1.supplier_id supplierId,
             t1.province_city provinceCity,
@@ -359,25 +365,23 @@
 
     <select id="pageWithLedgerAndConfig" resultType="org.jeecg.modules.tms.entity.vo.StocktakingPoundVo">
         SELECT
-        DISTINCT
         t.id,
-        t.classify_id AS classifyId,
+        t.create_time AS createTime,
         t.tool_code AS toolCode,
-        t.foreign_language_name AS foreignLanguageName,
-        t.standard_level AS standardLevel,
-        t.standard_code AS standardCode,
-        t.tool_model AS toolModel,
-        t.parama_table_name AS paramaTableName,
+        t2.tool_model AS toolModel,
+        t2.parama_table_name AS paramaTableName,
         t.tool_id AS toolId,
-        t1.total_count AS totalCount,
-        t1.available_count AS availableCount,
         t3.position_code AS positionCode,
         t3.application_type AS applicationType,
         t3.chinese_name AS chineseName,
         t3.supplier_id AS supplierId,
         t3.storage_location AS storageLocation,
         t3.main_unit AS mainUnit,
-
+        t1.available_count AS availableCount,
+        t1.total_count AS totalCount,
+        t3.warehouse_id AS warehouseId,
+        t4.classify_id AS classifyId,
+        t3.province_city AS provinceCity,
         <!-- 鍔ㄦ�佸瓧娈甸�夋嫨锛屼娇鐢ㄨ〃鍒悕锛堥渶纭繚琛ㄥ凡鍏宠仈锛� -->
         <choose>
             <when test="ew.paramNameValuePairs.paramaTableName == '1'">
@@ -410,10 +414,11 @@
                 c.part_material AS partMaterial
             </otherwise>
         </choose>
-
-        FROM tms_base_tools t
-        LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id
-        LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id
+        FROM tms_tool_ledger_detail t
+        left join tms_tool_ledger t1 ON  t1.tool_id= t.tool_Code
+        left join tms_tools_classify t4 on t4.id = t1.classify_id
+        left join tms_base_tools t2 on t2.id = t.tool_code
+        left join tms_tools_config_property t3 on t3.tool_code = t.tool_code
 
 
         <!-- 鍔ㄦ�佽〃鍏宠仈锛岀‘淇濇墍鏈夋儏鍐甸兘鏈夊搴旂殑 LEFT JOIN -->
@@ -443,8 +448,8 @@
         </choose>
 
         <where>
-            <if test="ew.paramNameValuePairs.toolCode != null and ew.paramNameValuePairs.toolCode != ''">
-                AND t.tool_code LIKE CONCAT('%', #{ew.paramNameValuePairs.toolCode}, '%')
+            <if test="ew.paramNameValuePairs.toolId != null and ew.paramNameValuePairs.toolId != ''">
+                AND t.tool_id LIKE CONCAT('%', #{ew.paramNameValuePairs.toolId}, '%')
             </if>
         </where>
 
@@ -454,19 +459,12 @@
 
     <select id="pageWithSharpedAndConfig" resultType="org.jeecg.modules.tms.entity.vo.SharpeeningVo">
         SELECT
-        DISTINCT
         t.id,
         t.create_time AS createTime,
-        t.classify_id AS classifyId,
         t.tool_code AS toolCode,
-        t.foreign_language_name AS foreignLanguageName,
-        t.standard_level AS standardLevel,
-        t.standard_code AS standardCode,
-        t.tool_model AS toolModel,
-        t.parama_table_name AS paramaTableName,
+        t2.tool_model AS toolModel,
+        t2.parama_table_name AS paramaTableName,
         t.tool_id AS toolId,
-        t1.total_count AS totalCount,
-        t1.available_count AS availableCount,
         t3.position_code AS positionCode,
         t3.application_type AS applicationType,
         t3.chinese_name AS chineseName,
@@ -474,16 +472,21 @@
         t3.storage_location AS storageLocation,
         t3.main_unit AS mainUnit,
         t3.warehouse_id AS warehouseId,
+        t4.classify_id AS classifyId,
         t3.province_city AS provinceCity
-
-        FROM tms_base_tools t
-        LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id
-        LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id
+        FROM tms_tool_ledger_detail t
+        left join tms_tool_ledger t1 ON  t1.tool_id= t.tool_Code
+        left join tms_tools_classify t4 on t4.id = t1.classify_id
+        left join tms_base_tools t2 on t2.id = t.tool_code
+        left join tms_tools_config_property t3 on t3.tool_code = t.tool_code
+--         FROM tms_base_tools t
+--         LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id
+--         LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id
 
 
         <where>
-            <if test="ew.paramNameValuePairs.toolCode != null and ew.paramNameValuePairs.toolCode != ''">
-                AND t.tool_code LIKE CONCAT('%', #{ew.paramNameValuePairs.toolCode}, '%')
+            <if test="ew.paramNameValuePairs.toolId != null and ew.paramNameValuePairs.toolId != ''">
+                AND t.tool_id LIKE CONCAT('%', #{ew.paramNameValuePairs.toolId}, '%')
             </if>
         </where>
 

--
Gitblit v1.9.3