From 075cd1a82dc00988ed67b08c3a03fab51bf450e2 Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期六, 29 十一月 2025 18:10:48 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 264 +++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 218 insertions(+), 46 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 6e65d8a..0dbe861 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -110,6 +110,8 @@
private ApiLogService apiLogService;
@Autowired
private BasDevpOptService basDevpOptService;
+ @Autowired
+ private MatService matService;
@Value("${wms.url}")
private String wmsUrl;
@@ -183,6 +185,9 @@
errMsg = "鎵爜澶辫触";
log.error("鐗╂枡鐮佹壂鐮佸け璐�");
back = true;
+ }
+ if(barcode.equals("0")){
+ continue;
}
// 閫�鍥�
if (back) {
@@ -4333,8 +4338,6 @@
}
}
-
-
/*
* arm浠诲姟瀹屾垚鑷姩缁勬墭
* */
@@ -4450,9 +4453,9 @@
* */
public synchronized void armTaskAssignment() {
try{
- List<BasArm> basArmList = basArmService.selectList(new EntityWrapper<>());
+ List<BasArm> basArmList = basArmService.selectList(new EntityWrapper<BasArm>().lt("arm_no",5));
for (BasArm basArm : basArmList) {
- if (basArm.getStatus()!=1){
+ if (basArm.getStatus()!=1 || basArm.getArmNo()>4){
continue;
}
try{
@@ -4469,31 +4472,23 @@
if(!Cools.isEmpty(barcode)) {
if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
armTaskAssignmentCallApiLogSave(staProtocol, "鎵樼洏鏉$爜涓虹┖", staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛�===銆嬫墭鐩樻潯鐮佷负绌�", false);
-// log.error(staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛�===銆嬫墭鐩樻潯鐮佷负绌�");
continue;
}
} else {
armTaskAssignmentCallApiLogSave(staProtocol, "鎵樼洏鏉$爜涓虹┖", staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛�===銆嬫墭鐩樻潯鐮佷负绌�", false);
-
-// log.error(staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛�===銆嬫墭鐩樻潯鐮佷负绌�");
continue;
}
if(barcode.length()!=6){
armTaskAssignmentCallApiLogSave(staProtocol, "鏉$爜闀垮害涓嶆槸6浣�", staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛屾潯鐮侀暱搴︿笉鏄�6浣�===>>" + barcode, false);
-// log.error(staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛屾潯鐮侀暱搴︿笉鏄�6浣�===>>" + barcode);
continue;
-// throw new CoolException(staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛屾潯鐮侀暱搴︿笉鏄�6浣�===>>" + barcode);
}
int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",barcode));
int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",barcode));
int countwait = waitPakinMapper.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",barcode));
if (countLoc > 0 || countWrk > 0 || countwait > 0) {
-// throw new CoolException("缁勬墭妗�/宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + barcode);
armTaskAssignmentCallApiLogSave(staProtocol, "鏉$爜鏁版嵁宸插瓨鍦�", staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛岀粍鎵樻。/宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + barcode, false);
-
-// log.error(staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛岀粍鎵樻。/宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + barcode);
continue;
}
@@ -4514,8 +4509,6 @@
);
if (!basArmMastListError.isEmpty()){
armTaskAssignmentCallApiLogSave(staProtocol, "瀛樺湪寮傚父鏈烘鑷備换鍔�", basArm.getArmNo()+"鍙锋満姊拌噦瀛樺湪寮傚父鏁版嵁闇�瑕佺淮鎶わ紒锛侊紒", false);
-
-// log.error(basArm.getArmNo()+"鍙锋満姊拌噦瀛樺湪寮傚父鏁版嵁闇�瑕佺淮鎶わ紒锛侊紒");
continue;
}
List<BasArmMast> basArmMastListRuning = basArmMastService.selectList(
@@ -4527,9 +4520,7 @@
List<BasArmMast> basArmMastListRuning3 = basArmMastService.selectList(
new EntityWrapper<BasArmMast>()
.eq("arm_no", basArm.getArmNo())
- .eq(
-
- "sorting_line", basArm.getSortingLineSou())
+ .eq("sorting_line", basArm.getSortingLineSou())
.eq("status", 3)
);
if (basArmMastListRuning.isEmpty() && basArmMastListRuning3.isEmpty()){
@@ -4544,8 +4535,6 @@
}
if (basArmMastList.size()>1){
armTaskAssignmentCallApiLogSave(staProtocol, "浠诲姟寰呮墽琛屾暟閲忓ぇ浜�1,鏃犳硶鍒嗚鲸寰呮墽琛屼换鍔�", "arm缂栧彿锛�"+basArm.getArmNo()+"====銆嬫媶鐮佸灈浠诲姟寮傚父绂佹涓嬪彂锛侊紒锛佷换鍔″緟鎵ц鏁伴噺澶т簬1锛侊紒锛�", false);
-
-// log.error("arm缂栧彿锛�"+basArm.getArmNo()+"====銆嬫媶鐮佸灈浠诲姟寮傚父绂佹涓嬪彂锛侊紒锛佷换鍔″緟鎵ц鏁伴噺澶т簬1锛侊紒锛�");
continue;
}
BasArmMast basArmMast = basArmMastList.get(0);
@@ -4560,26 +4549,20 @@
if (basArmMastListOrder.size()==1){
Thread.sleep(100);
-
List<BasArmMast> basArmMastListRuningBarCode2 = basArmMastService.selectList(
- new EntityWrapper<BasArmMast>()
- .eq("barcode", barcode)
+ new EntityWrapper<BasArmMast>().eq("barcode", barcode)
);
if (!basArmMastListRuningBarCode2.isEmpty()){
int binding_tags = basArmMastService.selectCount(
new EntityWrapper<BasArmMast>()
.eq("status", 2)
- .eq("binding_tags", basArmMast.getBindingTags())
- );
-
+ .eq("binding_tags", basArmMast.getBindingTags()));
if (binding_tags<2){
BasArmMast basArmMastOne = basArmMastService.selectOne(
new EntityWrapper<BasArmMast>()
.eq("status", 2)
- .eq("binding_tags", basArmMast.getBindingTags())
- );
+ .eq("binding_tags", basArmMast.getBindingTags()));
Double anfmeSignOne = basArmMastService.selectBasArmMastSignValue(basArmMastOne.getOrderNo(), basArmMastOne.getMatnr(),basArmMastOne.getBindingTags());
-
if (anfmeSignOne>1D){
armTaskAssignmentCallApiLogSave(staProtocol, "鏉$爜鏁版嵁宸插瓨鍦紒锛侊紒", staProtocol.getSiteId()+"鐮佸灈浣嶇疆锛屾潯鐮佹暟鎹鍦ㄨ嚜鍔ㄧ粍鎵�===>>" + barcode, false);
continue;
@@ -4599,18 +4582,12 @@
ArmOrderAssignmentParam armOrderAssignmentParam = new ArmOrderAssignmentParam(basArmMast,orderDetlValueResultUtil);
// 璁㈠崟涓嬪彂(SKU+璁㈠崟)
ReturnT<String> result = new PostMesDataUtils().postMesData("鏈烘鑷傛姄鍙栬鍗曪紙SKU锛変笅鍙戯細",ArmConstant.getArmUrl(basArmMast.getArmNo()), ArmConstant.ARM_ADAPTOR, armOrderAssignmentParam);
- if (result.getCode()==200){
-// basArmMast.setStatus(1);
-// basArmMast.setBarcode(barcode);
-// basArmMastService.updateById(basArmMast);
- } else {
+ if (result.getCode()!=200){
armTaskAssignmentCallApiLogSave(staProtocol, "鏈烘鑷傛姄鍙栬鍗曪紙SKU锛変笅鍙�", "arm缂栧彿锛�"+basArm.getArmNo()+"璁㈠崟涓嬪彂璁㈠崟淇℃伅涓嬪彂澶辫触锛侊紒锛�", false);
-
-// log.error("arm缂栧彿锛�"+basArm.getArmNo()+"鏈烘鑷傛姄鍙栬鍗曪紙SKU锛変笅鍙戯細"+JSON.toJSON(basArmMast)+"===銆嬭鍗曚俊鎭笅鍙戝け璐�");
+ continue;
}
} catch (Exception e){
armTaskAssignmentCallApiLogSave(staProtocol, "鏈烘鑷傛姄鍙栬鍗曪紙SKU锛変笅鍙�", "arm缂栧彿锛�"+basArm.getArmNo()+"璁㈠崟涓嬪彂璁㈠崟淇℃伅涓嬪彂澶辫触锛侊紒锛�", false);
-// log.error("arm缂栧彿锛�"+basArm.getArmNo()+"鏈烘鑷傛姄鍙栬鍗曪紙SKU锛変笅鍙戯細"+JSON.toJSON(basArmMast)+"===銆嬭鍗曚笅鍙戣鍗曚俊鎭笅鍙戝け璐�");
continue;
}
}
@@ -4623,7 +4600,150 @@
basArmMastService.updateById(basArmMast);
} else {
armTaskAssignmentCallApiLogSave(staProtocol, "鏈烘鑷傛姄鍙栦换鍔′俊鎭笅鍙戝け璐�", "arm缂栧彿锛�"+basArm.getArmNo()+"浠诲姟淇℃伅涓嬪彂澶辫触锛侊紒锛�", false);
-// log.error("鏈烘鑷傛姄鍙栦换鍔★細"+JSON.toJSON(basArmMast)+"===銆嬩换鍔′俊鎭笅鍙戝け璐�");
+ }
+ }
+ } catch (Exception e){
+ log.error("arm缂栧彿锛�"+basArm.getArmNo()+"====銆嬫媶鐮佸灈浠诲姟涓嬪彂澶辫触"+e.getMessage());
+ }
+ }
+ }catch (Exception e){
+ log.error("arm浠诲姟涓嬪彂澶辫触"+e.getMessage());
+ }
+ }
+
+ /*
+ * arm浠诲姟涓嬪彂
+ * */
+ public synchronized void armTaskAssignment2() {
+ try{
+ List<BasArm> basArmList = basArmService.selectList(new EntityWrapper<BasArm>().gt("arm_no",4));
+ for (BasArm basArm : basArmList) {
+ if (basArm.getStatus()!=1 || basArm.getArmNo()<5){
+ continue;
+ }
+ try{
+ LocMast locMastEnd = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", basArm.getStaNoSou()));
+ if(!locMastEnd.getLocSts().equals("D")){
+ continue;
+ }
+
+ String barcode = locMastEnd.getBarcode();
+ if(!Cools.isEmpty(barcode)) {
+ if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "0".equals(barcode)) {
+ armTaskAssignmentCallApiLogSave(locMastEnd, "鎵樼洏鏉$爜涓虹┖", basArm.getStaNoSou()+"鐮佸灈浣嶇疆锛�===銆嬫墭鐩樻潯鐮佷负绌�", false);
+ continue;
+ }
+ } else {
+ armTaskAssignmentCallApiLogSave(locMastEnd, "鎵樼洏鏉$爜涓虹┖", basArm.getStaNoSou()+"鐮佸灈浣嶇疆锛�===銆嬫墭鐩樻潯鐮佷负绌�", false);
+ continue;
+ }
+
+ if(barcode.length()!=6){
+ armTaskAssignmentCallApiLogSave(locMastEnd, "鏉$爜闀垮害涓嶆槸6浣�", basArm.getStaNoSou()+"鐮佸灈浣嶇疆锛屾潯鐮侀暱搴︿笉鏄�6浣�===>>" + barcode, false);
+ continue;
+ }
+
+ int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",barcode));
+ int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",barcode));
+ int countwait = waitPakinMapper.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",barcode));
+ if (countLoc > 0 || countWrk > 0 || countwait > 0) {
+ armTaskAssignmentCallApiLogSave(locMastEnd, "鏉$爜鏁版嵁宸插瓨鍦�", basArm.getStaNoSou()+"鐮佸灈浣嶇疆锛岀粍鎵樻。/宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + barcode, false);
+ continue;
+ }
+
+ List<BasArmMast> basArmMastListRuningBarCode = basArmMastService.selectList(
+ new EntityWrapper<BasArmMast>()
+ .eq("barcode", barcode)
+ .eq("status", 3)
+ );
+ if (!basArmMastListRuningBarCode.isEmpty()){
+ armTaskAssignmentCallApiLogSave(locMastEnd, "鏉$爜鏁版嵁宸插瓨鍦�,姝e湪鑷姩缁勬墭锛侊紒锛�", basArm.getStaNoSou()+"鐮佸灈浣嶇疆锛屾潯鐮佹暟鎹鍦ㄨ嚜鍔ㄧ粍鎵�===>>" + barcode, false);
+ continue;
+ }
+ List<BasArmMast> basArmMastListError = basArmMastService.selectList(
+ new EntityWrapper<BasArmMast>()
+ .eq("arm_no", basArm.getArmNo())
+ .eq("sorting_line", basArm.getSortingLineSou())
+ .eq("status", 9)
+ );
+ if (!basArmMastListError.isEmpty()){
+ armTaskAssignmentCallApiLogSave(locMastEnd, "瀛樺湪寮傚父鏈烘鑷備换鍔�", basArm.getArmNo()+"鍙锋満姊拌噦瀛樺湪寮傚父鏁版嵁闇�瑕佺淮鎶わ紒锛侊紒", false);
+ continue;
+ }
+ List<BasArmMast> basArmMastListRuning = basArmMastService.selectList(
+ new EntityWrapper<BasArmMast>()
+ .eq("arm_no", basArm.getArmNo())
+ .eq("sorting_line", basArm.getSortingLineSou())
+ .eq("status", 1)
+ );
+ List<BasArmMast> basArmMastListRuning3 = basArmMastService.selectList(
+ new EntityWrapper<BasArmMast>()
+ .eq("arm_no", basArm.getArmNo())
+ .eq("sorting_line", basArm.getSortingLineSou())
+ .eq("status", 3)
+ );
+ if (basArmMastListRuning.isEmpty() && basArmMastListRuning3.isEmpty()){
+ List<BasArmMast> basArmMastList = basArmMastService.selectList(
+ new EntityWrapper<BasArmMast>()
+ .eq("arm_no", basArm.getArmNo())
+ .eq("sorting_line", basArm.getSortingLineSou())
+ .eq("sta_no", basArm.getStaNoSou())
+ .eq("status", 0)
+ );
+ if (basArmMastList.isEmpty()){
+ continue;
+ }
+ if (basArmMastList.size()>1){
+ armTaskAssignmentCallApiLogSave(locMastEnd, "浠诲姟寰呮墽琛屾暟閲忓ぇ浜�1,鏃犳硶鍒嗚鲸寰呮墽琛屼换鍔�", "arm缂栧彿锛�"+basArm.getArmNo()+"====銆嬫媶鐮佸灈浠诲姟寮傚父绂佹涓嬪彂锛侊紒锛佷换鍔″緟鎵ц鏁伴噺澶т簬1锛侊紒锛�", false);
+ continue;
+ }
+ BasArmMast basArmMast = basArmMastList.get(0);
+// List<BasArmMast> basArmMastListOrder = basArmMastService.selectList(
+// new EntityWrapper<BasArmMast>()
+// .eq("arm_no", basArm.getArmNo())
+// .eq("sorting_line", basArm.getSortingLineSou())
+// .eq("matnr", basArmMast.getMatnr())
+// .eq("order_no", basArmMast.getOrderNo())
+// .eq("binding_tags", basArmMast.getBindingTags())
+// );
+// if (basArmMastListOrder.size()==1){
+// OrderDetlValueResultUtil orderDetlValueResultUtil = basArmMastService.selectOrderDetlValue(basArmMast.getOrderNo(), basArmMast.getMatnr());
+//
+// if (Cools.isEmpty(orderDetlValueResultUtil)){
+// continue;
+// }
+
+ OrderDetlValueResultUtil orderDetlValueResultUtil = new OrderDetlValueResultUtil();
+ Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", basArmMast.getMatnr()));
+// Double anfmeSign = basArmMastService.selectBasArmMastSignValue(basArmMast.getOrderNo(), basArmMast.getMatnr(),basArmMast.getBindingTags());
+ orderDetlValueResultUtil.setAnfme(1D);
+ orderDetlValueResultUtil.setHeight(mat.getHeight());
+ orderDetlValueResultUtil.setWeight(mat.getWeight());
+ orderDetlValueResultUtil.setLength(mat.getManLength());
+ orderDetlValueResultUtil.setWidth(mat.getWidth());
+ //璁㈠崟涓嬪彂
+ try{
+ ArmOrderAssignmentParam armOrderAssignmentParam = new ArmOrderAssignmentParam(basArmMast,orderDetlValueResultUtil);
+// 璁㈠崟涓嬪彂(SKU+璁㈠崟)
+ ReturnT<String> result = new PostMesDataUtils().postMesData("鏈烘鑷傛姄鍙栬鍗曪紙SKU锛変笅鍙戯細",ArmConstant.getArmUrl(basArmMast.getArmNo()), ArmConstant.ARM_ADAPTOR, armOrderAssignmentParam);
+ if (result.getCode()!=200){
+ armTaskAssignmentCallApiLogSave(locMastEnd, "鏈烘鑷傛姄鍙栬鍗曪紙SKU锛変笅鍙�", "arm缂栧彿锛�"+basArm.getArmNo()+"璁㈠崟涓嬪彂璁㈠崟淇℃伅涓嬪彂澶辫触锛侊紒锛�", false);
+ continue;
+ }
+ } catch (Exception e){
+ armTaskAssignmentCallApiLogSave(locMastEnd, "鏈烘鑷傛姄鍙栬鍗曪紙SKU锛変笅鍙�", "arm缂栧彿锛�"+basArm.getArmNo()+"璁㈠崟涓嬪彂璁㈠崟淇℃伅涓嬪彂澶辫触锛侊紒锛�", false);
+ continue;
+ }
+// }
+ ArmTaskAssignmentParam armTaskAssignmentParam = new ArmTaskAssignmentParam(basArm.getSortingLine());
+ //璁剧疆宸ヤ綔绌洪棿灏辩华
+ ReturnT<String> result = new PostMesDataUtils().postMesData("鏈烘鑷傛姄鍙栦换鍔′笅鍙戯細閫氱煡宸ヤ綔绌洪棿宸插氨缁�",ArmConstant.getArmUrl(basArmMast.getArmNo()), ArmConstant.ARM_WORKSPACE, armTaskAssignmentParam);
+ if (result.getCode()==200){
+ basArmMast.setStatus(1);
+ basArmMast.setBarcode(barcode);
+ basArmMastService.updateById(basArmMast);
+ } else {
+ armTaskAssignmentCallApiLogSave(locMastEnd, "鏈烘鑷傛姄鍙栦换鍔′俊鎭笅鍙戝け璐�", "arm缂栧彿锛�"+basArm.getArmNo()+"浠诲姟淇℃伅涓嬪彂澶辫触锛侊紒锛�", false);
}
}
} catch (Exception e){
@@ -4659,6 +4779,33 @@
// 濡傛灉娌℃湁绗﹀悎鏉′欢鐨勮褰曪紝鎴栬�呮墍鏈夎褰曟椂闂村樊澶т簬 5 鍒嗛挓锛屼繚瀛樻柊鐨勬棩蹇�
apiLogService.save("鏈烘鑷備换鍔$浉鍏�", tableName, "null", staProtocol.getBarcode(),
"绔欑偣鍙�:" + staProtocol.getSiteId(),
+ response, bool);
+ }
+
+ public void armTaskAssignmentCallApiLogSave(LocMast locMast, String tableName, String response, Boolean bool) {
+ // 鏌ヨ绗﹀悎鏉′欢鐨勬墍鏈� ApiLog
+ List<ApiLog> apiLogs = apiLogService.selectList(new EntityWrapper<ApiLog>()
+ .eq("namespace", "鏈烘鑷備换鍔$浉鍏�")
+ .eq("request", "绔欑偣鍙�:" + locMast.getLocNo())
+ .eq("response", response)
+ .eq("url", tableName)
+ .eq("client_ip", locMast.getBarcode())
+ .eq("result", 0)
+ .orderBy("create_time", false)
+ );
+
+ // 閬嶅巻缁撴灉闆嗭紝妫�鏌ユ椂闂存埑宸�兼槸鍚﹀皬浜� 5 鍒嗛挓
+ for (ApiLog apiLog : apiLogs) {
+ long parseLong = Long.parseLong(apiLog.getTimestamp());
+ if (new Date().getTime() - parseLong < 5 * 1000 * 60) {
+ // 濡傛灉鎵惧埌绗﹀悎鏉′欢鐨勮褰曚笖鏃堕棿宸皬浜� 5 鍒嗛挓锛屽垯涓嶄繚瀛樻柊璁板綍锛岀洿鎺ヨ繑鍥�
+ return;
+ }
+ }
+
+ // 濡傛灉娌℃湁绗﹀悎鏉′欢鐨勮褰曪紝鎴栬�呮墍鏈夎褰曟椂闂村樊澶т簬 5 鍒嗛挓锛屼繚瀛樻柊鐨勬棩蹇�
+ apiLogService.save("鏈烘鑷備换鍔$浉鍏�", tableName, "null", locMast.getBarcode(),
+ "绔欑偣鍙�:" + locMast.getLocNo(),
response, bool);
}
@@ -4774,8 +4921,8 @@
String barcode = staProtocol.getBarcode();
if(!Cools.isEmpty(barcode)) {
- if("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
- News.info("{}鍙风珯鐐规壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", outStaAgv.getStaNo(), barcode);
+ if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "0".equals(barcode)) {
+// News.info("{}鍙风珯鐐规壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", outStaAgv.getStaNo(), barcode);
continue;
}
} else {
@@ -4873,18 +5020,37 @@
BasAgvMast basAgvMast = new BasAgvMast();
try {
- List<LocMast> locMastList = locMastService.selectList(new EntityWrapper<LocMast>()
- .eq("loc_sts", "R")
- .ge("row1", 23)
- .le("row1", 32)
- .orderBy("io_time",true)
- );
+ List<LocMast> locMastList = null;
+ Integer floorNo = 1;
+ if(inStaAgv.getStaNo() < 2000){
+ locMastList = locMastService.selectList(new EntityWrapper<LocMast>()
+ .eq("loc_sts", "R")
+ .ge("row1", 21)
+ .le("row1", 26)
+ .orderBy("io_time",true)
+ );
+ }else if(inStaAgv.getStaNo() < 4000){
+ locMastList = locMastService.selectList(new EntityWrapper<LocMast>()
+ .eq("loc_sts", "R")
+ .ge("row1", 28)
+ .le("row1", 31)
+ .orderBy("io_time",true));
+ floorNo = 2;
+ }else{
+ locMastList = locMastService.selectList(new EntityWrapper<LocMast>()
+ .eq("loc_sts", "R")
+ .ge("row1", 32)
+ .le("row1", 38)
+ .orderBy("io_time",true));
+ floorNo = 3;
+ }
for (LocMast locMast : locMastList){
basAgvMast.setTaskNo(inStaAgv.getStaNo());
basAgvMast.setSourceLocNo(locMast.getLocNo());
basAgvMast.setStaNo(inStaAgv.getStaNo());
basAgvMast.setDevpId(devp.getId());
+ basAgvMast.setFloorNo(floorNo);
basAgvMast.setIoType(0);//AGV搴撲綅==銆嬭緭閫佺嚎绔欑偣 0
basAgvMastService.insert(basAgvMast);
break;
@@ -4966,6 +5132,12 @@
}
if (staProtocol.isAutoing()){
+ AgvBindCtnrAndBinParam agvBindCtnrAndBinParam = new AgvBindCtnrAndBinParam(basAgvMast);
+ agvBindCtnrAndBinParam.setCtnrCode(basAgvMast.getTimestamp().toString());
+ ReturnT<String> resultBind = new PostMesDataUtils().postMesDataAgv("AGV瀹瑰櫒缁戝畾", AgvConstant.AGV_URL, AgvConstant.AGV_CTNRANDBING, agvBindCtnrAndBinParam);
+ if (resultBind.getCode()!=200){
+ agvTaskAssignmentCallApiLogSave(basAgvMast, "AGV瀹瑰櫒缁戝畾", "浠诲姟鍙凤細"+basAgvMast.getTaskNo()+"浠诲姟淇℃伅涓嬪彂澶辫触锛侊紒锛�", false);
+ }
AgvTaskAssignmentParam agvTaskAssignmentParam = new AgvTaskAssignmentParam(basAgvMast);
//浠诲姟涓嬪彂
@@ -5044,7 +5216,7 @@
(basAgvMast.getSourceStaNo().equals(2033))){
AgvTaskAssignmentParam agvTaskAssignmentParam = new AgvTaskAssignmentParam(basAgvMast);
- if(basAgvMast.getFloorNo()==1) {
+ if(basAgvMast.getFloorNo()==1 || basAgvMast.getStaNo().equals(2034)) {
WrkMast wrkMast = wrkMastService.selectByWrkNo(staProtocol.getWorkNo());
AgvBindCtnrAndBinParam agvBindCtnrAndBinParam = new AgvBindCtnrAndBinParam(basAgvMast);
agvBindCtnrAndBinParam.setCtnrCode(wrkMast.getBarcode());
--
Gitblit v1.9.1