From f6a6411a324734862f8521bf5b0a27a00e84bc8c Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Fri, 29 Sep 2023 13:35:14 +0800 Subject: [PATCH] bug fix --- .../controller/BPlanEnterpriseController.java | 17 ++++++++++++++--- .../request/BPlanEnterprisePageRequest.java | 1 + .../mapper/yingji/BAdministrativeMapper.xml | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java index c8c14f0..d640a92 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/controller/BPlanEnterpriseController.java @@ -87,7 +87,8 @@ public class BPlanEnterpriseController extends BaseController { */ @ApiOperation(value = "查询首页",response =BPlanEnterPriseTreeResponse.class ) @GetMapping("/tree") - public AjaxResult tree(BPlanEnterprisePageRequest req) { + public TableDataInfo tree(BPlanEnterprisePageRequest req) { + List list = bAdministrativeService.selectBPlanEnterPriseTreeRequestRequestList(req); int plannedEnterpriseCountSum = list.stream() .mapToInt(BPlanEnterPriseTreeResponse::getPlannedEnterpriseCount) @@ -102,8 +103,7 @@ public class BPlanEnterpriseController extends BaseController { resultObject.setCheckEnterpriseCount(checkEnterpriseCountSum); resultObject.setPt(ptSum); list.add(resultObject); - - return success(list); + return getDataTable(list); // List> groupedList = list.stream() // .collect(Collectors.groupingBy(BPlanEnterPriseTreeResponse::getCounty)) // .values() @@ -223,6 +223,17 @@ public class BPlanEnterpriseController extends BaseController { util.exportExcel(response, list, "导出计划管理"); } + /** + * 导出计划管理 + */ + @ApiOperation(value = "导出计划管理") + @PostMapping("/exportplan") + public void exportplan(HttpServletResponse response, BPlanEnterprise bPlanEnterprise) + { + List list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise); + ExcelUtil util = new ExcelUtil(BPlanEnterprise.class); + util.exportExcel(response, list, "计划管理数据"); + } /** * 查看计划明细 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterprisePageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterprisePageRequest.java index ebb19ec..465bcde 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterprisePageRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/programManagement/entity/request/BPlanEnterprisePageRequest.java @@ -16,4 +16,5 @@ public class BPlanEnterprisePageRequest { */ @ApiModelProperty(value = "计划年份") private String plannedYear; + } diff --git a/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeMapper.xml b/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeMapper.xml index 32fde21..10cb74b 100644 --- a/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/yingji/BAdministrativeMapper.xml @@ -73,11 +73,11 @@ LEFT JOIN sz_enfor_examine c ON b.enterprise_id = c.USC_CODE - b.planned_year#{req.plannedYear} + b.planned_year=#{req.plannedYear} GROUP BY SUBSTRING(a.county, 1, 8) )s - where s. institutionName!='苏州市' + where s.institutionName!='苏州市'