From 30304784e82d4bba24121328da8eb8490aec4f4f Mon Sep 17 00:00:00 2001 From: hjg <hjg@123.com> Date: 星期二, 09 七月 2024 18:05:21 +0800 Subject: [PATCH] 更改进厂为待装 --- JavaSource/com/mandi/webservice/service/impl/InvoiceService.java | 78 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 77 insertions(+), 1 deletions(-) diff --git a/JavaSource/com/mandi/webservice/service/impl/InvoiceService.java b/JavaSource/com/mandi/webservice/service/impl/InvoiceService.java index 2da633c..6c9d857 100644 --- a/JavaSource/com/mandi/webservice/service/impl/InvoiceService.java +++ b/JavaSource/com/mandi/webservice/service/impl/InvoiceService.java @@ -276,18 +276,22 @@ // Fileoperation.AppendContentToFile(Fileoperation.gettestFileName(), "鍙傛暟yktkh::::"+RequestParam.getString(r, "yktkh")); String cardID=""; + boolean needRecord=true; Map<String, Object> mm=new HashMap<String, Object>(); try { JsonParser jp=new JsonParser(); JsonObject jo=jp.parse(jsonParam).getAsJsonObject(); cardID=JSONobj.getstring(jo, "yktkh"); + if(jo.has("needRecord")) { + needRecord = JSONobj.getbool(jo, "needRecord"); + } } catch (Exception e) { mm.put("respcode", 999); mm.put("respmsg", "鏁版嵁瑙f瀽鍑洪敊锛�"); String str=Jacksonmethod.tojson(mm, false); return str; } - ObjectResult<Map<String, Object>> prs=fdser.getcInfo(cardID); + ObjectResult<Map<String, Object>> prs=fdser.getcInfo(cardID,needRecord); if(prs.getCode() == 1) { log.info("鍗″彿:" + cardID + "---- 閿欒锛�"+ prs.getErrmsg()); } @@ -368,5 +372,77 @@ return str; } + @Override + public String receiveCurrWeight(HttpServletRequest r, String jsonParam) { // 鑾峰彇涓氬姟鍗曞彿 涓�娆$О閲� 浜屾绉伴噸 + JsonParser jp = new JsonParser(); + JsonObject jo = jp.parse(jsonParam).getAsJsonObject(); + String businessNo = JSONobj.getstring(jo, "businessNo"); + boolean firstWeighing = JSONobj.getbool(jo, "firstWeighing"); + boolean secondWeighing = JSONobj.getbool(jo, "secondWeighing"); + boolean isJc = JSONobj.getbool(jo, "isJc"); + String sdepartNo = JSONobj.getstring(jo, "sdepartNo"); + if (StringUtils.isBlank(businessNo) || businessNo.indexOf("XS") != 0 || StringUtils.isBlank(sdepartNo) + ) { + return null; + } + // 鍒锋柊 + if (firstWeighing || secondWeighing) { // 绉伴噸闇�瑕佸埛鏂颁竴涓� + if ("06".equals(sdepartNo)) { // 鏄庢櫉 + synchronized (FdXSTDService.refreshMsLedLock) { + if (FdXSTDService.refreshMsLedLock) { // 绯荤粺绻佸繖 + return null; + } + } + try { + synchronized (FdXSTDService.refreshMsLedLock) { + FdXSTDService.refreshMsLedLock = true; + } + fdser.sendToMsLed(null); + } finally { + synchronized (FdXSTDService.refreshMsLedLock) { + FdXSTDService.refreshMsLedLock = false; + } + } + } + } + if (firstWeighing || secondWeighing || isJc) { // 绉伴噸闇�瑕佸埛鏂颁竴涓� + if ("08".equals(sdepartNo)) { // 涔夌憺 + synchronized (FdXSTDService.refreshYrLedLock) { + if (FdXSTDService.refreshYrLedLock) { // 绯荤粺绻佸繖 + return null; + } + } + try { + synchronized (FdXSTDService.refreshYrLedLock) { + FdXSTDService.refreshYrLedLock = true; + } + fdser.sendToYrLed(null); + } finally { + synchronized (FdXSTDService.refreshYrLedLock) { + FdXSTDService.refreshYrLedLock = false; + } + } + } + if ("04".equals(sdepartNo)) { // 绉戞妧 + synchronized (FdXSTDService.refreshYrLedLock) { + if (FdXSTDService.refreshKjLedLock) { // 绯荤粺绻佸繖 + return null; + } + } + try { + synchronized (FdXSTDService.refreshKjLedLock) { + FdXSTDService.refreshKjLedLock = true; + } + fdser.sendToKjLed(null); + } finally { + synchronized (FdXSTDService.refreshKjLedLock) { + FdXSTDService.refreshKjLedLock = false; + } + } + } + } + return null; + } + } -- Gitblit v1.9.3