自动化立体仓库 - WMS系统
#
LSH
2022-09-23 23d414032034cbd4557198338124af212da13c74
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -15,15 +15,12 @@
import com.zy.asrs.service.*;
import com.zy.asrs.utils.MatUtils;
import com.zy.common.model.DetlDto;
import com.zy.common.model.enums.WorkNoType;
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;
import javax.tools.JavaCompiler;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -63,8 +60,6 @@
    private TestMastService testMastService;
    @Autowired
    private LocMastService locMastService;
    @Autowired
    private WorkService workService;
    @Override
    @Transactional
@@ -667,12 +662,14 @@
        TestMast testMast = testMastService.selectOne(wrapper);
        if(null != testMast){
            if (testMast.getStatus()==3){
                Date date = new Date();
                testMast.setStatus(4);
                testMast.setModiTime(new Date());
                testMast.setModiTime(date);
                if (!testMastService.update(testMast,wrapper)){
                    throw new CoolException("更改测试状态失败");
                }
                locMast.setPackStatus(3);
                testMast.setModiTime(date);
                if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
                    throw new CoolException("更改产品状态失败");
                }
@@ -683,17 +680,6 @@
            }
        } 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;
    }