Browse Source

一类交调站 站点查询增加占比

develop
lau572 1 month ago
parent
commit
8edd8e62f7
  1. 24
      zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeCarTypeData.java
  2. 72
      zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeData.java
  3. 76
      zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeDirectionCarTypeData.java
  4. 168
      zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeDirectionData.java
  5. 41
      zc-business/src/main/java/com/zc/business/service/impl/DcTrafficSurveyDataServiceImpl.java

24
zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeCarTypeData.java

@ -30,10 +30,18 @@ public class DcTrafficVolumeCarTypeData extends BaseEntity
@Excel(name = "客车")
private Integer bus;
/** 客车占比 */
@Excel(name = "客车占比")
private String busRatio;
/** 货车交通量 */
@Excel(name = "货车")
private Integer goodsCar;
/** 货车占比 */
@Excel(name = "货车占比")
private String goodsCarRatio;
/** 合计 */
@Excel(name = "合计")
private Integer trafficVolume;
@ -94,6 +102,22 @@ public class DcTrafficVolumeCarTypeData extends BaseEntity
this.trafficVolume = trafficVolume;
}
public String getBusRatio() {
return busRatio;
}
public void setBusRatio(String busRatio) {
this.busRatio = busRatio;
}
public String getGoodsCarRatio() {
return goodsCarRatio;
}
public void setGoodsCarRatio(String goodsCarRatio) {
this.goodsCarRatio = goodsCarRatio;
}
public DcTrafficVolumeCarTypeData(){}
public DcTrafficVolumeCarTypeData(Integer initData){

72
zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeData.java

@ -36,26 +36,50 @@ public class DcTrafficVolumeData extends BaseEntity
@Excel(name = "中小客车")
private Integer trafficNumberOfInAndSmall;
/** 中小客车占比 */
@Excel(name = "中小客车占比")
private String trafficNumberOfInAndSmallRatio;
/** 大客车交通量 */
@Excel(name = "大客车")
private Integer busTrafficVolume;
/** 大客车占比 */
@Excel(name = "大客车占比")
private String busTrafficVolumeRatio;
/** 小型货车交通量 */
@Excel(name = "小型货车")
private Integer trafficVolumeOfSmallTrucks;
/** 小型货车占比 */
@Excel(name = "小型货车占比")
private String trafficVolumeOfSmallTrucksRatio;
/** 中型货车交通量 */
@Excel(name = "中型货车")
private Integer mediumTruckTrafficVolume;
/** 中型货车占比 */
@Excel(name = "中型货车占比")
private String mediumTruckTrafficVolumeRatio;
/** 大型货车交通量 */
@Excel(name = "大型货车")
private Integer largeTruckTrafficVolume;
/** 大型货车占比 */
@Excel(name = "大型货车占比")
private String largeTruckTrafficVolumeRatio;
/** 特大型货车交通量 */
@Excel(name = "特大型货车")
private Integer extraLargeTrucksTrafficVolume;
/** 特大型货车占比 */
@Excel(name = "特大型货车占比")
private String extraLargeTrucksTrafficVolumeRatio;
/** 集装箱车交通量 */
// @Excel(name = "集装箱车")
private Integer containerTruckTrafficVolume;
@ -184,6 +208,54 @@ public class DcTrafficVolumeData extends BaseEntity
this.trafficVolume = trafficVolume;
}
public String getTrafficNumberOfInAndSmallRatio() {
return trafficNumberOfInAndSmallRatio;
}
public void setTrafficNumberOfInAndSmallRatio(String trafficNumberOfInAndSmallRatio) {
this.trafficNumberOfInAndSmallRatio = trafficNumberOfInAndSmallRatio;
}
public String getBusTrafficVolumeRatio() {
return busTrafficVolumeRatio;
}
public void setBusTrafficVolumeRatio(String busTrafficVolumeRatio) {
this.busTrafficVolumeRatio = busTrafficVolumeRatio;
}
public String getTrafficVolumeOfSmallTrucksRatio() {
return trafficVolumeOfSmallTrucksRatio;
}
public void setTrafficVolumeOfSmallTrucksRatio(String trafficVolumeOfSmallTrucksRatio) {
this.trafficVolumeOfSmallTrucksRatio = trafficVolumeOfSmallTrucksRatio;
}
public String getMediumTruckTrafficVolumeRatio() {
return mediumTruckTrafficVolumeRatio;
}
public void setMediumTruckTrafficVolumeRatio(String mediumTruckTrafficVolumeRatio) {
this.mediumTruckTrafficVolumeRatio = mediumTruckTrafficVolumeRatio;
}
public String getLargeTruckTrafficVolumeRatio() {
return largeTruckTrafficVolumeRatio;
}
public void setLargeTruckTrafficVolumeRatio(String largeTruckTrafficVolumeRatio) {
this.largeTruckTrafficVolumeRatio = largeTruckTrafficVolumeRatio;
}
public String getExtraLargeTrucksTrafficVolumeRatio() {
return extraLargeTrucksTrafficVolumeRatio;
}
public void setExtraLargeTrucksTrafficVolumeRatio(String extraLargeTrucksTrafficVolumeRatio) {
this.extraLargeTrucksTrafficVolumeRatio = extraLargeTrucksTrafficVolumeRatio;
}
public DcTrafficVolumeData(){}
public DcTrafficVolumeData(Integer initData){

76
zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeDirectionCarTypeData.java

@ -30,26 +30,50 @@ public class DcTrafficVolumeDirectionCarTypeData extends BaseEntity
@Excel(name = "客车-菏泽")
private Integer busHZ;
/** 菏泽客车交通量 */
@Excel(name = "客车占比-菏泽")
private String busRatioHZ;
/** 济南客车交通量 */
@Excel(name = "客车-济南")
private Integer busJN;
/** 济南客车交通量 */
@Excel(name = "客车占比-济南")
private String busRatioJN;
/** 菏泽货车交通量 */
@Excel(name = "小型货车-菏泽")
@Excel(name = "货车-菏泽")
private Integer goodsCarHZ;
/** 菏泽货车交通量 */
@Excel(name = "货车占比-菏泽")
private String goodsCarRatioHZ;
/** 济南货车交通量 */
@Excel(name = "小型货车-济南")
@Excel(name = "货车-济南")
private Integer goodsCarJN;
/** 济南货车交通量 */
@Excel(name = "货车占比-济南")
private String goodsCarRatioJN;
/** 合计 */
@Excel(name = "合计-菏泽")
private Integer trafficVolumeHZ;
/** 合计 */
@Excel(name = "合计占比-菏泽")
private String trafficVolumeRatioHZ;
/** 合计 */
@Excel(name = "合计-济南")
private Integer trafficVolumeJN;
/** 合计 */
@Excel(name = "合计占比-济南")
private String trafficVolumeRatioJN;
/** 总计车流量 */
@Excel(name = "总计车流量")
private Integer allTrafficVolume;
@ -142,6 +166,54 @@ public class DcTrafficVolumeDirectionCarTypeData extends BaseEntity
this.allTrafficVolume = allTrafficVolume;
}
public String getBusRatioHZ() {
return busRatioHZ;
}
public void setBusRatioHZ(String busRatioHZ) {
this.busRatioHZ = busRatioHZ;
}
public String getBusRatioJN() {
return busRatioJN;
}
public void setBusRatioJN(String busRatioJN) {
this.busRatioJN = busRatioJN;
}
public String getGoodsCarRatioHZ() {
return goodsCarRatioHZ;
}
public void setGoodsCarRatioHZ(String goodsCarRatioHZ) {
this.goodsCarRatioHZ = goodsCarRatioHZ;
}
public String getGoodsCarRatioJN() {
return goodsCarRatioJN;
}
public void setGoodsCarRatioJN(String goodsCarRatioJN) {
this.goodsCarRatioJN = goodsCarRatioJN;
}
public String getTrafficVolumeRatioHZ() {
return trafficVolumeRatioHZ;
}
public void setTrafficVolumeRatioHZ(String trafficVolumeRatioHZ) {
this.trafficVolumeRatioHZ = trafficVolumeRatioHZ;
}
public String getTrafficVolumeRatioJN() {
return trafficVolumeRatioJN;
}
public void setTrafficVolumeRatioJN(String trafficVolumeRatioJN) {
this.trafficVolumeRatioJN = trafficVolumeRatioJN;
}
public DcTrafficVolumeDirectionCarTypeData(){}
public DcTrafficVolumeDirectionCarTypeData(Integer initData){

168
zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeDirectionData.java

@ -30,50 +30,98 @@ public class DcTrafficVolumeDirectionData extends BaseEntity
@Excel(name = "中小客车-菏泽")
private Integer trafficNumberOfInAndSmallHZ;
/** 中小客车占比-菏泽 */
@Excel(name = "中小客车占比-菏泽")
private String trafficNumberOfInAndSmallRatioHZ;
/** 中小客车交通量 */
@Excel(name = "中小客车-济南")
private Integer trafficNumberOfInAndSmallJN;
/** 中小客车占比-济南 */
@Excel(name = "中小客车占比-济南")
private String trafficNumberOfInAndSmallRatioJN;
/** 大客车交通量 */
@Excel(name = "大客车-菏泽")
private Integer busTrafficVolumeHZ;
/** 大客车占比-菏泽 */
@Excel(name = "大客车占比-菏泽")
private String busTrafficVolumeRatioHZ;
/** 大客车交通量 */
@Excel(name = "大客车-济南")
private Integer busTrafficVolumeJN;
/** 大客车占比-济南 */
@Excel(name = "大客车占比-济南")
private String busTrafficVolumeRatioJN;
/** 小型货车交通量 */
@Excel(name = "小型货车-菏泽")
private Integer trafficVolumeOfSmallTrucksHZ;
/** 小型货车占比-菏泽 */
@Excel(name = "小型货车占比-菏泽")
private String trafficVolumeOfSmallTrucksRatioHZ;
/** 小型货车交通量 */
@Excel(name = "小型货车-济南")
private Integer trafficVolumeOfSmallTrucksJN;
/** 小型货车占比-济南 */
@Excel(name = "小型货车占比-济南")
private String trafficVolumeOfSmallTrucksRatioJN;
/** 中型货车交通量 */
@Excel(name = "中型货车-菏泽")
private Integer mediumTruckTrafficVolumeHZ;
/** 中型货车占比-菏泽 */
@Excel(name = "中型货车占比-菏泽")
private String mediumTruckTrafficVolumeRatioHZ;
/** 中型货车交通量 */
@Excel(name = "中型货车-济南")
private Integer mediumTruckTrafficVolumeJN;
/** 中型货车占比-济南 */
@Excel(name = "中型货车占比-济南")
private String mediumTruckTrafficVolumeRatioJN;
/** 大型货车交通量 */
@Excel(name = "大型货车-菏泽")
private Integer largeTruckTrafficVolumeHZ;
/** 大型货车占比-菏泽 */
@Excel(name = "大型货车占比-菏泽")
private String largeTruckTrafficVolumeRatioHZ;
/** 大型货车交通量 */
@Excel(name = "大型货车-济南")
private Integer largeTruckTrafficVolumeJN;
/** 大型货车占比-济南 */
@Excel(name = "大型货车占比-济南")
private String largeTruckTrafficVolumeRatioJN;
/** 特大型货车交通量 */
@Excel(name = "特大型货车-菏泽")
private Integer extraLargeTrucksTrafficVolumeHZ;
/** 特大型货车占比-菏泽 */
@Excel(name = "特大型货车占比-菏泽")
private String extraLargeTrucksTrafficVolumeRatioHZ;
/** 特大型货车交通量 */
@Excel(name = "特大型货车-济南")
private Integer extraLargeTrucksTrafficVolumeJN;
/** 特大型货车占比-济南 */
@Excel(name = "特大型货车占比-济南")
private String extraLargeTrucksTrafficVolumeRatioJN;
/** 集装箱车交通量 */
// @Excel(name = "集装箱车-菏泽")
private Integer containerTruckTrafficVolumeHZ;
@ -102,10 +150,18 @@ public class DcTrafficVolumeDirectionData extends BaseEntity
@Excel(name = "合计-菏泽")
private Integer trafficVolumeHZ;
/** 菏泽占比 */
@Excel(name = "合计占比-菏泽")
private String trafficVolumeRatioHZ;
/** 合计 */
@Excel(name = "合计-济南")
private Integer trafficVolumeJN;
/** 合计占比-济南 */
@Excel(name = "合计占比-济南")
private String trafficVolumeRatioJN;
/** 总计车流量 */
@Excel(name = "总计车流量")
private Integer allTrafficVolume;
@ -310,6 +366,118 @@ public class DcTrafficVolumeDirectionData extends BaseEntity
this.allTrafficVolume = allTrafficVolume;
}
public String getTrafficNumberOfInAndSmallRatioHZ() {
return trafficNumberOfInAndSmallRatioHZ;
}
public void setTrafficNumberOfInAndSmallRatioHZ(String trafficNumberOfInAndSmallRatioHZ) {
this.trafficNumberOfInAndSmallRatioHZ = trafficNumberOfInAndSmallRatioHZ;
}
public String getTrafficNumberOfInAndSmallRatioJN() {
return trafficNumberOfInAndSmallRatioJN;
}
public void setTrafficNumberOfInAndSmallRatioJN(String trafficNumberOfInAndSmallRatioJN) {
this.trafficNumberOfInAndSmallRatioJN = trafficNumberOfInAndSmallRatioJN;
}
public String getBusTrafficVolumeRatioHZ() {
return busTrafficVolumeRatioHZ;
}
public void setBusTrafficVolumeRatioHZ(String busTrafficVolumeRatioHZ) {
this.busTrafficVolumeRatioHZ = busTrafficVolumeRatioHZ;
}
public String getBusTrafficVolumeRatioJN() {
return busTrafficVolumeRatioJN;
}
public void setBusTrafficVolumeRatioJN(String busTrafficVolumeRatioJN) {
this.busTrafficVolumeRatioJN = busTrafficVolumeRatioJN;
}
public String getTrafficVolumeOfSmallTrucksRatioHZ() {
return trafficVolumeOfSmallTrucksRatioHZ;
}
public void setTrafficVolumeOfSmallTrucksRatioHZ(String trafficVolumeOfSmallTrucksRatioHZ) {
this.trafficVolumeOfSmallTrucksRatioHZ = trafficVolumeOfSmallTrucksRatioHZ;
}
public String getTrafficVolumeOfSmallTrucksRatioJN() {
return trafficVolumeOfSmallTrucksRatioJN;
}
public void setTrafficVolumeOfSmallTrucksRatioJN(String trafficVolumeOfSmallTrucksRatioJN) {
this.trafficVolumeOfSmallTrucksRatioJN = trafficVolumeOfSmallTrucksRatioJN;
}
public String getMediumTruckTrafficVolumeRatioHZ() {
return mediumTruckTrafficVolumeRatioHZ;
}
public void setMediumTruckTrafficVolumeRatioHZ(String mediumTruckTrafficVolumeRatioHZ) {
this.mediumTruckTrafficVolumeRatioHZ = mediumTruckTrafficVolumeRatioHZ;
}
public String getMediumTruckTrafficVolumeRatioJN() {
return mediumTruckTrafficVolumeRatioJN;
}
public void setMediumTruckTrafficVolumeRatioJN(String mediumTruckTrafficVolumeRatioJN) {
this.mediumTruckTrafficVolumeRatioJN = mediumTruckTrafficVolumeRatioJN;
}
public String getLargeTruckTrafficVolumeRatioHZ() {
return largeTruckTrafficVolumeRatioHZ;
}
public void setLargeTruckTrafficVolumeRatioHZ(String largeTruckTrafficVolumeRatioHZ) {
this.largeTruckTrafficVolumeRatioHZ = largeTruckTrafficVolumeRatioHZ;
}
public String getLargeTruckTrafficVolumeRatioJN() {
return largeTruckTrafficVolumeRatioJN;
}
public void setLargeTruckTrafficVolumeRatioJN(String largeTruckTrafficVolumeRatioJN) {
this.largeTruckTrafficVolumeRatioJN = largeTruckTrafficVolumeRatioJN;
}
public String getExtraLargeTrucksTrafficVolumeRatioHZ() {
return extraLargeTrucksTrafficVolumeRatioHZ;
}
public void setExtraLargeTrucksTrafficVolumeRatioHZ(String extraLargeTrucksTrafficVolumeRatioHZ) {
this.extraLargeTrucksTrafficVolumeRatioHZ = extraLargeTrucksTrafficVolumeRatioHZ;
}
public String getExtraLargeTrucksTrafficVolumeRatioJN() {
return extraLargeTrucksTrafficVolumeRatioJN;
}
public void setExtraLargeTrucksTrafficVolumeRatioJN(String extraLargeTrucksTrafficVolumeRatioJN) {
this.extraLargeTrucksTrafficVolumeRatioJN = extraLargeTrucksTrafficVolumeRatioJN;
}
public String getTrafficVolumeRatioHZ() {
return trafficVolumeRatioHZ;
}
public void setTrafficVolumeRatioHZ(String trafficVolumeRatioHZ) {
this.trafficVolumeRatioHZ = trafficVolumeRatioHZ;
}
public String getTrafficVolumeRatioJN() {
return trafficVolumeRatioJN;
}
public void setTrafficVolumeRatioJN(String trafficVolumeRatioJN) {
this.trafficVolumeRatioJN = trafficVolumeRatioJN;
}
public DcTrafficVolumeDirectionData(){}
public DcTrafficVolumeDirectionData(Integer initData){

41
zc-business/src/main/java/com/zc/business/service/impl/DcTrafficSurveyDataServiceImpl.java

@ -361,6 +361,7 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi
dcTrafficVolumeDirectionData.setTrafficVolumeJN(trafficVolumeData.getTrafficVolume());
}
}
dcTrafficVolumeDirectionData.setAllTrafficVolume(dcTrafficVolumeDirectionData.getTrafficVolumeHZ()+dcTrafficVolumeDirectionData.getTrafficVolumeJN());
result.add(dcTrafficVolumeDirectionData);
@ -526,11 +527,36 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi
carTypeData.setTrafficVolumeHZ(dcTrafficVolumeDirectionData.getTrafficVolumeHZ());
carTypeData.setTrafficVolumeJN(dcTrafficVolumeDirectionData.getTrafficVolumeJN());
carTypeData.setAllTrafficVolume(dcTrafficVolumeDirectionData.getAllTrafficVolume());
//占比
carTypeData.setBusRatioHZ(String.format("%.2f", (double) carTypeData.getBusHZ() / carTypeData.getTrafficVolumeHZ() * 100) + "%");
carTypeData.setBusRatioJN(String.format("%.2f", (double) carTypeData.getBusJN() / carTypeData.getTrafficVolumeJN() * 100) + "%");
carTypeData.setGoodsCarRatioHZ(String.format("%.2f", (double) carTypeData.getGoodsCarHZ() / carTypeData.getTrafficVolumeHZ() * 100) + "%");
carTypeData.setGoodsCarRatioJN(String.format("%.2f", (double) carTypeData.getGoodsCarJN() / carTypeData.getTrafficVolumeJN() * 100) + "%");
carTypeData.setTrafficVolumeRatioHZ(String.format("%.2f", (double) carTypeData.getTrafficVolumeHZ() / carTypeData.getAllTrafficVolume() * 100) + "%");
carTypeData.setTrafficVolumeRatioJN(String.format("%.2f", (double) carTypeData.getTrafficVolumeJN() / carTypeData.getAllTrafficVolume() * 100) + "%");
carTypeResult.add(carTypeData);
}
return AjaxResult.success(carTypeResult);
} else {
//统计占比
for (DcTrafficVolumeDirectionData dcTrafficVolumeDirectionData : result) {
dcTrafficVolumeDirectionData.setTrafficNumberOfInAndSmallRatioHZ(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getTrafficNumberOfInAndSmallHZ() / dcTrafficVolumeDirectionData.getTrafficVolumeHZ() * 100) + "%");
dcTrafficVolumeDirectionData.setTrafficNumberOfInAndSmallRatioJN(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getTrafficNumberOfInAndSmallJN() / dcTrafficVolumeDirectionData.getTrafficVolumeJN() * 100) + "%");
dcTrafficVolumeDirectionData.setBusTrafficVolumeRatioHZ(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getBusTrafficVolumeHZ() / dcTrafficVolumeDirectionData.getTrafficVolumeHZ() * 100) + "%");
dcTrafficVolumeDirectionData.setBusTrafficVolumeRatioJN(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getBusTrafficVolumeJN() / dcTrafficVolumeDirectionData.getTrafficVolumeJN() * 100) + "%");
dcTrafficVolumeDirectionData.setTrafficVolumeOfSmallTrucksRatioHZ(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getTrafficVolumeOfSmallTrucksHZ() / dcTrafficVolumeDirectionData.getTrafficVolumeHZ() * 100) + "%");
dcTrafficVolumeDirectionData.setTrafficVolumeOfSmallTrucksRatioJN(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getTrafficVolumeOfSmallTrucksJN() / dcTrafficVolumeDirectionData.getTrafficVolumeJN() * 100) + "%");
dcTrafficVolumeDirectionData.setMediumTruckTrafficVolumeRatioHZ(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getMediumTruckTrafficVolumeHZ() / dcTrafficVolumeDirectionData.getTrafficVolumeHZ() * 100) + "%");
dcTrafficVolumeDirectionData.setMediumTruckTrafficVolumeRatioJN(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getMediumTruckTrafficVolumeJN() / dcTrafficVolumeDirectionData.getTrafficVolumeJN() * 100) + "%");
dcTrafficVolumeDirectionData.setLargeTruckTrafficVolumeRatioHZ(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getLargeTruckTrafficVolumeHZ() / dcTrafficVolumeDirectionData.getTrafficVolumeHZ() * 100) + "%");
dcTrafficVolumeDirectionData.setLargeTruckTrafficVolumeRatioJN(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getLargeTruckTrafficVolumeJN() / dcTrafficVolumeDirectionData.getTrafficVolumeJN() * 100) + "%");
dcTrafficVolumeDirectionData.setExtraLargeTrucksTrafficVolumeRatioHZ(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getExtraLargeTrucksTrafficVolumeHZ() / dcTrafficVolumeDirectionData.getTrafficVolumeHZ() * 100) + "%");
dcTrafficVolumeDirectionData.setExtraLargeTrucksTrafficVolumeRatioJN(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getExtraLargeTrucksTrafficVolumeJN() / dcTrafficVolumeDirectionData.getTrafficVolumeJN() * 100) + "%");
dcTrafficVolumeDirectionData.setTrafficVolumeRatioHZ(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getTrafficVolumeHZ() / dcTrafficVolumeDirectionData.getAllTrafficVolume() * 100) + "%");
dcTrafficVolumeDirectionData.setTrafficVolumeRatioJN(String.format("%.2f", (double) dcTrafficVolumeDirectionData.getTrafficVolumeJN() / dcTrafficVolumeDirectionData.getAllTrafficVolume() * 100) + "%");
}
return AjaxResult.success(result);
}
} else if (dcTrafficSurveyDataQueryParams.getDirection().equals("2")){
@ -630,11 +656,26 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi
+ dcTrafficVolumeDatum.getExtraLargeTrucksTrafficVolume()
);
carTypeData.setTrafficVolume(dcTrafficVolumeDatum.getTrafficVolume());
//占比
carTypeData.setBusRatio(String.format("%.2f", (double) carTypeData.getBus() / carTypeData.getTrafficVolume() * 100) + "%");
carTypeData.setGoodsCarRatio(String.format("%.2f", (double) carTypeData.getGoodsCar() / carTypeData.getTrafficVolume() * 100) + "%");
carTypeResult.add(carTypeData);
}
return AjaxResult.success(carTypeResult);
} else {
//占比
for (DcTrafficVolumeData dcTrafficVolumeDatum : dcTrafficVolumeData) {
dcTrafficVolumeDatum.setTrafficNumberOfInAndSmallRatio(String.format("%.2f", (double) dcTrafficVolumeDatum.getTrafficNumberOfInAndSmall() / dcTrafficVolumeDatum.getTrafficVolume() * 100) + "%");
dcTrafficVolumeDatum.setBusTrafficVolumeRatio(String.format("%.2f", (double) dcTrafficVolumeDatum.getBusTrafficVolume() / dcTrafficVolumeDatum.getTrafficVolume() * 100) + "%");
dcTrafficVolumeDatum.setTrafficVolumeOfSmallTrucksRatio(String.format("%.2f", (double) dcTrafficVolumeDatum.getTrafficVolumeOfSmallTrucks() / dcTrafficVolumeDatum.getTrafficVolume() * 100) + "%");
dcTrafficVolumeDatum.setMediumTruckTrafficVolumeRatio(String.format("%.2f", (double) dcTrafficVolumeDatum.getMediumTruckTrafficVolume() / dcTrafficVolumeDatum.getTrafficVolume() * 100) + "%");
dcTrafficVolumeDatum.setLargeTruckTrafficVolumeRatio(String.format("%.2f", (double) dcTrafficVolumeDatum.getLargeTruckTrafficVolume() / dcTrafficVolumeDatum.getTrafficVolume() * 100) + "%");
dcTrafficVolumeDatum.setExtraLargeTrucksTrafficVolumeRatio(String.format("%.2f", (double) dcTrafficVolumeDatum.getExtraLargeTrucksTrafficVolume() / dcTrafficVolumeDatum.getTrafficVolume() * 100) + "%");
}
return AjaxResult.success(dcTrafficVolumeData);
}
} else {

Loading…
Cancel
Save