diff --git a/zc-business/src/main/java/com/zc/business/controller/DcTrafficSurveyDataController.java b/zc-business/src/main/java/com/zc/business/controller/DcTrafficSurveyDataController.java index df7541e3..f51905e0 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcTrafficSurveyDataController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcTrafficSurveyDataController.java @@ -495,24 +495,40 @@ public class DcTrafficSurveyDataController extends BaseController AjaxResult ajaxResult = dcTrafficSurveyDataService.selectComprehensiveData(dcTrafficSurveyDataQueryParams); if (ajaxResult.get("code").equals(UniversalEnum.TWO_HUNDRED.getNumber())) { if (dcTrafficSurveyDataQueryParams.getDataType().equals("1")){ - if (dcTrafficSurveyDataQueryParams.getDirection().equals("2")) { + if (dcTrafficSurveyDataQueryParams.getDirection().equals("2") && dcTrafficSurveyDataQueryParams.getCarType().equals("1")) { List<DcTrafficVolumeData> dcTrafficVolumeData = (List<DcTrafficVolumeData>) ajaxResult.get("data"); ExcelUtil<DcTrafficVolumeData> util = new ExcelUtil<>(DcTrafficVolumeData.class); - util.exportExcel(response, dcTrafficVolumeData, "综合查询"); - } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1")) { + util.exportExcel(response, dcTrafficVolumeData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("2") && dcTrafficSurveyDataQueryParams.getCarType().equals("2")) { + List<DcTrafficVolumeCarTypeData> dcTrafficVolumeData = (List<DcTrafficVolumeCarTypeData>) ajaxResult.get("data"); + ExcelUtil<DcTrafficVolumeCarTypeData> util = new ExcelUtil<>(DcTrafficVolumeCarTypeData.class); + util.exportExcel(response, dcTrafficVolumeData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1") && dcTrafficSurveyDataQueryParams.getCarType().equals("1")) { List<DcTrafficVolumeDirectionData> dcTrafficVolumeData = (List<DcTrafficVolumeDirectionData>) ajaxResult.get("data"); ExcelUtil<DcTrafficVolumeDirectionData> util = new ExcelUtil<>(DcTrafficVolumeDirectionData.class); - util.exportExcel(response, dcTrafficVolumeData, "综合查询"); + util.exportExcel(response, dcTrafficVolumeData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1") && dcTrafficSurveyDataQueryParams.getCarType().equals("2")) { + List<DcTrafficVolumeDirectionCarTypeData> dcTrafficVolumeData = (List<DcTrafficVolumeDirectionCarTypeData>) ajaxResult.get("data"); + ExcelUtil<DcTrafficVolumeDirectionCarTypeData> util = new ExcelUtil<>(DcTrafficVolumeDirectionCarTypeData.class); + util.exportExcel(response, dcTrafficVolumeData, "站点查询"); } } else { - if (dcTrafficSurveyDataQueryParams.getDirection().equals("2")) { + if (dcTrafficSurveyDataQueryParams.getDirection().equals("2") && dcTrafficSurveyDataQueryParams.getCarType().equals("1")) { List<DcTrafficSpeedData> dcTrafficSpeedData = (List<DcTrafficSpeedData>) ajaxResult.get("data"); ExcelUtil<DcTrafficSpeedData> util = new ExcelUtil<>(DcTrafficSpeedData.class); - util.exportExcel(response, dcTrafficSpeedData, "综合查询"); - } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1")) { + util.exportExcel(response, dcTrafficSpeedData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("2") && dcTrafficSurveyDataQueryParams.getCarType().equals("2")) { + List<DcTrafficSpeedCarTypeData> dcTrafficSpeedData = (List<DcTrafficSpeedCarTypeData>) ajaxResult.get("data"); + ExcelUtil<DcTrafficSpeedCarTypeData> util = new ExcelUtil<>(DcTrafficSpeedCarTypeData.class); + util.exportExcel(response, dcTrafficSpeedData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1") && dcTrafficSurveyDataQueryParams.getCarType().equals("1")) { List<DcTrafficSpeedDirectionData> dcTrafficSpeedData = (List<DcTrafficSpeedDirectionData>) ajaxResult.get("data"); ExcelUtil<DcTrafficSpeedDirectionData> util = new ExcelUtil<>(DcTrafficSpeedDirectionData.class); - util.exportExcel(response, dcTrafficSpeedData, "综合查询"); + util.exportExcel(response, dcTrafficSpeedData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1") && dcTrafficSurveyDataQueryParams.getCarType().equals("2")) { + List<DcTrafficSpeedDirectionCarTypeData> dcTrafficSpeedData = (List<DcTrafficSpeedDirectionCarTypeData>) ajaxResult.get("data"); + ExcelUtil<DcTrafficSpeedDirectionCarTypeData> util = new ExcelUtil<>(DcTrafficSpeedDirectionCarTypeData.class); + util.exportExcel(response, dcTrafficSpeedData, "站点查询"); } } }