自动化立体仓库 - WMS系统
1
zhang
2025-06-25 0e262efdb8cb2768e0aa845ccb26f47b8732c577
src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java
@@ -16,6 +16,8 @@
import com.zy.asrs.service.*;
import com.zy.common.service.AgvCommonService;
import com.zy.common.utils.HttpHandler;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -64,6 +66,8 @@
    private AgvCommonService agvCommonService;
    @Autowired
    private AgvWrkMastService agvWrkMastService;
    @Autowired
    private ConfigService configService;
    public Boolean updateWrkStsByWrkNo(int wrkNo, long wrkSts) {
@@ -265,10 +269,25 @@
                }
                break;
            default:
                agvTaskCreateParam.setTaskTyp("F01");
                if (processUseTiShengJi(agvWrkMast.getSourceLocNo(), agvWrkMast.getLocNo())) {
                    agvTaskCreateParam.setTaskTyp("F06");
                } else {
                    agvTaskCreateParam.setTaskTyp("F01");
                }
                break;
        }
        try {
            Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "BARCODE"));
            boolean flag = false;
            if (!Cools.isEmpty(config)) {
                flag = config.getValue().equals("Y");
            }
            if (!Cools.isEmpty(agvWrkMast.getBarcode()) && flag) {
                agvTaskCreateParam.setPodCode(agvWrkMast.getBarcode());
            }
        }catch (Exception e){
        }
        agvTaskCreateParam.setPositionCodePath(agvTaskParamList);
    }
@@ -277,7 +296,7 @@
    private boolean processUseTiShengJi(String sourceLocNo, String locNo) {
        // 判断是否是提升机
        if (sourceLocNo.startsWith("YZ")) {
            if (sourceLocNo.endsWith("01F2") && !locNo.startsWith("YZ") && locNo.endsWith("F4") && locNo.startsWith("Q")) {
            if (sourceLocNo.endsWith("01F2") && !locNo.startsWith("YZ") && locNo.endsWith("F4")) {
                // 从生产二厂的库位到吸塑二厂的点位上
                return true;
            } else if (sourceLocNo.endsWith("01F2") && locNo.startsWith("YZ") && locNo.endsWith("02F1")) {
@@ -289,6 +308,12 @@
            } else if (sourceLocNo.endsWith("02F1") && !locNo.startsWith("YZ") && locNo.endsWith("F2")) {
                // 吸塑二楼的库位到生产二厂的点位
                return true;
            } else if (sourceLocNo.endsWith("01F1") && !locNo.startsWith("YZ") && locNo.endsWith("F4")) {
                // 从吸塑一楼的库位到吸塑二楼的点位上
                return true;
            } else if (sourceLocNo.endsWith("02F1") && !locNo.startsWith("YZ") && locNo.endsWith("F1")) {
                // 从吸塑er楼的kuwei到吸塑一楼的dianwei
                return true;
            }
        } else {
            if (sourceLocNo.endsWith("F4") && locNo.startsWith("YZ") && locNo.endsWith("01F2")) {
@@ -297,6 +322,12 @@
            } else if (sourceLocNo.endsWith("F2") && locNo.startsWith("YZ") && locNo.endsWith("02F1")) {
                // 从生产二厂的点位到吸塑二楼的库位
                return true;
            } else if (sourceLocNo.endsWith("F4") && locNo.startsWith("YZ") && locNo.endsWith("01F1")) {
                // 从吸塑二楼的点位到吸塑一楼的库位
                return true;
            } else if (sourceLocNo.endsWith("F1") && locNo.startsWith("YZ") && locNo.endsWith("02F1")) {
                // 从吸塑二楼的点位到吸塑一楼的库位
                return true;
            }
        }
        return false;