自动化立体仓库 - WMS系统
野心家
2024-01-24 b931c44bee33ccae4d14594a6419bcf0a26b29dd
src/main/java/com/zy/common/web/WcsController.java
@@ -52,10 +52,10 @@
    @Autowired
    private  MatService matService;
    @Value("mes.url")
    @Value("${mes.url}")
    private String mesUrl;
    @Value("mes.inPath")
    @Value("${mes.inPath}")
    private String inpath;
    @PostMapping("/pakin/loc/v1")
@@ -175,7 +175,7 @@
    }
    /**
     * 全板入库
         * 全板入库
     */
    @Transactional
    public StartupDto startupFullPutStore(Integer devpNo, String barcode, LocTypeDto locTypeDto, List<WaitPakin> waitPakins) {
@@ -249,7 +249,6 @@
                    }
                }else if(wrkMast.getStaNo()==209){
                    testMast.setBarcode(wrkDetl.getMatnr());
                    testMast.setChannel(locMast.getChannel());
                    testMast.setLocNo(locMast.getLocNo());
                    testMast.setUserId(wrkMast.getBarcode());//托盘码
                    testMast.setAppeTime(now);
@@ -293,16 +292,17 @@
            if (!locMastService.updateById(locMast)){
                throw new CoolException("改变库位状态失败");
            }else{
//                if (locMast.getRow1()<3){
//                    //1.扫码上报
//                    CombParam combParam = new CombParam();
//                    combParam.setPackNo(wrkMast.getBarcode());
//                    combParam.setLocNo(wrkMast.getLocNo());
//                    combParam.setPackSts(0);
//                    combParam.setStepSts(1);
//                    combParam.setRequestTime(DateUtils.convert(now));
//                    new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
//                }
                if (locMast.getRow1()<2){
                    //1.扫码上报
                    CombParam combParam = new CombParam();
                    combParam.setPackNo(waitPakins.get(0).getMatnr());
                    combParam.setBarcode(wrkMast.getBarcode());
                    combParam.setLocNo(wrkMast.getLocNo());
                    combParam.setPackSts(0);
                    combParam.setStepSts(1);
                    combParam.setRequestTime(DateUtils.convert(now));
                    new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                }
            }
        } else {
            throw new CoolException(dto.getLocNo()+"目标库位已被占用");