diff --git a/src/main/java/org/springblade/modules/business/controller/ReportController.java b/src/main/java/org/springblade/modules/business/controller/ReportController.java index 02dbd47..bdcbe7b 100644 --- a/src/main/java/org/springblade/modules/business/controller/ReportController.java +++ b/src/main/java/org/springblade/modules/business/controller/ReportController.java @@ -22,9 +22,14 @@ import lombok.AllArgsConstructor; import org.springblade.common.constant.CommonConstant; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.tenant.annotation.TenantDS; +import org.springblade.core.tool.api.R; +import org.springblade.modules.business.service.ILargeScreenService; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.Date; + /** * 控制器 * @@ -38,5 +43,85 @@ import org.springframework.web.bind.annotation.RestController; @Api(value = "统计报表", tags = "统计报表接口") public class ReportController extends BladeController { + private final ILargeScreenService largeScreenService; + + /** + * 矛盾纠纷化解统计(左1) + */ + @GetMapping("/getMediateFinish") + public R getMediateFinish() { + return R.data(largeScreenService.getMediateFinish()); + } + + /** + * 矛盾纠纷上报处理列表(左2) + */ + @GetMapping("/getAppealList") + public R getAppealList() { + return R.data(largeScreenService.getAppealList()); + } + + /** + * 矛盾纠纷月份趋势统计(左3) + */ + @GetMapping("/getAppealByMon") + public R getAppealByMon() { + return R.data(largeScreenService.getAppealByMon()); + } + + /** + * 矛盾纠纷类型占比统计(左4) + */ + @GetMapping("/getAppealTypePercent") + public R getAppealTypePercent() { + return R.data(largeScreenService.getAppealTypePercent()); + } + + /** + * 矛盾纠纷上报统计(中1) + */ + @GetMapping("/getAppealSubmit") + public R getAppealSubmit() { + return R.data(largeScreenService.getAppealSubmit()); + } + + /** + * 事件上报热力图(中2) + */ + @GetMapping("/getAppealSubmitCountByLoc") + public R getAppealSubmitCountByLoc(Integer timeFrame, Date startTime, Date endTime) { + return R.data(largeScreenService.getAppealSubmitCountByLoc(timeFrame, startTime, endTime)); + } + + /** + * 矛盾化解热力图(中3) + */ + @GetMapping("/getAppealFinishCountByLoc") + public R getAppealFinishCountByLoc(Integer timeFrame, Date startTime, Date endTime) { + return R.data(largeScreenService.getAppealFinishCountByLoc(timeFrame, startTime, endTime)); + } + + /** + * 越级上报热力图(中4) + */ + @GetMapping("/getImmediateCountByLoc") + public R getImmediateCountByLoc(Integer timeFrame, Date startTime, Date endTime) { + return R.data(largeScreenService.getImmediateCountByLoc(timeFrame, startTime, endTime)); + } + + /** + * 越级上报事件列表(中5) + */ + @GetMapping("/getImmediateList") + public R getImmediateList(String streetId) { + return R.data(largeScreenService.getImmediateList(streetId)); + } + /** + * 矛盾纠纷化解排行(街道/部门)统计(右1-2) + */ + @GetMapping("/getAppealHot") + public R getAppealHot() { + return R.data(largeScreenService.getAppealHot()); + } } diff --git a/src/main/java/org/springblade/modules/business/service/ILargeScreenService.java b/src/main/java/org/springblade/modules/business/service/ILargeScreenService.java new file mode 100644 index 0000000..480299a --- /dev/null +++ b/src/main/java/org/springblade/modules/business/service/ILargeScreenService.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package org.springblade.modules.business.service; + + +import org.springblade.modules.business.entity.Appeal; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 服务类 + * + * @author BladeX + */ +public interface ILargeScreenService { + + Map getMediateFinish(); + + Map getAppealSubmit(); + + List getAppealList(); + + Map getAppealByMon(); + + Map getAppealTypePercent(); + + Map getAppealSubmitCountByLoc(Integer timeFrame, Date startTime, Date endTime); + + Map getAppealFinishCountByLoc(Integer timeFrame, Date startTime, Date endTime); + + Map getImmediateCountByLoc(Integer timeFrame, Date startTime, Date endTime); + + List getImmediateList(String streetId); + + Map getAppealHot(); +} diff --git a/src/main/java/org/springblade/modules/business/service/impl/LargeScreenServiceImpl.java b/src/main/java/org/springblade/modules/business/service/impl/LargeScreenServiceImpl.java new file mode 100644 index 0000000..1431a47 --- /dev/null +++ b/src/main/java/org/springblade/modules/business/service/impl/LargeScreenServiceImpl.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package org.springblade.modules.business.service.impl; + +import lombok.AllArgsConstructor; +import org.springblade.modules.business.entity.Appeal; +import org.springblade.modules.business.service.IAppealService; +import org.springblade.modules.business.service.ILargeScreenService; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 服务实现类 + * + * @author BladeX + */ +@Service +@AllArgsConstructor +public class LargeScreenServiceImpl implements ILargeScreenService { + + private final IAppealService appealService; + + @Override + public Map getMediateFinish() { + // 总化解数 + // 本年化解数 + // 本季度化解数 + // 本月化解数 + return null; + } + + @Override + public Map getAppealSubmit() { + return null; + } + + @Override + public List getAppealList() { + return null; + } + + @Override + public Map getAppealByMon() { + return null; + } + + @Override + public Map getAppealTypePercent() { + // 先查所有 + // 根据纠纷类型分组(输入的纠纷类型算其他纠纷) + return null; + } + + @Override + public Map getAppealSubmitCountByLoc(Integer timeFrame, Date startTime, Date endTime) { + return null; + } + + @Override + public Map getAppealFinishCountByLoc(Integer timeFrame, Date startTime, Date endTime) { + return null; + } + + @Override + public Map getImmediateCountByLoc(Integer timeFrame, Date startTime, Date endTime) { + return null; + } + + @Override + public List getImmediateList(String streetId) { + return null; + } + + @Override + public Map getAppealHot() { + return null; + } +}