案件统计功能修改。
This commit is contained in:
parent
23e1543fa4
commit
75b91cc4c3
@ -18,10 +18,7 @@ import com.cm.systemcity.dao.reportcase.IReportCaseDao;
|
|||||||
import com.cm.systemcity.pojo.dtos.community.CommunityDTO;
|
import com.cm.systemcity.pojo.dtos.community.CommunityDTO;
|
||||||
import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossDTO;
|
import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossDTO;
|
||||||
import com.cm.systemcity.pojo.dtos.dict.DictDTO;
|
import com.cm.systemcity.pojo.dtos.dict.DictDTO;
|
||||||
import com.cm.systemcity.pojo.dtos.reportcase.CaseStatisticDTO;
|
import com.cm.systemcity.pojo.dtos.reportcase.*;
|
||||||
import com.cm.systemcity.pojo.dtos.reportcase.ReportCaseAssignDTO;
|
|
||||||
import com.cm.systemcity.pojo.dtos.reportcase.ReportCaseDTO;
|
|
||||||
import com.cm.systemcity.pojo.dtos.reportcase.ReportCaseLogDTO;
|
|
||||||
import com.cm.systemcity.pojo.dtos.userlocation.UserLocationDTO;
|
import com.cm.systemcity.pojo.dtos.userlocation.UserLocationDTO;
|
||||||
import com.cm.systemcity.service.bindingdepartment.IBindingDepartmentService;
|
import com.cm.systemcity.service.bindingdepartment.IBindingDepartmentService;
|
||||||
import com.cm.systemcity.service.community.ICommunityService;
|
import com.cm.systemcity.service.community.ICommunityService;
|
||||||
@ -43,8 +40,10 @@ import org.springframework.data.mongodb.core.MongoTemplate;
|
|||||||
import org.springframework.data.mongodb.core.query.Query;
|
import org.springframework.data.mongodb.core.query.Query;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -1290,4 +1289,49 @@ public class DataReleaseController extends AbstractController {
|
|||||||
return resList;
|
return resList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("data-counts-bigdata/{level}")
|
||||||
|
public List<CaseCountDTO> dataCountBigdata(@PathVariable("level") Integer level){
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
if(null == params.get("start")) {
|
||||||
|
// 获取当前日期
|
||||||
|
LocalDate currentDate = LocalDate.now();
|
||||||
|
|
||||||
|
// 获取当前年份
|
||||||
|
int currentYear = currentDate.getYear();
|
||||||
|
params.put("start", currentYear + "01-01");
|
||||||
|
}
|
||||||
|
if(null == params.get("end")) {
|
||||||
|
params.put("start", LocalDate.now());
|
||||||
|
}
|
||||||
|
return reportCaseService.dataCountBigdata(level, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("update-case-bigdata")
|
||||||
|
public SuccessResultData<String> updateCaseBigData() {
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
reportCaseService.updateCaseCount(params);
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
return new SuccessResultData<>("used " + (endTime - startTime) + " ms");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "导出自上报案件数量", notes = "导出自上报案件数量接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("export-datacount-bigdata")
|
||||||
|
public void exportDataCountBigData(HttpServletResponse response) throws Exception {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
if(null == params.get("start")) {
|
||||||
|
// 获取当前日期
|
||||||
|
LocalDate currentDate = LocalDate.now();
|
||||||
|
|
||||||
|
// 获取当前年份
|
||||||
|
int currentYear = currentDate.getYear();
|
||||||
|
params.put("start", currentYear + "01-01");
|
||||||
|
}
|
||||||
|
if(null == params.get("end")) {
|
||||||
|
params.put("start", LocalDate.now());
|
||||||
|
}
|
||||||
|
reportCaseService.exportDataCountBigdata(response, params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -433,4 +433,6 @@ public interface IReportCaseDao {
|
|||||||
void updateCase(Map<String, Object> params);
|
void updateCase(Map<String, Object> params);
|
||||||
|
|
||||||
List<CasePO> dataCountLevel1(Map<String, Object> params);
|
List<CasePO> dataCountLevel1(Map<String, Object> params);
|
||||||
|
|
||||||
|
List<ReportCaseDTO> dataCountReportCase(Map<String, Object> caseParams);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,8 @@ public class CaseCountDTO {
|
|||||||
private Integer prpeLevel;
|
private Integer prpeLevel;
|
||||||
@ApiModelProperty(name = "userId", value = "网格员ID")
|
@ApiModelProperty(name = "userId", value = "网格员ID")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
@ApiModelProperty(name = "departmentId", value = "部门ID")
|
||||||
|
private String departmentId;
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
@ -100,6 +102,14 @@ public class CaseCountDTO {
|
|||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDepartmentId() {
|
||||||
|
return departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentId(String departmentId) {
|
||||||
|
this.departmentId = departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "CaseCountDTO{" +
|
return "CaseCountDTO{" +
|
||||||
|
@ -502,4 +502,8 @@ public interface IReportCaseService {
|
|||||||
SuccessResultList<List<ReportCaseDTO>> listPageHandleCase(ListPage page);
|
SuccessResultList<List<ReportCaseDTO>> listPageHandleCase(ListPage page);
|
||||||
|
|
||||||
void updateCaseCount(Map<String, Object> params);
|
void updateCaseCount(Map<String, Object> params);
|
||||||
|
|
||||||
|
List<CaseCountDTO> dataCountBigdata(Integer level, Map<String, Object> params);
|
||||||
|
|
||||||
|
void exportDataCountBigdata(HttpServletResponse response, Map<String, Object> params);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,6 @@ import com.cm.systemcity.service.readstate.IReadStateService;
|
|||||||
import com.cm.systemcity.service.reportcase.IReportCaseService;
|
import com.cm.systemcity.service.reportcase.IReportCaseService;
|
||||||
import com.cm.systemcity.service.userpoints.IUserPointsService;
|
import com.cm.systemcity.service.userpoints.IUserPointsService;
|
||||||
import com.cm.systemcity.service.worknote.IWorkNoteService;
|
import com.cm.systemcity.service.worknote.IWorkNoteService;
|
||||||
import com.cm.systemcity.utils.BigDataResult2;
|
|
||||||
import com.cm.systemcity.utils.ImageUtil;
|
import com.cm.systemcity.utils.ImageUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
@ -60,7 +59,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.apache.shiro.util.CollectionUtils;
|
import org.apache.shiro.util.CollectionUtils;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.Days;
|
import org.joda.time.Days;
|
||||||
import org.joda.time.LocalDateTime;
|
|
||||||
import org.joda.time.format.DateTimeFormat;
|
import org.joda.time.format.DateTimeFormat;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -75,6 +73,8 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
import java.util.concurrent.atomic.LongAdder;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2185,8 +2185,11 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
|||||||
|
|
||||||
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
||||||
|
|
||||||
|
String dataId = null;
|
||||||
|
|
||||||
for (String key : groupMap.keySet()) {
|
for (String key : groupMap.keySet()) {
|
||||||
List<CasePO> value = groupMap.get(key);
|
List<CasePO> value = groupMap.get(key);
|
||||||
|
if(!key.equals("专管员区域")) {
|
||||||
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
caseCountDTO.setName(key);
|
caseCountDTO.setName(key);
|
||||||
long selfCount = value.stream().filter(element -> element.getIsSelf() == 1 && element.getIsHandle() == 1).count();
|
long selfCount = value.stream().filter(element -> element.getIsSelf() == 1 && element.getIsHandle() == 1).count();
|
||||||
@ -2199,20 +2202,77 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
|||||||
caseCountDTO.setPrpeLevel(1);
|
caseCountDTO.setPrpeLevel(1);
|
||||||
caseCountDTO.setPrpeDataId("9d179f05-3ea0-48f7-853c-d3b7124b791c");
|
caseCountDTO.setPrpeDataId("9d179f05-3ea0-48f7-853c-d3b7124b791c");
|
||||||
caseCountDTOList.add(caseCountDTO);
|
caseCountDTOList.add(caseCountDTO);
|
||||||
|
}else {
|
||||||
|
dataId = value.get(0).getAreaId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(caseCountDTOList)) {
|
// 列出所有的专管机构
|
||||||
|
params.put("departmentParentId", "0");
|
||||||
|
List<HandleDepartmentDTO> handleDepartmentDTOS = reportCaseDao.listDept(params);
|
||||||
|
for (int i = 0; i < handleDepartmentDTOS.size(); i++) {
|
||||||
|
HandleDepartmentDTO handleDepartmentDTO = handleDepartmentDTOS.get(i);
|
||||||
|
handleDepartmentDTO.setCaseCount(0);
|
||||||
|
}
|
||||||
|
AtomicInteger zgyAllCount = new AtomicInteger();
|
||||||
|
AtomicInteger zgySelfCount = new AtomicInteger();
|
||||||
|
AtomicInteger zgyHandleCount = new AtomicInteger();
|
||||||
|
handleDepartmentDTOS.forEach(handleDepartmentDTO -> {
|
||||||
|
// 查询需要专管员的案件
|
||||||
|
Map<String, Object> caseParams = getHashMap(2);
|
||||||
|
caseParams.put("startTime", params.get("start"));
|
||||||
|
caseParams.put("endTime", params.get("end"));
|
||||||
|
caseParams.put("handleDepartmentId", handleDepartmentDTO.getDepartmentId());
|
||||||
|
List<ReportCaseDTO> reportCaseDTOList = reportCaseDao.dataCountReportCase(caseParams);
|
||||||
|
if(!CollectionUtils.isEmpty(reportCaseDTOList)) {
|
||||||
|
zgyAllCount.addAndGet(reportCaseDTOList.size());
|
||||||
|
zgySelfCount.addAndGet((int) reportCaseDTOList.stream().filter(element -> element.getIsSelf() == 1).count());
|
||||||
|
|
||||||
|
List<String> caseIdList = reportCaseDTOList.stream()
|
||||||
|
.map(ReportCaseDTO::getReportCaseId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
final int batchSize = 5000;
|
||||||
|
int start = 0;
|
||||||
|
int totalHandleCount = 0;
|
||||||
|
while (start < caseIdList.size()) {
|
||||||
|
int end = Math.min(start + batchSize, caseIdList.size());
|
||||||
|
List<String> batchCaseIds = caseIdList.subList(start, end);
|
||||||
|
|
||||||
|
params.put("caseIds", batchCaseIds);
|
||||||
|
Integer i1 = reportCaseDao.handleCountData(params);
|
||||||
|
totalHandleCount += i1;
|
||||||
|
|
||||||
|
start += batchSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
zgyHandleCount.addAndGet(totalHandleCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
caseCountDTO.setName("暂无数据");
|
caseCountDTO.setName("专管员区域");
|
||||||
caseCountDTO.setSelfCount("0");
|
caseCountDTO.setAllCount("" + zgyAllCount);
|
||||||
caseCountDTO.setHandleCount("0");
|
caseCountDTO.setSelfCount("" + zgySelfCount);
|
||||||
caseCountDTO.setAllCount("0");
|
caseCountDTO.setHandleCount("" + zgyHandleCount);
|
||||||
caseCountDTO.setDataId("9999");
|
caseCountDTO.setDataId(dataId);
|
||||||
caseCountDTO.setLevel(2);
|
caseCountDTO.setLevel(2);
|
||||||
caseCountDTO.setPrpeLevel(1);
|
caseCountDTO.setPrpeLevel(1);
|
||||||
caseCountDTO.setPrpeDataId("9d179f05-3ea0-48f7-853c-d3b7124b791c");
|
caseCountDTO.setPrpeDataId("9d179f05-3ea0-48f7-853c-d3b7124b791c");
|
||||||
caseCountDTOList.add(caseCountDTO);
|
caseCountDTOList.add(caseCountDTO);
|
||||||
|
|
||||||
|
if (CollectionUtils.isEmpty(caseCountDTOList)) {
|
||||||
|
CaseCountDTO caseCountDTO1 = new CaseCountDTO();
|
||||||
|
caseCountDTO1.setName("暂无数据");
|
||||||
|
caseCountDTO1.setSelfCount("0");
|
||||||
|
caseCountDTO1.setHandleCount("0");
|
||||||
|
caseCountDTO1.setAllCount("0");
|
||||||
|
caseCountDTO1.setDataId("9999");
|
||||||
|
caseCountDTO1.setLevel(2);
|
||||||
|
caseCountDTO1.setPrpeLevel(1);
|
||||||
|
caseCountDTO1.setPrpeDataId("9d179f05-3ea0-48f7-853c-d3b7124b791c");
|
||||||
|
caseCountDTOList.add(caseCountDTO1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return caseCountDTOList;
|
return caseCountDTOList;
|
||||||
@ -2223,16 +2283,18 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
|||||||
if (null == params.get("areaId")) {
|
if (null == params.get("areaId")) {
|
||||||
throw new SearchException("areaId不能为空");
|
throw new SearchException("areaId不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
||||||
|
|
||||||
|
if(!params.get("areaId").toString().equals("e64a0a05-45ca-4452-a869-a4dcbff74593")) {
|
||||||
List<CasePO> casePOList = reportCaseDao.dataCountLevel1(params);
|
List<CasePO> casePOList = reportCaseDao.dataCountLevel1(params);
|
||||||
Map<String, List<CasePO>> groupMap = casePOList.stream()
|
Map<String, List<CasePO>> groupMap = casePOList.stream()
|
||||||
.collect(Collectors.groupingBy(CasePO::getCommunityId));
|
.collect(Collectors.groupingBy(CasePO::getCommunityId));
|
||||||
|
|
||||||
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (String key : groupMap.keySet()) {
|
for (String key : groupMap.keySet()) {
|
||||||
List<CasePO> value = groupMap.get(key);
|
List<CasePO> value = groupMap.get(key);
|
||||||
String communityName = value.get(0).getCommunityName();
|
String communityName = value.get(0).getCommunityName();
|
||||||
if(communityName.equals("油房村") || communityName.equals("高油房村")) {
|
if (communityName.equals("油房村") || communityName.equals("高油房村")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
@ -2249,6 +2311,70 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
|||||||
caseCountDTO.setPrpeDataId(params.get("areaId").toString());
|
caseCountDTO.setPrpeDataId(params.get("areaId").toString());
|
||||||
caseCountDTOList.add(caseCountDTO);
|
caseCountDTOList.add(caseCountDTO);
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
// 列出所有的专管机构
|
||||||
|
params.put("departmentParentId", "0");
|
||||||
|
List<HandleDepartmentDTO> handleDepartmentDTOS = reportCaseDao.listDept(params);
|
||||||
|
for (int i = 0; i < handleDepartmentDTOS.size(); i++) {
|
||||||
|
HandleDepartmentDTO handleDepartmentDTO = handleDepartmentDTOS.get(i);
|
||||||
|
handleDepartmentDTO.setCaseCount(0);
|
||||||
|
}
|
||||||
|
AtomicInteger zgyAllCount = new AtomicInteger();
|
||||||
|
AtomicInteger zgySelfCount = new AtomicInteger();
|
||||||
|
AtomicInteger zgyHandleCount = new AtomicInteger();
|
||||||
|
handleDepartmentDTOS.forEach(handleDepartmentDTO -> {
|
||||||
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
|
caseCountDTO.setName(handleDepartmentDTO.getDepartmentName());
|
||||||
|
caseCountDTO.setDepartmentId(handleDepartmentDTO.getDepartmentId());
|
||||||
|
|
||||||
|
// 查询需要专管员的案件
|
||||||
|
Map<String, Object> caseParams = getHashMap(2);
|
||||||
|
caseParams.put("startTime", params.get("start"));
|
||||||
|
caseParams.put("endTime", params.get("end"));
|
||||||
|
caseParams.put("handleDepartmentId", handleDepartmentDTO.getDepartmentId());
|
||||||
|
List<ReportCaseDTO> reportCaseDTOList = reportCaseDao.dataCountReportCase(caseParams);
|
||||||
|
if (!CollectionUtils.isEmpty(reportCaseDTOList)) {
|
||||||
|
zgyAllCount.addAndGet(reportCaseDTOList.size());
|
||||||
|
zgySelfCount.addAndGet((int) reportCaseDTOList.stream().filter(element -> element.getIsSelf() == 1).count());
|
||||||
|
|
||||||
|
List<String> caseIdList = reportCaseDTOList.stream()
|
||||||
|
.map(ReportCaseDTO::getReportCaseId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
final int batchSize = 5000;
|
||||||
|
int start = 0;
|
||||||
|
int totalHandleCount = 0;
|
||||||
|
while (start < caseIdList.size()) {
|
||||||
|
int end = Math.min(start + batchSize, caseIdList.size());
|
||||||
|
List<String> batchCaseIds = caseIdList.subList(start, end);
|
||||||
|
|
||||||
|
params.put("caseIds", batchCaseIds);
|
||||||
|
Integer i1 = reportCaseDao.handleCountData(params);
|
||||||
|
totalHandleCount += i1;
|
||||||
|
|
||||||
|
start += batchSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
zgyHandleCount.addAndGet(totalHandleCount);
|
||||||
|
|
||||||
|
|
||||||
|
long selfCount = reportCaseDTOList.stream().filter(element -> element.getIsSelf() == 1).count();
|
||||||
|
caseCountDTO.setAllCount("" + reportCaseDTOList.size());
|
||||||
|
caseCountDTO.setSelfCount("" + (int) selfCount);
|
||||||
|
caseCountDTO.setHandleCount("" + totalHandleCount);
|
||||||
|
caseCountDTO.setDataId(reportCaseDTOList.get(0).getCommunityId());
|
||||||
|
}else {
|
||||||
|
caseCountDTO.setAllCount("0");
|
||||||
|
caseCountDTO.setSelfCount("0");
|
||||||
|
caseCountDTO.setHandleCount("0");
|
||||||
|
caseCountDTO.setDataId(params.get("areaId").toString());
|
||||||
|
}
|
||||||
|
caseCountDTO.setLevel(3);
|
||||||
|
caseCountDTO.setPrpeLevel(2);
|
||||||
|
caseCountDTO.setPrpeDataId(params.get("areaId").toString());
|
||||||
|
caseCountDTOList.add(caseCountDTO);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(caseCountDTOList)) {
|
if (CollectionUtils.isEmpty(caseCountDTOList)) {
|
||||||
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
@ -2272,12 +2398,21 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
|||||||
throw new SearchException("communityId不能为空");
|
throw new SearchException("communityId不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String communityId = params.get("communityId").toString();
|
||||||
|
|
||||||
|
if(null == params.get("prpedataId")) {
|
||||||
|
throw new SearchException("prpedataId不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
String prpedataId = params.get("prpedataId").toString();
|
||||||
|
|
||||||
|
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
||||||
|
|
||||||
|
if(!prpedataId.equals("e64a0a05-45ca-4452-a869-a4dcbff74593")) {
|
||||||
List<CasePO> casePOList = reportCaseDao.dataCountLevel1(params);
|
List<CasePO> casePOList = reportCaseDao.dataCountLevel1(params);
|
||||||
Map<String, List<CasePO>> groupMap = casePOList.stream()
|
Map<String, List<CasePO>> groupMap = casePOList.stream()
|
||||||
.collect(Collectors.groupingBy(CasePO::getReportUserName));
|
.collect(Collectors.groupingBy(CasePO::getReportUserName));
|
||||||
|
|
||||||
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (String key : groupMap.keySet()) {
|
for (String key : groupMap.keySet()) {
|
||||||
List<CasePO> value = groupMap.get(key);
|
List<CasePO> value = groupMap.get(key);
|
||||||
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
@ -2294,6 +2429,50 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
|||||||
caseCountDTO.setDataId(params.get("communityId").toString());
|
caseCountDTO.setDataId(params.get("communityId").toString());
|
||||||
caseCountDTOList.add(caseCountDTO);
|
caseCountDTOList.add(caseCountDTO);
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
// 查询需要专管员的案件
|
||||||
|
Map<String, Object> caseParams = getHashMap(2);
|
||||||
|
caseParams.put("startTime", params.get("start"));
|
||||||
|
caseParams.put("endTime", params.get("end"));
|
||||||
|
caseParams.put("handleDepartmentId", params.get("departmentId"));
|
||||||
|
List<ReportCaseDTO> reportCaseDTOList = reportCaseDao.dataCountReportCase(caseParams);
|
||||||
|
Map<String, List<ReportCaseDTO>> collect = reportCaseDTOList.stream()
|
||||||
|
.collect(Collectors.groupingBy(ReportCaseDTO::getCaseReporter));
|
||||||
|
|
||||||
|
for (String key : collect.keySet()) {
|
||||||
|
List<ReportCaseDTO> value = collect.get(key);
|
||||||
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
|
caseCountDTO.setName(key);
|
||||||
|
long selfCount = value.stream().filter(element -> element.getIsSelf() == 1).count();
|
||||||
|
caseCountDTO.setAllCount("" + value.size());
|
||||||
|
caseCountDTO.setSelfCount("" + (int) selfCount);
|
||||||
|
|
||||||
|
List<String> caseIdList = value.stream()
|
||||||
|
.map(ReportCaseDTO::getReportCaseId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
final int batchSize = 5000;
|
||||||
|
int start = 0;
|
||||||
|
int totalHandleCount = 0;
|
||||||
|
while (start < caseIdList.size()) {
|
||||||
|
int end = Math.min(start + batchSize, caseIdList.size());
|
||||||
|
List<String> batchCaseIds = caseIdList.subList(start, end);
|
||||||
|
|
||||||
|
params.put("caseIds", batchCaseIds);
|
||||||
|
Integer i1 = reportCaseDao.handleCountData(params);
|
||||||
|
totalHandleCount += i1;
|
||||||
|
|
||||||
|
start += batchSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
caseCountDTO.setHandleCount("" + totalHandleCount);
|
||||||
|
caseCountDTO.setDataId(value.get(0).getCaseReporter());
|
||||||
|
caseCountDTO.setLevel(4);
|
||||||
|
caseCountDTO.setPrpeLevel(3);
|
||||||
|
caseCountDTO.setPrpeDataId(params.get("prpeDataId").toString());
|
||||||
|
caseCountDTO.setDataId(params.get("communityId").toString());
|
||||||
|
caseCountDTOList.add(caseCountDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(caseCountDTOList)) {
|
if (CollectionUtils.isEmpty(caseCountDTOList)) {
|
||||||
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
@ -2305,7 +2484,7 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
|||||||
caseCountDTO.setLevel(4);
|
caseCountDTO.setLevel(4);
|
||||||
caseCountDTO.setPrpeLevel(3);
|
caseCountDTO.setPrpeLevel(3);
|
||||||
caseCountDTO.setPrpeDataId(params.get("prpeDataId").toString());
|
caseCountDTO.setPrpeDataId(params.get("prpeDataId").toString());
|
||||||
caseCountDTO.setDataId(params.get("communityId").toString());
|
caseCountDTO.setDataId(communityId);
|
||||||
caseCountDTOList.add(caseCountDTO);
|
caseCountDTOList.add(caseCountDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2801,4 +2980,314 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CaseCountDTO> dataCountBigdata(Integer level, Map<String, Object> params) {
|
||||||
|
String userType = params.get("userType").toString();
|
||||||
|
switch (level) {
|
||||||
|
case 1:
|
||||||
|
return dataCountBigdataLevel1(params, userType);
|
||||||
|
case 2:
|
||||||
|
return dataCountBigdataLevel2(params, userType);
|
||||||
|
case 3:
|
||||||
|
return dataCountBigdataLevel3(params, userType);
|
||||||
|
case 4:
|
||||||
|
return dataCountBigdataLevel4(params, userType);
|
||||||
|
}
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportDataCountBigdata(HttpServletResponse response, Map<String, Object> params) {
|
||||||
|
Integer level = Integer.parseInt(params.get("level").toString());
|
||||||
|
List<CaseCountDTO> caseCountDTOS = dataCountBigdata(level, params);
|
||||||
|
|
||||||
|
String excelName = "自处理案件统计";
|
||||||
|
String fileName = null;
|
||||||
|
try {
|
||||||
|
fileName = URLEncoder.encode(excelName, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||||
|
|
||||||
|
String[] headers = {"序号", "级别", "已上报数量", "已处理数量", "自处理数量"};
|
||||||
|
List<List<String>> listHeader = new ArrayList<>();
|
||||||
|
for (String item : headers) {
|
||||||
|
List<String> title = new ArrayList<>();
|
||||||
|
title.add(item);
|
||||||
|
listHeader.add(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<List<Object>> listData = new ArrayList<>();
|
||||||
|
int i = 0;
|
||||||
|
for (CaseCountDTO caseCountDTO : caseCountDTOS) {
|
||||||
|
i++;
|
||||||
|
List<Object> data = new ArrayList<>();
|
||||||
|
data.add(i);
|
||||||
|
data.add(caseCountDTO.getName());
|
||||||
|
data.add(caseCountDTO.getAllCount());
|
||||||
|
data.add(caseCountDTO.getHandleCount());
|
||||||
|
data.add(caseCountDTO.getSelfCount());
|
||||||
|
listData.add(data);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
EasyExcel.write(response.getOutputStream()).sheet("自处理案件统计").head(listHeader).doWrite(listData);
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getUserMsg(String userType, Map<String, Object> params) {
|
||||||
|
List<String> userList = new ArrayList<>();
|
||||||
|
if (userType.equals("网格员")) {
|
||||||
|
// 查询所有网格员
|
||||||
|
List<CommunityBossDTO> communityBossDTOS = communityBossService.listCommunityBoss(params);
|
||||||
|
userList = communityBossDTOS.stream()
|
||||||
|
.map(CommunityBossDTO::getCommunityBossUserId).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (userType.equals("专管员")) {
|
||||||
|
params.put("roleId", "bc405346-8714-4ded-89ac-9cc4d755f66a");
|
||||||
|
|
||||||
|
List<Map<String, Object>> roleUserMap = communityBossService.getRoleUser(params);
|
||||||
|
userList = roleUserMap.stream()
|
||||||
|
.map(map -> map.get("userId").toString()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<CaseCountDTO> dataCountBigdataLevel1(Map<String, Object> params, String userType) {
|
||||||
|
Map<String, Object> newParams = new HashMap<>();
|
||||||
|
newParams.putAll(params);
|
||||||
|
// 获取所有网格员处理数
|
||||||
|
final int batchSize = 5000;
|
||||||
|
int start = 0;
|
||||||
|
long selfCount = 0L;
|
||||||
|
long handleCount = 0L;
|
||||||
|
List<CasePO> allPOList = new ArrayList<>();
|
||||||
|
List<String> userList = getUserMsg(userType, newParams);
|
||||||
|
|
||||||
|
while (start < userList.size()) {
|
||||||
|
int end = Math.min(start + batchSize, userList.size());
|
||||||
|
List<String> batchBossIds = userList.subList(start, end);
|
||||||
|
|
||||||
|
params.put("bossIds", batchBossIds);
|
||||||
|
List<CasePO> casePOList = reportCaseDao.dataCountLevel1(params);
|
||||||
|
|
||||||
|
allPOList.addAll(casePOList);
|
||||||
|
|
||||||
|
start += batchSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CollectionUtils.isEmpty(allPOList)) {
|
||||||
|
selfCount = allPOList.stream().filter(element -> element.getIsSelf() == 1 && element.getIsHandle() == 1).count();
|
||||||
|
handleCount = allPOList.stream().filter(element -> element.getIsHandle() == 1).count();
|
||||||
|
}
|
||||||
|
|
||||||
|
CaseCountDTO dto = new CaseCountDTO();
|
||||||
|
dto.setName("全区");
|
||||||
|
dto.setAllCount("" + allPOList.size());
|
||||||
|
dto.setSelfCount("" + (int) selfCount);
|
||||||
|
dto.setHandleCount("" + (int) handleCount);
|
||||||
|
dto.setLevel(1);
|
||||||
|
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
||||||
|
caseCountDTOList.add(dto);
|
||||||
|
return caseCountDTOList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<CaseCountDTO> dataCountBigdataLevel2(Map<String, Object> params, String userType) {
|
||||||
|
Map<String, Object> newParams = new HashMap<>();
|
||||||
|
newParams.putAll(params);
|
||||||
|
params.put("dictParentId", "9d179f05-3ea0-48f7-853c-d3b7124b791c");
|
||||||
|
// 获取所有网格员处理数
|
||||||
|
final int batchSize = 5000;
|
||||||
|
int start = 0;
|
||||||
|
List<CasePO> casePOList = new ArrayList<>();
|
||||||
|
List<String> userList = getUserMsg(userType, newParams);
|
||||||
|
|
||||||
|
while (start < userList.size()) {
|
||||||
|
int end = Math.min(start + batchSize, userList.size());
|
||||||
|
List<String> batchBossIds = userList.subList(start, end);
|
||||||
|
|
||||||
|
params.put("bossIds", batchBossIds);
|
||||||
|
List<CasePO> subList = reportCaseDao.dataCountLevel1(params);
|
||||||
|
|
||||||
|
casePOList.addAll(subList);
|
||||||
|
|
||||||
|
start += batchSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, List<CasePO>> groupMap = casePOList.stream()
|
||||||
|
.collect(Collectors.groupingBy(CasePO::getAreaName));
|
||||||
|
|
||||||
|
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (String key : groupMap.keySet()) {
|
||||||
|
List<CasePO> value = groupMap.get(key);
|
||||||
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
|
caseCountDTO.setName(key);
|
||||||
|
long selfCount = value.stream().filter(element -> element.getIsSelf() == 1 && element.getIsHandle() == 1).count();
|
||||||
|
long handleCount = value.stream().filter(element -> element.getIsHandle() == 1).count();
|
||||||
|
caseCountDTO.setAllCount("" + value.size());
|
||||||
|
caseCountDTO.setSelfCount("" + (int) selfCount);
|
||||||
|
caseCountDTO.setHandleCount("" + (int) handleCount);
|
||||||
|
caseCountDTO.setDataId(value.get(0).getAreaId());
|
||||||
|
caseCountDTO.setLevel(2);
|
||||||
|
caseCountDTO.setPrpeLevel(1);
|
||||||
|
caseCountDTO.setPrpeDataId("9d179f05-3ea0-48f7-853c-d3b7124b791c");
|
||||||
|
caseCountDTOList.add(caseCountDTO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<CaseCountDTO> dataCountBigdataLevel3(Map<String, Object> params, String userType) {
|
||||||
|
Map<String, Object> newParams = new HashMap<>();
|
||||||
|
newParams.putAll(params);
|
||||||
|
params.put("community", "yes");
|
||||||
|
if (null == params.get("areaId")) {
|
||||||
|
throw new SearchException("areaId不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有网格员处理数
|
||||||
|
final int batchSize = 5000;
|
||||||
|
int start = 0;
|
||||||
|
List<CasePO> casePOList = new ArrayList<>();
|
||||||
|
List<String> userList = getUserMsg(userType, newParams);
|
||||||
|
|
||||||
|
while (start < userList.size()) {
|
||||||
|
int end = Math.min(start + batchSize, userList.size());
|
||||||
|
List<String> batchBossIds = userList.subList(start, end);
|
||||||
|
|
||||||
|
params.put("bossIds", batchBossIds);
|
||||||
|
List<CasePO> subList = reportCaseDao.dataCountLevel1(params);
|
||||||
|
|
||||||
|
casePOList.addAll(subList);
|
||||||
|
|
||||||
|
start += batchSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, List<CasePO>> groupMap = casePOList.stream()
|
||||||
|
.collect(Collectors.groupingBy(CasePO::getCommunityId));
|
||||||
|
|
||||||
|
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (String key : groupMap.keySet()) {
|
||||||
|
List<CasePO> value = groupMap.get(key);
|
||||||
|
String communityName = value.get(0).getCommunityName();
|
||||||
|
if(communityName.equals("油房村") || communityName.equals("高油房村")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
|
caseCountDTO.setName(value.get(0).getCommunityName().equals("高油房村") ?
|
||||||
|
"油房村" : value.get(0).getCommunityName());
|
||||||
|
long selfCount = value.stream().filter(element -> element.getIsSelf() == 1 && element.getIsHandle() == 1).count();
|
||||||
|
long handleCount = value.stream().filter(element -> element.getIsHandle() == 1).count();
|
||||||
|
caseCountDTO.setAllCount("" + value.size());
|
||||||
|
caseCountDTO.setSelfCount("" + (int) selfCount);
|
||||||
|
caseCountDTO.setHandleCount("" + (int) handleCount);
|
||||||
|
caseCountDTO.setDataId(value.get(0).getCommunityId());
|
||||||
|
caseCountDTO.setLevel(3);
|
||||||
|
caseCountDTO.setPrpeLevel(2);
|
||||||
|
caseCountDTO.setPrpeDataId(params.get("areaId").toString());
|
||||||
|
caseCountDTOList.add(caseCountDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<CaseCountDTO> dataCountBigdataLevel4(Map<String, Object> params, String userType) {
|
||||||
|
Map<String, Object> newParams = new HashMap<>();
|
||||||
|
newParams.putAll(params);
|
||||||
|
params.put("creator", "yes");
|
||||||
|
if (null == params.get("communityId")) {
|
||||||
|
throw new SearchException("communityId不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有网格员处理数
|
||||||
|
final int batchSize = 5000;
|
||||||
|
int start = 0;
|
||||||
|
List<CasePO> casePOList = new ArrayList<>();
|
||||||
|
List<String> userList = getUserMsg(userType, newParams);
|
||||||
|
|
||||||
|
while (start < userList.size()) {
|
||||||
|
int end = Math.min(start + batchSize, userList.size());
|
||||||
|
List<String> batchBossIds = userList.subList(start, end);
|
||||||
|
|
||||||
|
params.put("bossIds", batchBossIds);
|
||||||
|
List<CasePO> subList = reportCaseDao.dataCountLevel1(params);
|
||||||
|
|
||||||
|
casePOList.addAll(subList);
|
||||||
|
|
||||||
|
start += batchSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, List<CasePO>> groupMap = casePOList.stream()
|
||||||
|
.collect(Collectors.groupingBy(CasePO::getReportUserName));
|
||||||
|
|
||||||
|
List<CaseCountDTO> caseCountDTOList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (String key : groupMap.keySet()) {
|
||||||
|
List<CasePO> value = groupMap.get(key);
|
||||||
|
CaseCountDTO caseCountDTO = new CaseCountDTO();
|
||||||
|
caseCountDTO.setName(key);
|
||||||
|
long selfCount = value.stream().filter(element -> element.getIsSelf() == 1 && element.getIsHandle() == 1).count();
|
||||||
|
long handleCount = value.stream().filter(element -> element.getIsHandle() == 1).count();
|
||||||
|
caseCountDTO.setAllCount("" + value.size());
|
||||||
|
caseCountDTO.setSelfCount("" + (int) selfCount);
|
||||||
|
caseCountDTO.setHandleCount("" + (int) handleCount);
|
||||||
|
caseCountDTO.setDataId(value.get(0).getReportUserId());
|
||||||
|
caseCountDTO.setLevel(4);
|
||||||
|
caseCountDTO.setPrpeLevel(3);
|
||||||
|
caseCountDTO.setPrpeDataId(params.get("prpeDataId").toString());
|
||||||
|
caseCountDTO.setDataId(params.get("communityId").toString());
|
||||||
|
caseCountDTOList.add(caseCountDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
@ -3061,7 +3061,73 @@
|
|||||||
<if test="creator != null and creator != ''">
|
<if test="creator != null and creator != ''">
|
||||||
AND community_id = #{communityId}
|
AND community_id = #{communityId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="bossIds != null and bossIds.size > 0">
|
||||||
|
AND report_user_id IN
|
||||||
|
<foreach collection="bossIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{bossIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="dataCountReportCase" parameterType="map" resultMap="reportCaseDTO">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
city_report_case
|
||||||
|
WHERE
|
||||||
|
is_delete = 0
|
||||||
|
<if test="caseStatusOne != null and caseStatusOne !=''">
|
||||||
|
AND case_status = #{caseStatusOne}
|
||||||
|
</if>
|
||||||
|
<if test="caseStatus != null and caseStatus !=''">
|
||||||
|
AND case_status >= #{caseStatus}
|
||||||
|
</if>
|
||||||
|
<if test="exception != null and exception !=''">
|
||||||
|
AND case_status = '-1'
|
||||||
|
</if>
|
||||||
|
<if test="areaId != null and areaId !=''">
|
||||||
|
AND area_id = #{areaId}
|
||||||
|
</if>
|
||||||
|
<if test="communityId != null and communityId !=''">
|
||||||
|
AND community_id = #{communityId}
|
||||||
|
</if>
|
||||||
|
<if test="caseTypeId != null and caseTypeId !=''">
|
||||||
|
AND case_type_id = #{caseTypeId}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != ''">
|
||||||
|
AND LEFT(gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
AND LEFT(gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="handleDepartmentId != null and handleDepartmentId != ''">
|
||||||
|
AND (
|
||||||
|
report_case_id IN (
|
||||||
|
SELECT
|
||||||
|
st1.case_id
|
||||||
|
FROM
|
||||||
|
city_report_case_assign st1
|
||||||
|
WHERE
|
||||||
|
st1.is_delete = 0
|
||||||
|
AND
|
||||||
|
st1.handle_user_id IN (
|
||||||
|
SELECT
|
||||||
|
sst1.user_id
|
||||||
|
FROM
|
||||||
|
sys_department_user sst1
|
||||||
|
INNER JOIN
|
||||||
|
sys_role_user sst2
|
||||||
|
ON
|
||||||
|
sst1.user_id = sst2.user_id
|
||||||
|
AND
|
||||||
|
sst2.role_id = 'bc405346-8714-4ded-89ac-9cc4d755f66a'
|
||||||
|
WHERE
|
||||||
|
sst1.department_id = #{handleDepartmentId}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -0,0 +1,363 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<base href="/servicecity/">
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-card" id="left-card-div" style="">
|
||||||
|
<div class="layui-card-body">
|
||||||
|
<div style="padding: 10px 0px; border-bottom: 1px solid #DDDDDD;text-align: left">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="start" class="layui-input search-item"
|
||||||
|
readonly="readonly" placeholder="开始时间" style="height: 38px;width:150px;cursor: pointer" autocomplete="off">
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="end" class="layui-input search-item"
|
||||||
|
readonly="readonly" placeholder="结束时间" style="height: 38px;width:150px;cursor: pointer" autocomplete="off">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-inline">
|
||||||
|
<select id="userTypeSel" name="userTypeSel" lay-filter="changeUserType">
|
||||||
|
<option value="网格员">网格员</option>
|
||||||
|
<option value="专管员">专管员</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 10px 0px; border-bottom: 1px solid #DDDDDD;text-align: right">
|
||||||
|
<button type="button" id="refreshData" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-refresh"></i> 更新案件情况
|
||||||
|
</button>
|
||||||
|
<button typeof="button" id="backToArea" class="layui-btn layui-btn-sm">返回上级</button>
|
||||||
|
<button typeof="button" id="exportExcel" class="layui-btn layui-btn-sm">导出本级数据</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table class="layui-table">
|
||||||
|
<colgroup>
|
||||||
|
<col width="200">
|
||||||
|
<col width="130">
|
||||||
|
<col width="130">
|
||||||
|
<col width="130">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align: center;">级别</th>
|
||||||
|
<th style="text-align: center;">已上报数量</th>
|
||||||
|
<th style="text-align: center;">已处理数量</th>
|
||||||
|
<th style="text-align: center;">自处理数量</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="areaUserCountBox"></tbody>
|
||||||
|
<script type="text/html" id="areaUserCountTemplate">
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
{{# if(item.name == '暂无数据'){ }}
|
||||||
|
<a href="javascript:void(0)"
|
||||||
|
data-hansubarea="{{item.name}}" class=""
|
||||||
|
style="color: #0a54a6;text-decoration: underline"
|
||||||
|
data-level="{{item.level}}"
|
||||||
|
data-dataId="{{item.dataId}}"
|
||||||
|
data-prpeLevel="{{item.prpeLevel}}"
|
||||||
|
data-prpeDataId="{{item.prpeDataId}}">{{item.name}}</a>
|
||||||
|
{{# } }}
|
||||||
|
|
||||||
|
{{# if(item.name != '暂无数据'){ }}
|
||||||
|
<a href="javascript:void(0)"
|
||||||
|
data-hansubarea="{{item.name}}" class="change-area"
|
||||||
|
style="color: #0a54a6;text-decoration: underline"
|
||||||
|
data-level="{{item.level}}"
|
||||||
|
data-dataId="{{item.dataId}}"
|
||||||
|
data-prpeLevel="{{item.prpeLevel}}"
|
||||||
|
data-prpeDataId="{{item.prpeDataId}}">{{item.name}}</a>
|
||||||
|
{{# } }}
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<a href="javascript:void(0)">{{item.allCount}}</a>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<a href="javascript:void(0)">{{item.handleCount}}</a>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<a href="javascript:void(0)">{{item.selfCount}}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script type="text/javascript" src="assets/js/jquery-3.5.1.min.js"></script>
|
||||||
|
<script type="text/javascript" src="assets/js/restajax.js"></script>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/'
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index'
|
||||||
|
}).use(['index', 'table', 'laytpl', 'form','laydate', 'dialog'], function() {
|
||||||
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
|
var laytpl = layui.laytpl;
|
||||||
|
var table = layui.table;
|
||||||
|
var admin = layui.admin;
|
||||||
|
var form = layui.form;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var dialog = layui.dialog;
|
||||||
|
var resizeTimeout = null;
|
||||||
|
var dataLoading = false;
|
||||||
|
|
||||||
|
$(document).on('click', '#search', function() {
|
||||||
|
if(dataLoading){
|
||||||
|
layer.msg('数据加载中,请稍等...');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
changeSearchData();
|
||||||
|
});
|
||||||
|
|
||||||
|
function initDateTime(){
|
||||||
|
// 获取当前年份
|
||||||
|
var currentYear = new Date().getFullYear();
|
||||||
|
// 定义今年的开始和结束日期
|
||||||
|
var startDate = currentYear + '-01-01';
|
||||||
|
var endDate = currentYear + '-12-31';
|
||||||
|
|
||||||
|
laydate.render({
|
||||||
|
elem: '#start',
|
||||||
|
type: 'date',
|
||||||
|
min: startDate, // 设置最小日期为今年开始日期
|
||||||
|
max: endDate,
|
||||||
|
});
|
||||||
|
laydate.render({
|
||||||
|
elem: '#end',
|
||||||
|
type: 'date',
|
||||||
|
min: startDate, // 设置最小日期为今年开始日期
|
||||||
|
max: endDate,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initDateTime();
|
||||||
|
|
||||||
|
var dataMsg = {
|
||||||
|
url: '',
|
||||||
|
dataId: '',
|
||||||
|
level: 0,
|
||||||
|
nowLevel: '',
|
||||||
|
nowDataId: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
$('#left-card-div').height($win.height() - 30);
|
||||||
|
$('#left-card-div').css('overflow', 'auto');
|
||||||
|
|
||||||
|
function initData() {
|
||||||
|
var start = $('#start').val();
|
||||||
|
var end = $('#end').val();
|
||||||
|
var userType = $('#userTypeSel').val();
|
||||||
|
var url = 'app/data-external-release/data-counts-bigdata/{level}?start=' + start + '&end='+ end + '&userType=' + userType;
|
||||||
|
listAreaUserCounts(url, 1, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
initData();
|
||||||
|
|
||||||
|
function listAreaUserCounts(url, level, searchData, prpeDataId) {
|
||||||
|
var loadIndex = layer.load(0, {shade: 0.3});
|
||||||
|
restAjax.get(restAjax.path(url, [level, searchData, prpeDataId]),
|
||||||
|
{}, null, function (code, data) {
|
||||||
|
dataMsg.nowLevel = data[0].level;
|
||||||
|
dataMsg.nowDataId = data[0].dataId;
|
||||||
|
dataMsg.level = data[0].prpeLevel;
|
||||||
|
dataMsg.dataId = data[0].prpeDataId;
|
||||||
|
console.log(dataMsg)
|
||||||
|
laytpl(document.getElementById('areaUserCountTemplate').innerHTML).render(data, function (html) {
|
||||||
|
document.getElementById('areaUserCountBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
layer.close(loadIndex);
|
||||||
|
}, function (code, data) {
|
||||||
|
dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绑定点击区域切换事件
|
||||||
|
$(document).on('click', '.change-area', function () {
|
||||||
|
var level = $(this).data().level;
|
||||||
|
level+=1;
|
||||||
|
var dataId = $(this).data().dataid;
|
||||||
|
var url = '';
|
||||||
|
|
||||||
|
console.log("level==" + level + "-------" + "dataId==" + dataId)
|
||||||
|
|
||||||
|
var start = $('#start').val();
|
||||||
|
var end = $('#end').val();
|
||||||
|
var userType = $('#userTypeSel').val();
|
||||||
|
|
||||||
|
if(level == 2) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?start=' + start + '&end='+ end + '&userType=' + userType;
|
||||||
|
}
|
||||||
|
if(level == 3) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?areaId={areaId}&start=' + start + '&end='+ end + '&userType=' + userType;
|
||||||
|
}
|
||||||
|
if(level == 4) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start=' + start + '&end='+ end + '&userType=' + userType;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(level > 4) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
listAreaUserCounts(url, level, dataId, dataMsg.dataId);
|
||||||
|
});
|
||||||
|
|
||||||
|
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();
|
||||||
|
var userType = $('#userTypeSel').val();
|
||||||
|
|
||||||
|
if(level == 1) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?start=' + start + '&end='+ end + '&userType=' + userType;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(level == 2) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?start=' + start + '&end='+ end + '&userType=' + userType;
|
||||||
|
}
|
||||||
|
if(level == 3) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?areaId={areaId}&start=' + start + '&end='+ end + '&userType=' + userType;
|
||||||
|
}
|
||||||
|
if(level == 4) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start=' + start + '&end='+ end + '&userType=' + userType;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(level > 4) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
listAreaUserCounts(url, level, dataId, dataMsg.dataId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回上级
|
||||||
|
$(document).on('click', '#backToArea', function () {
|
||||||
|
var level = dataMsg.level;
|
||||||
|
var dataId = dataMsg.dataId;
|
||||||
|
var url;
|
||||||
|
|
||||||
|
if(level == 1) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}';
|
||||||
|
}
|
||||||
|
if(level == 2) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}';
|
||||||
|
}
|
||||||
|
if(level == 3) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?areaId={areaId}';
|
||||||
|
}
|
||||||
|
if(level == 4) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?communityId={communityId}';
|
||||||
|
}
|
||||||
|
listAreaUserCounts(url, level, dataId);
|
||||||
|
});
|
||||||
|
|
||||||
|
function backSearchData(start, end) {
|
||||||
|
var level = 1;
|
||||||
|
var dataId = dataMsg.dataId;
|
||||||
|
var url;
|
||||||
|
|
||||||
|
console.log(start)
|
||||||
|
console.log(end)
|
||||||
|
|
||||||
|
if(level == 1) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?start=' + start + '&end='+ end;
|
||||||
|
}
|
||||||
|
if(level == 2) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?start=' + start + '&end='+ end;
|
||||||
|
}
|
||||||
|
if(level == 3) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?areaId={areaId}&start=' + start + '&end='+ end;
|
||||||
|
}
|
||||||
|
if(level == 4) {
|
||||||
|
url = 'app/data-external-release/data-counts-bigdata/{level}?communityId={communityId}&start=' + start + '&end='+ end;
|
||||||
|
}
|
||||||
|
listAreaUserCounts(url, level, dataId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出数据
|
||||||
|
$(document).on('click', '#exportExcel', function () {
|
||||||
|
dialog.msg('确定导出吗?', {
|
||||||
|
time: 0,
|
||||||
|
btn: [dataMessage.button.yes, dataMessage.button.no],
|
||||||
|
shade: 0.3,
|
||||||
|
yes: function (index) {
|
||||||
|
dialog.close(index);
|
||||||
|
var level = dataMsg.nowLevel;
|
||||||
|
var dataId = dataMsg.nowDataId;
|
||||||
|
var url;
|
||||||
|
|
||||||
|
var start = $('#start').val();
|
||||||
|
var end = $('#end').val();
|
||||||
|
|
||||||
|
if(level == 1) {
|
||||||
|
url = 'api/reportcase/export-datacount?level={level}?start=' + start + '&end='+ end;
|
||||||
|
}
|
||||||
|
if(level == 2) {
|
||||||
|
url = 'api/reportcase/export-datacount?level={level}?start=' + start + '&end='+ end;
|
||||||
|
}
|
||||||
|
if(level == 3) {
|
||||||
|
url = 'api/reportcase/export-datacount?level={level}&areaId={areaId}&start=' + start + '&end='+ end;
|
||||||
|
}
|
||||||
|
if(level == 4) {
|
||||||
|
url = 'app/data-external-release/export-datacount?level={level}&communityId={communityId}&prpeDataId={prpeDataId}&start=' + start + '&end='+ end;
|
||||||
|
}
|
||||||
|
window.open(restAjax.path(url, [level, dataId, dataMsg.dataId]));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 事件 - 页面变化
|
||||||
|
$win.on('resize', function () {
|
||||||
|
clearTimeout(resizeTimeout);
|
||||||
|
resizeTimeout = setTimeout(function () {
|
||||||
|
reloadTable();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '#refreshData', function() {
|
||||||
|
dialog.confirm('确定更新吗?时间可能较长,请不要关闭页面!', function(index) {
|
||||||
|
dialog.close(index);
|
||||||
|
var loadLayerIndex;
|
||||||
|
restAjax.get(restAjax.path('app/data-external-release/update-case-bigdata', []), {}, null, function(code, data) {
|
||||||
|
initData();
|
||||||
|
}, function(code, data) {
|
||||||
|
dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = dialog.msg('正在更新...', {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -142,6 +142,7 @@
|
|||||||
initCaseType();
|
initCaseType();
|
||||||
initChildCaseType('');*/
|
initChildCaseType('');*/
|
||||||
initTable('网格员');
|
initTable('网格员');
|
||||||
|
initArea()
|
||||||
}
|
}
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
@ -63,7 +63,8 @@
|
|||||||
data-level="{{item.level}}"
|
data-level="{{item.level}}"
|
||||||
data-dataId="{{item.dataId}}"
|
data-dataId="{{item.dataId}}"
|
||||||
data-prpeLevel="{{item.prpeLevel}}"
|
data-prpeLevel="{{item.prpeLevel}}"
|
||||||
data-prpeDataId="{{item.prpeDataId}}">{{item.name}}</a>
|
data-prpeDataId="{{item.prpeDataId}}"
|
||||||
|
data-departmentId="{{item.departmentId}}">{{item.name}}</a>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
|
|
||||||
{{# if(item.name != '暂无数据'){ }}
|
{{# if(item.name != '暂无数据'){ }}
|
||||||
@ -73,7 +74,8 @@
|
|||||||
data-level="{{item.level}}"
|
data-level="{{item.level}}"
|
||||||
data-dataId="{{item.dataId}}"
|
data-dataId="{{item.dataId}}"
|
||||||
data-prpeLevel="{{item.prpeLevel}}"
|
data-prpeLevel="{{item.prpeLevel}}"
|
||||||
data-prpeDataId="{{item.prpeDataId}}">{{item.name}}</a>
|
data-prpeDataId="{{item.prpeDataId}}"
|
||||||
|
data-departmentId="{{item.departmentId}}">{{item.name}}</a>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: center;">
|
<td style="text-align: center;">
|
||||||
@ -141,7 +143,9 @@
|
|||||||
dataId: '',
|
dataId: '',
|
||||||
level: 0,
|
level: 0,
|
||||||
nowLevel: '',
|
nowLevel: '',
|
||||||
nowDataId: ''
|
nowDataId: '',
|
||||||
|
prpedataid: '',
|
||||||
|
departmentId: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
$('#left-card-div').height($win.height() - 30);
|
$('#left-card-div').height($win.height() - 30);
|
||||||
@ -164,6 +168,8 @@
|
|||||||
dataMsg.nowDataId = data[0].dataId;
|
dataMsg.nowDataId = data[0].dataId;
|
||||||
dataMsg.level = data[0].prpeLevel;
|
dataMsg.level = data[0].prpeLevel;
|
||||||
dataMsg.dataId = data[0].prpeDataId;
|
dataMsg.dataId = data[0].prpeDataId;
|
||||||
|
dataMsg.prpedataid = data[0].prpeDataId;
|
||||||
|
dataMsg.departmentId = data[0].departmentId;
|
||||||
console.log(dataMsg)
|
console.log(dataMsg)
|
||||||
laytpl(document.getElementById('areaUserCountTemplate').innerHTML).render(data, function (html) {
|
laytpl(document.getElementById('areaUserCountTemplate').innerHTML).render(data, function (html) {
|
||||||
document.getElementById('areaUserCountBox').innerHTML = html;
|
document.getElementById('areaUserCountBox').innerHTML = html;
|
||||||
@ -181,7 +187,8 @@
|
|||||||
var dataId = $(this).data().dataid;
|
var dataId = $(this).data().dataid;
|
||||||
var url = '';
|
var url = '';
|
||||||
|
|
||||||
console.log("level==" + level + "-------" + "dataId==" + dataId)
|
var prpedataid = $(this).data().prpedataid;
|
||||||
|
var departmentId = $(this).data().departmentid;
|
||||||
|
|
||||||
var start = $('#start').val();
|
var start = $('#start').val();
|
||||||
var end = $('#end').val();
|
var end = $('#end').val();
|
||||||
@ -193,7 +200,8 @@
|
|||||||
url = 'api/reportcase/data-counts/{level}?areaId={areaId}&start=' + start + '&end='+ end;
|
url = 'api/reportcase/data-counts/{level}?areaId={areaId}&start=' + start + '&end='+ end;
|
||||||
}
|
}
|
||||||
if(level == 4) {
|
if(level == 4) {
|
||||||
url = 'api/reportcase/data-counts/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start=' + start + '&end='+ end;
|
url = 'api/reportcase/data-counts/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start='
|
||||||
|
+ start + '&end='+ end + '&prpedataId=' + prpedataid + '&departmentId=' + departmentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(level > 4) {
|
if(level > 4) {
|
||||||
@ -206,9 +214,11 @@
|
|||||||
function changeSearchData() {
|
function changeSearchData() {
|
||||||
// 假设 elem 是你已经获取到的元素引用
|
// 假设 elem 是你已经获取到的元素引用
|
||||||
let elem = document.querySelector('.change-area');
|
let elem = document.querySelector('.change-area');
|
||||||
|
console.log(elem)
|
||||||
let level = elem.dataset.level;
|
let level = elem.dataset.level;
|
||||||
let dataId = elem.dataset.dataid;
|
let dataId = elem.dataset.dataid;
|
||||||
|
let prpedataid = elem.dataset.prpedataid;
|
||||||
|
var departmentId = elem.dataset.departmentid;
|
||||||
console.log(level, "------------", dataId)
|
console.log(level, "------------", dataId)
|
||||||
var url = '';
|
var url = '';
|
||||||
|
|
||||||
@ -226,7 +236,8 @@
|
|||||||
url = 'api/reportcase/data-counts/{level}?areaId={areaId}&start=' + start + '&end='+ end;
|
url = 'api/reportcase/data-counts/{level}?areaId={areaId}&start=' + start + '&end='+ end;
|
||||||
}
|
}
|
||||||
if(level == 4) {
|
if(level == 4) {
|
||||||
url = 'api/reportcase/data-counts/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start=' + start + '&end='+ end;
|
url = 'api/reportcase/data-counts/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start='
|
||||||
|
+ start + '&end='+ end + '&prpedataId=' + prpedataid + '&departmentId=' + departmentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(level > 4) {
|
if(level > 4) {
|
||||||
@ -240,19 +251,25 @@
|
|||||||
$(document).on('click', '#backToArea', function () {
|
$(document).on('click', '#backToArea', function () {
|
||||||
var level = dataMsg.level;
|
var level = dataMsg.level;
|
||||||
var dataId = dataMsg.dataId;
|
var dataId = dataMsg.dataId;
|
||||||
|
var prpedataid = dataMsg.prpedataid;
|
||||||
|
var departmentId = dataMsg.departmentId;
|
||||||
|
var start = $('#start').val();
|
||||||
|
var end = $('#end').val();
|
||||||
var url;
|
var url;
|
||||||
|
|
||||||
if(level == 1) {
|
if(level == 1) {
|
||||||
url = 'api/reportcase/data-counts/{level}';
|
url = 'api/reportcase/data-counts/{level}?start=' + start + '&end='+ end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(level == 2) {
|
if(level == 2) {
|
||||||
url = 'api/reportcase/data-counts/{level}';
|
url = 'api/reportcase/data-counts/{level}?start=' + start + '&end='+ end;
|
||||||
}
|
}
|
||||||
if(level == 3) {
|
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) {
|
if(level == 4) {
|
||||||
url = 'api/reportcase/data-counts/{level}?communityId={communityId}';
|
url = 'api/reportcase/data-counts/{level}?communityId={communityId}&prpeDataId={prpeDataId}&start='
|
||||||
|
+ start + '&end='+ end + '&prpedataId=' + prpedataid + '&departmentId=' + departmentId;
|
||||||
}
|
}
|
||||||
listAreaUserCounts(url, level, dataId);
|
listAreaUserCounts(url, level, dataId);
|
||||||
});
|
});
|
||||||
@ -316,7 +333,6 @@
|
|||||||
$win.on('resize', function () {
|
$win.on('resize', function () {
|
||||||
clearTimeout(resizeTimeout);
|
clearTimeout(resizeTimeout);
|
||||||
resizeTimeout = setTimeout(function () {
|
resizeTimeout = setTimeout(function () {
|
||||||
reloadTable();
|
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user