#
Junjie
16 小时以前 3372040097ad2c01aeb6fd6485e89f19bf81b316
src/main/java/com/zy/asrs/controller/BasStationPathPolicyController.java
@@ -41,6 +41,8 @@
@RequestMapping("/basStationPathPolicy")
public class BasStationPathPolicyController extends BaseController {
    private static final String CFG_DEFAULT_PROFILE_CODE = "stationPathDefaultProfileCode";
    @Autowired
    private BasStationPathProfileService basStationPathProfileService;
    @Autowired
@@ -64,8 +66,8 @@
        Map<String, Object> data = new HashMap<>();
        data.put("profiles", basStationPathProfileService.list(new QueryWrapper<BasStationPathProfile>().orderByAsc("priority", "id")));
        data.put("rules", basStationPathRuleService.list(new QueryWrapper<BasStationPathRule>().orderByAsc("priority", "id")));
        data.put("scoreMode", getSystemConfig("stationPathScoreMode", "legacy"));
        data.put("defaultProfileCode", getSystemConfig("stationPathDefaultProfileCode", "default"));
        data.put("scoreMode", "twoStage");
        data.put("defaultProfileCode", getSystemConfig(CFG_DEFAULT_PROFILE_CODE, "default"));
        data.put("stations", buildStationSummaryList());
        data.put("levList", basMapService.getLevList());
        return R.ok(data);
@@ -77,8 +79,7 @@
        JSONArray profiles = payload.getJSONArray("profiles");
        JSONArray rules = payload.getJSONArray("rules");
        upsertSystemConfig("站点路径评分模式", "stationPathScoreMode", defaultIfBlank(payload.getString("scoreMode"), "legacy"), "String");
        upsertSystemConfig("站点路径默认模板编码", "stationPathDefaultProfileCode", defaultIfBlank(payload.getString("defaultProfileCode"), "default"), "String");
        upsertSystemConfig("站点路径默认模板编码", CFG_DEFAULT_PROFILE_CODE, defaultIfBlank(payload.getString("defaultProfileCode"), "default"), "String");
        basStationPathProfileService.remove(new QueryWrapper<>());
        basStationPathRuleService.remove(new QueryWrapper<>());