自动化立体仓库 - WMS系统
LSH
2022-08-17 31d7788cf41d7a134326e790fb0cbbe5353ec4a3
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -19,6 +19,7 @@
import com.zy.common.utils.NodeUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.expression.spel.ast.NullLiteral;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -603,6 +604,7 @@
        waitPakin.setAppeTime(requestTime);
        waitPakin.setModiUser(null);
        waitPakin.setModiTime(requestTime);
        waitPakin.setDeadWarn(param.getSettingTimes());
        if (!waitPakinService.insert(waitPakin)) {
            throw new CoolException("保存入库通知档失败");
        }
@@ -616,7 +618,7 @@
                .eq("barcode", review.getBarcode())
                .eq("user_Id", review.getUserId());
        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()));
        if (locMast.getPackStatus()!=1) {
        if (null == locMast ||locMast.getPackStatus()!=1) {
            throw new CoolException("产品状态不是 1:待测试");
        }
        TestMast testMast = testMastService.selectOne(wrapper);
@@ -662,6 +664,10 @@
                if (!testMastService.update(testMast,wrapper)){
                    throw new CoolException("更改测试状态失败");
                }
                locMast.setPackStatus(3);
                if (!locMastService.update(locMast, wrapper)){
                    throw new CoolException("更改产品状态失败");
                }
            }else if (Cools.isEmpty(testMast.getStatus())){
                throw new CoolException("状态异常");
            }else {
@@ -670,16 +676,7 @@
        } else {
            throw new CoolException("状态异常");
        }
        LocMast targetLocNo = locMastService.selectOne(new EntityWrapper<LocMast>()
                .eq("row1",2)
                .eq("loc_sts","O")
                .eq("fire_status", 0)
                .eq("pack_status",0));
        if (targetLocNo != null){
            workService.locMove(review.getLocNo(),targetLocNo.getLocNo(),(long)Integer.parseInt(review.getUserId()));
        }else {
            throw new CoolException("没有空库位");
        }
        return success;
    }