From f1a1915b575c435f7172fdb59d48e13726ff4ff0 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期三, 29 五月 2024 16:29:07 +0800 Subject: [PATCH] # 调拨单同步锁 --- src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 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 2b26325..d877c17 100644 --- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java @@ -118,7 +118,8 @@ for (PickParam.Pick pick : pickParams.getPicks()) { if (pick.getCount().equals(0D)) continue; - AgvWrkDetl agvWrkDetl = agvWrkDetlService.selectOne(new EntityWrapper<AgvWrkDetl>().eq("matnr", pick.getMatnr()).eq("three_code", pick.getThreeCode())); + Double count = 0.0D; + AgvWrkDetl agvWrkDetl = agvWrkDetlService.selectOne(new EntityWrapper<AgvWrkDetl>().eq("matnr", pick.getMatnr()).eq("three_code", pick.getThreeCode()).eq("supp_code",pick.getSuppCode())); if (Cools.isEmpty(agvWrkDetl)) { AgvWrkDetl wrkDetl = new AgvWrkDetl(); Mat mat = matService.selectByMatnr(pick.getMatnr()); @@ -140,7 +141,7 @@ } else { Double anfme = agvWrkDetl.getAnfme() + pick.getCount(); agvWrkDetl.setAnfme(anfme); - agvWrkDetlService.update(agvWrkDetl,new EntityWrapper<AgvWrkDetl>().eq("matnr",agvWrkDetl.getMatnr()).eq("three_code",agvWrkDetl.getThreeCode())); + agvWrkDetlService.update(agvWrkDetl,new EntityWrapper<AgvWrkDetl>().eq("matnr",agvWrkDetl.getMatnr()).eq("three_code",agvWrkDetl.getThreeCode()).eq("supp_code",pick.getSuppCode())); } @@ -393,7 +394,11 @@ } } else { if (agvLocMast.getFloor() != floor) { - ioType = 12; + if (agvLocMast.getFloor() == 1) { + throw new CoolException("褰撳墠搴撲綅璇烽�夋嫨璋冩嫧鍗曡皟鎷紒"); + } else { + ioType = 12; + } } else { ioType = 11; } -- Gitblit v1.9.1