Commit c09413e1 authored by duanruiming's avatar duanruiming

[add] 策略历史查询优化-返回结果优化

parent 8e500612
......@@ -51,4 +51,8 @@ public class StrategyGreenOptHistEntity {
private Date createTime;
@TableField("modify_time")
private Date modifyTime;
@TableField("response_code")
private Integer responseCode;
@TableField("response_content")
private String responseContent;
}
......@@ -33,6 +33,8 @@ public class StrategyCrossResultEntity {
private Date issueTime;
@TableField("response_code")
private Integer responseCode;
@TableField("response_content")
private String responseContent;
@TableField("timing_plan")
private String timingPlan;
@TableField("insert_time")
......
......@@ -23,6 +23,8 @@ public class StrategyControlHistVO {
private String optTime;
@ApiModelProperty("优化结果")
private String result;
@ApiModelProperty("优化结果")
private Integer code;
@ApiModelProperty("经纬度")
private String wkt;
}
......@@ -249,11 +249,13 @@ public class StrategyControlServiceImpl implements StrategyControlService {
Date issueTime = resultEntity.getIssueTime();
String format = DateUtil.format(issueTime, Constants.DATE_FORMAT.E_DATE_FORMAT_SECOND);
histVO.setOptTime(format);
if (resultEntity.getCurrentAlgo() != 1) {
histVO.setResult(Objects.equals(200, resultEntity.getResponseCode()) ? "成功" : "失败");
} else {
histVO.setResult("成功");
}
//if (resultEntity.getCurrentAlgo() != 1) {
// histVO.setResult(Objects.equals(200, resultEntity.getResponseCode()) ? "成功" : "失败");
//} else {
// histVO.setResult("成功");
//}
histVO.setResult(resultEntity.getResponseContent());
histVO.setCode(resultEntity.getResponseCode());
results.add(histVO);
}
}
......@@ -300,7 +302,9 @@ public class StrategyControlServiceImpl implements StrategyControlService {
histVO.setStrategyName("绿波带");
}
histVO.setOptTime(entity.getControlTime());
histVO.setResult(Objects.equals(1, entity.getControlMethod()) ? "失败" : "成功");
//histVO.setResult(Objects.equals(1, entity.getControlMethod()) ? "失败" : "成功");
histVO.setResult(entity.getResponseContent());
histVO.setCode(entity.getResponseCode());
results.add(histVO);
}
}
......
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