From 1c1472f51d68382f913e413aa827fd0b028ab589 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期六, 13 七月 2024 16:44:20 +0800
Subject: [PATCH] 更改配置信息
---
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutEventControlManager.java | 58 ++++++++++++++++++++++++++++++++++++----------------------
1 files changed, 36 insertions(+), 22 deletions(-)
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutEventControlManager.java b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutEventControlManager.java
index 7732e83..f4e8329 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutEventControlManager.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutEventControlManager.java
@@ -126,27 +126,7 @@
}
- /**
- * @param param
- * @return
- */
-// public String noticeWeightDone(ApiInoutData param) {
-// //鑾峰彇绉伴噸涓绘帶鍣ㄩ厤缃�
-// InoutConf conf = getWeightGateway(param.getCompanyId(), param.getDeptId(), param.getSort());
-//
-// if (null == conf) {
-// return "绉伴噸涓绘帶鏈厤缃紝鏀寔澶辫触";
-// }
-//
-// ApiInoutData apiData = new ApiInoutData(conf);
-// apiData.setPlateNum(param.getPlateNum());
-// apiData.setTime(new Date());
-//
-// ApiInoutService inoutApiService = apiInoutManager.getApiService(conf.getProtocol());
-//
-// // return inoutApiService.noticeWeightDone(apiData); TODO
-// return null;
-// }
+
/**
* 鍑哄叆搴撴姄鎷�
@@ -276,6 +256,10 @@
req.setPlayType(conf.getPlayType());
req.setSerSn(null == snapSer ? null : snapSer.getSn());
req.setBizId(param.getBizId());
+ //鑻ヤ负鍑哄叆搴撶О閲嶆姄鎷嶏紝鍒欎笉浼犻�掍笟鍔′富閿�傚湪鍑哄叆搴撲笟鍔℃彁浜ゆ椂淇濆瓨鏂囦欢淇℃伅
+ if(InoutConstant.PROGRESS_WEIGHT_TAG.equals(conf.getInoutProgress())){
+ req.setBizId(null);
+ }
req.setCameraName(conf.getName());
req.setMediaAddr(CameraUtil.updateMediaAddr(conf.getMediaAddr(), conf.getLoginId(),
@@ -389,6 +373,24 @@
return null;
}
+ /**
+ * @Desc: 鑾峰彇绉伴噸缃戝叧璁惧
+ * @author: Andy
+ * @update-time: 2022/11/26
+ */
+ public InoutConf getLedConf(String companyId, String deptId, String sort) {
+ if (null == sort) sort = "1";
+ List<InoutConf> list = inoutCommonService.getCacheInoutConf(companyId, deptId);
+ if (null == list || list.isEmpty()) return null;
+
+ for (InoutConf conf : list) {
+ if (InoutConstant.CONF_TYPE_40.equals(conf.getType()) && sort.equals(conf.getSort())) {
+ return conf;
+ }
+ }
+ return null;
+ }
+
/**
* 琚姩鏀跺埌杞︾墝璇嗗埆缁撴灉锛屼簨浠�
@@ -484,6 +486,18 @@
*/
@Async
public void onInoutWeight(InoutData data, String curProgress, String nextProgress) {
+ ApiInoutData apiData;
+ //閫氱煡鍖栭獙灞�
+ //鑾峰彇LED灞忛厤缃俊鎭�
+ InoutConf ledConf = this.getLedConf(data.getCompanyId(), data.getDeptId(), null);
+ if(null != ledConf){
+ apiData = new ApiInoutData(ledConf);
+ apiData.setTime(new Date());
+ apiData.setDeviceCode(InoutApiConstant.DEVICE_CODE_6001);
+ ApiInoutService inoutApiService = apiInoutManager.getApiService(ledConf.getProtocol());
+ inoutApiService.noticeLed(apiData, data);
+ }
+
//鑾峰彇鍦扮鎺у埗鍣�
InoutConf conf = this.getWeightGateway(data.getCompanyId(), data.getDeptId(), null);
if (null == conf) {
@@ -491,7 +505,7 @@
}
//1銆侀�氱煡绉伴噸鏄剧ず灞忥紝璁惧缂栧彿6001
- ApiInoutData apiData = new ApiInoutData(conf);
+ apiData = new ApiInoutData(conf);
apiData.setTime(new Date());
apiData.setDeviceCode(InoutApiConstant.DEVICE_CODE_6001);
ApiInoutService inoutApiService = apiInoutManager.getApiService(conf.getProtocol());
--
Gitblit v1.9.3