From 7964ad29dc282c472a56945b857343105463fd0a Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期四, 31 十月 2024 13:40:05 +0800
Subject: [PATCH] 入库呼叫agv取货
---
src/main/java/com/zy/common/service/CommonService.java | 41 +++++++++++++++++++++++++++++------------
1 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 195fe0d..f8cb3b4 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -209,7 +209,7 @@
//姝ょ▼搴忕敤浜庝紭鍖栧爢鍨涙満寮傚父鏃剁殑杩愯鏃堕棿
for (int i = times; i < crnNumber*2; i++) {
- int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber);
+ int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType);
curRow = locNecessaryParameters[1];
crnNo = locNecessaryParameters[2];
if (basCrnpService.checkSiteError(crnNo, true)) {
@@ -369,10 +369,19 @@
// 1.鎸夎鍒欐煡鎵惧簱浣�
if (Cools.isEmpty(locMast) && crnNo != 0) {
- List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
- .eq("row1", nearRow)
- .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())
- .orderBy("lev1",true).orderBy("bay1",true));
+ List<LocMast> locMasts = null;
+ if (Utils.isNorth(sourceStaNo)){
+ locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
+ .eq("row1", nearRow)
+ .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())
+ .orderBy("lev1",true).orderBy("bay1",false));
+ }else {
+ locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
+ .eq("row1", nearRow)
+ .eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())
+ .orderBy("lev1",true).orderBy("bay1",true));
+ }
+
for (LocMast locMast1 : locMasts) {
if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
continue;
@@ -507,7 +516,7 @@
//姝ょ▼搴忕敤浜庝紭鍖栧爢鍨涙満寮傚父鏃剁殑杩愯鏃堕棿
for (int i = times; i < crnNumber*2; i++) {
- int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber);
+ int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType);
rowCount = locNecessaryParameters[0];
curRow = locNecessaryParameters[1];
crnNo = locNecessaryParameters[2];
@@ -560,7 +569,7 @@
for (int i = 0; i < crnNumber*2; i++) {
if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){
- int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber);
+ int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType);
curRowW = locNecessaryParameters[1];
nearRowW = locNecessaryParameters[3];
}else {
@@ -626,7 +635,7 @@
for (int i = 0; i < crnNumber*2; i++) {
if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){
- int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber);
+ int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType);
curRowW = locNecessaryParameters[1];
nearRowW = locNecessaryParameters[3];
}else {
@@ -655,7 +664,7 @@
// 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 //浜掗�氱増
if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) {
- List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow));
+ List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow).eq("crn_no",7));
int nearbay = 0;
int nearlev = 0;
for (LocMast locMastSign:locMasts){
@@ -678,7 +687,7 @@
for (int i = 0; i < crnNumber*2; i++) {
if (!(Utils.getRow(locMastGro.getLocNo())>nearRowW && Utils.getRow(locMastGro.getLocNo())<=curRowW) && !(Utils.getRow(locMastGro.getLocNo())<nearRowW && Utils.getRow(locMastGro.getLocNo())>=curRowW) ){
- int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber);
+ int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRowW, crnNumber,whsType);
curRowW = locNecessaryParameters[1];
nearRowW = locNecessaryParameters[3];
}else {
@@ -696,7 +705,7 @@
bay2=Utils.getBay(locMast2.getLocNo())+1;
}
String targetLocNo = locMast2.getLocNo().substring(0,2) +zerofill(String.valueOf(bay2), 3) + locMast2.getLocNo().substring(5);
- locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("loc_sts","O"));
+ locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",targetLocNo).eq("crn_no",7).eq("loc_sts","O"));
if (Cools.isEmpty(locMast)){
continue;
}
@@ -742,7 +751,9 @@
List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
.eq("bay1", nearRow)
.eq("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue())
+ .eq("crn_no",7)
.orderBy("lev1",true).orderBy("row1",false));//鏈�娴呭簱浣�
+
for (LocMast locMast1 : locMasts) {
if (locMast != null){
break;
@@ -761,15 +772,18 @@
if (curRow < nearRow){
locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>()
.eq("gro1", locMast1.getGro1())
+ .eq("crn_no",7)
.orderBy("bay1",true));
if(locMasts1.size() == 3 || (curRow>20 && locMasts1.size() == 2)){
locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>()
.eq("gro1", locMast1.getGro1())
+ .eq("crn_no",7)
.orderBy("bay1",false));
}
}else {
locMasts1 = locMastService.selectList(new EntityWrapper<LocMast>()
.eq("gro1", locMast1.getGro1())
+ .eq("crn_no",7)
.orderBy("bay1",false));
}
if (Cools.isEmpty(locMasts1)) {
@@ -879,7 +893,7 @@
}
//姝ょ▼搴忕敤浜庝紭鍖栧爢鍨涙満寮傚父鏃剁殑杩愯鏃堕棿
- int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber);
+ int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber,whsType);
curRow = locNecessaryParameters[1];
crnNo = locNecessaryParameters[2];
rowCount = locNecessaryParameters[0];
@@ -890,6 +904,9 @@
BasDevp staNo = null;
if (Utils.BooleanWhsTypeSta(rowLastno, staDescId)) {
+
+ LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", curRow).eq("bay1", 2).eq("lev1", 1));
+ crnNo = locMast1.getCrnNo();
// 鑾峰彇鐩爣绔�
wrapper = new EntityWrapper<StaDesc>()
.eq("type_no", staDescId)
--
Gitblit v1.9.1