pang.jiabao
2024-07-10 09f658d805f714fc2b90794e4b772aa802ca55a3
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -22,6 +22,7 @@
import com.zy.core.model.Task;
import com.zy.core.model.protocol.StaProtocol;
import com.zy.core.properties.SlaveProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -29,6 +30,7 @@
import java.io.IOException;
import java.util.*;
@Slf4j
@Service
public class OpenServiceImpl implements OpenService {
@@ -94,10 +96,12 @@
        taskWrk.setBarcode(param.getBarcode());//条码
        taskWrk.setCrnNo(param.getCrn());
        String stats = "";
        String wcsLocNo = "";
        if(param.getIoType() == 1){
            taskWrk.setWrkSts(1);
            if (!Cools.isEmpty(param.getTargetPoint())) {
                taskWrk.setTargetPoint(Utils.getWcsLocNo(param.getTargetPoint()));//终点
                wcsLocNo = taskWrk.getTargetPoint();
                taskWrk.setOriginTargetPoint(param.getTargetPoint());
                stats = "S";
            }
@@ -106,6 +110,7 @@
            taskWrk.setWrkSts(11);
            if (!Cools.isEmpty(param.getStartPoint())) {
                taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//起点
                wcsLocNo = taskWrk.getStartPoint();
                taskWrk.setOriginStartPoint(param.getStartPoint());
                stats = "R";
            }
@@ -114,6 +119,7 @@
            taskWrk.setWrkSts(11);
            if (!Cools.isEmpty(param.getStartPoint())) {
                taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//起点
                wcsLocNo = taskWrk.getStartPoint();
                taskWrk.setOriginStartPoint(param.getStartPoint());
                stats = "R";
            }
@@ -126,7 +132,6 @@
        }
        // 更新库位状态
        String wcsLocNo = Utils.getWcsLocNo(param.getStartPoint());
        LocMast locMast = locMastService.selectByLocNo(wcsLocNo);
        locMast.setLocSts(stats);
        locMastService.updateById(locMast);
@@ -150,6 +155,7 @@
        }
        if (Cools.isEmpty(list)){
            log.warn("无可入巷道,请稍后再试");
            return R.error("无可入巷道");
        }