From 7be83adcdc6ee45fce42d14d7da2be33b1bcc216 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期四, 18 五月 2023 09:23:48 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/web/WcsController.java | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/common/web/WcsController.java b/src/main/java/com/zy/common/web/WcsController.java index b00ca42..3a6f58f 100644 --- a/src/main/java/com/zy/common/web/WcsController.java +++ b/src/main/java/com/zy/common/web/WcsController.java @@ -47,6 +47,8 @@ private WaitPakinService waitPakinService; @Autowired private LocDetlService locDetlService; + @Autowired + private TestMastService testMastService; @Value("mes.url") private String mesUrl; @@ -198,6 +200,25 @@ } else { throw new CoolException(dto.getLocNo()+"鐩爣搴撲綅宸茶鍗犵敤"); } + TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>().eq("barcode", wrkMast.getBarcode())); + + if (Cools.isEmpty(testMast)){ + //鐢熸垚娴嬭瘯妗� + testMast=new TestMast(); + testMast.setChannel(locMast.getChannel()); + testMast.setUserId(locMast.getLocNo()); + testMast.setStatus(1); + testMast.setBarcode(wrkMast.getBarcode()); + testMast.setLocNo(locMast.getLocNo()); + testMast.setModiTime(now); + testMast.setAppeTime(now); + if (!testMastService.insert(testMast)){ + throw new CoolException(wrkMast.getBarcode()+"鐢熸垚娴嬭瘯妗eけ璐�"); + } + }else { + throw new CoolException(wrkMast.getBarcode()+"宸插瓨鍦ㄦ祴璇曟。"); + } + return dto; } -- Gitblit v1.9.1