Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
b6468f2aca
  1. 24
      src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java
  2. 20
      src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java
  3. 2
      src/main/java/com/biutag/supervision/mapper/NegativeBlameMapper.java
  4. 81
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  5. 2
      src/main/java/com/biutag/supervision/mapper/NegativeProblemRelationMapper.java
  6. 4
      src/main/java/com/biutag/supervision/mapper/SupDepartMapper.java
  7. 1
      src/main/java/com/biutag/supervision/pojo/vo/RankVo.java
  8. 16
      src/main/java/com/biutag/supervision/service/DataGobalService.java
  9. 14
      src/main/java/com/biutag/supervision/service/DataMigrationServiceImpl.java
  10. 128
      src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java

24
src/main/java/com/biutag/supervision/controller/datav/DataGobalController.java

@ -36,12 +36,12 @@ public class DataGobalController {
private final DataGobalService dataGobalService;
/**
* 获取数据大屏总数概览
* 获取数据大屏概览
* @param beginTime
* @param endTime
* @return
*/
@Operation(summary = "初始化大屏中央数据")
@Operation(summary = "初始化大屏数据")
@GetMapping
public Result<JSONObject> getAllGobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
@ -77,22 +77,22 @@ public class DataGobalController {
List<CommonVo> policeProList = dataGobalService.getPoliceProTotal(beginTime, endTime);
List<CommonVo> reviewProList = dataGobalService.getReviewProTotal(beginTime, endTime);
List<GobalMapIconVo> gobalTempMapVoList = new ArrayList<>();
if (false) {
if (!gobalMapVoList.isEmpty()) {
updateProList(superviseProList, gobalMapVoList, GobalMapIconVo::setSupervisePro);
updateProList(caseVerifyProList, gobalMapVoList, GobalMapIconVo::setCaseVerifyPro);
updateProList(mailProList, gobalMapVoList, GobalMapIconVo::setMailPro);
updateProList(policeProList, gobalMapVoList, GobalMapIconVo::setPolicePro);
updateProList(reviewProList, gobalMapVoList, GobalMapIconVo::setReviewPro);
}else {
gobalTempMapVoList.add(new GobalMapIconVo("芙蓉分局", 1,11,11,11,11,11));
gobalTempMapVoList.add(new GobalMapIconVo("天心分局", 2,22,22,22,22,22));
gobalTempMapVoList.add(new GobalMapIconVo("岳麓分局", 3,33,33,33,33,33));
gobalTempMapVoList.add(new GobalMapIconVo("开福分局", 4,44,44,44,44,44));
gobalTempMapVoList.add(new GobalMapIconVo("雨花分局", 5,55,55,55,55,55));
gobalTempMapVoList.add(new GobalMapIconVo("长沙县局", 6,66,66,66,66,66));
gobalTempMapVoList.add(new GobalMapIconVo("望城分局", 7,77,77,77,77,77));
gobalTempMapVoList.add(new GobalMapIconVo("宁乡市局", 8,88,88,88,88,88));
gobalTempMapVoList.add(new GobalMapIconVo("浏阳市局", 9,99,99,99,99,99));
// gobalTempMapVoList.add(new GobalMapIconVo("芙蓉分局", 1,11,11,11,11,11));
// gobalTempMapVoList.add(new GobalMapIconVo("天心分局", 2,22,22,22,22,22));
// gobalTempMapVoList.add(new GobalMapIconVo("岳麓分局", 3,33,33,33,33,33));
// gobalTempMapVoList.add(new GobalMapIconVo("开福分局", 4,44,44,44,44,44));
// gobalTempMapVoList.add(new GobalMapIconVo("雨花分局", 5,55,55,55,55,55));
// gobalTempMapVoList.add(new GobalMapIconVo("长沙县局", 6,66,66,66,66,66));
// gobalTempMapVoList.add(new GobalMapIconVo("望城分局", 7,77,77,77,77,77));
// gobalTempMapVoList.add(new GobalMapIconVo("宁乡市局", 8,88,88,88,88,88));
// gobalTempMapVoList.add(new GobalMapIconVo("浏阳市局", 9,99,99,99,99,99));
}
JSONObject data = new JSONObject().fluentPut("overview", overview)

20
src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java

@ -30,16 +30,17 @@ import java.util.List;
@Tag(name = "现场督察相关")
public class SupervisionNotifyController {
private final DataSupervisionNotifyServiceImpl dataSupervisionNotifyService;
private final DataSupervisionNotifyServiceImpl dataSupervisionNotifyService;
/**
* 获取所有现场督察钟中央总数数量
*
* @return
*/
@Operation(summary = "获取所有督察通知相关数量")
@GetMapping
public Result<JSONObject> getAllSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
JSONObject overview = dataSupervisionNotifyService.getAllSupervisionNotifyCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
@ -48,20 +49,23 @@ public class SupervisionNotifyController {
/**
* 获取日常督察排行
* @param groupType 分组类型 1: 分县市局 2: 局属单位
*
* @param groupType 分组类型 1: 分县市局 2: 局属单位
* @return
*/
@Operation(summary = "获取日常督察排行")
@Operation(summary = "获取日常督察数量概览和整改率排名")
@GetMapping("/rank")
public Result<JSONObject> getChangedRank(@RequestParam Integer groupType,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
List<RankVo> changedRank = dataSupervisionNotifyService.getChangedRank(groupType, beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("changedRank", changedRank);
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
JSONObject rankOverview = dataSupervisionNotifyService.getDailySupervisionCount(groupType, beginTime, endTime);
List<RankVo> changedRankList = dataSupervisionNotifyService.getChangedRateRank(groupType, beginTime, endTime);
JSONObject data = new JSONObject()
.fluentPut("rankOverview", rankOverview)
.fluentPut("changedRankList", changedRankList);
return Result.success(data);
}
}

2
src/main/java/com/biutag/supervision/mapper/NegativeBlameMapper.java

@ -5,6 +5,7 @@ import com.biutag.supervision.pojo.entity.NegativeBlame;
import org.apache.ibatis.annotations.Select;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
public interface NegativeBlameMapper extends BaseMapper<NegativeBlame> {
@ -24,4 +25,5 @@ public interface NegativeBlameMapper extends BaseMapper<NegativeBlame> {
"where n.checkStatus in ('1', '2') and n.processing_status = 'completed' and pr.threeLevelCode is not null")
List<NegativeBlame> selectVerifyTrue();
}

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

@ -1,5 +1,6 @@
package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.vo.EchartsVo;
@ -13,8 +14,11 @@ import java.util.List;
public interface NegativeMapper extends BaseMapper<Negative> {
// region 首页大屏
/**
* 查询机构问题问题排名
*
* @param beginTime
* @param endTime
*/
@ -33,7 +37,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE " +
"discoveryTime BETWEEN #{beginTime} and #{endTime} and checkStatus=1 " +
"GROUP BY businessTypeName")
List<EchartsVo> selectBusinessRate(Date beginTime,Date endTime);
List<EchartsVo> selectBusinessRate(Date beginTime, Date endTime);
@Select("SELECT DATE_FORMAT(ng.discoveryTime, '%Y-%m') AS monthTime, COUNT(*) total FROM negative ng " +
@ -41,14 +45,79 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP BY monthTime " +
"order BY monthTime asc")
List<RecentTrendByMonthVo> selectRecentTrendByMonth(String year);
// endregion
// region 现场督察大屏
/**
* 获取现场督察和专项督察的通报问题数
*
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT count(*) FROM negative WHERE checkStatus = #{checkStatus} " +
"AND problemSourcesCode IN (13, 15) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Long selectSupervisionNotifyCount(Date beginTime, Date endTime, String checkStatus);
/**
* 获取现场督察和专项督察属实的已经整改的问题数
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT count(*) FROM negative WHERE checkStatus = #{checkStatus} " +
"AND problemSourcesCode IN (13, 15) " +
"AND isRectifyCode=#{isRectify}" +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Long selectChangSupervisionNotifyCount(Date beginTime, Date endTime, String checkStatus, String isRectify);
/**
* @Select("SELECT sd.short_name as label, sd.statistics_group_id, count(*) as value FROM sup_depart sd INNER JOIN " +
* "(SELECT ng.handle_second_depart_id, ng.handle_second_depart_name FROM negative ng WHERE " +
* " crtTime BETWEEN #{beginTime} and #{endTime} and checkStatus=1 ) temp " +
* " on sd.id=temp.handle_second_depart_id GROUP BY short_name HAVING statistics_group_id=#{groupType} " +
* " ORDER BY value desc")
* 获取现场督察和专项督察属实的涉及单位数
*
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT count(*) FROM " +
" ( SELECT DISTINCT involveDepartName FROM negative " +
" WHERE checkStatus=1 AND problemSourcesCode in (13, 15) AND discoveryTime " +
" BETWEEN '2024-01-01' AND '2024-11-17'" +
" )" +
"AS distinct_departments;")
Long selectRelationOrgCount(Date beginTime, Date endTime, String checkStatus);
@Select("SELECT COUNT(*) FROM negative n " +
"INNER JOIN ( " +
" SELECT DISTINCT sd.id " +
" FROM sup_depart sd " +
" INNER JOIN sup_depart sd1 ON sd.pid = sd1.id " +
" WHERE sd1.statistics_group_id = #{groupType}" +
") AS filtered_sd ON n.involveDepartId = filtered_sd.id " +
"WHERE n.checkStatus = 1 " +
"AND n.problemSourcesCode = 15;")
Long getCountByGroupType(Integer groupType, Date beginTime, Date endTime);
@Select("SELECT COUNT(*) FROM negative n " +
"INNER JOIN ( " +
" SELECT DISTINCT sd.id " +
" FROM sup_depart sd " +
" INNER JOIN sup_depart sd1 ON sd.pid = sd1.id " +
" WHERE sd1.statistics_group_id = #{groupType}" +
") AS filtered_sd ON n.involveDepartId = filtered_sd.id " +
"WHERE n.checkStatus = 1 " +
"AND n.problemSourcesCode = 15 " +
"AND n.isRectifyCode=#{isRectify} " +
"AND n.discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Long getChangCountByGroupType(Integer groupType, Date beginTime, Date endTime, Integer isRectify);
// endregion
}

2
src/main/java/com/biutag/supervision/mapper/NegativeProblemRelationMapper.java

@ -19,7 +19,7 @@ public interface NegativeProblemRelationMapper extends BaseMapper<NegativeProble
"GROUP BY `name` ")
List<EchartsVo> selectProblemRate(Date beginTime, Date endTime);
@Select("SELECT threeLevelContent as name, count(*) as `value` " +
@Select("SELECT threeLevelContent as label, count(*) as `value` " +
"FROM negative_problem_relation " +
"WHERE negativeId " +
"in ( SELECT id FROM negative WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime}) " +

4
src/main/java/com/biutag/supervision/mapper/SupDepartMapper.java

@ -30,4 +30,8 @@ public interface SupDepartMapper extends BaseMapper<SupDepart> {
+ "</foreach>"
+ "</script>")
List<Map<String, Object>> getIdsByCode(List<String> departIds);
@Select("select * from sup_depart where statistics_group_id = #{groupType} ")
List<SupDepart> selectDepartsByGroupType(Integer groupType);
}

1
src/main/java/com/biutag/supervision/pojo/vo/RankVo.java

@ -13,6 +13,7 @@ public class RankVo {
private String label; // 部门名称
private String departId; // 部门id
private Integer value; // 数量
private Double rate; // 整改率
private String numerator; // 分子 已整改
private String denominator; // 分母 问题数
}

16
src/main/java/com/biutag/supervision/service/DataGobalService.java

@ -40,16 +40,17 @@ public class DataGobalService {
* @return 返回所有大屏统计数据
*/
public JSONObject getAllGobalCount(Date beginTime, Date endTime) {
// 获取案件核查问题数量(查实版本)
Long caseVerificationPro = getCountByConditions(
Integer.parseInt(InspectCaseEnum.TRUE.getValue()),
beginTime, endTime,
17, 18, 19, 20);
// 督察问题数量(查实版本)
Long supervisionPro = getCountByConditions(
Integer.parseInt(InspectCaseEnum.TRUE.getValue()),
beginTime, endTime,
13, 15, 16);
// 获取案件核查问题数量(查实版本)
Long caseVerificationPro = getCountByConditions(
Integer.parseInt(InspectCaseEnum.TRUE.getValue()),
beginTime, endTime,
17, 18, 19, 20);
// 信访投诉问题数量(查实版本)
Long complaintPro = getCountByConditions(
Integer.parseInt(InspectCaseEnum.TRUE.getValue()),
@ -133,9 +134,10 @@ public class DataGobalService {
*/
public List<StrongProblemRank> getStrongProblemRank(Date beginTime, Date endTime) {
// 1.获取这段时间的negative id
//
List<StrongProblemRank> res= negativeProblemRelationMapper.selectStrongProblemRank(beginTime, endTime);
for (int i = 1; i <= res.size(); i++) {
res.get(i - 1).setSort(i);
}
return res;
}

14
src/main/java/com/biutag/supervision/service/DataMigrationServiceImpl.java

@ -65,7 +65,7 @@ public class DataMigrationServiceImpl extends ServiceImpl<DataMigrationMapper, D
}*/
// @Scheduled(cron = "*/10 * * * * ?")
@Async
// @Async
public void migrateData() {
LocalDateTime startTime = LocalDateTime.now(); // 开始迁移时间
@ -141,17 +141,7 @@ public class DataMigrationServiceImpl extends ServiceImpl<DataMigrationMapper, D
dataMigrationMapper.insert(dataMigration);
}
/**
* boolean migrationSuccessful = updateMigration(dataPoliceMeetingFromSqlServerList);
* if (migrationSuccessful) {
* LocalDateTime endTime = LocalDateTime.now(); // 结束迁移时间
* // 4、更新迁移记录
* updateMigrationRecord(startTime, endTime, dataPoliceMeetingFromSqlServerList);
* System.out.println("数据迁移成功");
* } else {
* System.out.println("数据迁移失败");
* }
*/
}

128
src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java

@ -4,15 +4,18 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.constants.enums.DepartGroupEnum;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.constants.enums.RepeatEnum;
import com.biutag.supervision.mapper.DataSupervisionNotifyMapper;
import com.biutag.supervision.mapper.NegativeBlameMapper;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.dto.CaseVerifDepart;
import com.biutag.supervision.pojo.entity.DataSupervisionNotify;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.vo.RankVo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@ -37,33 +40,29 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio
private final NegativeBlameService blameService;
private final SupDepartMapper supDepartMapper;
/**
* 获取所有现场督察的数量
* 现场督察代码 13
* 获取所有 现场督察+专项督察 的数量
* 现场督察代码 13 专项督察代码: 15
*
* @param beginTime
* @param endTime
* @return
*/
public JSONObject getAllSupervisionNotifyCount(Date beginTime, Date endTime) {
QueryWrapper<Negative> negativeQueryWrapper = new QueryWrapper<>();
negativeQueryWrapper.between("crtTime", beginTime, endTime);
negativeQueryWrapper.eq("problemSourcesCode", ProblemSourcesEnum.XCDC.getValue());
Long supervisionNotifyTotal = negativeMapper.selectCount(negativeQueryWrapper); // 通报问题数
/* QueryWrapper<Negative> changingQueryWrapper = new QueryWrapper<>();
changingQueryWrapper.between("crtTime", beginTime, endTime);
changingQueryWrapper.eq("problemSourcesCode", ProblemSourcesEnum.XCDC.getValue());
changingQueryWrapper.eq("isRectifyCode", 1);
Long supervisionNotifyChangingTotal = negativeMapper.selectCount(changingQueryWrapper); */ // 整改中问题数
QueryWrapper<Negative> changedQueryWrapper = new QueryWrapper<>();
changedQueryWrapper.between("crtTime", beginTime, endTime);
changedQueryWrapper.eq("problemSourcesCode", ProblemSourcesEnum.XCDC.getValue());
changedQueryWrapper.eq("isRectifyCode", 1);
Long supervisionNotifyChangedTotal = negativeMapper.selectCount(changedQueryWrapper); // 已整改问题数
QueryWrapper<Negative> orgQueryWrapper = new QueryWrapper<>();
orgQueryWrapper.between("crtTime", beginTime, endTime);
orgQueryWrapper.eq("problemSourcesCode", ProblemSourcesEnum.XCDC.getValue());
orgQueryWrapper.select("distinct involveDepartId");
Long supervisionNotifyOrgTotal = negativeMapper.selectCount(orgQueryWrapper); // 涉及单位数
// 通报问题数
Long supervisionNotifyTotal = negativeMapper.selectSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue());
// 整改中
Long supervisionNotifyChangingTotal = negativeMapper.selectChangSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue(), "0");
// 已整改
Long supervisionNotifyChangedTotal = negativeMapper.selectChangSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue(), "1");
// 涉及单位数
Long supervisionNotifyOrgTotal = negativeMapper.selectRelationOrgCount(beginTime, endTime, "1");
/**
* 涉及人数
* 1查出在 negative中的id集合
@ -71,7 +70,8 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio
*/
QueryWrapper<Negative> preQueryWrapper = new QueryWrapper<>();
preQueryWrapper.eq("problemSourcesCode", ProblemSourcesEnum.XCDC.getValue());
ArrayList<Negative> negatives = (ArrayList<Negative>) negativeMapper.selectList(preQueryWrapper);
List<Negative> negatives = negativeMapper.selectList(preQueryWrapper);
Long supervisionNotifyPreTotal = 0L;
for (Negative negative : negatives) {
String id = negative.getId();
@ -79,68 +79,60 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio
totalWrapper.eq("negativeId", id);
supervisionNotifyPreTotal += negativeBlameMapper.selectCount(totalWrapper);
}
double correctionRate = supervisionNotifyTotal != 0 ? (supervisionNotifyChangedTotal * 1.0 / supervisionNotifyTotal) * 100 : 0; // 整改率
// 整改率
double correctionRate = supervisionNotifyTotal != 0 ? (supervisionNotifyChangedTotal * 1.0 / supervisionNotifyTotal) * 100 : 0;
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("supervisionNotifyTotal", supervisionNotifyTotal)
.fluentPut("supervisionNotifyOrgTotal", supervisionNotifyOrgTotal)
.fluentPut("supervisionNotifyPreTotal", supervisionNotifyPreTotal)
// .fluentPut("supervisionNotifyChangingTotal", supervisionNotifyChangingTotal)
.fluentPut("supervisionNotifyChangingTotal", supervisionNotifyChangingTotal)
.fluentPut("supervisionNotifyChangedTotal", supervisionNotifyChangedTotal)
.fluentPut("correctionRate", correctionRate);
return jsonObject;
}
public List<RankVo> getChangedRank(Integer groupType, Date beginTime, Date endTime) {
// List<RankVo> changedList = negativeMapper.rank(groupType, beginTime, endTime);
// 计算整改率
// return changedList;
return null;
}
/**
* 获取日常督察数量概览
*
* @param groupType
* @param beginTime
* @param endTime
* @return
*/
public JSONObject getDailySupervisionCount(Integer groupType, Date beginTime, Date endTime) {
private JSONObject getJsonObject(Date beginTime, Date endTime) {
// 通报问题数
QueryWrapper<DataSupervisionNotify> queryWrapper = new QueryWrapper<>();
queryWrapper.between("dis_date", beginTime, endTime);
queryWrapper.select("distinct tb_name");
Long supervisionNotifyTotal = dataSupervisionNotifyMapper.selectCount(queryWrapper);
// 涉及单位数
QueryWrapper<DataSupervisionNotify> orgQueryWrapper = new QueryWrapper<>();
orgQueryWrapper.between("dis_date", beginTime, endTime);
orgQueryWrapper.select("distinct th_org_name");
Long supervisionNotifyOrgTotal = dataSupervisionNotifyMapper.selectCount(orgQueryWrapper);
// 涉及人数
QueryWrapper<DataSupervisionNotify> preQueryWrapper = new QueryWrapper<>();
preQueryWrapper.between("dis_date", beginTime, endTime);
preQueryWrapper.select("distinct pro_person_name");
Long supervisionNotifyPreTotal = dataSupervisionNotifyMapper.selectCount(preQueryWrapper);
// 整改中
QueryWrapper<DataSupervisionNotify> changingQueryWrapper = new QueryWrapper<>();
changingQueryWrapper.between("dis_date", beginTime, endTime);
changingQueryWrapper.isNull("rep_content");
Long supervisionNotifyChangingTotal = dataSupervisionNotifyMapper.selectCount(changingQueryWrapper);
// 已整改
QueryWrapper<DataSupervisionNotify> changedQueryWrapper = new QueryWrapper<>();
changedQueryWrapper.between("dis_date", beginTime, endTime);
changedQueryWrapper.isNotNull("rep_content");
Long supervisionNotifyChangedTotal = dataSupervisionNotifyMapper.selectCount(changedQueryWrapper);
Long proTotal = negativeMapper.getCountByGroupType(groupType, beginTime, endTime);
Long changing = negativeMapper.getChangCountByGroupType(groupType, beginTime, endTime, 0);
Long changed = negativeMapper.getChangCountByGroupType(groupType, beginTime, endTime, 1);
// 整改率
long count = this.count(); // 库里面总数
double correctionRate = count != 0 ? (supervisionNotifyChangedTotal * 1.0 / count) * 100 : 0;
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("supervisionNotifyTotal", supervisionNotifyTotal)
.fluentPut("supervisionNotifyOrgTotal", supervisionNotifyOrgTotal)
.fluentPut("supervisionNotifyPreTotal", supervisionNotifyPreTotal)
.fluentPut("supervisionNotifyChangingTotal", supervisionNotifyChangingTotal)
.fluentPut("supervisionNotifyChangedTotal", supervisionNotifyChangedTotal)
double correctionRate = proTotal != 0 ? (changed * 1.0 / proTotal) * 100 : 0;
JSONObject res = new JSONObject()
.fluentPut("proTotal", proTotal)
.fluentPut("changing", changing)
.fluentPut("changed", changed)
.fluentPut("correctionRate", correctionRate);
return jsonObject;
return res;
}
/**
* 获取日常督察整改率排名
*
* @param groupType
* @param beginTime
* @param endTime
* @return
*/
public List<RankVo> getChangedRateRank(Integer groupType, Date beginTime, Date endTime) {
List<RankVo> rankVos = new ArrayList<>();
List<SupDepart> departs = supDepartMapper.selectDepartsByGroupType(groupType);
// negativeMapper.select
return null;
}
}

Loading…
Cancel
Save