Browse Source

fiex:优化

master
pengwei 1 month ago
parent
commit
4cbf708322
  1. 6
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java
  2. 10
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

6
src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java

@ -2,6 +2,7 @@ package com.biutag.supervision.controller.mobileSupervision;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelReader; import com.alibaba.excel.ExcelReader;
@ -173,7 +174,7 @@ public class TestingAlcoholController {
if (StrUtil.isNotBlank(distribute.getProblemVo().getFiles())) { if (StrUtil.isNotBlank(distribute.getProblemVo().getFiles())) {
vo.setFileData(JSON.parseArray(distribute.getProblemVo().getFiles(), FileVo.class)); vo.setFileData(JSON.parseArray(distribute.getProblemVo().getFiles(), FileVo.class));
} }
if(StrUtil.isNotBlank(distribute.getProblemVo().getPeoples())){ if( StrUtil.isNotBlank(distribute.getProblemVo().getPeoples())){
vo.setPeopleData(JSON.parseArray(distribute.getProblemVo().getPeoples(), People.class)); vo.setPeopleData(JSON.parseArray(distribute.getProblemVo().getPeoples(), People.class));
} }
break; break;
@ -181,6 +182,9 @@ public class TestingAlcoholController {
//违反六项规定 //违反六项规定
List<SupTaskProblem> list = supTaskProblemService.list(new LambdaQueryWrapper<SupTaskProblem>().eq(SupTaskProblem::getTaskId,distribute.getTaskId())); List<SupTaskProblem> list = supTaskProblemService.list(new LambdaQueryWrapper<SupTaskProblem>().eq(SupTaskProblem::getTaskId,distribute.getTaskId()));
//判断 //判断
if(ObjectUtil.isNotEmpty(distribute.getProblemVo())){
vo.setDepartId(distribute.getProblemVo().getDepartId());
}
if(CollectionUtil.isNotEmpty(list)){ if(CollectionUtil.isNotEmpty(list)){
list = list.stream().filter(s->StrUtil.isNotEmpty(s.getEmpNo())).toList(); list = list.stream().filter(s->StrUtil.isNotEmpty(s.getEmpNo())).toList();
if(CollectionUtil.isNotEmpty(list)){ if(CollectionUtil.isNotEmpty(list)){

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

@ -639,11 +639,12 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT sd.short_name AS label, " + @Select("SELECT sd.short_name AS label, " +
"count(*) as `value` " + "count(*) as `value` " +
" FROM negative ng " + " FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "INNER JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"AND sd.pid=#{departId} AND sd.statistics_group_id=10 " + "AND ng.second_involve_depart_id=#{departId} AND sd.statistics_group_id=10 " +
"WHERE checkStatus <> 3 " + "WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " + "AND problemSourcesCode=16 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"and ng.three_involve_depart_id is not null " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY `value` DESC ") "ORDER BY `value` DESC ")
List<OrganizeProblemRankVo> getSuboOneVideoSupervisePoliceProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId); List<OrganizeProblemRankVo> getSuboOneVideoSupervisePoliceProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId);
@ -651,11 +652,12 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT sd.short_name AS label, " + @Select("SELECT sd.short_name AS label, " +
"count(*) as `value` " + "count(*) as `value` " +
" FROM negative ng " + " FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "INNER JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"AND sd.pid=#{departId} AND sd.statistics_group_id!=10 " + "AND ng.second_involve_depart_id=#{departId} AND sd.statistics_group_id!=10 " +
"WHERE checkStatus <> 3 " + "WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " + "AND problemSourcesCode=16 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"and ng.three_involve_depart_id is not null " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY `value` DESC ") "ORDER BY `value` DESC ")
List<OrganizeProblemRankVo> getSuboOneVideoSuperviseTeamProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId); List<OrganizeProblemRankVo> getSuboOneVideoSuperviseTeamProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId);

Loading…
Cancel
Save