From 69abc2fe603e5e6282e6ff6d70463f93fdadce52 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期二, 18 十一月 2025 15:33:18 +0800
Subject: [PATCH] *

---
 src/main/resources/mapper/OrderDetlPakoutMapper.xml |   83 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/OrderDetlPakoutMapper.xml b/src/main/resources/mapper/OrderDetlPakoutMapper.xml
index 7fc6c63..aacf6a5 100644
--- a/src/main/resources/mapper/OrderDetlPakoutMapper.xml
+++ b/src/main/resources/mapper/OrderDetlPakoutMapper.xml
@@ -50,6 +50,60 @@
 
     </resultMap>
 
+    <!-- 鏄庣粏瑙嗗浘B鐨勯�氱敤鏌ヨ鏄犲皠缁撴灉 -->
+    <resultMap id="PakoutDetailResultMap" type="com.zy.asrs.entity.result.OrderPakoutDetailVo">
+        <id column="id" property="id" jdbcType="BIGINT"/>
+        <result column="row" property="row" jdbcType="BIGINT"/>
+        <result column="item_name" property="itemName" jdbcType="VARCHAR"/>
+        <result column="matnr" property="matnr" jdbcType="VARCHAR"/>
+        <result column="batch" property="batch" jdbcType="VARCHAR"/>
+        <result column="model" property="model" jdbcType="VARCHAR"/>
+        <result column="origin" property="origin" jdbcType="VARCHAR"/>
+        <result column="danger" property="danger" jdbcType="INTEGER"/>
+        <result column="status" property="status" jdbcType="INTEGER"/>
+        <result column="specs" property="specs" jdbcType="VARCHAR"/>
+        <result column="brand" property="brand" jdbcType="VARCHAR"/>
+        <result column="price" property="price" jdbcType="DECIMAL"/>
+        <result column="weight" property="weight" jdbcType="DECIMAL"/>
+        <result column="roughWeight" property="roughWeight" jdbcType="DECIMAL"/>
+        <result column="volume" property="volume" jdbcType="DECIMAL"/>
+
+        <!-- 鏁伴噺瀛楁 -->
+        <result column="anfme" property="anfme" jdbcType="DECIMAL"/>
+        <result column="qty" property="qty" jdbcType="DECIMAL"/>
+        <result column="units" property="units" jdbcType="DECIMAL"/>
+        <result column="safe_qty" property="safeQty" jdbcType="DECIMAL"/>
+        <result column="work_qty" property="workQty" jdbcType="DECIMAL"/>
+
+        <!-- 鍏朵粬瀛楁 -->
+        <result column="order_id" property="orderId" jdbcType="BIGINT"/>
+        <result column="order_no" property="orderNo" jdbcType="VARCHAR"/>
+        <result column="maktx" property="maktx" jdbcType="VARCHAR"/>
+        <result column="color" property="color" jdbcType="VARCHAR"/>
+        <result column="unit" property="unit" jdbcType="VARCHAR"/>
+        <result column="sku" property="sku" jdbcType="VARCHAR"/>
+        <result column="barcode" property="barcode" jdbcType="VARCHAR"/>
+        <result column="manu" property="manu" jdbcType="VARCHAR"/>
+        <result column="manu_date" property="manuDate" jdbcType="VARCHAR"/>
+        <result column="item_num" property="itemNum" jdbcType="VARCHAR"/>
+        <result column="length" property="length" jdbcType="DECIMAL"/>
+        <result column="three_code" property="threeCode" jdbcType="VARCHAR"/>
+        <result column="supp" property="supp" jdbcType="VARCHAR"/>
+        <result column="supp_code" property="suppCode" jdbcType="VARCHAR"/>
+        <result column="be_batch" property="beBatch" jdbcType="INTEGER"/>
+        <result column="dead_time" property="deadTime" jdbcType="VARCHAR"/>
+        <result column="dead_warn" property="deadWarn" jdbcType="INTEGER"/>
+        <result column="source" property="source" jdbcType="INTEGER"/>
+        <result column="inspect" property="inspect" jdbcType="INTEGER"/>
+        <result column="tk_type" property="tkType" jdbcType="INTEGER"/>
+        <result column="roll_up" property="rollUp" jdbcType="BIGINT"/>
+        <result column="create_by" property="createBy" jdbcType="BIGINT"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="update_by" property="updateBy" jdbcType="BIGINT"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="memo" property="memo" jdbcType="VARCHAR"/>
+    </resultMap>
+
     <select id="selectItem" resultMap="BaseResultMap">
         select * from man_order_detl_pakout
         where 1=1
@@ -202,4 +256,33 @@
         </choose>
     </update>
 
+    <select id="selectOrderPakoutDetailVoList" resultMap="PakoutDetailResultMap">
+        select d.* from (
+            select
+            ROW_NUMBER() over (order by c.update_time desc) as row1,
+            c.* from (
+                select a.* from v_pakout_detail as a
+                where 1=1
+                <if test="itemName != null and itemName != ''">
+                    AND item_name LIKE CONCAT('%', #{itemName}, '%')
+                </if>
+            ) as c
+        ) as d
+        where d.row1 between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) order by d.update_time desc
+    </select>
+
+    <select id="selectOrderPakoutDetailVoListV1" resultMap="PakoutDetailResultMap">
+        select a.* from v_pakout_detail as a
+        where 1=1
+        AND item_name = #{itemName}
+    </select>
+
+    <select id="selectOrderPakoutDetailVoListTotal" resultType="Long">
+        SELECT count(1) FROM v_pakout_detail
+        WHERE 1 = 1
+        <if test="itemName != null and itemName != ''">
+            AND item_name LIKE CONCAT('%', #{itemName}, '%')
+        </if>
+    </select>
+
 </mapper>

--
Gitblit v1.9.1