From a335c50aff0d3c382dad7429998c1aa7d383413a Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Mon, 17 Feb 2025 15:05:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E7=B1=BB=E4=BA=A4=E8=B0=83=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DcTrafficSurveyDataController.java | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) 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 = (List) ajaxResult.get("data"); ExcelUtil 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 dcTrafficVolumeData = (List) ajaxResult.get("data"); + ExcelUtil util = new ExcelUtil<>(DcTrafficVolumeCarTypeData.class); + util.exportExcel(response, dcTrafficVolumeData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1") && dcTrafficSurveyDataQueryParams.getCarType().equals("1")) { List dcTrafficVolumeData = (List) ajaxResult.get("data"); ExcelUtil util = new ExcelUtil<>(DcTrafficVolumeDirectionData.class); - util.exportExcel(response, dcTrafficVolumeData, "综合查询"); + util.exportExcel(response, dcTrafficVolumeData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1") && dcTrafficSurveyDataQueryParams.getCarType().equals("2")) { + List dcTrafficVolumeData = (List) ajaxResult.get("data"); + ExcelUtil 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 = (List) ajaxResult.get("data"); ExcelUtil 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 dcTrafficSpeedData = (List) ajaxResult.get("data"); + ExcelUtil util = new ExcelUtil<>(DcTrafficSpeedCarTypeData.class); + util.exportExcel(response, dcTrafficSpeedData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1") && dcTrafficSurveyDataQueryParams.getCarType().equals("1")) { List dcTrafficSpeedData = (List) ajaxResult.get("data"); ExcelUtil util = new ExcelUtil<>(DcTrafficSpeedDirectionData.class); - util.exportExcel(response, dcTrafficSpeedData, "综合查询"); + util.exportExcel(response, dcTrafficSpeedData, "站点查询"); + } else if (dcTrafficSurveyDataQueryParams.getDirection().equals("1") && dcTrafficSurveyDataQueryParams.getCarType().equals("2")) { + List dcTrafficSpeedData = (List) ajaxResult.get("data"); + ExcelUtil util = new ExcelUtil<>(DcTrafficSpeedDirectionCarTypeData.class); + util.exportExcel(response, dcTrafficSpeedData, "站点查询"); } } }