| | |
| | | @RequestMapping("/basStationPathPolicy") |
| | | public class BasStationPathPolicyController extends BaseController { |
| | | |
| | | private static final String CFG_DEFAULT_PROFILE_CODE = "stationPathDefaultProfileCode"; |
| | | |
| | | @Autowired |
| | | private BasStationPathProfileService basStationPathProfileService; |
| | | @Autowired |
| | |
| | | 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); |
| | |
| | | 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<>()); |