diff --git a/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java b/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java index 903f826..c41741c 100644 --- a/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java +++ b/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java @@ -1278,4 +1278,16 @@ public class DataReleaseController extends AbstractController { return bdr; } + @GetMapping("list-page-handle-case") + public SuccessResultList> listPageHandleCase(ListPage page) throws SearchException { + Map params = requestParams(); + // 为了避免案件类型没传,单独处理 + /*if (params.get("caseFlowType") == null || "".equals(params.get("caseFlowType").toString().trim())) { + params.put("caseFlowType", "1,2"); + }*/ + page.setParams(params); + SuccessResultList> resList = reportCaseService.listPageHandleCase(page); + return resList; + } + } diff --git a/src/main/java/com/cm/systemcity/dao/reportcase/IReportCaseDao.java b/src/main/java/com/cm/systemcity/dao/reportcase/IReportCaseDao.java index 2f8445c..08a4047 100755 --- a/src/main/java/com/cm/systemcity/dao/reportcase/IReportCaseDao.java +++ b/src/main/java/com/cm/systemcity/dao/reportcase/IReportCaseDao.java @@ -398,4 +398,12 @@ public interface IReportCaseDao { void insertIntoTempTable(Map params); void cleanUpTempTable(); + + List> handleData(Map params); + + List reporeCaseList(Map params); + + List showBoxWgyCaseList(Map params); + + List showBoxZgyCaseList(Map params); } diff --git a/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java b/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java index 75fe67c..6f4f80e 100755 --- a/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java +++ b/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java @@ -498,4 +498,6 @@ public interface IReportCaseService { List dataCount(Integer level, Map params); void exportDataCount(HttpServletResponse response, Map params); + + SuccessResultList> listPageHandleCase(ListPage page); } diff --git a/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java b/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java index fc5755c..6c955c1 100755 --- a/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java @@ -34,6 +34,7 @@ import com.cm.systemcity.pojo.dtos.AreaPointsDTO; import com.cm.systemcity.pojo.dtos.areapoints.GridAndPointsDTO; import com.cm.systemcity.pojo.dtos.bindingdepartment.BindingDepartmentDTO; import com.cm.systemcity.pojo.dtos.community.CommunityDTO; +import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossDTO; import com.cm.systemcity.pojo.dtos.dict.DictDTO; import com.cm.systemcity.pojo.dtos.readstate.ReadStateDTO; import com.cm.systemcity.pojo.dtos.reportcase.*; @@ -46,6 +47,7 @@ import com.cm.systemcity.service.readstate.IReadStateService; import com.cm.systemcity.service.reportcase.IReportCaseService; import com.cm.systemcity.service.userpoints.IUserPointsService; import com.cm.systemcity.service.worknote.IWorkNoteService; +import com.cm.systemcity.utils.BigDataResult2; import com.cm.systemcity.utils.ImageUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -54,6 +56,7 @@ import freemarker.template.Template; import freemarker.template.TemplateException; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.util.CollectionUtils; import org.joda.time.DateTime; import org.joda.time.Days; import org.joda.time.format.DateTimeFormat; @@ -2177,6 +2180,35 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer } } + @Override + public SuccessResultList> listPageHandleCase(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List handleList = getHandleList(page.getParams()); + PageInfo pageInfo = new PageInfo<>(handleList); + return new SuccessResultList<>(handleList, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + private List getHandleList(Map params) { + // 获取当前年份 + Calendar calendar = Calendar.getInstance(); + int year = calendar.get(Calendar.YEAR); + params.put("year", year); + + List reportCaseDTOAll = new ArrayList<>(); + + String userType = params.get("userType").toString(); + if(userType.equals("网格员")) { + reportCaseDTOAll = reportCaseDao.showBoxWgyCaseList(params); + } + if(userType.equals("专管员")) { + // 查询所有的专管员(ID: bc405346-8714-4ded-89ac-9cc4d755f66a) + params.put("roleId", "bc405346-8714-4ded-89ac-9cc4d755f66a"); + reportCaseDTOAll = reportCaseDao.showBoxZgyCaseList(params); + } + + return reportCaseDTOAll; + } + /** * 全区数据 * @@ -2309,6 +2341,19 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer } } + if(CollectionUtils.isEmpty(caseCountDTOList)) { + CaseCountDTO caseCountDTO = new CaseCountDTO(); + caseCountDTO.setName("暂无数据"); + caseCountDTO.setSelfCount("0"); + caseCountDTO.setHandleCount("0"); + caseCountDTO.setAllCount("0"); + caseCountDTO.setDataId("9999"); + caseCountDTO.setLevel(2); + caseCountDTO.setPrpeLevel(1); + caseCountDTO.setPrpeDataId("9d179f05-3ea0-48f7-853c-d3b7124b791c"); + caseCountDTOList.add(caseCountDTO); + } + return caseCountDTOList; } @@ -2394,6 +2439,19 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer } } + if(CollectionUtils.isEmpty(caseCountDTOList)) { + CaseCountDTO caseCountDTO = new CaseCountDTO(); + caseCountDTO.setName("暂无数据"); + caseCountDTO.setSelfCount("0"); + caseCountDTO.setHandleCount("0"); + caseCountDTO.setAllCount("0"); + caseCountDTO.setDataId("9999"); + caseCountDTO.setLevel(3); + caseCountDTO.setPrpeLevel(2); + caseCountDTO.setPrpeDataId(params.get("areaId").toString()); + caseCountDTOList.add(caseCountDTO); + } + return caseCountDTOList; } @@ -2475,6 +2533,20 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer } } + if(CollectionUtils.isEmpty(caseCountDTOList)) { + CaseCountDTO caseCountDTO = new CaseCountDTO(); + caseCountDTO.setName("暂无数据"); + caseCountDTO.setSelfCount("0"); + caseCountDTO.setHandleCount("0"); + caseCountDTO.setAllCount("0"); + caseCountDTO.setDataId("9999"); + caseCountDTO.setLevel(4); + caseCountDTO.setPrpeLevel(3); + caseCountDTO.setPrpeDataId(params.get("prpeDataId").toString()); + caseCountDTO.setDataId(params.get("communityId").toString()); + caseCountDTOList.add(caseCountDTO); + } + return caseCountDTOList; } } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/reportcase/reportcase-mapper.xml b/src/main/resources/mybatis/mapper/reportcase/reportcase-mapper.xml index 6efc33a..f1982a0 100755 --- a/src/main/resources/mybatis/mapper/reportcase/reportcase-mapper.xml +++ b/src/main/resources/mybatis/mapper/reportcase/reportcase-mapper.xml @@ -2250,6 +2250,12 @@ AND is_delete = 0 AND creator ]]> '1' + + AND LEFT(gmt_create, 10) = ]]> #{start} + + + AND LEFT(gmt_create, 10) #{end} + GROUP BY area_id @@ -2280,6 +2286,12 @@ report_case_id case_id FROM city_report_case WHERE 1 = 1 + + AND LEFT(gmt_create, 10) = ]]> #{start} + + + AND LEFT(gmt_create, 10) #{end} + AND is_self = 1 @@ -2337,4 +2349,144 @@ DROP TEMPORARY TABLE temp_table + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/bigdata/list-case-handle-year.html b/src/main/resources/static/route/bigdata/list-case-handle-year.html new file mode 100644 index 0000000..c99f8b9 --- /dev/null +++ b/src/main/resources/static/route/bigdata/list-case-handle-year.html @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+ +
+ + +
+ +
+
+
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/reportcase/list-area-case.html b/src/main/resources/static/route/reportcase/list-area-case.html index 9b6a969..d41c3c0 100644 --- a/src/main/resources/static/route/reportcase/list-area-case.html +++ b/src/main/resources/static/route/reportcase/list-area-case.html @@ -15,6 +15,19 @@
+
+
+ +
+
+ +
+ +
@@ -40,6 +53,17 @@ {{# for(var i = 0, item; item = d[i++];) { }} + {{# if(item.name == '暂无数据'){ }} + {{item.name}} + {{# } }} + + {{# if(item.name != '暂无数据'){ }} {{item.name}} + {{# } }} {{item.allCount}} @@ -84,21 +109,46 @@ var resizeTimeout = null; var tableUrl = 'api/building/listpage'; var residentialId = top.restAjax.params(window.location.href).residentialId; + var dataLoading = false; + + $(document).on('click', '#search', function() { + if(dataLoading){ + layer.msg('数据加载中,请稍等...'); + return; + } + var start = $('#start').val(); + var end = $('#end').val(); + changeSearchData(start, end); + }); + + function initDateTime(){ + laydate.render({ + elem: '#start' + ,value: '' + }); + laydate.render({ + elem: '#end' + ,value: '' + }); + } + initDateTime(); var dataMsg = { url: '', dataId: '', - level: '', + level: 0, nowLevel: '', nowDataId: '' }; - var areaCode = ''; $('#left-card-div').height($win.height() - 30); $('#left-card-div').css('overflow', 'auto'); function initData() { - listAreaUserCounts('api/reportcase/data-counts/{level}', 1, ''); + var start = $('#start').val(); + var end = $('#end').val(); + var url = 'api/reportcase/data-counts/{level}?start=' + start + '&end='+ end; + listAreaUserCounts(url, 1, ''); } initData(); @@ -127,14 +177,20 @@ level+=1; var dataId = $(this).data().dataid; var url = ''; + + console.log("level==" + level + "-------" + "dataId==" + dataId) + + var start = $('#start').val(); + var end = $('#end').val(); + if(level == 2) { - url = 'api/reportcase/data-counts/{level}'; + url = 'api/reportcase/data-counts/{level}?start=' + start + '&end='+ end; } if(level == 3) { - url = 'api/reportcase/data-counts/{level}?areaId={areaId}'; + url = 'api/reportcase/data-counts/{level}?areaId={areaId}&start=' + start + '&end='+ end; } if(level == 4) { - url = 'api/reportcase/data-counts/{level}?communityId={communityId}&prpeDataId={prpeDataId}'; + url = 'api/reportcase/data-counts/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start=' + start + '&end='+ end; } if(level > 4) { @@ -142,9 +198,41 @@ } listAreaUserCounts(url, level, dataId, dataMsg.dataId); - reloadTable(); }); + function changeSearchData() { + // 假设 elem 是你已经获取到的元素引用 + let elem = document.querySelector('.change-area'); + + let level = elem.dataset.level; + let dataId = elem.dataset.dataid; + console.log(level, "------------", dataId) + var url = ''; + + var start = $('#start').val(); + var end = $('#end').val(); + + if(level == 1) { + url = 'api/reportcase/data-counts/{level}?start=' + start + '&end='+ end; + } + + if(level == 2) { + url = 'api/reportcase/data-counts/{level}?start=' + start + '&end='+ end; + } + if(level == 3) { + url = 'api/reportcase/data-counts/{level}?areaId={areaId}&start=' + start + '&end='+ end; + } + if(level == 4) { + url = 'api/reportcase/data-counts/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start=' + start + '&end='+ end; + } + + if(level > 4) { + return false; + } + + listAreaUserCounts(url, level, dataId, dataMsg.dataId); + } + // 返回上级 $(document).on('click', '#backToArea', function () { var level = dataMsg.level; @@ -164,9 +252,31 @@ url = 'api/reportcase/data-counts/{level}?communityId={communityId}'; } listAreaUserCounts(url, level, dataId); - reloadTable(); }); + function backSearchData(start, end) { + var level = 1; + var dataId = dataMsg.dataId; + var url; + + console.log(start) + console.log(end) + + if(level == 1) { + url = 'api/reportcase/data-counts/{level}?start=' + start + '&end='+ end; + } + if(level == 2) { + url = 'api/reportcase/data-counts/{level}?start=' + start + '&end='+ end; + } + if(level == 3) { + url = 'api/reportcase/data-counts/{level}?areaId={areaId}&start=' + start + '&end='+ end; + } + if(level == 4) { + url = 'api/reportcase/data-counts/{level}?communityId={communityId}&start=' + start + '&end='+ end; + } + listAreaUserCounts(url, level, dataId); + } + // 导出数据 $(document).on('click', '#exportExcel', function () { top.dialog.msg('确定导出吗?', { @@ -179,39 +289,26 @@ var dataId = dataMsg.nowDataId; var url; + var start = $('#start').val(); + var end = $('#end').val(); + if(level == 1) { - url = 'api/reportcase/export-datacount?level={level}'; + url = 'api/reportcase/export-datacount?level={level}?start=' + start + '&end='+ end; } if(level == 2) { - url = 'api/reportcase/export-datacount?level={level}'; + url = 'api/reportcase/export-datacount?level={level}?start=' + start + '&end='+ end; } if(level == 3) { - url = 'api/reportcase/export-datacount?level={level}&areaId={areaId}'; + url = 'api/reportcase/export-datacount?level={level}&areaId={areaId}&start=' + start + '&end='+ end; } if(level == 4) { - url = 'api/reportcase/export-datacount?level={level}&communityId={communityId}&prpeDataId={prpeDataId}'; + url = 'api/reportcase/export-datacount?level={level}&communityId={communityId}&prpeDataId={prpeDataId}&start=' + start + '&end='+ end; } window.open(top.restAjax.path(url, [level, dataId, dataMsg.dataId])); } }); }); - // 重载表格 - function reloadTable(currentPage) { - table.reload('dataTable', { - url: top.restAjax.path(tableUrl, [residentialId]), - where: { - keywords: $('#keywords').val(), - startTime: $('#startTime').val(), - endTime: $('#endTime').val() - }, - page: { - curr: currentPage - }, - height: $win.height() - 90, - }); - } - // 事件 - 页面变化 $win.on('resize', function () { clearTimeout(resizeTimeout);