|
|
@ -64,6 +64,8 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
dataList = dcTrafficSurveyDataMapper.selectMonth(dcTrafficSurveyData); |
|
|
|
} else if (dcTrafficSurveyData.getType().equals("year")){ |
|
|
|
dataList = dcTrafficSurveyDataMapper.selectYear(dcTrafficSurveyData); |
|
|
|
} else if (dcTrafficSurveyData.getType().equals("range")){ |
|
|
|
dataList = dcTrafficSurveyDataMapper.selectRange(dcTrafficSurveyData); |
|
|
|
} |
|
|
|
Map<String,Map<String, Map<String, List<DcTrafficSurveyData>>>> groupedData = dataList.stream() |
|
|
|
.collect(Collectors.groupingBy( |
|
|
@ -83,6 +85,15 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
row.put("stakeMark",dcDevice.getStakeMark()); |
|
|
|
row.put("direction","1"); |
|
|
|
|
|
|
|
//单个设备合计数据
|
|
|
|
Map<String,Object> totalRow = new HashMap<>(); |
|
|
|
totalRow.put("stakeMark",dcDevice.getStakeMark()); |
|
|
|
totalRow.put("direction","2"); |
|
|
|
for (Map<String, String> columnMap : columnList) { |
|
|
|
totalRow.put(columnMap.get("key"),0); |
|
|
|
totalRow.put("total",0); |
|
|
|
} |
|
|
|
|
|
|
|
if (directionData.containsKey("1")){ |
|
|
|
Integer total = 0; |
|
|
|
//单个设备济南方向分时数据
|
|
|
@ -91,12 +102,14 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
if (directionList.containsKey(columnMap.get("key"))){ |
|
|
|
List<DcTrafficSurveyData> timeList = directionList.get(columnMap.get("key")); |
|
|
|
row.put(columnMap.get("key"),timeList.get(0).getTrafficVolume()); |
|
|
|
totalRow.put(columnMap.get("key"),timeList.get(0).getTrafficVolume()); |
|
|
|
total += timeList.get(0).getTrafficVolume().intValue(); |
|
|
|
} else { |
|
|
|
row.put(columnMap.get("key"),0); |
|
|
|
} |
|
|
|
} |
|
|
|
row.put("total",total); |
|
|
|
totalRow.put("total",total); |
|
|
|
} else { |
|
|
|
for (Map<String, String> columnMap : columnList) { |
|
|
|
row.put(columnMap.get("key"),0); |
|
|
@ -117,12 +130,15 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
if (directionList.containsKey(columnMap.get("key"))){ |
|
|
|
List<DcTrafficSurveyData> timeList = directionList.get(columnMap.get("key")); |
|
|
|
row.put(columnMap.get("key"),timeList.get(0).getTrafficVolume()); |
|
|
|
Long totalRowData = Long.parseLong(totalRow.get(columnMap.get("key")).toString()); |
|
|
|
totalRow.put(columnMap.get("key"),totalRowData + timeList.get(0).getTrafficVolume()); |
|
|
|
total += timeList.get(0).getTrafficVolume().intValue(); |
|
|
|
} else { |
|
|
|
row.put(columnMap.get("key"),0); |
|
|
|
} |
|
|
|
} |
|
|
|
row.put("total",total); |
|
|
|
totalRow.put("total",Integer.parseInt(totalRow.get("total").toString()) + total); |
|
|
|
} else { |
|
|
|
for (Map<String, String> columnMap : columnList) { |
|
|
|
row.put(columnMap.get("key"),0); |
|
|
@ -130,6 +146,8 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
} |
|
|
|
} |
|
|
|
rowList.add(row); |
|
|
|
|
|
|
|
rowList.add(totalRow); |
|
|
|
} else { |
|
|
|
row = new HashMap<>(); |
|
|
|
row.put("stakeMark",dcDevice.getStakeMark()); |
|
|
@ -148,6 +166,16 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
} |
|
|
|
row.put("total",0); |
|
|
|
rowList.add(row); |
|
|
|
|
|
|
|
//单个设备合计数据
|
|
|
|
row = new HashMap<>(); |
|
|
|
row.put("stakeMark",dcDevice.getStakeMark()); |
|
|
|
row.put("direction","2"); |
|
|
|
for (Map<String, String> columnMap : columnList) { |
|
|
|
row.put(columnMap.get("key"),0); |
|
|
|
} |
|
|
|
row.put("total",0); |
|
|
|
rowList.add(row); |
|
|
|
} |
|
|
|
} |
|
|
|
Map<String,Object> result = new HashMap<>(); |
|
|
@ -184,6 +212,23 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
column.put("key",String.valueOf(i)); |
|
|
|
columnList.add(column); |
|
|
|
} |
|
|
|
} else if (dcTrafficSurveyData.getType().equals("range")){ |
|
|
|
Calendar startCal = Calendar.getInstance(); |
|
|
|
startCal.setTime(dcTrafficSurveyData.getTimestamp()); |
|
|
|
Calendar endCal = Calendar.getInstance(); |
|
|
|
endCal.setTime(dcTrafficSurveyData.getEndTime()); |
|
|
|
|
|
|
|
SimpleDateFormat sf = new SimpleDateFormat("MM-dd"); |
|
|
|
while (startCal.before(endCal) || startCal.equals(endCal)) { |
|
|
|
column = new HashMap<>(); |
|
|
|
Date currentDate = startCal.getTime(); |
|
|
|
|
|
|
|
column.put("label",sf.format(currentDate)); |
|
|
|
column.put("key",sf.format(currentDate)); |
|
|
|
columnList.add(column); |
|
|
|
|
|
|
|
startCal.add(Calendar.DATE, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
return columnList; |
|
|
|
} |
|
|
@ -258,7 +303,7 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 综合查询 |
|
|
|
* 站点查询 |
|
|
|
* |
|
|
|
* @param dcTrafficSurveyDataQueryParams |
|
|
|
* @return 结果 |
|
|
@ -268,8 +313,6 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(dcTrafficSurveyDataQueryParams.getIotDeviceId())){ |
|
|
|
return AjaxResult.error("请选择设备"); |
|
|
|
} else if (dcTrafficSurveyDataQueryParams.getDate() == null){ |
|
|
|
return AjaxResult.error("请选择查询时间"); |
|
|
|
} else if (StringUtils.isEmpty(dcTrafficSurveyDataQueryParams.getType())){ |
|
|
|
return AjaxResult.error("请选择时间类型"); |
|
|
|
} else if (StringUtils.isEmpty(dcTrafficSurveyDataQueryParams.getDataType())){ |
|
|
@ -421,11 +464,75 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
naturalAvg.setTrafficVolumeJN(naturalAvgTrafficVolumeJN); |
|
|
|
naturalAvg.setAllTrafficVolume(naturalAvgTrafficVolumeHZ + naturalAvgTrafficVolumeJN); |
|
|
|
|
|
|
|
//折算平均值
|
|
|
|
DcTrafficVolumeDirectionData conversionAvg = new DcTrafficVolumeDirectionData(0); |
|
|
|
conversionAvg.setTime("折算平均值"); |
|
|
|
conversionAvg.setTrafficNumberOfInAndSmallHZ(conversionValue.getTrafficNumberOfInAndSmallHZ() / result.size()); |
|
|
|
conversionAvg.setTrafficNumberOfInAndSmallJN(conversionValue.getTrafficNumberOfInAndSmallJN() / result.size()); |
|
|
|
conversionAvg.setBusTrafficVolumeHZ(conversionValue.getBusTrafficVolumeHZ() / result.size()); |
|
|
|
conversionAvg.setBusTrafficVolumeJN(conversionValue.getBusTrafficVolumeJN() / result.size()); |
|
|
|
conversionAvg.setTrafficVolumeOfSmallTrucksHZ(conversionValue.getTrafficVolumeOfSmallTrucksHZ() / result.size()); |
|
|
|
conversionAvg.setTrafficVolumeOfSmallTrucksJN(conversionValue.getTrafficVolumeOfSmallTrucksJN() / result.size()); |
|
|
|
conversionAvg.setMediumTruckTrafficVolumeHZ(conversionValue.getMediumTruckTrafficVolumeHZ() / result.size()); |
|
|
|
conversionAvg.setMediumTruckTrafficVolumeJN(conversionValue.getMediumTruckTrafficVolumeJN() / result.size()); |
|
|
|
conversionAvg.setLargeTruckTrafficVolumeHZ(conversionValue.getLargeTruckTrafficVolumeHZ() / result.size()); |
|
|
|
conversionAvg.setLargeTruckTrafficVolumeJN(conversionValue.getLargeTruckTrafficVolumeJN() / result.size()); |
|
|
|
conversionAvg.setExtraLargeTrucksTrafficVolumeHZ(conversionValue.getExtraLargeTrucksTrafficVolumeHZ() / result.size()); |
|
|
|
conversionAvg.setExtraLargeTrucksTrafficVolumeJN(conversionValue.getExtraLargeTrucksTrafficVolumeJN() / result.size()); |
|
|
|
conversionAvg.setContainerTruckTrafficVolumeHZ(conversionValue.getContainerTruckTrafficVolumeHZ() / result.size()); |
|
|
|
conversionAvg.setContainerTruckTrafficVolumeJN(conversionValue.getContainerTruckTrafficVolumeJN() / result.size()); |
|
|
|
conversionAvg.setMotorcycleTrafficVolumeHZ(conversionValue.getMotorcycleTrafficVolumeHZ() / result.size()); |
|
|
|
conversionAvg.setMotorcycleTrafficVolumeJN(conversionValue.getMotorcycleTrafficVolumeJN() / result.size()); |
|
|
|
conversionAvg.setTractorTrafficVolumeHZ(conversionValue.getTractorTrafficVolumeHZ() / result.size()); |
|
|
|
conversionAvg.setTractorTrafficVolumeJN(conversionValue.getTractorTrafficVolumeJN() / result.size()); |
|
|
|
Integer conversionAvgTrafficVolumeHZ = conversionAvg.getTrafficNumberOfInAndSmallHZ() + conversionAvg.getBusTrafficVolumeHZ() + |
|
|
|
conversionAvg.getTrafficVolumeOfSmallTrucksHZ() + conversionAvg.getMediumTruckTrafficVolumeHZ() + |
|
|
|
conversionAvg.getLargeTruckTrafficVolumeHZ() + conversionAvg.getExtraLargeTrucksTrafficVolumeHZ() + |
|
|
|
conversionAvg.getContainerTruckTrafficVolumeHZ() + conversionAvg.getMotorcycleTrafficVolumeHZ() + |
|
|
|
conversionAvg.getTractorTrafficVolumeHZ(); |
|
|
|
conversionAvg.setTrafficVolumeHZ(conversionAvgTrafficVolumeHZ); |
|
|
|
Integer conversionAvgTrafficVolumeJN = conversionAvg.getTrafficNumberOfInAndSmallJN() + conversionAvg.getBusTrafficVolumeJN() + |
|
|
|
conversionAvg.getTrafficVolumeOfSmallTrucksJN() + conversionAvg.getMediumTruckTrafficVolumeJN() + |
|
|
|
conversionAvg.getLargeTruckTrafficVolumeJN() + conversionAvg.getExtraLargeTrucksTrafficVolumeJN() + |
|
|
|
conversionAvg.getContainerTruckTrafficVolumeJN() + conversionAvg.getMotorcycleTrafficVolumeJN() + |
|
|
|
conversionAvg.getTractorTrafficVolumeJN(); |
|
|
|
conversionAvg.setTrafficVolumeJN(conversionAvgTrafficVolumeJN); |
|
|
|
conversionAvg.setAllTrafficVolume(conversionAvgTrafficVolumeHZ + conversionAvgTrafficVolumeJN); |
|
|
|
|
|
|
|
result = result.stream().sorted(Comparator.comparing(DcTrafficVolumeDirectionData::getTime)).collect(Collectors.toList()); |
|
|
|
result.add(naturalTotal); |
|
|
|
result.add(conversionValue); |
|
|
|
result.add(naturalAvg); |
|
|
|
result.add(conversionAvg); |
|
|
|
|
|
|
|
//车型大类
|
|
|
|
if(dcTrafficSurveyDataQueryParams.getCarType().equals("2")){ |
|
|
|
List<DcTrafficVolumeDirectionCarTypeData> carTypeResult = new ArrayList<>(); |
|
|
|
for (DcTrafficVolumeDirectionData dcTrafficVolumeDirectionData : result) { |
|
|
|
DcTrafficVolumeDirectionCarTypeData carTypeData = new DcTrafficVolumeDirectionCarTypeData(0); |
|
|
|
carTypeData.setTime(dcTrafficVolumeDirectionData.getTime()); |
|
|
|
carTypeData.setBusHZ(dcTrafficVolumeDirectionData.getTrafficNumberOfInAndSmallHZ() + dcTrafficVolumeDirectionData.getBusTrafficVolumeHZ()); |
|
|
|
carTypeData.setBusJN(dcTrafficVolumeDirectionData.getTrafficNumberOfInAndSmallJN() + dcTrafficVolumeDirectionData.getBusTrafficVolumeJN()); |
|
|
|
carTypeData.setGoodsCarHZ(dcTrafficVolumeDirectionData.getTrafficVolumeOfSmallTrucksHZ() |
|
|
|
+ dcTrafficVolumeDirectionData.getMediumTruckTrafficVolumeHZ() |
|
|
|
+ dcTrafficVolumeDirectionData.getLargeTruckTrafficVolumeHZ() |
|
|
|
+ dcTrafficVolumeDirectionData.getExtraLargeTrucksTrafficVolumeHZ() |
|
|
|
); |
|
|
|
carTypeData.setGoodsCarJN(dcTrafficVolumeDirectionData.getTrafficVolumeOfSmallTrucksJN() |
|
|
|
+ dcTrafficVolumeDirectionData.getMediumTruckTrafficVolumeJN() |
|
|
|
+ dcTrafficVolumeDirectionData.getLargeTruckTrafficVolumeJN() |
|
|
|
+ dcTrafficVolumeDirectionData.getExtraLargeTrucksTrafficVolumeJN() |
|
|
|
); |
|
|
|
carTypeData.setTrafficVolumeHZ(dcTrafficVolumeDirectionData.getTrafficVolumeHZ()); |
|
|
|
carTypeData.setTrafficVolumeJN(dcTrafficVolumeDirectionData.getTrafficVolumeJN()); |
|
|
|
carTypeData.setAllTrafficVolume(dcTrafficVolumeDirectionData.getAllTrafficVolume()); |
|
|
|
carTypeResult.add(carTypeData); |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success(carTypeResult); |
|
|
|
} else { |
|
|
|
return AjaxResult.success(result); |
|
|
|
} |
|
|
|
} else if (dcTrafficSurveyDataQueryParams.getDirection().equals("2")){ |
|
|
|
//自然合计值
|
|
|
|
DcTrafficVolumeData naturalTotal = new DcTrafficVolumeData(0); |
|
|
@ -481,14 +588,55 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
naturalAvg.getTractorTrafficVolume(); |
|
|
|
naturalAvg.setTrafficVolume(naturalAvgTrafficVolume); |
|
|
|
|
|
|
|
//折算平均值
|
|
|
|
DcTrafficVolumeData conversionAvg = new DcTrafficVolumeData(0); |
|
|
|
conversionAvg.setTime("自然平均值"); |
|
|
|
conversionAvg.setTrafficNumberOfInAndSmall(conversionValue.getTrafficNumberOfInAndSmall() / dcTrafficVolumeData.size()); |
|
|
|
conversionAvg.setBusTrafficVolume(conversionValue.getBusTrafficVolume() / dcTrafficVolumeData.size()); |
|
|
|
conversionAvg.setTrafficVolumeOfSmallTrucks(conversionValue.getTrafficVolumeOfSmallTrucks() / dcTrafficVolumeData.size()); |
|
|
|
conversionAvg.setMediumTruckTrafficVolume(conversionValue.getMediumTruckTrafficVolume() / dcTrafficVolumeData.size()); |
|
|
|
conversionAvg.setLargeTruckTrafficVolume(conversionValue.getLargeTruckTrafficVolume() / dcTrafficVolumeData.size()); |
|
|
|
conversionAvg.setExtraLargeTrucksTrafficVolume(conversionValue.getExtraLargeTrucksTrafficVolume() / dcTrafficVolumeData.size()); |
|
|
|
conversionAvg.setContainerTruckTrafficVolume(conversionValue.getContainerTruckTrafficVolume() / dcTrafficVolumeData.size()); |
|
|
|
conversionAvg.setMotorcycleTrafficVolume(conversionValue.getMotorcycleTrafficVolume() / dcTrafficVolumeData.size()); |
|
|
|
conversionAvg.setTractorTrafficVolume(conversionValue.getTractorTrafficVolume() / dcTrafficVolumeData.size()); |
|
|
|
Integer conversionAvgTrafficVolume = conversionAvg.getTrafficNumberOfInAndSmall() + conversionAvg.getBusTrafficVolume() + |
|
|
|
conversionAvg.getTrafficVolumeOfSmallTrucks() + conversionAvg.getMediumTruckTrafficVolume() + |
|
|
|
conversionAvg.getLargeTruckTrafficVolume() + conversionAvg.getExtraLargeTrucksTrafficVolume() + |
|
|
|
conversionAvg.getContainerTruckTrafficVolume() + conversionAvg.getMotorcycleTrafficVolume() + |
|
|
|
conversionAvg.getTractorTrafficVolume(); |
|
|
|
conversionAvg.setTrafficVolume(conversionAvgTrafficVolume); |
|
|
|
|
|
|
|
dcTrafficVolumeData.add(naturalTotal); |
|
|
|
dcTrafficVolumeData.add(conversionValue); |
|
|
|
dcTrafficVolumeData.add(naturalAvg); |
|
|
|
dcTrafficVolumeData.add(conversionAvg); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success(dcTrafficVolumeData); |
|
|
|
//车型大类
|
|
|
|
if(dcTrafficSurveyDataQueryParams.getCarType().equals("2")){ |
|
|
|
List<DcTrafficVolumeCarTypeData> carTypeResult = new ArrayList<>(); |
|
|
|
|
|
|
|
for (DcTrafficVolumeData dcTrafficVolumeDatum : dcTrafficVolumeData) { |
|
|
|
DcTrafficVolumeCarTypeData carTypeData = new DcTrafficVolumeCarTypeData(0); |
|
|
|
carTypeData.setTime(dcTrafficVolumeDatum.getTime()); |
|
|
|
carTypeData.setBus(dcTrafficVolumeDatum.getTrafficNumberOfInAndSmall() + dcTrafficVolumeDatum.getBusTrafficVolume()); |
|
|
|
carTypeData.setGoodsCar(dcTrafficVolumeDatum.getTrafficVolumeOfSmallTrucks() |
|
|
|
+ dcTrafficVolumeDatum.getMediumTruckTrafficVolume() |
|
|
|
+ dcTrafficVolumeDatum.getLargeTruckTrafficVolume() |
|
|
|
+ dcTrafficVolumeDatum.getExtraLargeTrucksTrafficVolume() |
|
|
|
); |
|
|
|
carTypeData.setTrafficVolume(dcTrafficVolumeDatum.getTrafficVolume()); |
|
|
|
carTypeResult.add(carTypeData); |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success(carTypeResult); |
|
|
|
} else { |
|
|
|
return AjaxResult.success(dcTrafficVolumeData); |
|
|
|
} |
|
|
|
} else { |
|
|
|
//车速
|
|
|
|
List<DcTrafficSpeedData> dcTrafficSpeedData = dcTrafficSurveyDataMapper.selectSpeed(dcTrafficSurveyDataQueryParams); |
|
|
@ -581,7 +729,33 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
avgSpeed.setAvgSpeedJN(avgSpeed.getAvgSpeedJN() / result.size()); |
|
|
|
result.add(avgSpeed); |
|
|
|
|
|
|
|
//车型大类
|
|
|
|
if(dcTrafficSurveyDataQueryParams.getCarType().equals("2")){ |
|
|
|
List<DcTrafficSpeedDirectionCarTypeData> carTypeList = new ArrayList<>(); |
|
|
|
|
|
|
|
for (DcTrafficSpeedDirectionData speedDirectionData : result) { |
|
|
|
DcTrafficSpeedDirectionCarTypeData carTypeData = new DcTrafficSpeedDirectionCarTypeData(0); |
|
|
|
carTypeData.setTime(speedDirectionData.getTime()); |
|
|
|
|
|
|
|
carTypeData.setBusVehicleSpeedHZ((speedDirectionData.getInAndSmallAverageVehicleSpeedHZ() + speedDirectionData.getAverageSpeedOfBusHZ()) / 2); |
|
|
|
carTypeData.setBusVehicleSpeedJN((speedDirectionData.getInAndSmallAverageVehicleSpeedJN() + speedDirectionData.getAverageSpeedOfBusJN()) / 2); |
|
|
|
carTypeData.setGoodsCarVehicleSpeedHZ((speedDirectionData.getSmallTrucksAverageVehicleSpeedHZ() |
|
|
|
+ speedDirectionData.getAverageSpeedOfMediumSizeTrucksHZ() |
|
|
|
+ speedDirectionData.getAverageSpeedOfLargeTrucksHZ() |
|
|
|
+ speedDirectionData.getAverageSpeedOfExtraLargeTrucksHZ()) / 4); |
|
|
|
carTypeData.setGoodsCarVehicleSpeedJN((speedDirectionData.getSmallTrucksAverageVehicleSpeedJN() |
|
|
|
+ speedDirectionData.getAverageSpeedOfMediumSizeTrucksJN() |
|
|
|
+ speedDirectionData.getAverageSpeedOfLargeTrucksJN() |
|
|
|
+ speedDirectionData.getAverageSpeedOfExtraLargeTrucksJN()) / 4); |
|
|
|
carTypeData.setAvgSpeedHZ(speedDirectionData.getAvgSpeedHZ()); |
|
|
|
carTypeData.setAvgSpeedJN(speedDirectionData.getAvgSpeedJN()); |
|
|
|
carTypeList.add(carTypeData); |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success(carTypeList); |
|
|
|
} else { |
|
|
|
return AjaxResult.success(result); |
|
|
|
} |
|
|
|
} else { |
|
|
|
DcTrafficSpeedData avgSpeed = new DcTrafficSpeedData(0); |
|
|
|
avgSpeed.setTime("车速平均值"); |
|
|
@ -610,6 +784,24 @@ public class DcTrafficSurveyDataServiceImpl implements IDcTrafficSurveyDataServi |
|
|
|
avgSpeed.setAvgSpeed(avgSpeed.getAvgSpeed() / dcTrafficSpeedData.size()); |
|
|
|
dcTrafficSpeedData.add(avgSpeed); |
|
|
|
} |
|
|
|
//车型大类
|
|
|
|
if(dcTrafficSurveyDataQueryParams.getCarType().equals("2")){ |
|
|
|
List<DcTrafficSpeedCarTypeData> carTypeResult = new ArrayList<>(); |
|
|
|
|
|
|
|
for (DcTrafficSpeedData speedData : dcTrafficSpeedData) { |
|
|
|
DcTrafficSpeedCarTypeData carTypeData = new DcTrafficSpeedCarTypeData(0); |
|
|
|
carTypeData.setTime(speedData.getTime()); |
|
|
|
carTypeData.setBusVehicleSpeed((speedData.getInAndSmallAverageVehicleSpeed() + speedData.getAverageSpeedOfBus()) / 2); |
|
|
|
carTypeData.setGoodsCarVehicleSpeed((speedData.getSmallTrucksAverageVehicleSpeed() |
|
|
|
+ speedData.getAverageSpeedOfMediumSizeTrucks() |
|
|
|
+ speedData.getAverageSpeedOfLargeTrucks() |
|
|
|
+ speedData.getAverageSpeedOfExtraLargeTrucks()) / 4); |
|
|
|
carTypeData.setAvgSpeed(speedData.getAvgSpeed()); |
|
|
|
carTypeResult.add(carTypeData); |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success(carTypeResult); |
|
|
|
} |
|
|
|
} |
|
|
|
return AjaxResult.success(dcTrafficSpeedData); |
|
|
|
} |
|
|
|