From c6ab1a516d8398de65512fcd380d89e46ec8e430 Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期五, 27 五月 2022 15:31:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/jkasrs' into jkasrs
---
src/main/resources/mapper/OrderDetlMapper.xml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 49 insertions(+), 9 deletions(-)
diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index 26707d9..5d5fa60 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -37,7 +37,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" />
@@ -69,14 +69,9 @@
where 1=1
and order_no = #{orderNo}
and matnr = #{matnr}
- <choose>
- <when test="batch != null and batch != ''">
- and batch = #{batch}
- </when>
- <otherwise>
- and (batch IS NULL OR batch = '')
- </otherwise>
- </choose>
+ <if test="batch!=null and batch!='' ">
+ and batch = #{batch}
+ </if>
</select>
<select id="selectWorkingDetls" resultMap="BaseResultMap">
@@ -86,6 +81,51 @@
and qty < anfme
</select>
+ <sql id="pakOutPageCondition">
+ <if test="order_id!=null and order_id!='' ">
+ and mod.order_id like '%' + #{order_id} + '%'
+ </if>
+ <if test="matnr!=null and matnr!='' ">
+ and mod.matnr like '%' + #{matnr} + '%'
+ </if>
+ <if test="maktx!=null and maktx!='' ">
+ and mod.maktx like '%' + #{maktx} + '%'
+ </if>
+ <if test="batch!=null and batch!='' ">
+ and mod.batch like '%' + #{batch} + '%'
+ </if>
+ </sql>
+
+ <select id="getPakoutPage" resultMap="BaseResultMap">
+ select * from
+ (
+ select
+ ROW_NUMBER() over (order by mo.create_time desc) as row,
+ mod.*
+ from man_order_detl mod
+ inner join man_order mo on mod.order_id = mo.id
+ inner join man_doc_type mdt on mo.doc_type = mdt.doc_id
+ where 1=1
+ and mo.settle <= 2
+ and mo.status = 1
+ and mdt.pakout = 1
+ <include refid="pakOutPageCondition"></include>
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+
+ <select id="getPakoutPageCount" parameterType="java.util.Map" resultType="java.lang.Integer">
+ select
+ count(1)
+ from man_order_detl mod
+ inner join man_order mo on mod.order_id = mo.id
+ inner join man_doc_type mdt on mo.doc_type = mdt.doc_id
+ where 1=1
+ and mo.settle <= 2
+ and mo.status = 1
+ and mdt.pakout = 1
+ <include refid="pakOutPageCondition"></include>
+ </select>
+
<update id="increase">
update man_order_detl
set qty = qty + #{qty}
--
Gitblit v1.9.1