1
2026-04-25 af8f6fb713ec7991d259424399963ec84ea3b288
lsh#
6个文件已修改
99 ■■■■ 已修改文件
asrs-schedule/src/main/java/com/vincent/rsf/schedule/manager/entity/BasStation.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
asrs-schedule/src/main/java/com/vincent/rsf/schedule/schedules/SynchronizationToMESSchedules.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
asrs-schedule/src/main/java/com/vincent/rsf/schedule/system/service/ConfigService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
asrs-schedule/src/main/java/com/vincent/rsf/schedule/system/service/impl/ConfigServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-design/package-lock.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/system/constant/GlobalConfigCode.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
asrs-schedule/src/main/java/com/vincent/rsf/schedule/manager/entity/BasStation.java
@@ -264,5 +264,51 @@
        }
    }
    public String getProductionLineCode$() {
        String productionLineCode1 = "";
        if (productionLineCode.contains("2#1f-")){
            productionLineCode1 = "1002_";
        } else if (productionLineCode.contains("2#2f-1")){
            productionLineCode1 = "1104_";
        } else if (productionLineCode.contains("2#2f-2")){
            productionLineCode1 = "1201_";
        } else if (productionLineCode.contains("2#2f-3")){
            productionLineCode1 = "1202_";
        } else if (productionLineCode.contains("2#2f-4")){
            productionLineCode1 = "1203_";
        } else if (productionLineCode.contains("2#2f-5")){
            productionLineCode1 = "13_";
        } else if (productionLineCode.contains("2#5f-1")){
            productionLineCode1 = "A";
        } else if (productionLineCode.contains("2#5f-2")){
            productionLineCode1 = "B";
        } else {
            productionLineCode1 = "G";
        }
        return productionLineCode1 + id;
    }
    public String getProductionLineName$() {
        String productionLineName1 = "";
        if (productionLineCode.contains("2#1f-1")){
            productionLineName1 = "内夹"+id+"组";
        } else if (productionLineCode.contains("2#2f-1")){
            productionLineName1 = "包装线";
        } else if (productionLineCode.contains("2#2f-2")){
            productionLineName1 = "抽板"+id+"线";
        } else if (productionLineCode.contains("2#2f-3")){
            productionLineName1 = "吸塑"+id+"线";
        } else if (productionLineCode.contains("2#2f-4")){
            productionLineName1 = "注塑"+id+"线";
        } else if (productionLineCode.contains("2#2f-5")){
            productionLineName1 = "弯框"+id+"线";
        } else if (productionLineCode.contains("2#5f-1")){
            productionLineName1 = "组装A"+id+"线";
        } else if (productionLineCode.contains("2#5f-2")){
            productionLineName1 = "组装B"+id+"线";
        } else {
            productionLineName1 = "组装G"+id+"线";
        }
        return productionLineName1;
    }
}
asrs-schedule/src/main/java/com/vincent/rsf/schedule/schedules/SynchronizationToMESSchedules.java
@@ -50,7 +50,7 @@
    /**
     * @author Munch D. Luffy
     * @date 2026/01/15
     * @description: 缓存区域自动生成移库任务
     * @description: 站点同步至MES
     * @version 1.0
     */
    @Scheduled(cron = "0 0/01 * * * ?  ")
@@ -60,6 +60,7 @@
        if (Cools.isEmpty(config) || !Boolean.parseBoolean(config.getVal())) {
            return;
        }
        configService.refreshCache();
        String autoSiteSynchronizationToMesValue = configService.getVal(GlobalConfigCode.AUTO_SITE_SYNCHRONIZATION_TO_MES_VALUE, String.class);
        if (Cools.isEmpty(autoSiteSynchronizationToMesValue)) {
@@ -98,8 +99,8 @@
            item.put("ConnPortName", Cools.isEmpty(basStation.getStationId()) ? basStation.getStationName() : basStation.getStationId());
            item.put("WorkshopCode", "");
            item.put("WorkshopName", "");
            item.put("ProductionLineCode", basStation.getProductionLineCode());
            item.put("ProductionLineName", basStation.getProductionLineName());
            item.put("ProductionLineCode", basStation.getProductionLineCode$());
            item.put("ProductionLineName", basStation.getProductionLineName$());
            item.put("CreatedBy", "WMSSystem");
            item.put("IsValid", Objects.equals(basStation.getStatus(), 1));
            params.add(item);
asrs-schedule/src/main/java/com/vincent/rsf/schedule/system/service/ConfigService.java
@@ -11,5 +11,7 @@
    <T> boolean setVal(String key, T val);
    R modiftyStatus(Config config);
    void refreshCache();
}
asrs-schedule/src/main/java/com/vincent/rsf/schedule/system/service/impl/ConfigServiceImpl.java
@@ -12,6 +12,7 @@
import com.vincent.rsf.schedule.system.enums.StatusType;
import com.vincent.rsf.schedule.system.mapper.ConfigMapper;
import com.vincent.rsf.schedule.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import jakarta.annotation.PostConstruct;
@@ -23,6 +24,7 @@
/**
 * Created by vincent on 8/30/2024
 */
@Slf4j
@Service("configService")
public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> implements ConfigService {
@@ -34,6 +36,18 @@
        for (Config config : list) {
            CONFIG_CACHE.put(config.getFlag(), config);
        }
    }
    @Override
    public void refreshCache() {
        List<Config> list = this.list(new LambdaQueryWrapper<Config>().eq(Config::getStatus, StatusType.ENABLE.val));
        Map<String, Config> newCache = new ConcurrentHashMap<>();
        for (Config config : list) {
            newCache.put(config.getFlag(), config);
        }
        CONFIG_CACHE.clear();
        CONFIG_CACHE.putAll(newCache);
        log.info("CONFIG_CACHE 已刷新,共 {} 条配置", newCache.size());
    }
    @Override
@@ -134,6 +148,11 @@
        if (!this.update(new LambdaUpdateWrapper<Config>().set(Config::getVal, config.getVal()).eq(Config::getFlag, config.getFlag()))) {
            throw new CoolException("修改失败!!");
        }
        // 同步更新缓存
        Config cached = CONFIG_CACHE.get(config.getFlag());
        if (cached != null) {
            cached.setVal(config.getVal());
        }
        return R.ok();
    }
rsf-design/package-lock.json
@@ -31,6 +31,7 @@
        "element-plus": "^2.11.2",
        "file-saver": "^2.0.5",
        "highlight.js": "^11.10.0",
        "jsbarcode": "^3.12.3",
        "mitt": "^3.0.1",
        "nprogress": "^0.2.0",
        "ohash": "^2.0.11",
@@ -5572,6 +5573,12 @@
        "js-yaml": "bin/js-yaml.js"
      }
    },
    "node_modules/jsbarcode": {
      "version": "3.12.3",
      "resolved": "https://registry.npmjs.org/jsbarcode/-/jsbarcode-3.12.3.tgz",
      "integrity": "sha512-CuHU9hC6dPsHF5oVFMo8NW76uQVjH4L22CsP4hW+dNnGywJHC/B0ThA1CTDVLnxKLrrpYdicBLnd2xsgTfRnvg==",
      "license": "MIT"
    },
    "node_modules/jsesc": {
      "version": "3.1.0",
      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
rsf-server/src/main/java/com/vincent/rsf/server/system/constant/GlobalConfigCode.java
@@ -14,26 +14,8 @@
    public final static String DIRECT_WAIT_PAKIN = "DirectWaitPakin";
    /**收货时是否允许超收*/
    public final static String ALLOW_OVER_CHANGE = "AllowOverchange";
    /**订单是否上报平台*/
    public final static String ORDER_INOF_REPORT_PLAT = "OrderInofReportPlat";
    /**波次自动下发任务*/
    public final static String WAVE_AUTO_EXCE_TASK = "WaveAutoExce";
    public final static String AUTO_RUN_CHECK_ORDERS = "AUTO_RUN_CHECK_ORDERS";
    /*银座缓存库自动入库、移库*/
    public final static String AUTO_RUN_CHECK_IN_YZ = "AUTO_RUN_CHECK_IN_YZ";
    public final static String AUTO_RUN_CHECK_OUT_YZ = "AUTO_RUN_CHECK_OUT_YZ";
    public final static String AUTO_RUN_MOVE_THEAD_MAX = "AUTO_RUN_MOVE_THEAD_MAX";
    /*初始任务自动规划路径*/
    public final static String AUTO_TEMPLATE_PLANNING_STEP_FLOW = "AUTO_TEMPLATE_PLANNING_STEP_FLOW";
    /*站点同步至MES*/
    public final static String AUTO_SITE_SYNCHRONIZATION_TO_MES = "AUTO_SITE_SYNCHRONIZATION_TO_MES";
    public final static String AUTO_SITE_SYNCHRONIZATION_TO_MES_VALUE = "AUTO_SITE_SYNCHRONIZATION_TO_MES_VALUE";
}