From 292cf07a04a7b6d72ee0a49dab5b4db712c41603 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期二, 14 四月 2026 10:55:06 +0800
Subject: [PATCH] 1
---
zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/service/impl/CtuMainServiceImpl.java | 46 +++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/service/impl/CtuMainServiceImpl.java b/zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/service/impl/CtuMainServiceImpl.java
index 3bf5896..20254ec 100644
--- a/zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/service/impl/CtuMainServiceImpl.java
+++ b/zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/service/impl/CtuMainServiceImpl.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
+import com.zy.acs.common.utils.News;
import com.zy.acs.conveyor.common.utils.HttpHandler;
import com.zy.acs.conveyor.controller.requestParam.StationRequestParam;
import com.zy.acs.conveyor.controller.vo.OpenBusSubmitParam;
@@ -36,6 +37,9 @@
@Value("${ctu.station}")
private String station;
+ @Value("${ctu.checkTakeComplete}")
+ private String checkTakeComplete;
+
@Value("${ctu.sendTask}")
private String sendTask;
@@ -45,7 +49,7 @@
private Integer codeValue = 200;
- private Integer timeout = 1200;
+ private Integer timeout = 10;
@Transactional
@@ -108,16 +112,48 @@
log.info("鏈繑鍥炵珯鐐圭姸鎬侊細{}", staNo);
} else {
log.error("璋冪敤涓嬪彂浠诲姟鎺ュ彛鎶ラ敊锛屽搷搴旂爜锛歿}锛屽搷搴斿唴瀹癸細{}", jsonObject.getInteger(code), response);
- throw new CoolException("璋冪敤涓嬪彂浠诲姟鎺ュ彛鎶ラ敊锛屽搷搴旂爜锛�" + jsonObject.getInteger(code));
+ //throw new CoolException("璋冪敤涓嬪彂浠诲姟鎺ュ彛鎶ラ敊锛屽搷搴旂爜锛�" + jsonObject.getInteger(code));
}
} catch (CoolException e) {
log.error("璋冪敤绔欑偣鐘舵�佹帴鍙e紓甯�", e);
- throw e;
+ //throw e;
} catch (Exception e) {
- log.error("妫�鏌ョ珯鐐圭姸鎬佸け璐ワ紝绔欑偣缂栧彿锛歿}", staNo, e);
+ //log.error("妫�鏌ョ珯鐐圭姸鎬佸け璐ワ紝绔欑偣缂栧彿锛歿}", staNo, e);
}
return null;
}
-
+ /**
+ * 妫�鏌ョ珯鐐圭姸鎬�
+ *
+ * @param seqNum 浠诲姟鍙�
+ * @return 绔欑偣鏄惁鍙�氳
+ */
+ public Boolean checkComplete(String seqNum) {
+ StationRequestParam stationRequestParam = new StationRequestParam();
+ stationRequestParam.setSeqNum(seqNum);
+ String response = "";
+ try {
+ response = new HttpHandler.Builder()
+ .setUri(ctuUrl)
+ .setPath(checkTakeComplete)
+ .setTimeout(timeout, TimeUnit.SECONDS)
+ .setJson(JSON.toJSONString(stationRequestParam))
+ .build()
+ .doPost();
+ News.info("RCS杩斿洖鏁版嵁锛歿}", response);
+ JSONObject jsonObject = JSON.parseObject(response);
+ if (jsonObject.getInteger(code).equals(codeValue)) {
+ if (jsonObject.getBoolean(dataCode)) {
+ return true;
+ }
+ } else {
+ log.error("璋冪敤涓嬪彂浠诲姟鎺ュ彛鎶ラ敊锛屽弬鏁帮細{}锛屽搷搴斿唴瀹癸細{}", seqNum, response);
+ //throw new CoolException("璋冪敤涓嬪彂浠诲姟鎺ュ彛鎶ラ敊锛屽搷搴旂爜锛�" + jsonObject.getInteger(code));
+ }
+ } catch (Exception e) {
+ log.error("妫�鏌ョ珯鐐圭姸鎬佸け璐ワ紝浠诲姟缂栧彿锛歿},{}", seqNum,e.getMessage());
+ }
+ return false;
+ }
}
--
Gitblit v1.9.1