| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.common.wms.mapper.LocDetlMapper"> |
| | | |
| | | <sql id="batchSeq"> |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | </sql> |
| | | |
| | | <sql id="stockOutCondition"> |
| | | <if test="map.loc_no!=null and map.loc_no!='' "> |
| | | and a.loc_no like '%' + #{map.loc_no} + '%' |
| | |
| | | order by no, count desc |
| | | </select> |
| | | |
| | | <select id="selectItem" resultType="com.zy.asrs.common.wms.entity.LocDetl"> |
| | | select top 1 * |
| | | from wms_loc_detl |
| | | where 1=1 |
| | | and loc_no = #{locNo} |
| | | and matnr = #{matnr} |
| | | and host_id = #{hostId} |
| | | <include refid="batchSeq"></include> |
| | | </select> |
| | | |
| | | <delete id="deleteItem"> |
| | | delete from wms_loc_detl |
| | | where 1=1 |
| | | and loc_no = #{locNo} |
| | | and matnr = #{matnr} |
| | | and host_id = #{hostId} |
| | | <include refid="batchSeq"></include> |
| | | </delete> |
| | | |
| | | <update id="updateAnfme"> |
| | | update wms_loc_detl |
| | | set anfme = #{anfme} |
| | | , modi_time = getdate() |
| | | where 1=1 |
| | | and loc_no = #{locNo} |
| | | and matnr = #{matnr} |
| | | and host_id = #{hostId} |
| | | <include refid="batchSeq"></include> |
| | | </update> |
| | | |
| | | </mapper> |