src/main/java/com/zy/asrs/mapper/LocMastMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/utils/Utils.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/mapper/LocMastMapper.java
@@ -15,10 +15,7 @@ // @Select("select distinct row1 from asr_loc_mast where crn_no = #{crnNo}") @Select("select row1 from ( select distinct row1 from asr_loc_mast where crn_no = #{crnNo} ) a " + "order by case row1 when 1 then 1 when 2 then 0 when 3 then 0 when 4 then 1 " + "when 5 then 1 when 6 then 0 when 7 then 0 when 8 then 1 when 9 then 1 when 10 then 0 " + "when 11 then 0 when 12 then 1 when 13 then 0 when 14 then 0 when 15 then 1 when 16 then 0 " + "when 17 then 0 when 18 then 1 end desc,newid()") "order by case row1 when 31 then 1 when 32 then 0 when 33 then 0 when 34 then 1 end desc,newid()") List<Integer> queryDistinctRow(@Param("crnNo")Integer crnNo); LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1); src/main/java/com/zy/asrs/utils/Utils.java
@@ -87,8 +87,8 @@ */ public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { int row = getRow(deepLoc); int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); int shallowRow = remainder == 1 ? (row + 1) : (row - 1); // int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); int shallowRow ; if(row==31){ shallowRow = row + 1; }else if(row==34){ @@ -130,11 +130,11 @@ * 获取 浅库位排对应的深库位排 */ public static Integer getDeepRow(SlaveProperties slaveProperties, Integer shallowRow) { int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount()); // int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount()); int targetRow; if (remainder == 2) { if (shallowRow == 32) { targetRow = shallowRow - 1; } else if (remainder == 3) { } else if (shallowRow == 33) { targetRow = shallowRow + 1; } else { throw new RuntimeException(shallowRow + "不是浅库位排,系统繁忙");