自动化立体仓库 - WMS系统
src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
@@ -55,6 +55,7 @@
        if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
            throw new CoolException(BaseRes.PARAM);
        }
        param.setContainerType(Short.valueOf(param.getBarcode().substring(0,2)));
        //检查是否已存在相同的托盘条码,存在则抛出异常
        if (agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().eq("supp_code", param.getBarcode())) > 0) {
@@ -82,7 +83,7 @@
        if(StringUtils.isEmpty(param.getLocno())){
            return "组托成功";
        }else {
            combBinding(param.getBarcode(),param.getLocno());
            combBinding(param.getBarcode(),param.getLocno(),param.getContainerType());
            return "组托成功,绑定站点成功";
        }
@@ -219,19 +220,24 @@
    }
    @Override
    public void combBinding(String barcode, String stationCode) {
    public void combBinding(String barcode, String stationCode, Short containerType) {
        AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("dev_no", stationCode));
        if(Cools.eq(agvBasDevp.getBarcode(),barcode)){
            return;
        }
        if(Cools.isEmpty(agvWaitPakinService.selectByContainerCode(barcode))){
            throw new CoolException("该料箱未组托,无法绑定站点");
        }
        AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("barcode", barcode));
        AgvBasDevp agvBasDevp1 = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("barcode", barcode));
        if(!Cools.isEmpty(agvBasDevp)){
        if(!Cools.isEmpty(agvBasDevp1)){
            throw new CoolException(barcode + "已经绑定在"+ agvBasDevp.getDevNo() +"站点");
        }
        agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("dev_no",stationCode));
        if(agvBasDevp == null){
            throw new CoolException(stationCode + "站点信息错误");
        }
@@ -245,6 +251,7 @@
        agvBasDevp.setBarcode(barcode);
        agvBasDevp.setLocSts("F");
        agvBasDevp.setLocType2(containerType);
        agvBasDevpService.update(agvBasDevp,(new EntityWrapper<AgvBasDevp>().eq("dev_no",stationCode)));
    }