自动化立体仓库 - 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;
@@ -88,11 +90,11 @@
            }
        }
        if (Cools.isEmpty(param.getLocType1())){
            return R.error("高低检测信号不能为空");
            param.setLocType1((short)1);
        }
        // 源站点状态检测
        BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getSourceStaNo(), true);
        BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getSourceStaNo(), false);
//        sourceStaNo.setLocType1(param.getLocType1());
        sourceStaNo.setLocType1((short)1);
        LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo);
@@ -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;
    }