Commit ff4d6787 authored by wangyecheng's avatar wangyecheng

修改策略管理参数配置追加策略编号回显

parent 1d70fddd
......@@ -210,10 +210,10 @@ public class StrategyPriorityController {
})
@GetMapping("/getParamConfigData")
public JsonViewObject getParamConfigData(@RequestParam(required = false) String crossId,@RequestParam(required = false) Integer greenId,
@RequestParam(required = true) Integer type){
@RequestParam(required = true) Integer type,@RequestParam(required = true) String strategyNo){
JsonViewObject jsonView = JsonViewObject.newInstance();
try {
List<StrategyParameterConfig>list=strategyPriorityService.getParamConfigData(crossId,greenId,type);
List<StrategyParameterConfig>list=strategyPriorityService.getParamConfigData(crossId,greenId,type,strategyNo);
jsonView.success(list);
} catch (Exception e) {
jsonView.fail(I18nResourceBundle.getConstants("SAVE_FAILED_MSG"));
......
......@@ -89,7 +89,7 @@ public interface StrategyPriorityMapper extends BaseMapper<StrategyPriorityDaily
void saveParamConfig(@Param("savePlanList") List<StrategyParameterConfig> savePlanList);
List<StrategyParameterConfig> getParamConfigData(@Param("crossId") String crossId,@Param("type")Integer type);
List<StrategyParameterConfig> getParamConfigData(@Param("crossId") String crossId,@Param("type")Integer type,@Param("strategyNo") String strategyNo);
List<StrategyPriorityDailyInfo> getStrategyGreenWave();
......@@ -111,6 +111,6 @@ public interface StrategyPriorityMapper extends BaseMapper<StrategyPriorityDaily
void deleteGreenParamterConfig(Integer greenId);
List<StrategyParameterConfig> getGreenParamConfigData(@Param("greenId") Integer greenId, @Param("type") Integer type);
List<StrategyParameterConfig> getGreenParamConfigData(@Param("greenId") Integer greenId, @Param("type") Integer type,@Param("strategyNo") String strategyNo);
}
......@@ -44,7 +44,7 @@ public interface StrategyPriorityService extends IService<StrategyPriorityDailyI
void saveParamterConfig(StrategyPriorityGroup strategyPriorityGroup) throws Exception;
List<StrategyParameterConfig> getParamConfigData(String crossId,Integer greenId, Integer type);
List<StrategyParameterConfig> getParamConfigData(String crossId,Integer greenId, Integer type,String strategyNo);
List<StrategyPriorityDailyInfo> getStrategyGreenWave();
}
......@@ -416,7 +416,7 @@ import java.util.stream.Collectors;
* 策略参数配置干线路口数据回显
* */
@Override
public List<StrategyParameterConfig> getParamConfigData(String crossId,Integer greenId, Integer type) {
public List<StrategyParameterConfig> getParamConfigData(String crossId,Integer greenId, Integer type,String strategyNo) {
try {
List<StrategyParameterConfig> paraterConfigList=new ArrayList<>();
//type: 1路口 2干线
......@@ -424,12 +424,12 @@ import java.util.stream.Collectors;
if (crossId.isEmpty()){
throw new IllegalArgumentException("crossId cannot be null");
}
paraterConfigList = strategyPriorityMapper.getParamConfigData(crossId,type);
paraterConfigList = strategyPriorityMapper.getParamConfigData(crossId,type,strategyNo);
}else if(type==2){
if (greenId==null){
throw new IllegalArgumentException("greenId cannot be null");
}
paraterConfigList = strategyPriorityMapper.getGreenParamConfigData(greenId,type);
paraterConfigList = strategyPriorityMapper.getGreenParamConfigData(greenId,type,strategyNo);
}
return paraterConfigList;
}catch (Exception e){
......
......@@ -372,6 +372,10 @@
<if test="type!=null and type!=''">
and type = #{type}
</if>
<if test="strategyNo!=null and strategyNo!=''">
and strategy_no = #{strategyNo}
</if>
</select>
<select id="getGreenParamConfigData" parameterType="map" resultType="net.wanji.opt.entity.strategy.StrategyParameterConfig">
SELECT
......@@ -386,6 +390,9 @@
<if test="type!=null and type!=''">
and type = #{type}
</if>
<if test="strategyNo!=null and strategyNo!=''">
and strategy_no = #{strategyNo}
</if>
</select>
<select id="getStrategyGreenWave" parameterType="map" resultType="net.wanji.opt.entity.strategy.StrategyPriorityDailyInfo">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment