From 539d9ffc477d28a23a923b41fdeabc8c37c99ce6 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期一, 23 九月 2024 14:43:31 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/MatMapper.xml |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/MatMapper.xml b/src/main/resources/mapper/MatMapper.xml
index 3a5c151..b405ce5 100644
--- a/src/main/resources/mapper/MatMapper.xml
+++ b/src/main/resources/mapper/MatMapper.xml
@@ -34,7 +34,7 @@
         <result column="dead_time" property="deadTime" />
         <result column="dead_warn" property="deadWarn" />
         <result column="source" property="source" />
-        <result column="check" property="check" />
+        <result column="inspect" property="inspect" />
         <result column="danger" property="danger" />
         <result column="status" property="status" />
         <result column="create_by" property="createBy" />
@@ -42,8 +42,10 @@
         <result column="update_by" property="updateBy" />
         <result column="update_time" property="updateTime" />
         <result column="memo" property="memo" />
-
         <result column="stock" property="stock" />
+        <result column="inventory_max" property="inventoryMax" />
+        <result column="inventory_min" property="inventoryMin" />
+        <result column="inventory_age_max" property="inventoryAgeMax" />
     </resultMap>
 
     <select id="listByPage" resultMap="BaseResultMap">
@@ -60,6 +62,7 @@
             group by matnr
         ) as mld on mld.matnr = mm.matnr
         WHERE 1=1
+        and (mm.memo is null or mm.memo != '鎵撳寘涓婄嚎')
         AND (CHARINDEX(','+#{tagId}+',', ','+mt.path+',') > 0 OR mt.id = #{tagId})
         <if test="matnr != null and matnr != ''">
             and mm.matnr like concat('%',#{matnr},'%')
@@ -73,4 +76,21 @@
     <select id="selectByMatnr" resultMap="BaseResultMap">
         select top 1 * from man_mat where 1=1 and matnr = #{matnr}
     </select>
+    <select id="selectAllPage" resultMap="BaseResultMap">
+        select * from
+        (
+        SELECT
+        ROW_NUMBER() over (order by v.matnr desc) as row,
+        v.*
+        FROM man_mat v
+        WHERE 1=1
+        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+    </select>
+    <select id="selectAllPageSize" resultType="java.lang.Integer">
+        select
+        count(1)
+        FROM man_mat v
+        WHERE 1=1
+
+    </select>
 </mapper>

--
Gitblit v1.9.1