From 062b3da2a21fabbe5fe76178522ad763e09ed1cc Mon Sep 17 00:00:00 2001 From: LSH Date: 星期五, 22 十二月 2023 10:01:00 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/web/WcsController.java | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zy/common/web/WcsController.java b/src/main/java/com/zy/common/web/WcsController.java index e49a7ad..b2f31ac 100644 --- a/src/main/java/com/zy/common/web/WcsController.java +++ b/src/main/java/com/zy/common/web/WcsController.java @@ -166,12 +166,12 @@ // 妫�绱㈠簱浣� List<String> matNos = waitPakins.stream().map(WaitPakin::getMatnr).distinct().collect(Collectors.toList()); int rowCount = rowLastnoService.selectCount(null); - Integer integer = 1; + Integer integer = 2; for (int i = 1; i <= rowCount; i++) { integer = rowLastnoService.selectNextWhsType(); BasCrnp crn_no = basCrnpService.selectOne(new EntityWrapper<BasCrnp>() - .eq("crn_no", i)); - if (crn_no.getInEnable().equals("Y")){ + .eq("crn_no", integer)); + if (crn_no.getInEnable().equals("Y") && crn_no.getCrnSts() == 3){ break; } } @@ -206,12 +206,17 @@ } // 鐢熸垚宸ヤ綔妗f槑缁� waitPakins.forEach(waitPakin -> { + String uuid = String.valueOf(System.currentTimeMillis()); WrkDetl wrkDetl = new WrkDetl(); wrkDetl.sync(waitPakin); wrkDetl.setWrkNo(wrkMast.getWrkNo()); wrkDetl.setIoTime(wrkMast.getIoTime()); wrkDetl.setAppeTime(now); wrkDetl.setModiTime(now); + wrkDetl.setUuid(uuid); + wrkDetl.setWeight(waitPakin.getWeight()); + wrkDetl.setOwner(waitPakin.getOwner()); + wrkDetl.setPayment(waitPakin.getPayment()); if (!wrkDetlService.insert(wrkDetl)) { throw new CoolException("淇濆瓨宸ヤ綔鏄庣粏澶辫触"); } @@ -250,8 +255,19 @@ public StartupDto emptyPlateIn(Integer devpNo, LocTypeDto locTypeDto, String barcode) { // 婧愮珯鐐圭姸鎬佹娴� BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); + int rowCount = rowLastnoService.selectCount(null); + Integer integer = 2; + for (int i = 1; i <= rowCount; i++) { + integer = rowLastnoService.selectNextWhsType(); + BasCrnp crn_no = basCrnpService.selectOne(new EntityWrapper<BasCrnp>() + .eq("crn_no", integer)); + if (crn_no.getInEnable().equals("Y") + && crn_no.getCrnSts() == 3){ + break; + } + } // 妫�绱㈠簱浣� - StartupDto dto = commonService.getLocNo(1, 10, devpNo, null, locTypeDto,0); + StartupDto dto = commonService.getLocNo(integer, 10, devpNo, null, locTypeDto,0); int workNo = dto.getWorkNo(); // 鐢熸垚宸ヤ綔妗� WrkMast wrkMast = new WrkMast(); -- Gitblit v1.9.1