自动化立体仓库 - WMS系统
#
LSH
2023-05-18 7be83adcdc6ee45fce42d14d7da2be33b1bcc216
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()+"生成测试档失败");
            }
        }else {
            throw new CoolException(wrkMast.getBarcode()+"已存在测试档");
        }
        return dto;
    }