Browse Source

交调综合查询修改

develop
lau572 3 months ago
parent
commit
12d44c78aa
  1. 13
      zc-business/src/main/java/com/zc/business/domain/DcTrafficVolumeDirectionData.java
  2. 6
      zc-business/src/main/java/com/zc/business/service/impl/DcTrafficSurveyDataServiceImpl.java

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

@ -106,6 +106,10 @@ public class DcTrafficVolumeDirectionData extends BaseEntity
@Excel(name = "合计-济南") @Excel(name = "合计-济南")
private Integer trafficVolumeJN; private Integer trafficVolumeJN;
/** 总计车流量 */
@Excel(name = "总计车流量")
private Integer allTrafficVolume;
public Long getId() { public Long getId() {
return id; return id;
} }
@ -298,6 +302,14 @@ public class DcTrafficVolumeDirectionData extends BaseEntity
this.trafficVolumeHZ = trafficVolumeHZ; this.trafficVolumeHZ = trafficVolumeHZ;
} }
public Integer getAllTrafficVolume() {
return allTrafficVolume;
}
public void setAllTrafficVolume(Integer allTrafficVolume) {
this.allTrafficVolume = allTrafficVolume;
}
public DcTrafficVolumeDirectionData(){} public DcTrafficVolumeDirectionData(){}
public DcTrafficVolumeDirectionData(Integer initData){ public DcTrafficVolumeDirectionData(Integer initData){
@ -321,5 +333,6 @@ public class DcTrafficVolumeDirectionData extends BaseEntity
this.tractorTrafficVolumeHZ = initData; this.tractorTrafficVolumeHZ = initData;
this.trafficVolumeJN = initData; this.trafficVolumeJN = initData;
this.trafficVolumeHZ = initData; this.trafficVolumeHZ = initData;
this.allTrafficVolume = initData;
} }
} }

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

@ -280,7 +280,7 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi
if (dcTrafficSurveyDataQueryParams.getDataType().equals("1")){ if (dcTrafficSurveyDataQueryParams.getDataType().equals("1")){
//车流量 //车流量
List<DcTrafficVolumeData> dcTrafficVolumeData = dcTrafficSurveyDataMapper.selectTrafficVolume(dcTrafficSurveyDataQueryParams); List<DcTrafficVolumeData> dcTrafficVolumeData = dcTrafficSurveyDataMapper.selectTrafficVolume(dcTrafficSurveyDataQueryParams);
if (dcTrafficVolumeData.size() > 0){ if (dcTrafficVolumeData.size() > 0){
//判断是否区分方向 //判断是否区分方向
@ -318,6 +318,7 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi
dcTrafficVolumeDirectionData.setTrafficVolumeJN(trafficVolumeData.getTrafficVolume()); dcTrafficVolumeDirectionData.setTrafficVolumeJN(trafficVolumeData.getTrafficVolume());
} }
} }
dcTrafficVolumeDirectionData.setAllTrafficVolume(dcTrafficVolumeDirectionData.getTrafficVolumeHZ()+dcTrafficVolumeDirectionData.getTrafficVolumeJN());
result.add(dcTrafficVolumeDirectionData); result.add(dcTrafficVolumeDirectionData);
} }
@ -346,6 +347,7 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi
naturalTotal.setTractorTrafficVolumeJN(naturalTotal.getTractorTrafficVolumeJN() + dcTrafficVolumeDirectionDatum.getTractorTrafficVolumeJN()); naturalTotal.setTractorTrafficVolumeJN(naturalTotal.getTractorTrafficVolumeJN() + dcTrafficVolumeDirectionDatum.getTractorTrafficVolumeJN());
naturalTotal.setTrafficVolumeHZ(naturalTotal.getTrafficVolumeHZ() + dcTrafficVolumeDirectionDatum.getTrafficVolumeHZ()); naturalTotal.setTrafficVolumeHZ(naturalTotal.getTrafficVolumeHZ() + dcTrafficVolumeDirectionDatum.getTrafficVolumeHZ());
naturalTotal.setTrafficVolumeJN(naturalTotal.getTrafficVolumeJN() + dcTrafficVolumeDirectionDatum.getTrafficVolumeJN()); naturalTotal.setTrafficVolumeJN(naturalTotal.getTrafficVolumeJN() + dcTrafficVolumeDirectionDatum.getTrafficVolumeJN());
naturalTotal.setAllTrafficVolume(naturalTotal.getTrafficVolumeJN() + naturalTotal.getTrafficVolumeHZ());
} }
//折算值 //折算值
DcTrafficVolumeDirectionData conversionValue = new DcTrafficVolumeDirectionData(0); DcTrafficVolumeDirectionData conversionValue = new DcTrafficVolumeDirectionData(0);
@ -382,6 +384,7 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi
conversionValue.getContainerTruckTrafficVolumeJN() + conversionValue.getMotorcycleTrafficVolumeJN() + conversionValue.getContainerTruckTrafficVolumeJN() + conversionValue.getMotorcycleTrafficVolumeJN() +
conversionValue.getTractorTrafficVolumeJN(); conversionValue.getTractorTrafficVolumeJN();
conversionValue.setTrafficVolumeJN(trafficVolumeJN); conversionValue.setTrafficVolumeJN(trafficVolumeJN);
conversionValue.setAllTrafficVolume(trafficVolumeHZ + trafficVolumeJN);
//自然平均值 //自然平均值
DcTrafficVolumeDirectionData naturalAvg = new DcTrafficVolumeDirectionData(0); DcTrafficVolumeDirectionData naturalAvg = new DcTrafficVolumeDirectionData(0);
@ -416,6 +419,7 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi
naturalAvg.getContainerTruckTrafficVolumeJN() + naturalAvg.getMotorcycleTrafficVolumeJN() + naturalAvg.getContainerTruckTrafficVolumeJN() + naturalAvg.getMotorcycleTrafficVolumeJN() +
naturalAvg.getTractorTrafficVolumeJN(); naturalAvg.getTractorTrafficVolumeJN();
naturalAvg.setTrafficVolumeJN(naturalAvgTrafficVolumeJN); naturalAvg.setTrafficVolumeJN(naturalAvgTrafficVolumeJN);
naturalAvg.setAllTrafficVolume(naturalAvgTrafficVolumeHZ + naturalAvgTrafficVolumeJN);
result = result.stream().sorted(Comparator.comparing(DcTrafficVolumeDirectionData::getTime)).collect(Collectors.toList()); result = result.stream().sorted(Comparator.comparing(DcTrafficVolumeDirectionData::getTime)).collect(Collectors.toList());
result.add(naturalTotal); result.add(naturalTotal);

Loading…
Cancel
Save