From 80cd1569120416b096d28ebbe9a8e6e1d867f6e0 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期四, 19 九月 2024 14:19:45 +0800
Subject: [PATCH] 盘点异常处理
---
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 21 +++++++--------------
1 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
index 67a7ab4..2de975b 100644
--- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -1054,7 +1054,7 @@
StartupDto dto = commonService.getLocNo(1, param.getPalletizingNo(), locTypeDto, 0);
// 杩斿洖GWCS鐩爣淇℃伅
- boolean result = pushStaNoToGwcs(param.getPalletizingNo(), dto.getStaNo(), dto.getWorkNo(), param.getBarcode());
+ pushStaNoToGwcs(param.getPalletizingNo(), dto.getStaNo(), dto.getWorkNo(), param.getBarcode(),"涓�妤煎弽淇搧鍏ュ簱鎺ㄩ�乬wcs");
// if (!result) {
// throw new CoolException("鍏ュ簱鍥炴帹鍏ュ簱鐮佸ご缁橤WCS澶辫触");
// }
@@ -1173,7 +1173,7 @@
throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
}
// 杩斿洖GWCS鐩爣淇℃伅
- pushStaNoToGwcs(param.getPalletizingNo(),wrkMast.getSourceStaNo(),workNo,param.getBarcode());
+ pushStaNoToGwcs(param.getPalletizingNo(),wrkMast.getSourceStaNo(),workNo,param.getBarcode(),"浜屾ゼ绌烘墭鍥炴祦鎺ㄩ�乬wcs");
return R.ok("绌烘墭鍥炴祦璇锋眰鎴愬姛");
}
@@ -1233,7 +1233,7 @@
StartupDto dto = commonService.getLocNo(iotype, param.getPalletizingNo(), locTypeDto,0);
// 杩斿洖GWCS鐩爣淇℃伅
- pushStaNoToGwcs(param.getPalletizingNo(),dto.getStaNo(),dto.getWorkNo(),param.getBarcode());
+ pushStaNoToGwcs(param.getPalletizingNo(),dto.getStaNo(),dto.getWorkNo(),param.getBarcode(),"gwms鐢宠鍏ュ簱鍚庢帹閫乬wcs");
int workNo = dto.getWorkNo();
@@ -1741,7 +1741,7 @@
return wrkDetls.size() > 1 ? 1 : 4; // 涓�鏉¤褰曞氨鏄竴鍗�
}
- public boolean pushStaNoToGwcs(Integer palletizingNo, Integer staNo, Integer workNo,String barcode) {
+ public boolean pushStaNoToGwcs(Integer palletizingNo, Integer staNo, Integer workNo,String barcode,String message) {
boolean success = false;
// 鑾峰彇璇锋眰澶�
Map<String, Object> headers = getHeaders();
@@ -1764,23 +1764,16 @@
.doPost();
if (!Cools.isEmpty(response)) {
success = true;
-// // 淇敼璁㈠崟鐘舵�� 4.瀹屾垚 ===>> 6.宸蹭笂鎶�
-// if (!orderService.updateSettle(order.getId(), 6L, null)) {
-// throw new CoolException("鏈嶅姟鍣ㄥ唴閮ㄩ敊璇紝璇疯仈绯荤鐞嗗憳");
-// }
} else {
- log.error("zmws鎺ㄩ�佸叆搴撶爜澶寸珯鐐规帴鍙eけ璐ワ紒锛侊紒url锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL + MesConstant.PAKIN_URL, body, response);
- throw new CoolException("涓婃姤mes绯荤粺澶辫触");
+ log.error(message + "澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL + MesConstant.PAKIN_URL, body, response);
}
} catch (Exception e) {
- log.error("鍏ュ簱璇锋眰鎺ュ彛澶辫触锛歿}", e.getMessage());
-// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-// return FAIL.setMsg(e.getMessage());
+ log.error(message + "寮傚父锛歿}", e);
} finally {
try {
// 淇濆瓨鎺ュ彛鏃ュ織
apiLogService.save(
- "鍏ュ簱",
+ message,
MesConstant.GWCS_IP_PORT + MesConstant.GWCS_FPKW_URL,
null,
"127.0.0.1",
--
Gitblit v1.9.1