|
|
@ -13,6 +13,7 @@ import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
|
|
import com.zc.business.domain.*; |
|
|
|
import com.zc.business.domain.export.*; |
|
|
|
import com.zc.business.enums.LocationEnum; |
|
|
|
import com.zc.business.enums.StakeMarkRange; |
|
|
|
import com.zc.business.enums.UniversalEnum; |
|
|
|
import com.zc.business.request.DcTrafficMetricsDataRequest; |
|
|
@ -926,18 +927,18 @@ public AjaxResult trafficFlowAtTollStationEntranceHour(String startDate, String |
|
|
|
cell.setCellValue(UniversalEnum.EMPTY_STRING.getValue()); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
cell = subHeaderRow1.createCell(UniversalEnum.ONE.getNumber()); |
|
|
|
cell.setCellValue(UniversalEnum.CURRENT_TRAFFIC_FLOW.getValue()); |
|
|
|
cell.setCellValue(UniversalEnum.CURRENT_TRAFFIC_FLOW.getValue() + "(辆)"); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
|
|
|
|
cell = subHeaderRow1.createCell(UniversalEnum.TWO.getNumber()); |
|
|
|
cell.setCellValue(UniversalEnum.THE_SAME_PERIOD_LAST_YEAR.getValue()); |
|
|
|
cell.setCellValue(UniversalEnum.THE_SAME_PERIOD_LAST_YEAR.getValue() + "(辆)"); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
cell = subHeaderRow1.createCell(UniversalEnum.THREE.getNumber()); |
|
|
|
cell.setCellValue(UniversalEnum.CURRENT_TRAFFIC_FLOW.getValue()); |
|
|
|
cell.setCellValue(UniversalEnum.CURRENT_TRAFFIC_FLOW.getValue() + "(辆)"); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
|
|
|
|
cell = subHeaderRow1.createCell(UniversalEnum.FOUR.getNumber()); |
|
|
|
cell.setCellValue(UniversalEnum.THE_SAME_PERIOD_LAST_YEAR.getValue()); |
|
|
|
cell.setCellValue(UniversalEnum.THE_SAME_PERIOD_LAST_YEAR.getValue() + "(辆)"); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
|
|
|
|
//合并单元格,参数依次为起始行,结束行,起始列,结束列 (从0开始)
|
|
|
@ -949,7 +950,8 @@ public AjaxResult trafficFlowAtTollStationEntranceHour(String startDate, String |
|
|
|
sheet.addMergedRegion(new CellRangeAddress(UniversalEnum.ZERO.getNumber(), UniversalEnum.ZERO.getNumber(), UniversalEnum.THREE.getNumber(), UniversalEnum.FOUR.getNumber())); |
|
|
|
|
|
|
|
int i = 2; |
|
|
|
for (String station : stationList) { |
|
|
|
for (LocationEnum stationEnum : LocationEnum.values()) { |
|
|
|
String station = stationEnum.getName(); |
|
|
|
Row subHeaderRow = sheet.createRow(i); |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.ZERO.getNumber()); |
|
|
|
cell.setCellValue(station); |
|
|
@ -959,24 +961,40 @@ public AjaxResult trafficFlowAtTollStationEntranceHour(String startDate, String |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.ONE.getNumber()); |
|
|
|
cell.setCellValue(thisYearEntranceData.get(station).get(0).get("value")); |
|
|
|
cell.setCellStyle(dataStyle); |
|
|
|
} else { |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.ONE.getNumber()); |
|
|
|
cell.setCellValue(""); |
|
|
|
cell.setCellStyle(dataStyle); |
|
|
|
} |
|
|
|
|
|
|
|
if (lastYearEntranceData.containsKey(station)){ |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.TWO.getNumber()); |
|
|
|
cell.setCellValue(lastYearEntranceData.get(station).get(0).get("value")); |
|
|
|
cell.setCellStyle(dataStyle); |
|
|
|
} else { |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.TWO.getNumber()); |
|
|
|
cell.setCellValue(""); |
|
|
|
cell.setCellStyle(dataStyle); |
|
|
|
} |
|
|
|
|
|
|
|
if (thisYearExportData.containsKey(station)){ |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.THREE.getNumber()); |
|
|
|
cell.setCellValue(thisYearExportData.get(station).get(0).get("value")); |
|
|
|
cell.setCellStyle(dataStyle); |
|
|
|
} else { |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.THREE.getNumber()); |
|
|
|
cell.setCellValue(""); |
|
|
|
cell.setCellStyle(dataStyle); |
|
|
|
} |
|
|
|
|
|
|
|
if (lastYearExportData.containsKey(station)){ |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.THREE.getNumber()); |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.FOUR.getNumber()); |
|
|
|
cell.setCellValue(lastYearExportData.get(station).get(0).get("value")); |
|
|
|
cell.setCellStyle(dataStyle); |
|
|
|
} else { |
|
|
|
cell = subHeaderRow.createCell(UniversalEnum.FOUR.getNumber()); |
|
|
|
cell.setCellValue(""); |
|
|
|
cell.setCellStyle(dataStyle); |
|
|
|
} |
|
|
|
i++; |
|
|
|
} |
|
|
@ -1111,18 +1129,18 @@ public AjaxResult trafficFlowAtTollStationEntrance(String startDate, String endD |
|
|
|
cell.setCellValue(UniversalEnum.EMPTY_STRING.getValue()); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
cell = subHeaderRow1.createCell(UniversalEnum.ONE.getNumber()); |
|
|
|
cell.setCellValue(UniversalEnum.CURRENT_TRAFFIC_FLOW.getValue()); |
|
|
|
cell.setCellValue(UniversalEnum.CURRENT_TRAFFIC_FLOW.getValue() + "(辆)"); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
|
|
|
|
cell = subHeaderRow1.createCell(UniversalEnum.TWO.getNumber()); |
|
|
|
cell.setCellValue(UniversalEnum.THE_SAME_PERIOD_LAST_YEAR.getValue()); |
|
|
|
cell.setCellValue(UniversalEnum.THE_SAME_PERIOD_LAST_YEAR.getValue() + "(辆)"); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
cell = subHeaderRow1.createCell(UniversalEnum.THREE.getNumber()); |
|
|
|
cell.setCellValue(UniversalEnum.CURRENT_TRAFFIC_FLOW.getValue()); |
|
|
|
cell.setCellValue(UniversalEnum.CURRENT_TRAFFIC_FLOW.getValue() + "(辆)"); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
|
|
|
|
cell = subHeaderRow1.createCell(UniversalEnum.FOUR.getNumber()); |
|
|
|
cell.setCellValue(UniversalEnum.THE_SAME_PERIOD_LAST_YEAR.getValue()); |
|
|
|
cell.setCellValue(UniversalEnum.THE_SAME_PERIOD_LAST_YEAR.getValue() + "(辆)"); |
|
|
|
cell.setCellStyle(headerStyle); |
|
|
|
|
|
|
|
//合并单元格,参数依次为起始行,结束行,起始列,结束列 (从0开始)
|
|
|
|