From 3c2450c66d792b2e020ab954e902df9706f1cd7d Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期一, 10 三月 2025 14:12:27 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/asrs/utils/Utils.java          |   10 +++++-----
 src/main/java/com/zy/asrs/mapper/LocMastMapper.java |    5 +----
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/zy/asrs/mapper/LocMastMapper.java b/src/main/java/com/zy/asrs/mapper/LocMastMapper.java
index a1c8861..e0ee323 100644
--- a/src/main/java/com/zy/asrs/mapper/LocMastMapper.java
+++ b/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);
diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index ed947ab..b5cf43c 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/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 + "涓嶆槸娴呭簱浣嶆帓锛岀郴缁熺箒蹇�");

--
Gitblit v1.9.1