From 301115d5e96b56cd093eee3fcff2d60a15184162 Mon Sep 17 00:00:00 2001
From: hjg <hjg@123.com>
Date: 星期一, 05 二月 2024 14:28:29 +0800
Subject: [PATCH] 明晟装车记录
---
JavaSource/com/mandi/webservice/service/impl/FdXSTDService.java | 69 +++++++++++++++++++++++-----------
1 files changed, 47 insertions(+), 22 deletions(-)
diff --git a/JavaSource/com/mandi/webservice/service/impl/FdXSTDService.java b/JavaSource/com/mandi/webservice/service/impl/FdXSTDService.java
index 6582071..ec33ed7 100644
--- a/JavaSource/com/mandi/webservice/service/impl/FdXSTDService.java
+++ b/JavaSource/com/mandi/webservice/service/impl/FdXSTDService.java
@@ -437,10 +437,10 @@
return prr;
}
} catch (Exception e) {
- // TODO: handle exception
}
String currPch="";// 褰撳墠鎵规鍙�
+ List<String> pchList = new ArrayList<>();
//绗竴娆℃坊鍔犺鍗歌褰曞彂閫佽杞︿俊鎭�
int sfzc=this.fbper.getbsitembyNo(fdb.getBsNo());
if(sfzc<=0) {
@@ -582,6 +582,7 @@
remp.put("tdmx_tdfl",tdmx.getTdmx_tdfl());
relist.add(remp);
currPch = tdmx.getTdmx_pch();
+ pchList.add(tdmx.getTdmx_pch());
}
if(grossNum>0) {
@@ -607,12 +608,25 @@
// 姝ゅ寮傛瑙﹀彂涓�涓嬫槑鏅熷彂杞�
if("06".equals(fdb.getSdepartNo())) {
- final String cph = currPch;
+ final String pch = currPch;
final String finalVehicleId = vehicleId;
+ ThreadPoolUtil.getInstance().execute(()->{
+ Map paramMap = new HashMap();
+ paramMap.put("vehicleId", finalVehicleId);
+ paramMap.put("tdmxPchList", tdmxPchList);
+ String jsonStr = Jacksonmethod.tojson(paramMap, false);
+ JsonObject jsonObject = Wxhtmethod.postJsonStr(Contants.ms_DoScanUrl, jsonStr);
+ if (jsonObject.get("code").getAsInt() != 0) {
+ prr.setCode(1);
+ prr.setErrmsg(jsonObject.get("errmsg").getAsString());
+ // return prr;
+ }
+ });
+ // 寤惰繜1.5绉掓墽琛岋紝淇濊瘉鏁版嵁鎵ц瀹屼簡
ThreadPoolUtil.getInstance().execute(()->{
synchronized (FdXSTDService.refreshMsLedLock) {
if (FdXSTDService.refreshMsLedLock) { // 绯荤粺绻佸繖
- log.info(finalVehicleId + "" + cph + "绯荤粺绻佸繖锛�");
+ log.info(finalVehicleId + "" + pch + "绯荤粺绻佸繖锛�");
return;
}
}
@@ -620,7 +634,7 @@
synchronized (FdXSTDService.refreshMsLedLock) {
FdXSTDService.refreshMsLedLock = true;
}
- sendToMsLed(cph);
+ sendToMsLed(pch);
} catch (Exception e) {
log.error("鍑虹幇寮傚父锛�"+ e.getMessage(),e);
} finally {
@@ -628,14 +642,15 @@
FdXSTDService.refreshMsLedLock = false;
}
}
- });
+ },1500);
}
if("08".equals(fdb.getSdepartNo())) {
final String cph = currPch;
ThreadPoolUtil.getInstance().execute(()->{
- Map scanCodeParamMap = new HashMap();
+ // 杩欎釜鍦版柟涓嶅啀璇锋眰
+ /*Map scanCodeParamMap = new HashMap();
scanCodeParamMap.put("pch",cph);
- Wxhtmethod.post(Contants.yr_scanCodeNoticeUrl, scanCodeParamMap);
+ Wxhtmethod.post(Contants.yr_scanCodeNoticeUrl, scanCodeParamMap);*/
try {
synchronized (FdXSTDService.refreshYrLedLock) {
if (FdXSTDService.refreshYrLedLock) { // 绯荤粺绻佸繖
@@ -679,13 +694,18 @@
}
/**
- *
+ * 鎸埌涓�鍗¢��
* @param currPch 褰撳墠鎵规鍙�
*/
public void sendToMsLed(String currPch){
//A鍖� 76-86 + 99-1
//B鍖� 14-33 + 99-2
//C鍖� 53-67 + 99-3
+ // 2024骞存敼
+ //A鍖� 73-88 + 99-1 + 40-45
+ //B鍖� 14-27 + 99-2 + 46-49
+ //C鍖� 50-65 + 99-3
+ //D鍖� 28-39 + 69-72 + 89-98
log.info("LED-ABC褰撳墠鎵爜鎵规鍙凤細" + currPch);
List<Map> totalList = tdmxper.getHwList("06"); // 鑾峰彇鏄庢櫉鎵�鏈夊湪鍔炰笟鍔″崟鐨勪俊鎭�
log.info("LED-ABC鑾峰彇淇℃伅鏉℃暟锛�" + totalList.size());
@@ -709,16 +729,18 @@
Map speakParam = new HashMap(1);
for (Map.Entry<String, List<Map>> entry : ywbhListMap.entrySet()) {
// 閬嶅巻姣忎釜涓氬姟鍗曠殑
- // 褰撳墠瑁呰溅A銆丅銆丆鍖�
- boolean currA = false,currB = false, currC = false;
+ // 褰撳墠瑁呰溅A銆丅銆丆鍖�; D鍖哄彧鍙備笌璁板綍锛屼笉鍙備笌LED鏄剧ず鍜岃瑷�鎾姤
+ boolean currA = false,currB = false, currC = false, currD = false;
boolean hasZcwc = false; // 淇濊瘉宸茬粡瀹屾垚浜�
String ywhb = entry.getKey();
List<Map> vehicleIdTotalList = entry.getValue();
- Map<String, Integer> totalAbcMap = new HashMap(3); // 鎬昏淇℃伅
+ // 鎬昏淇℃伅
+ Map<String, Integer> totalAbcMap = new HashMap(3);
totalAbcMap.put("A", 0);
totalAbcMap.put("B", 0);
totalAbcMap.put("C", 0);
- Map<String, Integer> abcMap = new HashMap(3); // 宸茶淇℃伅
+ /* 宸茶淇℃伅 */
+ Map<String, Integer> abcMap = new HashMap(3);
abcMap.put("A", 0);
abcMap.put("B", 0);
abcMap.put("C", 0);
@@ -731,32 +753,36 @@
String hh = hw.replaceAll("\\-.*","");
hh = hh.substring(hh.length()-2); // 鍙栨渶鍚庝袱浣�
int num = Integer.parseInt(hh);
- if (num >= 76 && num <= 86 || hw.lastIndexOf("99-1") >= 0) { // A鍖�
+ if (num >= 73 && num <= 88 || hw.lastIndexOf("99-1") >= 0) { // A鍖�
totalAbcMap.put("A",totalAbcMap.get("A") + 1);
if (zcbz != null && zcbz == 1) { // 瑁呰溅瀹屾垚
abcMap.put("A", abcMap.get("A") + 1);
hasZcwc = true;
}
if(pch.equals(currPch)) {
- currA = true; currB = false;currC =false;
+ currA = true; currB = false;currC =false;currD=false;
}
- } else if (num >= 14 && num <= 33 || hw.lastIndexOf("99-2") >= 0) { // B鍖�
+ } else if (num >= 14 && num <= 27 || hw.lastIndexOf("99-2") >= 0) { // B鍖�
totalAbcMap.put("B", totalAbcMap.get("B") + 1);
if (zcbz != null && zcbz == 1) {
abcMap.put("B", abcMap.get("B") + 1);
hasZcwc = true;
}
if(pch.equals(currPch)) {
- currA = false; currB = true;currC =false;
+ currA = false; currB = true;currC =false;currD=false;
}
- } else if (num >= 53 && num <= 67 || hw.lastIndexOf("99-3") >= 0) { // C鍖�
+ } else if (num >= 50 && num <= 65 || hw.lastIndexOf("99-3") >= 0) { // C鍖�
totalAbcMap.put("C", totalAbcMap.get("C") + 1);
if (zcbz != null && zcbz == 1) {
abcMap.put("C", abcMap.get("C") + 1);
hasZcwc = true;
}
if(pch.equals(currPch)) {
- currA = false; currB = false; currC =true;
+ currA = false; currB = false; currC =true; currD=false;
+ }
+ } else if(num>=28 && num<=39 || (num>=69 && num<=72) || (num>=89 && num<=98)) {
+ if(pch.equals(currPch)) {
+ currA = false; currB = false;currC =false;currD=true;
}
}
}
@@ -814,7 +840,7 @@
}
/**
- * 鍑嗗璇煶
+ * 鍑嗗璇煶 锛屾尓鍒颁竴鍗¢��
* @param cph 杞︾墝鍙�
* @param total 褰撳墠鍖烘�绘暟
* @param abcMap A銆丅銆丆涓簁ey鐨勫尯宸茶鏁扮洰
@@ -934,8 +960,8 @@
Map paramMap = new HashMap();
paramMap.put("strTitle",strTitle);
paramMap.put("strContent",strContent);
- Wxhtmethod.post(Contants.kj_zcLedUrl + "/SendLED",paramMap);
- log.info("kj_zcLedUrl: " + Contants.kj_zcLedUrl + ";title:" + strTitle + ",content:" + strContent);
+ String re = Wxhtmethod.post(Contants.kj_zcLedUrl + "/SendLED",paramMap);
+ log.info("鍥炲锛�" + re +";kj_zcLedUrl: " + Contants.kj_zcLedUrl + ";title:" + strTitle + ",content:" + strContent);
}
String fillWithZero(int str){
@@ -995,7 +1021,6 @@
return orr;
}
} catch (Exception e) {
- // TODO: handle exception
}
// Fd_Bsheet nr=this.fbper.getbyVehicleId(vehicleId, Serviceenum.鍦ㄥ姙);
// if(nr==null){
--
Gitblit v1.9.3