自动化立体仓库 - WMS系统
#
18516761980
2022-10-06 5b4989a3e8dc144da636f1a8b84206e0f4ba76f3
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -722,7 +722,7 @@
    @Override
    @Transactional
    public void infoReview(Review review) {
    public TestMast infoReview(Review review) {
        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()));
        if (!review.getBarcode().equals(locMast.getBarcode())){
            throw new CoolException("pack码不同");
@@ -731,13 +731,22 @@
                .eq("loc_no", review.getLocNo())
                .eq("barcode", review.getBarcode())
                .eq("user_Id", review.getUserId());
        if (null == locMast ||locMast.getPackStatus()!=1) {
            throw new CoolException("产品状态不是 1:待测试");
        }
        TestMast testMast = testMastService.selectOne(wrapper);
        if (null == locMast) {
            throw new CoolException("产品状态为空");
        }else if (locMast.getPackStatus()==2){
            if (!Cools.isEmpty(testMast)){
                if (testMast.getStatus()==2 || testMast.getStatus()==3){
                    return testMast;
                }
            }
        }else if (locMast.getPackStatus()!=1){
            throw new CoolException("产品状态不是1待测试");
        }
        if(null != testMast){
            if (testMast.getStatus()==1){
                testMast.setStatus(3);
                testMast.setStatus(2);
                testMast.setModiTime(new Date());
                if (!testMastService.update(testMast,wrapper)){
                    throw new CoolException("更新测试状态失败");
@@ -752,7 +761,7 @@
                if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
                    throw new CoolException("更新产品状态失败");
                }
            }else if (Cools.isEmpty(testMast.getStatus())){
            } else if (Cools.isEmpty(testMast.getStatus())){
                throw new CoolException("状态异常");
            }else {
                throw new CoolException("状态不是 1:申请中");
@@ -760,6 +769,7 @@
        } else {
            throw new CoolException("测试申请复核失败");
        }
        return testMast;
    }