From 971dc3eb422fb38ffe8205ed60283c85036fde36 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期三, 03 九月 2025 17:10:58 +0800
Subject: [PATCH] 许可证有效期”改成“仓储系统许可有效期
---
src/main/resources/mapper/ManLocDetlMapper.xml | 75 ++++++++++++++++++++++++++++++++++---
1 files changed, 68 insertions(+), 7 deletions(-)
diff --git a/src/main/resources/mapper/ManLocDetlMapper.xml b/src/main/resources/mapper/ManLocDetlMapper.xml
index ac19331..395c9db 100644
--- a/src/main/resources/mapper/ManLocDetlMapper.xml
+++ b/src/main/resources/mapper/ManLocDetlMapper.xml
@@ -30,7 +30,10 @@
<result column="update_by" property="updateBy" />
<result column="modi_time" property="modiTime" />
<result column="memo" property="memo" />
-
+ <result column="owner" property="owner" />
+ <result column="payment" property="payment" />
+ <result column="real_anfme" property="realAnfme" />
+ <result column="order_no" property="orderNo" />
</resultMap>
<sql id="locDetlCondition">
@@ -48,6 +51,9 @@
</if>
<if test="maktx != null and maktx != ''">
and mld.maktx like concat('%',#{maktx},'%')
+ </if>
+ <if test="zpallet != null and zpallet != ''">
+ and mld.zpallet like concat('%',#{zpallet},'%')
</if>
<if test="startTime!=null and endTime!=null">
and mld.update_time between #{startTime} and #{endTime}
@@ -74,7 +80,7 @@
</if>
</sql>
- <select id="listByPage" resultMap="BaseResultMap">
+ <select id="listByPage" resultMap="BaseResultMap" parameterType="java.util.Map">
select * from
(
SELECT
@@ -85,8 +91,7 @@
LEFT JOIN man_mat mm ON mld.matnr = mm.matnr
LEFT JOIN man_tag mt ON mm.tag_id = mt.id
WHERE 1=1
- AND (CHARINDEX(','+#{node_id}+',', ','+mn.path+',') > 0 OR mn.id = #{node_id})
- AND (CHARINDEX(','+#{tag_id}+',', ','+mt.path+',') > 0 OR mt.id = #{tag_id})
+ AND (CHARINDEX(#{node_id}, mn.path) > 0 OR mn.id = #{node_id})
<include refid="locDetlCondition"></include>
) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
</select>
@@ -99,8 +104,7 @@
LEFT JOIN man_mat mm ON mld.matnr = mm.matnr
LEFT JOIN man_tag mt ON mm.tag_id = mt.id
WHERE 1=1
- AND (CHARINDEX(','+#{node_id}+',', ','+mn.path+',') > 0 OR mn.id = #{node_id})
- AND (CHARINDEX(','+#{tag_id}+',', ','+mt.path+',') > 0 OR mt.id = #{tag_id})
+ AND (CHARINDEX(#{node_id}, mn.path) > 0 OR mn.id = #{node_id})
<include refid="locDetlCondition"></include>
</select>
@@ -247,10 +251,21 @@
where loc_no = #{locNo}
and matnr = #{matnr}
</select>
- <select id="selectItem0" resultType="com.zy.asrs.entity.ManLocDetl">
+ <select id="selectItem" resultMap="BaseResultMap">
select top 1 * from man_loc_detl
where loc_no = #{locNo}
and matnr = #{matnr}
+ <if test="batch!=null and batch!='' ">
+ and batch = #{batch}
+ </if>
+ <!-- <choose>-->
+ <!-- <when test="batch != null and batch != ''">-->
+ <!-- and batch = #{batch}-->
+ <!-- </when>-->
+ <!-- <otherwise>-->
+ <!-- and (batch IS NULL OR batch = '')-->
+ <!-- </otherwise>-->
+ <!-- </choose>-->
</select>
<select id="listByOutPage" resultMap="BaseResultMap">
@@ -313,4 +328,50 @@
where node_id = #{nodeId} ;
</update>
+ <select id="selectInventory" resultMap="BaseResultMap">
+ select top 1 * from man_loc_detl
+ where loc_no=#{LocNo}
+ and 1=1
+ and matnr=#{Matnr}
+ <choose>
+ <when test="batch != null and batch != ''">
+ and batch = #{batch}
+ </when>
+ <otherwise>
+ and (batch IS NULL OR batch = '')
+ </otherwise>
+ </choose>
+ </select>
+ <delete id="deleteDatailed">
+ delete from man_loc_detl
+ where loc_no = #{locNo}
+ and matnr = #{matnr}
+ <choose>
+ <when test="batch != null and batch != ''">
+ and batch = #{batch}
+ </when>
+ <otherwise>
+ and (batch IS NULL OR batch = '')
+ </otherwise>
+ </choose>
+ </delete>
+
+ <update id="increase">
+ update man_loc_detl
+ set anfme= #{anfme}
+ , modi_time = getdate()
+ ,weight=#{weight}
+ where 1=1
+ and loc_no = #{locNo}
+ and matnr = #{matnr}
+<!-- <choose>-->
+<!-- <when test="batch != null and batch!='' ">-->
+<!-- and batch = #{batch}-->
+<!-- </when>-->
+<!-- <otherwise>-->
+<!-- and (batch IS NULL OR batch = '')-->
+<!-- </otherwise>-->
+<!-- </choose>-->
+ </update>
+
</mapper>
--
Gitblit v1.9.1