From e55b5aaddc111abc8ae61260eb20fddf6b089c07 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 21 三月 2024 14:09:10 +0800 Subject: [PATCH] 修改分类统计功能 --- src/main/java/com/lf/server/controller/data/DataCountController.java | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 106 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/lf/server/controller/data/DataCountController.java b/src/main/java/com/lf/server/controller/data/DataCountController.java index c70fb78..0c41db0 100644 --- a/src/main/java/com/lf/server/controller/data/DataCountController.java +++ b/src/main/java/com/lf/server/controller/data/DataCountController.java @@ -2,7 +2,6 @@ import com.lf.server.annotation.SysLog; import com.lf.server.controller.all.BaseController; -import com.lf.server.controller.all.BaseQueryController; import com.lf.server.entity.all.ResponseMsg; import com.lf.server.entity.ctrl.CountEntity; import com.lf.server.entity.sys.ReportEntity; @@ -15,9 +14,9 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; @@ -30,13 +29,13 @@ @RestController @RequestMapping("/dataCount") public class DataCountController extends BaseController { - @Autowired + @Resource ReportService reportService; - @Autowired + @Resource TokenService tokenService; - @Autowired + @Resource UploadAttachService uploadAttachService; @SysLog() @@ -148,10 +147,11 @@ @SysLog() @ApiOperation(value = "涓嬭浇鎶ュ憡") @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鎶ュ憡ID", dataType = "Integer", paramType = "query", example = "18") + @ApiImplicitParam(name = "id", value = "鎶ュ憡ID", dataType = "Integer", paramType = "query", example = "18"), + @ApiImplicitParam(name = "code", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "00"), }) @GetMapping(value = "/downloadReport") - public void downloadReport(Integer id, HttpServletRequest req, HttpServletResponse res) { + public void downloadReport(Integer id, String code, HttpServletRequest req, HttpServletResponse res) { try { if (null == id || id < 1) { return; @@ -164,7 +164,7 @@ UserEntity ue = tokenService.getCurrentUser(req); - reportService.createReport(ue, re, res); + reportService.createReport(ue, re, code, res); } catch (Exception ex) { log.error(ex.getMessage(), ex); } @@ -338,4 +338,102 @@ return fail(ex, null); } } + + @SysLog() + @ApiOperation(value = "鎸夐」鐩粺璁℃暟瀛楃嚎鍒掑浘闈㈢Н") + @GetMapping(value = "/countDlgAreaByPrj") + public ResponseMsg<Object> countDlgAreaByPrj() { + try { + List<CountEntity> list = reportService.countDlgAreaByPrj(); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } + + @SysLog() + @ApiOperation(value = "鎸夐」鐩粺璁℃暟瀛楁灏勫奖鍍忓浘闈㈢Н") + @GetMapping(value = "/countDomAreaByPrj") + public ResponseMsg<Object> countDomAreaByPrj() { + try { + List<CountEntity> list = reportService.countDomAreaByPrj(); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } + + @SysLog() + @ApiOperation(value = "鎸夐」鐩粺璁$绾块暱搴�") + @GetMapping(value = "/countLineLength") + public ResponseMsg<Object> countLineLength() { + try { + List<CountEntity> list = reportService.countLineLength(); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } + + @SysLog() + @ApiOperation(value = "鎸夐」鐩粺璁″嫎鎺㈢偣涓暟") + @GetMapping(value = "/countExplorationPointByPrj") + public ResponseMsg<Object> countExplorationPointByPrj() { + try { + List<CountEntity> list = reportService.countExplorationPointByPrj(); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } + + @SysLog() + @ApiOperation(value = "鎸夐」鐩粺璁′笁缁村湴璐ㄦā鍨嬮潰绉�") + @GetMapping(value = "/countGeoModelAreaByPrj") + public ResponseMsg<Object> countGeoModelAreaByPrj() { + try { + List<CountEntity> list = reportService.countGeoModelAreaByPrj(); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } + + @SysLog() + @ApiOperation(value = "鎸夐」鐩粺璁″湴鐏剧偣涓暟") + @GetMapping(value = "/countGeologicHazardByPrj") + public ResponseMsg<Object> countGeologicHazardByPrj() { + try { + List<CountEntity> list = reportService.countGeologicHazardByPrj(); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } + + @SysLog() + @ApiOperation(value = "椤圭洰鏁版嵁鍒嗙被缁熻") + @ApiImplicitParams({ + @ApiImplicitParam(name = "code", value = "椤圭洰缂栫爜", dataType = "String", paramType = "query", example = "0B") + }) + @GetMapping(value = "/countVariousDataByPrj") + public ResponseMsg<Object> countVariousDataByPrj(String code) { + try { + if (StringHelper.isEmpty(code)) { + return fail("椤圭洰缂栫爜涓嶈兘涓虹┖"); + } + + List<CountEntity> list = reportService.countVariousDataByPrj(code); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } } -- Gitblit v1.9.3