Commit a471a291 authored by zhoushiguang's avatar zhoushiguang

保留2位小数

parent b5aca06c
......@@ -2,9 +2,11 @@ package net.wanji.opt.vo2.report;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.wanji.common.utils.tool.DateUtil;
import net.wanji.opt.config.Double2TwoDecimalPlacesSerializer;
import java.util.ArrayList;
import java.util.Date;
......@@ -34,8 +36,11 @@ public class GreenReportRunStateResponseVO {
private String amMaxTravelTime;
@ApiModelProperty(value = "本周早高峰最大行程时间同比(上周)情况", example = "减少6分钟")
private String amMaxTravelTimeSameRatioSituation;
@ApiModelProperty(value = "平均拥堵指数", example = "4.5")
private String amAvgContestIndex;
@JsonSerialize(using = Double2TwoDecimalPlacesSerializer.class)
private Double amAvgContestIndex;
@ApiModelProperty(value = "平均拥堵指数同比(上周)情况", example = "减少0.5")
private String amAvgContestIndexSameRatioSituation;
......@@ -54,8 +59,11 @@ public class GreenReportRunStateResponseVO {
private String pmMaxTravelTime;
@ApiModelProperty(value = "本周早高峰最大行程时间同比(上周)情况", example = "减少6分钟")
private String pmMaxTravelTimeSameRatioSituation;
@ApiModelProperty(value = "平均拥堵指数", example = "4.5")
private String pmAvgContestIndex;
@JsonSerialize(using = Double2TwoDecimalPlacesSerializer.class)
private Double pmAvgContestIndex;
@ApiModelProperty(value = "平均拥堵指数同比(上周)情况", example = "减少0.5")
private String pmAvgContestIndexSameRatioSituation;
......
package net.wanji.opt.vo2.report;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.wanji.opt.config.Double2TwoDecimalPlacesSerializer;
@Data
......@@ -18,20 +20,27 @@ public class GreenReportRunStatedDataVO {
private String lastWeekCongestSpan;
@ApiModelProperty(value = "本周拥堵指数", example = "3.5")
@JsonSerialize(using = Double2TwoDecimalPlacesSerializer.class)
private Double thisWeekCongestIndex;
@ApiModelProperty(value = "上周拥堵指数", example = "3.0")
@JsonSerialize(using = Double2TwoDecimalPlacesSerializer.class)
private Double lastWeekCongestIndex;
@ApiModelProperty(value = "本周平均车速km/h", example = "30.5")
@JsonSerialize(using = Double2TwoDecimalPlacesSerializer.class)
private Double thisWeekAvgSpeed;
@ApiModelProperty(value = "上周平均车速km", example = "30.2")
@JsonSerialize(using = Double2TwoDecimalPlacesSerializer.class)
private Double lastWeekAvgSpeed;
@ApiModelProperty(value = "本周行程时间(分钟)", example = "6.5")
@JsonSerialize(using = Double2TwoDecimalPlacesSerializer.class)
private Double thisWeekTravelTime;
@ApiModelProperty(value = "上周行程时间(分钟)", example = "8.5")
@JsonSerialize(using = Double2TwoDecimalPlacesSerializer.class)
private Double lastWeekTravelTime;
@ApiModelProperty(value = "峰期时段", example = "7:35~8:40")
......
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