| | |
| | | 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) { |
| | |
| | | remp.put("tdmx_tdfl",tdmx.getTdmx_tdfl()); |
| | | relist.add(remp); |
| | | currPch = tdmx.getTdmx_pch(); |
| | | pchList.add(tdmx.getTdmx_pch()); |
| | | } |
| | | |
| | | if(grossNum>0) { |
| | |
| | | |
| | | // 此处异步触发一下明晟发车 |
| | | 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; |
| | | } |
| | | } |
| | |
| | | synchronized (FdXSTDService.refreshMsLedLock) { |
| | | FdXSTDService.refreshMsLedLock = true; |
| | | } |
| | | sendToMsLed(cph); |
| | | sendToMsLed(pch); |
| | | } catch (Exception e) { |
| | | log.error("出现异常:"+ e.getMessage(),e); |
| | | } finally { |
| | |
| | | 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) { // 系统繁忙 |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 挪到一卡通 |
| | | * @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()); |
| | |
| | | Map speakParam = new HashMap(1); |
| | | for (Map.Entry<String, List<Map>> entry : ywbhListMap.entrySet()) { |
| | | // 遍历每个业务单的 |
| | | // 当前装车A、B、C区 |
| | | boolean currA = false,currB = false, currC = false; |
| | | // 当前装车A、B、C区; 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); |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 准备语音 |
| | | * 准备语音 ,挪到一卡通 |
| | | * @param cph 车牌号 |
| | | * @param total 当前区总数 |
| | | * @param abcMap A、B、C为key的区已装数目 |
| | |
| | | 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){ |
| | |
| | | return orr; |
| | | } |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | } |
| | | // Fd_Bsheet nr=this.fbper.getbyVehicleId(vehicleId, Serviceenum.在办); |
| | | // if(nr==null){ |