自动化立体仓库 - WMS系统
#
LSH
2024-02-29 dff36af4872e3094cf646cd35b8277f79f21a2ed
src/main/java/com/zy/common/web/WcsController.java
@@ -171,6 +171,66 @@
        return R.ok().add(dto);
    }
    /*
     * 双工位单伸堆垛机,初始不分配库位
     * */
    @PostMapping("/pakin/pair/station/large/loc/v1")
    @ResponseBody
    public synchronized R getLocNoPairLarge(@RequestBody SearchLocParam param) {
        log.info("收到WCS入库接口请求====>>入参:{}", param);
        if (Cools.isEmpty(param.getIoType())) {
            return R.error("入出库类型不能为空");
        }
        if (Cools.isEmpty(param.getSourceStaNo())) {
            return R.error("源站编号不能为空");
        }
        List<WaitPakin> waitPakins = null;
        if (param.getIoType() == 1) {
            if (Cools.isEmpty(param.getBarcode())) {
                return R.error("条码不能为空");
            }
            waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode()));
            if (Cools.isEmpty(waitPakins)) {
                WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode());
                if (wrkMast != null && wrkMast.getIoType() == 103) {
                    return R.parse(CodeRes.PICK_600);
                }
                return R.parse(CodeRes.NO_COMB_700);
            }
            int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode()));
            int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode()));
            if (countLoc > 0 || countWrk > 0) {
                return R.error(CodeRes.EXIST_500);
            }
        }
        if (Cools.isEmpty(param.getLocType1())){
            return R.error("高低检测信号不能为空");
        }
        // 源站点状态检测
        BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getSourceStaNo(), true);
        sourceStaNo.setLocType1(param.getLocType1());
        LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo);
        StartupDto dto = null;
        switch (param.getIoType()) {
            case 1://满托盘入库
                assert waitPakins != null;
                dto = startupFullPutStorePairSingle(param.getSourceStaNo(), param.getBarcode(), locTypeDto, waitPakins);
                break;
            case 10://空托盘入库
                dto = emptyPlateInPairSingle(param.getSourceStaNo(), locTypeDto, param.getBarcode());
                break;
//            case 201://自动补空板任务
//                dto = emptyPlateIn201(param.getSourceStaNo(), locTypeDto, param.getBarcode());
//                break;
            default:
                break;
        }
        log.info("WCS入库接口返参:{},托盘码:{}", dto, param.getBarcode());
        return R.ok().add(dto);
    }
    @PostMapping("/pakin2/loc/v1")
    @ResponseBody
    @Transactional