From 6eb6a4b530627471d41979ccbc977a7371e99c1f Mon Sep 17 00:00:00 2001 From: zhangchao <zc857179121@qq.com> Date: 星期一, 04 十一月 2024 15:36:59 +0800 Subject: [PATCH] 找库位 --- src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java index 1cb8241..03b6140 100644 --- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java @@ -150,8 +150,9 @@ agvWrkDetlService.insert(wrkDetl); } else { Double anfme = agvWrkDetl.getAnfme() + pick.getCount(); + agvWrkDetl.setIoTime(agvWrkMast.getIoTime()); agvWrkDetl.setAnfme(anfme); - agvWrkDetl.setModiTime(new Date()); + agvWrkDetl.setModiTime(now); agvWrkDetlService.update(agvWrkDetl,new EntityWrapper<AgvWrkDetl>().eq("matnr",agvWrkDetl.getMatnr()).eq("three_code",agvWrkDetl.getThreeCode()).eq("supp_code",pick.getSuppCode())); } @@ -176,7 +177,6 @@ } if (totleWrkdetl >= totleLocdetl) { agvWrkMast.setIoType(101); - agvWrkMast.setModiTime(new Date()); agvWrkMastService.update(agvWrkMast,new EntityWrapper<AgvWrkMast>().eq("wrk_no", pickParams.getWrkNo())); } @@ -520,6 +520,15 @@ if (Cools.isEmpty(orderDetl)) { throw new CoolException("褰撳墠鐗╂枡鐨勮皟鎷ㄥ崟涓嶅瓨鍦紒"); } + Order order = orderService.selectByNo(orderDetl.getOrderNo()); + if (Cools.isEmpty(order)) { + throw new CoolException("褰撳墠鐗╂枡鐨勮皟鎷ㄥ崟涓嶅瓨鍦紒"); + } + if (order.getSettle() == 4L) { + if (!orderService.updateSettle(order.getId(),2L,userId)) { + throw new CoolException("璋冩嫧鍗曞洖婊氬紓甯�!"); + } + } orderDetl.setQty(orderDetl.getQty() - agvLocDetl.getAnfme()); if (!orderDetlService.updateById(orderDetl)) { throw new CoolException("淇濆瓨宸ヤ綔鏄庣粏澶辫触"); @@ -590,6 +599,7 @@ agvWrkDetl.setWrkNo(wrkMast.getWrkNo()); agvWrkDetl.setModiUser(userId); agvWrkDetl.setModiTime(now); + agvWrkDetl.setIoTime(now); if (!agvWrkDetlService.insert(agvWrkDetl)) { throw new CoolException("淇濆瓨宸ヤ綔鏄庣粏澶辫触"); } @@ -744,6 +754,7 @@ agvWrkMast.setWrkSts(201L); agvWrkMast.setModiUser(userId); agvWrkMast.setModiTime(now); + agvWrkMast.setIoTime(now); @@ -769,6 +780,7 @@ agvWrkDetl.setOrderNo(agvWrkDetl.getOrderNo().substring(2)); agvWrkDetl.setModiUser(userId); agvWrkDetl.setModiTime(now); + agvWrkDetl.setIoTime(now); if (!agvWrkDetlService.update(agvWrkDetl,new EntityWrapper<AgvWrkDetl>() .eq("matnr",agvWrkDetl.getMatnr()) .eq("three_code",agvWrkDetl.getThreeCode()) @@ -817,6 +829,7 @@ agvWrkDetl.setWrkNo(wrkMast.getWrkNo()); // 淇濇寔宸ヤ綔妗f槑缁� agvWrkDetl.setWrkNo(wrkMast.getWrkNo()); + agvWrkDetl.setIoTime(now); agvWrkDetl.setModiUser(userId); agvWrkDetl.setModiTime(now); if (!agvWrkDetlService.insert(agvWrkDetl)) { -- Gitblit v1.9.1