From 63676447b730800bc7ba3df060bf867713db98f4 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期三, 04 六月 2025 12:55:02 +0800 Subject: [PATCH] 关闭与erp的对接 --- src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java index 812886a..332fbc0 100644 --- a/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java @@ -1241,6 +1241,9 @@ String devNo = wrkMast.getSourceLocNo(); //鐩爣搴撲綅 String locNo = wrkMast.getLocNo(); + if (!Cools.isEmpty(locNo)) { + agvLocDetlService.delete(new EntityWrapper<AgvLocDetl>().eq("loc_no", locNo)); + } agvLocMastService.updateLocStsByLocNo(locNo, "O", "", null); if (wrkMast.getIoType() == 58) { agvBasDevpService.updateLocStsAndBarcodeByDevNo(devNo, "F", wrkMast.getBarcode(), wrkMast.getWhsType().shortValue()); @@ -1387,6 +1390,14 @@ if (!orderDetlService.update(orderDetl, new EntityWrapper<OrderDetl>().eq("order_no", "DB" + agvLocDetl.getOrderNo()).eq("matnr", agvLocDetl.getMatnr()).eq("three_code", agvLocDetl.getThreeCode()))) { throw new CoolException("淇敼璁㈠崟鏄庣粏澶辫触锛岃鑱旂郴绠$悊鍛�" + agvLocDetl.getOrderNo() + agvLocDetl.getMatnr()); } + }else { + orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("matnr", agvLocDetl.getMatnr()).eq("three_code", agvLocDetl.getThreeCode()).eq("source",33).ge("qty",agvLocDetl.getAnfme())); + if (orderDetl != null) { + orderDetl.setQty(orderDetl.getQty() - agvLocDetl.getAnfme()); + if (!orderDetlService.update(orderDetl, new EntityWrapper<OrderDetl>().eq("order_no", orderDetl.getOrderNo()).eq("matnr", agvLocDetl.getMatnr()).eq("three_code", agvLocDetl.getThreeCode()))) { + //throw new CoolException("淇敼璁㈠崟鏄庣粏澶辫触锛岃鑱旂郴绠$悊鍛�" + agvLocDetl.getOrderNo() + agvLocDetl.getMatnr()); + } + } } // FlowLog flowLog = new FlowLog(); // flowLog.setFid(String.valueOf(flowId)); -- Gitblit v1.9.1