自动化立体仓库 - WMS系统
#
luxiaotao1123
2023-02-03 521aadbbdde31da31a4dce9e35632af5048d67ba
#
3个文件已修改
64 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocDetlMapper.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
@@ -54,9 +54,9 @@
    // -------------------------------------------------
    List<QueryStockPreDo> queryStockPre(@Param("matnr")String matnr);
    List<QueryStockPreDo> queryStockPre(@Param("matnr")String matnr, @Param("batch")String batch);
    List<LocDetl> queryStock(@Param("matnr")String matnr, @Param("no") Integer no, @Param("orderBy") String orderBy, @Param("bay") Integer bay);
    List<LocDetl> queryStock(@Param("matnr")String matnr, @Param("batch")String batch, @Param("no") Integer no, @Param("orderBy") String orderBy, @Param("bay") Integer bay);
    Double queryStockAnfme(String matnr, String batch);
src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
@@ -85,9 +85,9 @@
    @Override
    public List<LocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos) {
        List<LocDetl> result = new ArrayList<>();
        List<QueryStockPreDo> preDos = this.baseMapper.queryStockPre(matnr);
        List<QueryStockPreDo> preDos = this.baseMapper.queryStockPre(matnr, batch);
        for (QueryStockPreDo preDo : preDos) {
            List<LocDetl> locDetls = this.baseMapper.queryStock(matnr, preDo.getNo(), preDo.getOrderBy(), preDo.getBay());
            List<LocDetl> locDetls = this.baseMapper.queryStock(matnr, batch, preDo.getNo(), preDo.getOrderBy(), preDo.getBay());
            result.addAll(locDetls);
        }
        return result;
src/main/resources/mapper/LocDetlMapper.xml
@@ -246,6 +246,14 @@
            and b.loc_sts = 'F' and b.frozen != 1
            and a.manu is null
            and a.matnr = #{matnr}
            <choose>
                <when test="batch != null and batch != ''">
                    and a.batch = #{batch}
                </when>
                <otherwise>
                    and (a.batch IS NULL OR a.batch = '')
                </otherwise>
            </choose>
            and b.row1 >= 1
            and b.row1 &lt;= 3
            group by b.bay1
@@ -261,6 +269,14 @@
            and b.loc_sts = 'F' and b.frozen != 1
            and a.manu is null
            and a.matnr = #{matnr}
            <choose>
                <when test="batch != null and batch != ''">
                    and a.batch = #{batch}
                </when>
                <otherwise>
                    and (a.batch IS NULL OR a.batch = '')
                </otherwise>
            </choose>
            and b.row1 >= 4
            and b.row1 &lt;= 7
            group by b.bay1
@@ -276,6 +292,14 @@
            and b.loc_sts = 'F' and b.frozen != 1
            and a.manu is null
            and a.matnr = #{matnr}
            <choose>
                <when test="batch != null and batch != ''">
                    and a.batch = #{batch}
                </when>
                <otherwise>
                    and (a.batch IS NULL OR a.batch = '')
                </otherwise>
            </choose>
            and b.row1 >= 8
            and b.row1 &lt;= 11
            group by b.bay1
@@ -291,6 +315,14 @@
            and b.loc_sts = 'F' and b.frozen != 1
            and a.manu is null
            and a.matnr = #{matnr}
            <choose>
                <when test="batch != null and batch != ''">
                    and a.batch = #{batch}
                </when>
                <otherwise>
                    and (a.batch IS NULL OR a.batch = '')
                </otherwise>
            </choose>
            and b.row1 >= 12
            and b.row1 &lt;= 14
            group by b.bay1
@@ -306,6 +338,14 @@
            and b.loc_sts = 'F' and b.frozen != 1
            and a.manu is null
            and a.matnr = #{matnr}
            <choose>
                <when test="batch != null and batch != ''">
                    and a.batch = #{batch}
                </when>
                <otherwise>
                    and (a.batch IS NULL OR a.batch = '')
                </otherwise>
            </choose>
            and b.row1 >= 15
            and b.row1 &lt;= 18
            group by b.bay1
@@ -321,6 +361,14 @@
            and b.loc_sts = 'F' and b.frozen != 1
            and a.manu is null
            and a.matnr = #{matnr}
            <choose>
                <when test="batch != null and batch != ''">
                    and a.batch = #{batch}
                </when>
                <otherwise>
                    and (a.batch IS NULL OR a.batch = '')
                </otherwise>
            </choose>
            and b.row1 >= 19
            and b.row1 &lt;= 21
            group by b.bay1
@@ -381,6 +429,14 @@
            </if>
        )
        and a.matnr = #{matnr}
        <choose>
            <when test="batch != null and batch != ''">
                and a.batch = #{batch}
            </when>
            <otherwise>
                and (a.batch IS NULL OR a.batch = '')
            </otherwise>
        </choose>
        and b.bay1 = #{bay}
        and b.loc_sts = 'F' and b.frozen != 1
        order by b.row1