Commit 04a9744e authored by hanbing's avatar hanbing

[update] 态势监测,增加优化类型接口

parent 68bd44da
......@@ -208,4 +208,16 @@ public class TrendController {
TableQueryVO tableRealTimeVO = trendService.tableRealTime(crossIdAndIsFirstBO);
return JsonViewObject.newInstance().success(tableRealTimeVO);
}
@ApiOperation(value = "优化类型", notes = "优化类型",response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/optType",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@ApiResponses({
@ApiResponse(code = 200, message = "OK", response = OptTypeVO.class),
})
public JsonViewObject optType(@RequestBody CrossIdBO crossIdBO) {
OptTypeVO optTypeVO = trendService.optType(crossIdBO);
return JsonViewObject.newInstance().success(optTypeVO);
}
}
\ No newline at end of file
......@@ -44,4 +44,5 @@ public interface TrendService {
TableQueryVO tableRealTime(CrossIdAndIsFirstBO crossIdAndIsFirstBO);
OptTypeVO optType(CrossIdBO crossIdBO);
}
......@@ -1110,6 +1110,19 @@ public class TrendServiceImpl implements TrendService {
return tableQueryVO;
}
@Override
public OptTypeVO optType(CrossIdBO crossIdBO) {
String crossId = crossIdBO.getCrossId();
List<CrossSchemeOptLogPO> poList = crossSchemeOptLogMapper.selectMaxByCrossId(crossId);
CrossSchemeOptLogPO po = poList.get(0);
String optType = po.getOptType();
Integer optTypeInt = Integer.valueOf(optType);
OptTypeVO optTypeVO = new OptTypeVO();
optTypeVO.setOptType(optTypeInt);
return optTypeVO;
}
private void initFirstDate() {
tableRealTimeFirstDate = new Date();
// 将当前时间向前推10分钟
......
package net.wanji.opt.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
@ApiModel(value = "OptTypeVO", description = "优化类型")
public class OptTypeVO {
@ApiModelProperty(value = "优化类型:0、手动优化;1、自动优化;2、恢复;3、绿波优化;4、区域优化; 5、高峰方案下发; 6、边缘优化")
private Integer optType;
}
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