From c4e8e814d2c9e0d03f6449860b70e58657fd7dc2 Mon Sep 17 00:00:00 2001 From: pjb <123456> Date: 星期二, 31 十二月 2024 11:58:27 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/tzhneasrs' into tzhneasrs --- src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java index 9e0d85f..b812ba7 100644 --- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java @@ -34,6 +34,7 @@ import java.util.Date; import java.util.List; import java.util.Map; +import java.util.concurrent.TimeUnit; /** * Created by vincent on 2022/4/9 @@ -417,7 +418,7 @@ //鍒犻櫎瀛樿揣妗f if (param.deleteFlag == 1) { for (MatSyncParam.MatParam matParam : param.getMatDetails()) { - matService.deleteById(matParam.getMatnr()); + matService.delete(new EntityWrapper<Mat>().eq("matnr", matParam.getMatnr())); } return; @@ -583,7 +584,7 @@ Pla pla = plaService.selectByBatchAndPackageNo(batch, packageNo, brand); Mat mat = matService.selectByMaktx(pla.getBrand()); //褰撶敓浜у崟鍙蜂笉涓�鑷存椂锛岄渶瑕佹柊寤轰竴涓猵aram - if (list.size() == 0 || checkOrder(list, pla.getProOrderNo()) == null) { + if (list.isEmpty() || (!Cools.isEmpty(pla.getProOrderNo()) && checkOrder(list, pla.getProOrderNo()) == null)) { OpenOrderPakoutParam param = new OpenOrderPakoutParam(); param.setcMaker(json.get("user").toString()); String type = Cools.isEmpty(pla.getProOrderNo()) ? "璋冩嫧鍏ュ簱鍗�" : "浜ф垚鍝佸叆搴�"; @@ -596,7 +597,8 @@ OpenOrderPakoutParam.Body body = new OpenOrderPakoutParam.Body(); body.setcInvCode(mat.getMatnr()); body.setiQuantity(pla.getWeightAnfme()); - body.setcBatch(""); + body.setcBatch(pla.getBatch()); + body.setCPackage(pla.getPackageNo()+""); body.setCbMemo(pla.getMemo()); bodyList.add(body); @@ -612,24 +614,27 @@ body = new OpenOrderPakoutParam.Body(); body.setcInvCode(mat.getMatnr()); body.setiQuantity(pla.getWeightAnfme()); + body.setcBatch(pla.getBatch()); + body.setCPackage(pla.getPackageNo()+""); body.setCbMemo(pla.getMemo()); bodyList.add(body); } else { body.setiQuantity(body.getIQuantity() + pla.getWeightAnfme()); + body.setcBatch(pla.getBatch()); + body.setCPackage(pla.getPackageNo()+""); } } } - //for (OpenOrderPakoutParam param : list) { - doHttpRequest(list, "鍏ュ簱鍗曚笂鎶�", url, orderReportPath, null, "127.0.0.1"); + for (OpenOrderPakoutParam param : list) { + doHttpRequest(param, "鍏ュ簱鍗曚笂鎶�", url, orderReportPath, null, "127.0.0.1"); - //} - + } return 200; - //return doHttpRequest(list, "鍏ュ簱鍗曚笂鎶�", url, orderReportPath, null, "127.0.0.1"); - } + + @Override public List<Order> selectOrderInformation(Map<String, String> param) { @@ -693,6 +698,7 @@ log.info("璇锋眰鍙傛暟锛歿}", requestParam); response = new HttpHandler.Builder() .setUri(url) + .setTimeout(30, TimeUnit.SECONDS) .setPath(path) .setJson(JSONObject.toJSONString(requestParam)) .build() -- Gitblit v1.9.1