自动化立体仓库 - WMS系统
lty
5 天以前 8e943b7104561c3b14cf223016698709c5ade4b5
src/main/resources/mapper/LocDetlMapper.xml
@@ -44,6 +44,7 @@
        <result column="appe_user" property="appeUser" />
        <result column="appe_time" property="appeTime" />
        <result column="memo" property="memo" />
        <result column="mix_number" property="mixNumber"/>
    </resultMap>
    <sql id="batchSeq">
@@ -53,6 +54,14 @@
            </when>
            <otherwise>
                and (batch IS NULL OR batch = '')
            </otherwise>
        </choose>
        <choose>
            <when test="barcode != null and barcode != ''">
                and barcode = #{barcode}
            </when>
            <otherwise>
                and (barcode IS NULL OR barcode = '')
            </otherwise>
        </choose>
    </sql>
@@ -66,11 +75,19 @@
        <include refid="batchSeq"></include>
    </select>
    <select id="selectItemByLocNo" resultMap="BaseResultMap">
    <select id="selectItemCarton" resultMap="BaseResultMap">
        select top 1 *
        from asr_loc_detl
        where 1=1
        and loc_no = #{locNo}
        and matnr = #{matnr}
        <include refid="batchSeq"></include>
    </select>
    <select id="selectItemByLocNo" resultMap="BaseResultMap">
        select *
        from asr_loc_detl
        where loc_no = #{locNo}
    </select>
    <delete id="deleteItem">
@@ -410,4 +427,22 @@
        order by row1
    </select>
    <select id="getSameDetlList" resultType="java.lang.String">
        select ld.loc_no from asr_loc_detl as ld
        left join asr_loc_mast as 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="getSameDetlList2" resultType="java.lang.String">
        select ld.loc_no from asr_loc_detl as ld
                                  left join asr_loc_mast as lm on ld.loc_no = lm.loc_no
        where 1 = 1
          and ld.order_no = #{orderNo}
          and lm.loc_type2 = #{areaId}
          and lm.loc_sts = 'F'
        order by ld.appe_time asc
    </select>
</mapper>