From dbfbc8f19dc5751b6dec442aff24463f1084a3d9 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期日, 21 九月 2025 15:54:02 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/LocDetlMapper.xml | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index cad2e7f..ba017ec 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -106,13 +106,20 @@
<if test="crnNo!=null and crnNo!='' ">
and b.crn_no=#{crnNo}
</if>
+ <if test="specs!=null and specs!='' ">
+ and a.specs=#{specs}
+ </if>
+ <if test="model!=null and model!='' ">
+ and a.model=#{model}
+ </if>
+
</sql>
<select id="getStockOutPage" resultMap="BaseResultMap">
select * from
(
select
- ROW_NUMBER() over (order by a.appe_time,a.matnr,a.loc_no) as row,
+ ROW_NUMBER() over (order by a.source desc, a.appe_time,a.matnr,a.loc_no) as row,
a.*
from asr_loc_detl a
left join asr_loc_mast b on a.loc_no = b.loc_no
@@ -131,6 +138,15 @@
where 1=1
and b.loc_sts = 'F'
<include refid="stockOutCondition"></include>
+ </select>
+
+ <select id="getSameDetlList" resultType="java.lang.String">
+ SELECT ld.loc_no FROM asr_loc_detl ld
+ LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no
+ WHERE 1 = 1
+ AND ld.matnr = #{matnr}
+ AND lm.loc_sts = 'F'
+ ORDER BY ld.appe_time ASC
</select>
<select id="getStockStatis" resultType="com.zy.asrs.entity.LocDetl">
@@ -327,4 +343,15 @@
<select id="selectByMatnr" resultType="com.zy.asrs.entity.LocDetl">
select * from asr_loc_detl where matnr=#{matnr}
</select>
+
+ <select id="selectMatnrSpecs" resultMap="BaseResultMap">
+ select
+ top 1 *
+ from asr_loc_detl a
+ left join asr_loc_mast b on a.loc_no = b.loc_no
+ where 1=1
+ and b.loc_no = #{locNo}
+ and a.matnr = #{matnr}
+ and a.specs = #{specs}
+ </select>
</mapper>
--
Gitblit v1.9.1