自动化立体仓库 - WMS系统
#
野心家
2023-09-05 835bd18ad7f74192f96e83d85c358a7d9aa6b559
#
3个文件已修改
108 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/FireOutHandler.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/WcsController.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -778,48 +778,53 @@
        return testMast;
    }
    @Override
    @Transactional
    public Boolean testFinish(Review review) {
        Boolean success=true;
        Wrapper wrapper = new EntityWrapper<TestMast>()
                .eq("loc_no", review.getLocNo())
                .eq("barcode", review.getBarcode())
                .eq("user_Id", review.getUserId());
        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()));
        if (null == locMast ||locMast.getPackStatus()!=2){
            throw new CoolException("产品状态不是 2:测试中");
        }else if (!review.getBarcode().equals(locMast.getBarcode())){
            throw new CoolException("pack码不同");
        }
        TestMast testMast = testMastService.selectOne(wrapper);
        if(null != testMast){
            if (testMast.getStatus()==3){
                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("MES系统",mesUrl,inpath,combParam);
                if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
                    throw new CoolException("更改产品状态失败");
                }
            }else if (Cools.isEmpty(testMast.getStatus())){
                throw new CoolException("状态异常");
            }else {
                throw new CoolException("测试状态不是 3:测试中");
            }
        } else {
            throw new CoolException("状态异常");
        }
        return success;
        return null;
    }
//    @Override
//    @Transactional
//    public Boolean testFinish(Review review) {
//        Boolean success=true;
//        Wrapper wrapper = new EntityWrapper<TestMast>()
//                .eq("loc_no", review.getLocNo())
//                .eq("barcode", review.getBarcode())
//                .eq("user_Id", review.getUserId());
//        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()));
//        if (null == locMast ||locMast.getPackStatus()!=2){
//            throw new CoolException("产品状态不是 2:测试中");
//        }else if (!review.getBarcode().equals(locMast.getBarcode())){
//            throw new CoolException("pack码不同");
//        }
//        TestMast testMast = testMastService.selectOne(wrapper);
//        if(null != testMast){
//            if (testMast.getStatus()==3){
//                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("MES系统",mesUrl,inpath,combParam);
//
//                if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
//                    throw new CoolException("更改产品状态失败");
//                }
//            }else if (Cools.isEmpty(testMast.getStatus())){
//                throw new CoolException("状态异常");
//            }else {
//                throw new CoolException("测试状态不是 3:测试中");
//            }
//        } else {
//            throw new CoolException("状态异常");
//        }
//        return success;
//    }
    @Override
    @Transactional
    public Boolean testNG(Review review) {
src/main/java/com/zy/asrs/task/handler/FireOutHandler.java
@@ -43,7 +43,10 @@
        try {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                    .eq("fire_status", 1)
                    .eq("loc_sts", "F"));
                    .andNew()
                    .eq("loc_sts", "F")
                    .or()
                    .eq("loc_sts", "R"));
            Integer ioType = 101;   //出库
            Date now = new Date();
            //优先级99,移库到0102501
@@ -107,6 +110,8 @@
                    if (!locMastService.updateById(locMast)) {
                        throw new CoolException("预约库位状态失败,库位号:"+locMast.getLocNo());
                    }
                }else if(locMast.getLocSts().equals("R")){
                } else {
                    throw new CoolException(locMast.getLocNo() + "库位不是在库状态");
                }
src/main/java/com/zy/common/web/WcsController.java
@@ -292,16 +292,16 @@
            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(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()+"目标库位已被占用");