From 403f92738e1e17268bc84b1d5daeb75d3ba7af5b Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 03 十一月 2025 12:54:22 +0800
Subject: [PATCH] 出库不用选站点
---
src/main/java/com/zy/asrs/controller/LocMastController.java | 36 +++++++++++++++++-------------------
1 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/LocMastController.java b/src/main/java/com/zy/asrs/controller/LocMastController.java
index 56cda69..81346c8 100644
--- a/src/main/java/com/zy/asrs/controller/LocMastController.java
+++ b/src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -17,12 +17,10 @@
import com.zy.asrs.service.BasWhsService;
import com.zy.asrs.service.LocDetlService;
import com.zy.asrs.service.LocMastService;
-import com.zy.asrs.utils.Utils;
import com.zy.common.entity.Parameter;
import com.zy.common.model.Shelves;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.*;
@@ -67,6 +65,9 @@
excludeTrash(param);
EntityWrapper<LocMast> wrapper = new EntityWrapper<>();
convert(param, wrapper);
+ if(!Cools.isEmpty(param.get("loc_sts")) && param.get("loc_sts").equals("D")) {
+ wrapper.last("ORDER BY CASE WHEN row1 IN (2,3,6,7) THEN 1 WHEN row1 IN (1,4,5,8) THEN 2 ELSE 3 END, row1 ASC");
+ }
if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper));
}
@@ -193,27 +194,24 @@
String locNo = String.format("%02d", r) + String.format("%03d", b) + String.format("%02d", l);
// 鑾峰彇鍫嗗灈鏈哄彿
int crnNo = 0;
- if (basWhs.getIdentifying().equals("1") || basWhs.getIdentifying().equals("3")){
- try{
- Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount(),param.getStartRow());
- for (List<Integer> node : shelves.nodes){
+ try{
+ Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount(),param.getStartRow());
+ for (List<Integer> node : shelves.nodes){
- if (node.contains(r)) {
- if (!Cools.isEmpty(param.getStaCrn()) && param.getStaCrn() > 0){
- crnNo = shelves.nodes.indexOf(node) + param.getStaCrn();
- }else {
- crnNo = shelves.nodes.indexOf(node) + 1;
- }
-
- break;
+ if (node.contains(r)) {
+ if (!Cools.isEmpty(param.getStaCrn()) && param.getStaCrn() > 0){
+ crnNo = shelves.nodes.indexOf(node) + param.getStaCrn();
+ }else {
+ crnNo = shelves.nodes.indexOf(node) + 1;
}
+
+ break;
}
- }catch (Exception e){
- throw new Exception("瑙f瀽鍫嗗灈鏈哄彿澶辫触锛岃濉啓姝g‘鐨勬暟鎹�!!!");
}
- }else {
- crnNo = param.getStaCrn();
+ }catch (Exception e){
+ throw new Exception("瑙f瀽鍫嗗灈鏈哄彿澶辫触锛岃濉啓姝g‘鐨勬暟鎹�!!!");
}
+
Date now = new Date();
LocMast locMast = new LocMast();
locMast.setLocNo(locNo);
@@ -221,7 +219,7 @@
locMast.setRow1(r); // 鎺�
locMast.setBay1(b); // 鍒�
locMast.setLev1(l); // 灞�
- locMast.setGro1(0); // 缁�
+ locMast.setGro1(r); // 缁�
locMast.setCrnNo(crnNo); // 鍫嗗灈鏈�
locMast.setLocType1(!Cools.isEmpty(param.getLocType1()) ? param.getLocType1() : 1);
locMast.setLocType2(param.getLocType2());
--
Gitblit v1.9.1