Browse Source

fix--首页大屏信访数据显示不对问题

master
parent
commit
bca2ac01fd
  1. 46
      src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java
  2. 29
      src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

46
src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java

@ -1,23 +1,13 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.mapper.DataCaseVerifMapper;
import com.biutag.supervision.mapper.MailMapper;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.request.datav.DataVRequest; import com.biutag.supervision.pojo.request.datav.DataVRequest;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.service.DataMailService; import com.biutag.supervision.pojo.vo.StrongProblemRank;
import com.biutag.supervision.service.NegativeService;
import com.biutag.supervision.service.datav.DatavService; import com.biutag.supervision.service.datav.DatavService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
@ -27,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -47,41 +36,10 @@ public class DataVGlobalController {
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final DataMailService dataMailService;
private final NegativeService negativeService;
private final SupDepartMapper supDepartMapper;
private final MailMapper mailMapper;
private final DataCaseVerifMapper dataCaseVerifMapper;
@Resource @Resource
private DatavService datavService; private DatavService datavService;
//region 左边 //region 左边
/**
* 机构问题排名
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
* 弃用 请看 {@link #getOrganizationRank(DataVRequest)}
*/
@Operation(summary = "机构问题排名")
@Deprecated
@GetMapping("/getOrganizationRank")
public Result<JSONObject> getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime = DateUtil.endOfDay(endTime);
List<OrganizeProblemRankVo> fxsjlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime);
List<OrganizeProblemRankVo> jsdwlist = negativeMapper.selectOrganizeProblemRank(4, beginTime, endTime);
JSONObject res = new JSONObject()
.fluentPut("fxsjlist", fxsjlist)
.fluentPut("jsdwlist", jsdwlist);
return Result.success(res);
}
/** /**
* 机构问题排名 * 机构问题排名
* @return Result<JSONObject> * @return Result<JSONObject>

29
src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

@ -104,6 +104,9 @@ public class DatavServiceImpl implements DatavService {
@Resource @Resource
private MailMapper mailMapper; private MailMapper mailMapper;
@Resource
private DataPetition12337Mapper dataPetition12337Mapper;
@Resource @Resource
private SupExternalDepartMapper supExternalDepartMapper; private SupExternalDepartMapper supExternalDepartMapper;
@ -235,11 +238,13 @@ public class DatavServiceImpl implements DatavService {
long caseVerificationProCount = negativeResourceService.count(group17To20Param); long caseVerificationProCount = negativeResourceService.count(group17To20Param);
// 12337 // 12337
NegativeQueryParam xf12337Param = new NegativeQueryParam(); QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
xf12337Param.setCrtTime(dates); queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
xf12337Param.setInvolveDepartIds(allDepartIds); queryWrapper12337.and(wrapper -> wrapper
xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue())); .in("third_depart_id", allDepartIds)
long xf12337Count = negativeResourceService.count(xf12337Param); .or()
.in("second_depart_id", allDepartIds) );
long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 国家信访 // 国家信访
DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam(); DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam();
countryParam.setCreateTime(dates); countryParam.setCreateTime(dates);
@ -381,10 +386,16 @@ public class DatavServiceImpl implements DatavService {
long jzxxCount = mailMapper.selectCount(mailQueryWrapper); long jzxxCount = mailMapper.selectCount(mailQueryWrapper);
// 12337 // 12337
NegativeQueryParam xf12337Param = new NegativeQueryParam(); // NegativeQueryParam xf12337Param = new NegativeQueryParam();
xf12337Param.setCrtTime(dates); // xf12337Param.setCrtTime(dates);
xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue())); // xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue()));
long xf12337Count = negativeResourceService.count(xf12337Param); // long xf12337Count = negativeResourceService.count(xf12337Param);
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 国家信访 // 国家信访
DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam(); DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam();
countryParam.setCreateTime(dates); countryParam.setCreateTime(dates);

Loading…
Cancel
Save