#
Junjie
2024-01-17 bb3941c91f4d400ec13044f5ada027b9bc3c07d3
zy-asrs-common/src/main/resources/mapper/wms/WrkMastMapper.xml
@@ -15,4 +15,44 @@
        order by io_time,wrk_no asc
    </select>
    <select id="selectSameLevMatnrs" resultType="com.zy.asrs.common.wms.entity.WrkMast">
        select m.loc_no
        from wms_wrk_mast m,
             wms_wrk_detl d,
             common_loc_mast lm
        where m.id = d.wrk_mast_id
          and m.loc_no = lm.loc_no
          and m.host_id = lm.host_id
          and io_type = 1
          and wrk_sts &lt; 99
          and d.matnr = #{matnr}
          <if test="batch != null and batch != ''">
              and d.batch = #{batch}
          </if>
          <if test="hostId != null">
              and lm.host_id = #{hostId}
          </if>
          <if test="locRangeDto != null">
              <if test="locRangeDto.startRow">
                  and lm.row1 &gt;= #{locRangeDto.startRow}
              </if>
              <if test="locRangeDto.targetRow">
                  and lm.row1 &lt;= #{locRangeDto.targetRow}
              </if>
              <if test="locRangeDto.startBay">
                  and lm.bay1 &gt;= #{locRangeDto.startBay}
              </if>
              <if test="locRangeDto.targetBay">
                  and lm.bay1 &lt;= #{locRangeDto.targetBay}
              </if>
              <if test="locRangeDto.startLev">
                  and lm.lev1 &gt;= #{locRangeDto.startLev}
              </if>
              <if test="locRangeDto.targetLev">
                  and lm.lev1 &lt;= #{locRangeDto.targetLev}
              </if>
          </if>
        ORDER BY m.wrk_no desc;
    </select>
</mapper>