From 76fe27b7b098cda720198aaa157edee4482351b8 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期三, 12 十一月 2025 13:08:16 +0800
Subject: [PATCH] 成品判料改待判
---
src/main/resources/mapper/OrderMapper.xml | 65 ++++++++++++++++++++++++++++++++
1 files changed, 64 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/OrderMapper.xml b/src/main/resources/mapper/OrderMapper.xml
index 6aed376..3266edf 100644
--- a/src/main/resources/mapper/OrderMapper.xml
+++ b/src/main/resources/mapper/OrderMapper.xml
@@ -85,6 +85,38 @@
mo.create_time asc
</select>
+ <select id="selectComplete2" resultMap="BaseResultMap">
+ select
+ top 5 mo.*
+ from
+ man_order mo
+ inner join man_doc_type mt on
+ mo.doc_type = mt.doc_id
+ where
+ mt.pakout = 1
+ and mo.settle = 5
+ and mo.status = 1
+ and mo.doc_type = 26
+ order by
+ mo.create_time asc
+ </select>
+
+ <select id="selectComplete3" resultMap="BaseResultMap">
+ select
+ top 5 mo.*
+ from
+ man_order mo
+ inner join man_doc_type mt on
+ mo.doc_type = mt.doc_id
+ where
+ mt.pakout = 1
+ and mo.settle = 5
+ and mo.status = 1
+ and mo.doc_type = 27
+ order by
+ mo.create_time asc
+ </select>
+
<insert id="addToLogTable">
INSERT INTO man_order_log SELECT * FROM man_order WHERE id = #{id}
</insert>
@@ -111,7 +143,38 @@
and mo.settle = 1
</select>
<select id="selectOrderNosByOrderNoLike" resultType="java.lang.String">
- select order_no from man_order where settle = 4 and order_no like '%' + #{orderNo} + '%'
+ select order_no from man_order where settle = 4 and order_no like '%' + #{orderNo} + '%' and doc_type in(21,23)
+ </select>
+ <select id="getUnfulfilledOrders" resultType="com.zy.asrs.entity.OrderStatisticsDto">
+ select
+ mo.order_no orderNo,
+ count(mo.order_no) sum,
+ count(case when md.work_qty = 0 then 1 end) toShipQuantity,
+ count(case when md.work_qty != 0 and md.qty = 0 then 1 end) workQuantity,
+ count(case when md.anfme = md.qty then 1 end) completedQuantity
+ from
+ man_order mo
+ LEFT JOIN man_order_detl md on
+ mo.id = md.order_id
+ where
+ mo.doc_type = 21
+ and mo.settle in(1, 2)
+ <if test="orderNo != ''">
+ and mo.order_no = #{orderNo}
+ </if>
+ GROUP BY
+ mo.order_no
+ </select>
+ <select id="selectOrderByOrderNo" resultMap="BaseResultMap">
+ select *
+ from man_order
+ where order_no = #{orderNo}
+ </select>
+ <select id="getOrderNosByDocType" resultType="String">
+ select order_no
+ from man_order
+ where doc_type =#{docType}
+ and status = 0
</select>
</mapper>
--
Gitblit v1.9.1