Browse Source

fix--修改首页二级大屏

master
buaixuexideshitongxue 1 month ago
parent
commit
a59dc4b11e
  1. 110
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java
  2. 42
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  3. 77
      src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java
  4. 7
      src/main/resources/mapper/SupTaskProblemMapper.xml

110
src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java

@ -1,17 +1,17 @@
package com.biutag.supervision.controller.subdatav; package com.biutag.supervision.controller.subdatav;
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.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum; import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.mapper.MailMapper;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.mapper.SupExternalDepartMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.mailbox.Mail;
import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest; import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.GlobalMapIconVo;
import com.biutag.supervision.pojo.vo.MailOverviewVo;
import com.biutag.supervision.pojo.vo.StrongProblemRank;
import com.biutag.supervision.service.CountyStreetDeptService; import com.biutag.supervision.service.CountyStreetDeptService;
import com.biutag.supervision.service.DataMailService; import com.biutag.supervision.service.DataMailService;
import com.biutag.supervision.service.NegativeService; import com.biutag.supervision.service.NegativeService;
@ -39,15 +39,11 @@ import java.util.List;
@Slf4j @Slf4j
public class SubOneGlobalController { public class SubOneGlobalController {
private final String VALID_SIGN = "terminated"; // 有效标识
private final String EX_SOURCE = "局长信箱"; // 映射来源
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final CountyStreetDeptService countyStreetDeptService; private final CountyStreetDeptService countyStreetDeptService;
private final DataMailService dataMailService; private final DataMailService dataMailService;
private final NegativeService negativeService; private final NegativeService negativeService;
private final MailMapper mailMapper;
private final SupExternalDepartMapper externalDepartMapper;
@Resource @Resource
@ -63,14 +59,12 @@ public class SubOneGlobalController {
*/ */
@Operation(summary = "获取二级大屏地图JSON") @Operation(summary = "获取二级大屏地图JSON")
@GetMapping("/getSubOneStreetMap") @GetMapping("/getSubOneStreetMap")
// @Cacheable(cacheNames = "subOneStreetMap", key = "'p_'+ #departId")
public Result<JSONObject> getSubOneStreetMap(@RequestParam Integer departId) { public Result<JSONObject> getSubOneStreetMap(@RequestParam Integer departId) {
JSONObject res = countyStreetDeptService.getSubOneStreetMap(departId); JSONObject res = countyStreetDeptService.getSubOneStreetMap(departId);
return Result.success(res); return Result.success(res);
} }
//region 左边
@Operation(summary = "机构问题排名") @Operation(summary = "机构问题排名")
@PostMapping("/getSubOneOrganizationRank") @PostMapping("/getSubOneOrganizationRank")
public Result<JSONObject> getSubOneOrganizationRank(@RequestBody SubDataVRequest request) { public Result<JSONObject> getSubOneOrganizationRank(@RequestBody SubDataVRequest request) {
@ -79,66 +73,17 @@ public class SubOneGlobalController {
/**
* 业务类型占比
*
* @param departId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "业务类型占比") @Operation(summary = "业务类型占比")
@GetMapping("/getSubOneBusinessRate") @GetMapping("/getSubOneBusinessRate")
public Result<JSONObject> getSubOneBusinessRate(@RequestParam Integer departId, public Result<JSONObject> getSubOneBusinessRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 业务类型占比 endTime = DateUtil.endOfDay(endTime);
List<EchartsVo> ywzblist = negativeMapper.selectSubOneBusinessRate(departId, beginTime, endTime); List<EchartsVo> ywzblist = negativeMapper.selectSubOneBusinessRate(departId, beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("ywzblist", ywzblist); JSONObject res = new JSONObject().fluentPut("ywzblist", ywzblist);
return Result.success(res); return Result.success(res);
} }
//endregion
//region 中间
/**
* 获取首页大屏中央数据
*
* @param departId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "大屏中央数据")
@GetMapping("/getSubOneAllCount")
public Result<JSONObject> getSubOneAllCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 获取数据大屏中央总数概览
GlobalOverViewVo overview = negativeMapper.getSuoOneAllGlobalCount(departId, beginTime, endTime);
MailOverviewVo vo = dataMailService.mailCount(departId,beginTime, endTime);
QueryWrapper<Mail> subOneMailQueryWrapper = new QueryWrapper<>();
String exDepartId = externalDepartMapper.getExIdByInId(departId.toString(), "局长信箱");
subOneMailQueryWrapper.ne("mail_state", VALID_SIGN);
subOneMailQueryWrapper.eq("second_dept_id", exDepartId);
subOneMailQueryWrapper.between("mail_time", beginTime, endTime);
Long mailboxNumber = mailMapper.selectCount(subOneMailQueryWrapper);
// todo 局长信箱
// long mailboxNumber = negativeService.count(new LambdaQueryWrapper<Negative>()
// .between(Negative::getCrtTime, beginTime, endTime)
// .eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue())
// .eq(Negative::getSecondInvolveDepartId,departId)
// );
overview.setMailboxNumber(mailboxNumber);
overview.setComplaintPro(vo.getCountryMail() + vo.getPoliceMail() + vo.getNumberMail());
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
}
@Operation(summary = "大屏中央数据") @Operation(summary = "大屏中央数据")
@PostMapping("/getSubOneAllCount") @PostMapping("/getSubOneAllCount")
@ -146,17 +91,9 @@ public class SubOneGlobalController {
return subDatavService.getSubOneAllCount(request); return subDatavService.getSubOneAllCount(request);
} }
/**
* 地图数据
*
* @param departId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "首页大屏地图数据") @Operation(summary = "首页大屏地图数据")
@GetMapping("/getSubOneGlobalMap") @GetMapping("/getSubOneGlobalMap")
// @Cacheable(cacheNames = "Supervision:Screen:SubOneGlobalMap", key = "#departId+'_'+#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getSubOneMap(@RequestParam Integer departId, public Result<JSONObject> getSubOneMap(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
@ -179,38 +116,22 @@ public class SubOneGlobalController {
} }
/**
* 数据大屏问题趋势统计
*
* @param departId 2级单位的id
* @param year 年份
* @return Result<JSONObject>
*/
@Operation(summary = "数据大屏问题趋势统计") @Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getSubOneGlobalTrend") @GetMapping("/getSubOneGlobalTrend")
public Result<JSONObject> getSubOneGlobalTrend(@RequestParam Integer departId, @RequestParam Integer year) { public Result<JSONObject> getSubOneGlobalTrend(@RequestParam Integer departId, @RequestParam Integer year) {
List<EchartsVo> GlobalRecentlyTrendList = negativeMapper.getSubOneTrend(departId.toString(), year.toString(), "2", "13", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "27", "28", "29", "30"); List<EchartsVo> GlobalRecentlyTrendList = negativeMapper.getSubOneTrend(departId.toString(), year.toString());
JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList); JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList);
return Result.success(jsonObject); return Result.success(jsonObject);
} }
//endregion
//region 右边
/**
* 突出问题排名
*
* @param departId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "突出问题排名") @Operation(summary = "突出问题排名")
@GetMapping("/getSubOneStrongProblemRate") @GetMapping("/getSubOneStrongProblemRate")
public Result<JSONObject> getSubOneStrongProblemRate(@RequestParam Integer departId, public Result<JSONObject> getSubOneStrongProblemRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime = DateUtil.endOfDay(endTime);
// 突出问题排名 // 突出问题排名
List<StrongProblemRank> tcwtlist = negativeMapper.selectSubOneStrongProblemRank(departId, beginTime, endTime); List<StrongProblemRank> tcwtlist = negativeMapper.selectSubOneStrongProblemRank(departId, beginTime, endTime);
for (int i = 1; i <= tcwtlist.size(); i++) { for (int i = 1; i <= tcwtlist.size(); i++) {
@ -221,25 +142,18 @@ public class SubOneGlobalController {
} }
/**
* 问题类型占比
*
* @param departId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "问题类型占比") @Operation(summary = "问题类型占比")
@GetMapping("/getSubOneProblemBusinessRate") @GetMapping("/getSubOneProblemBusinessRate")
public Result<JSONObject> getSubOneProblemBusinessRate(@RequestParam Integer departId, public Result<JSONObject> getSubOneProblemBusinessRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 问题类型占比 // 问题类型占比
endTime = DateUtil.endOfDay(endTime);
List<EchartsVo> wtlxlist = negativeMapper.selectSubOneProblemRate(departId, beginTime, endTime); List<EchartsVo> wtlxlist = negativeMapper.selectSubOneProblemRate(departId, beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist); JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist);
return Result.success(res); return Result.success(res);
} }
//endregion
} }

42
src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

@ -47,16 +47,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE crtTime BETWEEN #{beginTime} and #{endTime} " + "WHERE crtTime BETWEEN #{beginTime} and #{endTime} " +
"GROUP BY businessTypeName") "GROUP BY businessTypeName")
List<EchartsVo> selectBusinessRate(Date beginTime, Date endTime); List<EchartsVo> selectBusinessRate(Date beginTime, Date endTime);
@Select("SELECT " +
"COALESCE(SUM(IF(problemSourcesCode IN (13), 1, 0)), 0) AS supervisionPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (14,15,16), 1, 0)), 0) AS numSupervisionPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (17,18,19,20), 1, 0)), 0) AS caseVerificationPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (27,28,29,30), 1, 0)), 0) AS auditPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro " +
"FROM negative ng WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.handle_second_depart_id=#{departId} ")
// "COALESCE(SUM(IF(problemSourcesCode IN (27, 28, 29, 30), 1, 0)), 0) AS auditPro " +
GlobalOverViewVo getSuoOneAllGlobalCount(Integer departId, Date beginTime, Date endTime);
@ -91,7 +81,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"count(*) `value` " + "count(*) `value` " +
"FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " + "FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " +
"WHERE npr.threeLevelContent is not NULL " + "WHERE npr.threeLevelContent is not NULL " +
"AND checkStatus IN (1, 2) " + "AND ng.check_status_code IN (1, 2, 3) " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent " + "GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc " + "ORDER BY `value` desc " +
@ -244,7 +234,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getMailTrend(Integer year, Integer type); List<EchartsVo> getMailTrend(Integer year, Integer type);
List<EchartsVo> getSubOneTrend(String departId, String year, String... args); List<EchartsVo> getSubOneTrend(String departId, String year);
@ -252,10 +242,12 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT " + @Select("SELECT " +
"businessTypeName as name, " + "businessTypeName as name, " +
"count(*) value " + "count(*) value " +
"FROM negative " + "FROM negative ng " +
"WHERE checkStatus in (1, 2) " + "LEFT JOIN sup_depart sd on ng.involveDepartId = sd.id " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "LEFT JOIN sup_depart sdd on sd.pid = sdd.id " +
"AND negative.second_involve_depart_id=#{departId} " + "LEFT JOIN sup_depart sddd on sdd.pid = sddd.id " +
"WHERE crtTime >= #{beginTime} AND crtTime < #{endTime} " +
"AND (sd.id = #{departId} or sdd.id= #{departId} or sddd.id = #{departId} ) " +
"GROUP BY businessTypeName") "GROUP BY businessTypeName")
List<EchartsVo> selectSubOneBusinessRate(Integer departId, Date beginTime, Date endTime); List<EchartsVo> selectSubOneBusinessRate(Integer departId, Date beginTime, Date endTime);
@ -285,10 +277,13 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"npr.threeLevelContent as label, " + "npr.threeLevelContent as label, " +
"count(*) `value` " + "count(*) `value` " +
"FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " + "FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " +
"WHERE npr.threeLevelContent is not NULL " + "LEFT JOIN sup_depart sd on ng.involveDepartId = sd.id " +
"AND checkStatus IN (1, 2) " + "LEFT JOIN sup_depart sdd on sd.pid = sdd.id " +
"LEFT JOIN sup_depart sddd on sdd.pid = sddd.id " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime}" + "AND crtTime BETWEEN #{beginTime} AND #{endTime}" +
"AND ng.second_involve_depart_id=#{departId} " + "WHERE npr.threeLevelContent is not NULL " +
"AND ng.check_status_code IN (1, 2, 3) " +
"AND (sd.id = #{departId} or sdd.id= #{departId} or sddd.id = #{departId} ) " +
"GROUP BY npr.threeLevelContent " + "GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc " + "ORDER BY `value` desc " +
" LIMIT 10 OFFSET 1") " LIMIT 10 OFFSET 1")
@ -299,10 +294,13 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"count(*) `value` " + "count(*) `value` " +
"FROM negative_problem_relation npr " + "FROM negative_problem_relation npr " +
"LEFT JOIN negative ng ON ng.id=npr.negativeId " + "LEFT JOIN negative ng ON ng.id=npr.negativeId " +
"WHERE checkStatus in (1,2) " + "LEFT JOIN sup_depart sd on ng.involveDepartId = sd.id " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "LEFT JOIN sup_depart sdd on sd.pid = sdd.id " +
"LEFT JOIN sup_depart sddd on sdd.pid = sddd.id " +
"WHERE ng.check_status_code IN (1, 2, 3) " +
"AND crtTime >= #{beginTime} < #{endTime} " +
"AND npr.oneLevelContent is not NULL " + "AND npr.oneLevelContent is not NULL " +
"AND ng.second_involve_depart_id=#{departId} " + "AND (sd.id = #{departId} or sdd.id= #{departId} or sddd.id = #{departId} ) " +
"GROUP BY npr.oneLevelContent " + "GROUP BY npr.oneLevelContent " +
"ORDER BY `value` desc") "ORDER BY `value` desc")
List<EchartsVo> selectSubOneProblemRate(Integer departId, Date beginTime, Date endTime); List<EchartsVo> selectSubOneProblemRate(Integer departId, Date beginTime, Date endTime);

77
src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java

@ -94,7 +94,6 @@ public class SubDatavServiceImpl implements SubDatavService {
@Resource @Resource
private AccountabilityCountUtil accountabilityCountUtil; private AccountabilityCountUtil accountabilityCountUtil;
private static final BigDecimal WAN = new BigDecimal("10000");
private final String VALID_SIGN = "terminated"; private final String VALID_SIGN = "terminated";
private final String EX_SOURCE = "局长信箱"; private final String EX_SOURCE = "局长信箱";
@ -104,22 +103,56 @@ public class SubDatavServiceImpl implements SubDatavService {
// 问题排名 // 问题排名
@Override @Override
public Result<JSONObject> getSubOneOrganizationRank(SubDataVRequest request) { public Result<JSONObject> getSubOneOrganizationRank(SubDataVRequest request) {
SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam(); List<OrganizeProblemRankVo> fxsjlist = new ArrayList<>();
supDepartQueryParam.setPid(request.getDepartId()); List<OrganizeProblemRankVo> jsdwlist = new ArrayList<>();
List<SupDepart> query = supDepartResourceService.query(supDepartQueryParam); SupDepartQueryParam supDepartGroupParam = new SupDepartQueryParam();
supDepartGroupParam.setLevel("3");
supDepartGroupParam.setPid(request.getDepartId());
List<SupDepart> supDepartList = supDepartResourceService.query(supDepartGroupParam);
// 派出所
List<SupDepart> pcsList = supDepartList.stream()
.filter(one -> StrUtil.isNotBlank(one.getStatisticsGroupId()))
.filter(one -> DepartGroupEnum.PCS.getId().equals(Integer.valueOf(one.getStatisticsGroupId())))
.toList();
// 大队
List<SupDepart> dwList = supDepartList.stream()
.filter(one -> {
String groupId = one.getStatisticsGroupId();
return !StrUtil.isNotBlank(groupId)
|| !DepartGroupEnum.PCS.getId().equals(Integer.valueOf(groupId));
})
.toList();
Set<String> pcsSet = query.stream().filter(one -> "10".equals(one.getStatisticsGroupId())).map(SupDepart::getId).collect(Collectors.toSet()); for (SupDepart pcs : pcsList) {
Set<String> ddSet = query.stream().filter(one -> !"10".equals(one.getStatisticsGroupId())).map(SupDepart::getId).collect(Collectors.toSet()); List<Negative> negatives = negativeMapper.getNegativeListData(pcs.getId(), request.getBeginTime(), request.getEndTime(), ALL);
List<Date> dates = Arrays.asList(request.getBeginTime(), request.getEndTime()); if (negatives.isEmpty()) {
NegativeOrganizationRankQueryParam pcsParam = new NegativeOrganizationRankQueryParam(); continue;
pcsParam.setCrtTime(dates); }
pcsParam.setInvolveDepartIds(pcsSet); OrganizeProblemRankVo organizeProblemRankVo = new OrganizeProblemRankVo();
List<OrganizeProblemRankVo> fxsjlist = negativeResourceService.getOrganizationRank(pcsParam); organizeProblemRankVo.setLabel(pcs.getShortName());
NegativeOrganizationRankQueryParam ddParam = new NegativeOrganizationRankQueryParam(); organizeProblemRankVo.setValue(String.valueOf(negatives.size()));
ddParam.setCrtTime(dates); fxsjlist.add(organizeProblemRankVo);
ddParam.setInvolveDepartIds(ddSet); }
List<OrganizeProblemRankVo> jsdwlist = negativeResourceService.getOrganizationRank(ddParam); for (SupDepart dw : dwList) {
List<Negative> negatives = negativeMapper.getNegativeListData(dw.getId(), request.getBeginTime(), request.getEndTime(), ALL);
if (negatives.isEmpty()) {
continue;
}
OrganizeProblemRankVo organizeProblemRankVo = new OrganizeProblemRankVo();
organizeProblemRankVo.setLabel(dw.getShortName());
organizeProblemRankVo.setValue(String.valueOf(negatives.size()));
jsdwlist.add(organizeProblemRankVo);
}
// 排序
fxsjlist.sort(
Comparator.comparingLong((OrganizeProblemRankVo vo) -> Long.parseLong(vo.getValue()))
.reversed()
);
jsdwlist.sort(
Comparator.comparingLong((OrganizeProblemRankVo vo) -> Long.parseLong(vo.getValue()))
.reversed()
);
JSONObject res = new JSONObject() JSONObject res = new JSONObject()
.fluentPut("fxsjlist", fxsjlist) .fluentPut("fxsjlist", fxsjlist)
.fluentPut("jsdwlist", jsdwlist); .fluentPut("jsdwlist", jsdwlist);
@ -155,11 +188,15 @@ public class SubDatavServiceImpl implements SubDatavService {
szdcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_14_15_16); szdcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_14_15_16);
long szdcCount = negativeResourceService.count(szdcQueryParam); long szdcCount = negativeResourceService.count(szdcQueryParam);
// 案件核查 // 案件核查
NegativeQueryParam ajhcQueryParam = new NegativeQueryParam(); List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue(), STXF.getValue());
ajhcQueryParam.setCrtTime(dates); LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
ajhcQueryParam.setInvolveDepartIds(allDepartIds); dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime());
ajhcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_17_18_19_20); List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.getListData(request.getDepartId(), request.getBeginTime(), request.getEndTime());
long ajhcCount = negativeResourceService.count(ajhcQueryParam); List<Negative> negatives = negativeMapper.getNegativeListData(request.getDepartId(), request.getBeginTime(), request.getEndTime(), proCode);
// 交办案件数
List<Negative> jbNegatvieList = negatives.stream().filter(one -> proCode.contains(one.getProblemSourcesCode())).toList();
long ajhcCount = dataCaseVerifs.size() + jbNegatvieList.size();
// 局长信箱 // 局长信箱
SupExternalDepartQueryParam supExternalDepartQueryParam = new SupExternalDepartQueryParam(); SupExternalDepartQueryParam supExternalDepartQueryParam = new SupExternalDepartQueryParam();

7
src/main/resources/mapper/SupTaskProblemMapper.xml

@ -45,10 +45,11 @@
COUNT( ng.id ) AS `value` COUNT( ng.id ) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
LEFT JOIN negative ng ON DATE_FORMAT(ng.crtTime,'%m') = m.`month` LEFT JOIN negative ng ON DATE_FORMAT(ng.crtTime,'%m') = m.`month`
LEFT JOIN sup_depart sd on ng.involveDepartId = sd.id
LEFT JOIN sup_depart sdd on sd.pid = sdd.id
LEFT JOIN sup_depart sddd on sdd.pid = sddd.id
WHERE (sd.id = #{departId} or sdd.id= #{departId} or sddd.id = #{departId} )
AND YEAR(ng.crtTime) = #{year} AND YEAR(ng.crtTime) = #{year}
AND ng.problemSourcesCode IN
<foreach item="item" index="index" collection="args" open="(" separator="," close=")">#{item}</foreach>
AND ng.handle_second_depart_id=#{departId}
GROUP BY m.month_name GROUP BY m.month_name
ORDER BY m.`month` ASC; ORDER BY m.`month` ASC;
</select> </select>

Loading…
Cancel
Save