From 0b7bc50347ee1af032eb5e64c82e55fd43f1a93d Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 14 十一月 2025 11:49:54 +0800
Subject: [PATCH] *
---
src/main/resources/mapper/OrderPakoutMapper.xml | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 101 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/OrderPakoutMapper.xml b/src/main/resources/mapper/OrderPakoutMapper.xml
index caf4a69..63141ba 100644
--- a/src/main/resources/mapper/OrderPakoutMapper.xml
+++ b/src/main/resources/mapper/OrderPakoutMapper.xml
@@ -42,6 +42,47 @@
</resultMap>
+ <!-- 涓昏鍥続鐨勯�氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="PakoutMainResultMap" type="com.zy.asrs.entity.result.OrderPakoutMainVo">
+ <result column="id" property="id" jdbcType="BIGINT"/>
+ <result column="row" property="row" jdbcType="BIGINT"/>
+ <result column="item_name" property="itemName" jdbcType="VARCHAR"/>
+ <result column="order_count" property="orderCount" jdbcType="INTEGER"/>
+ <result column="uuid" property="uuid" jdbcType="VARCHAR"/>
+ <result column="order_no" property="orderNo" jdbcType="VARCHAR"/>
+ <result column="order_time" property="orderTime" jdbcType="VARCHAR"/>
+ <result column="doc_type" property="docType" jdbcType="BIGINT"/>
+ <result column="item_id" property="itemId" jdbcType="BIGINT"/>
+ <result column="allot_item_id" property="allotItemId" jdbcType="BIGINT"/>
+ <result column="def_number" property="defNumber" jdbcType="VARCHAR"/>
+ <result column="number" property="number" jdbcType="VARCHAR"/>
+ <result column="cstmr" property="cstmr" jdbcType="BIGINT"/>
+ <result column="cstmr_name" property="cstmrName" jdbcType="VARCHAR"/>
+ <result column="tel" property="tel" jdbcType="VARCHAR"/>
+ <result column="oper_memb" property="operMemb" jdbcType="VARCHAR"/>
+ <result column="total_fee" property="totalFee" jdbcType="DECIMAL"/>
+ <result column="discount" property="discount" jdbcType="DECIMAL"/>
+ <result column="discount_fee" property="discountFee" jdbcType="DECIMAL"/>
+ <result column="other_fee" property="otherFee" jdbcType="DECIMAL"/>
+ <result column="act_fee" property="actFee" jdbcType="DECIMAL"/>
+ <result column="pay_type" property="payType" jdbcType="INTEGER"/>
+ <result column="salesman" property="salesman" jdbcType="VARCHAR"/>
+ <result column="account_day" property="accountDay" jdbcType="INTEGER"/>
+ <result column="post_fee_type" property="postFeeType" jdbcType="INTEGER"/>
+ <result column="post_fee" property="postFee" jdbcType="DECIMAL"/>
+ <result column="pay_time" property="payTime" jdbcType="TIMESTAMP"/>
+ <result column="send_time" property="sendTime" jdbcType="TIMESTAMP"/>
+ <result column="ship_name" property="shipName" jdbcType="VARCHAR"/>
+ <result column="ship_code" property="shipCode" jdbcType="VARCHAR"/>
+ <result column="settle" property="settle" jdbcType="BIGINT"/>
+ <result column="status" property="status" jdbcType="INTEGER"/>
+ <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>
+
<update id="updateSettle">
update man_order_pakout
set settle = #{settle}
@@ -59,6 +100,15 @@
where 1=1
and settle = 4
and status = 1
+ order by create_time asc
+ </select>
+
+ <select id="selectSettle" resultMap="BaseResultMap">
+ select top 5 *
+ from man_order_pakout
+ where 1=1
+ and settle = #{settle}
+ and status = 1
order by create_time asc
</select>
@@ -91,7 +141,57 @@
where 1=1
and item_name = #{itemName}
and order_no != #{orderNo}
- and (settle = 10 or settle = 98)
+ and (settle = 10 or settle = 13 or settle = 98)
</update>
+ <update id="updateItemName">
+ update man_order_pakout
+ set settle = #{settle}
+ ,update_by = #{userId}
+ ,update_time = getdate()
+ where 1=1
+ and item_name = #{itemName}
+ </update>
+
+ <select id="selectOrderPakoutMainVoList" resultMap="PakoutMainResultMap">
+ select d.* from (
+ select
+ ROW_NUMBER() over (order by c.update_time desc) as row1,
+ c.* from (
+ select a.* from v_pakout_main as a
+ where 1=1 AND status = 1
+ <if test="itemName != null and itemName != ''">
+ AND item_name LIKE CONCAT('%', #{itemName}, '%')
+ </if>
+ <if test="cstmrName != null and cstmrName != ''">
+ AND cstmr_name LIKE CONCAT('%', #{cstmrName}, '%')
+ </if>
+ <if test="settle != null and settle != ''">
+ AND settle = #{settle}
+ </if>
+ <if test="status != null and status != ''">
+ AND status = #{status}
+ </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="selectOrderPakoutMainVoListTotal" resultType="Long">
+ SELECT count(1) FROM v_pakout_main
+ WHERE status = 1
+ <if test="itemName != null and itemName != ''">
+ AND item_name LIKE CONCAT('%', #{itemName}, '%')
+ </if>
+ <if test="cstmrName != null and cstmrName != ''">
+ AND cstmr_name LIKE CONCAT('%', #{cstmrName}, '%')
+ </if>
+ <if test="settle != null and settle != ''">
+ AND settle = #{settle}
+ </if>
+ <if test="status != null and status != ''">
+ AND status = #{status}
+ </if>
+ </select>
+
</mapper>
--
Gitblit v1.9.1