自动化立体仓库 - WMS系统
#
LSH
2023-05-18 bd1a2aef7fbe13e920c473b4f5e7ff5ba942c9a8
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -67,6 +67,8 @@
    @Value("${mes.inPath}")
    private String inpath;
    @Value("${mes.url}")
    private String mesUrl;
    @Override
    @Transactional
@@ -571,8 +573,8 @@
            throw new CoolException("缺少参数:packNo");
        }else if (Cools.isEmpty(param.getPackName())){
            throw new CoolException("缺少参数:packName");
        }else if (Cools.isEmpty(param.getSettingTimes())){
            throw new CoolException("缺少参数:settingTimes");
//        }else if (Cools.isEmpty(param.getSettingTimes())){
//            throw new CoolException("缺少参数:settingTimes");
        }else if (Cools.isEmpty(param.getRequestTime())){
            throw new CoolException("缺少参数:requestTime");
        }
@@ -602,7 +604,7 @@
            matNew.setTagId(tag.getId());
            matNew.setMatnr(param.getPackName());
            matNew.setMaktx(param.getPackName());
            matNew.setDeadWarn(param.getSettingTimes());
            matNew.setDeadWarn(480);//8小时  480分钟
            matNew.setCreateBy(9999L);//9999表示erp下发
            matNew.setCreateTime(new Date());
            matNew.setUpdateBy(9999L);//9999表示erp下发
@@ -610,6 +612,7 @@
            if (!matService.insert(matNew)){
                throw new CoolException(param.getPackName() + "商品档案自动生成失败");
            }
            mat=matNew;
//            throw new CoolException(param.getPackName() + "商品档案不存在");
        }
        WaitPakin waitPakin = new WaitPakin();
@@ -625,7 +628,7 @@
        waitPakin.setAppeTime(new Date());
        waitPakin.setModiUser(null);
        waitPakin.setModiTime(new Date());
        waitPakin.setDeadWarn(param.getSettingTimes());
        waitPakin.setDeadWarn(mat.getDeadWarn());
        if (!waitPakinService.insert(waitPakin)) {
            throw new CoolException("保存入库通知档失败");
        }
@@ -713,7 +716,7 @@
                    combParam.setLocNo(locMast.getLocNo());
                    combParam.setPackSts(7);
                    combParam.setRequestTime(DateUtils.convert(new Date()));
                    new PostMesDataUtils().postMesData(inpath,combParam);
                    new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                    if (!locMastService.updateById(locMast)) {
                        throw new CoolException("预约库位状态失败,库位号:"+locMast.getLocNo());
@@ -759,14 +762,9 @@
                    throw new CoolException("更新测试状态失败");
                }
                locMast.setPackStatus(2);
                CombParam combParam = new CombParam();
                combParam.setPackNo(locMast.getBarcode());
                combParam.setLocNo(locMast.getLocNo());
                combParam.setPackSts(2);
                combParam.setRequestTime(DateUtils.convert(new Date()));
                new PostMesDataUtils().postMesData(inpath,combParam);
                if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
                    throw new CoolException("更新产品状态失败");
                }
            } else if (Cools.isEmpty(testMast.getStatus())){
@@ -801,12 +799,12 @@
                Date date = new Date();
                locMast.setPackStatus(3);
                locMast.setModiTime(date);
                CombParam combParam = new CombParam();
                combParam.setPackNo(locMast.getBarcode());
                combParam.setLocNo(locMast.getLocNo());
                combParam.setPackSts(3);
                combParam.setRequestTime(DateUtils.convert(new Date()));
                new PostMesDataUtils().postMesData(inpath,combParam);
//                CombParam combParam = new CombParam();
//                combParam.setPackNo(locMast.getBarcode());
//                combParam.setLocNo(locMast.getLocNo());
//                combParam.setPackSts(3);
//                combParam.setRequestTime(DateUtils.convert(new Date()));
//                new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
                    throw new CoolException("更改产品状态失败");
@@ -842,12 +840,12 @@
                Date date = new Date();
                locMast.setPackStatus(4);
                locMast.setModiTime(date);
                CombParam combParam = new CombParam();
                combParam.setPackNo(locMast.getBarcode());
                combParam.setLocNo(locMast.getLocNo());
                combParam.setPackSts(4);
                combParam.setRequestTime(DateUtils.convert(new Date()));
                new PostMesDataUtils().postMesData(inpath,combParam);
//                CombParam combParam = new CombParam();
//                combParam.setPackNo(locMast.getBarcode());
//                combParam.setLocNo(locMast.getLocNo());
//                combParam.setPackSts(4);
//                combParam.setRequestTime(DateUtils.convert(new Date()));
//                new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
                    throw new CoolException("更改产品状态失败");