Browse Source

20250512

main
wxc 9 months ago
parent
commit
2293aa8e7d
  1. 1978
      demo.json
  2. 33
      src/main/java/com/biutag/supervision/config/CorsConfig.java
  3. 5
      src/main/java/com/biutag/supervision/config/InterceptorConfig.java
  4. 5
      src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java
  5. 3
      src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java
  6. 73
      src/main/java/com/biutag/supervision/controller/AppController.java
  7. 37
      src/main/java/com/biutag/supervision/controller/FileController.java
  8. 14
      src/main/java/com/biutag/supervision/controller/LoginController.java
  9. 41
      src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java
  10. 20
      src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java
  11. 4
      src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java
  12. 156
      src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java
  13. 57
      src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java
  14. 10
      src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java
  15. 51
      src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java
  16. 54
      src/main/java/com/biutag/supervision/controller/mobileSupervision/PhotoController.java
  17. 47
      src/main/java/com/biutag/supervision/controller/mobileSupervision/SelfexaminationController.java
  18. 43
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskController.java
  19. 40
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java
  20. 44
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java
  21. 2
      src/main/java/com/biutag/supervision/controller/rightsComfort/RightPersonController.java
  22. 4
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java
  23. 2
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java
  24. 2
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java
  25. 4
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java
  26. 1
      src/main/java/com/biutag/supervision/controller/system/PoliceController.java
  27. 21
      src/main/java/com/biutag/supervision/controller/system/UserController.java
  28. 1
      src/main/java/com/biutag/supervision/controller/system/VideoConfigController.java
  29. 3
      src/main/java/com/biutag/supervision/controller/work/NegativeController.java
  30. 2
      src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java
  31. 1
      src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java
  32. 11
      src/main/java/com/biutag/supervision/job/DepartJob.java
  33. 49
      src/main/java/com/biutag/supervision/job/Job.java
  34. 23
      src/main/java/com/biutag/supervision/job/ScoreJob.java
  35. 2
      src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java
  36. 51
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  37. 374
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  38. 35
      src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java
  39. 1
      src/main/java/com/biutag/supervision/mapper/StatisticsGroupMapper.java
  40. 8
      src/main/java/com/biutag/supervision/mapper/SupPhotoMapper.java
  41. 10
      src/main/java/com/biutag/supervision/mapper/SupTaskMapper.java
  42. 8
      src/main/java/com/biutag/supervision/mapper/SupTaskProblemMapper.java
  43. 8
      src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationContentMapper.java
  44. 16
      src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationMapper.java
  45. 8
      src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java
  46. 21
      src/main/java/com/biutag/supervision/pojo/domain/AppUser.java
  47. 6
      src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java
  48. 17
      src/main/java/com/biutag/supervision/pojo/dto/FileBase64Dto.java
  49. 3
      src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java
  50. 2
      src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java
  51. 16
      src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionProblemQueryParam.java
  52. 43
      src/main/java/com/biutag/supervision/pojo/dto/TaskProblemDto.java
  53. 39
      src/main/java/com/biutag/supervision/pojo/dto/TaskSelfexaminationDto.java
  54. 44
      src/main/java/com/biutag/supervision/pojo/dto/TaskTestingAlcoholPeopleDto.java
  55. 16
      src/main/java/com/biutag/supervision/pojo/dto/UserPasswordDto.java
  56. 4
      src/main/java/com/biutag/supervision/pojo/dto/common/BarItem.java
  57. 3
      src/main/java/com/biutag/supervision/pojo/entity/DataPetition12337.java
  58. 38
      src/main/java/com/biutag/supervision/pojo/entity/SupPhoto.java
  59. 2
      src/main/java/com/biutag/supervision/pojo/entity/SupTask.java
  60. 5
      src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java
  61. 61
      src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java
  62. 32
      src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexamination.java
  63. 38
      src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexaminationContent.java
  64. 16
      src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java
  65. 30
      src/main/java/com/biutag/supervision/pojo/model/DataRightsComfortModel.java
  66. 5
      src/main/java/com/biutag/supervision/pojo/model/UserAuth.java
  67. 1
      src/main/java/com/biutag/supervision/pojo/param/DataPetitionComplaintQueryParam.java
  68. 7
      src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java
  69. 2
      src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java
  70. 13
      src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java
  71. 18
      src/main/java/com/biutag/supervision/pojo/param/TaskQueryParam.java
  72. 26
      src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholPeopleQueryParam.java
  73. 19
      src/main/java/com/biutag/supervision/pojo/vo/AuditOverview.java
  74. 2
      src/main/java/com/biutag/supervision/pojo/vo/ComfortCountVO.java
  75. 6
      src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java
  76. 1
      src/main/java/com/biutag/supervision/pojo/vo/FileVo.java
  77. 2
      src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java
  78. 1
      src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java
  79. 21
      src/main/java/com/biutag/supervision/pojo/vo/PhotoGroupVo.java
  80. 6
      src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java
  81. 16
      src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java
  82. 22
      src/main/java/com/biutag/supervision/pojo/vo/TaskCountVo.java
  83. 47
      src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionProblemVo.java
  84. 6
      src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java
  85. 51
      src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationDetailVo.java
  86. 42
      src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationVo.java
  87. 60
      src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholPeopleVo.java
  88. 56
      src/main/java/com/biutag/supervision/pojo/vo/TaskVo.java
  89. 6
      src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseCountVo.java
  90. 6
      src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseMapIconVo.java
  91. 31
      src/main/java/com/biutag/supervision/service/BusinessDepartService.java
  92. 2
      src/main/java/com/biutag/supervision/service/DataCaseVerifService.java
  93. 34
      src/main/java/com/biutag/supervision/service/DataMailService.java
  94. 2
      src/main/java/com/biutag/supervision/service/DataPetition12337Service.java
  95. 3
      src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java
  96. 85
      src/main/java/com/biutag/supervision/service/DataRightsComfortService.java
  97. 1
      src/main/java/com/biutag/supervision/service/ModelClueService.java
  98. 8
      src/main/java/com/biutag/supervision/service/NegativeCountersignService.java
  99. 27
      src/main/java/com/biutag/supervision/service/NegativeQueryService.java
  100. 10
      src/main/java/com/biutag/supervision/service/NegativeService.java
  101. Some files were not shown because too many files have changed in this diff Show More

1978
demo.json

File diff suppressed because it is too large Load Diff

33
src/main/java/com/biutag/supervision/config/CorsConfig.java

@ -0,0 +1,33 @@
package com.biutag.supervision.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
/**
* @author wxc
* @date 2025/4/12
*/
@Configuration
public class CorsConfig {
private CorsConfiguration corsConfig() {
CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.addAllowedOriginPattern("*"); //允许所有域名访问
corsConfiguration.addAllowedHeader("*"); //允许所有请求头
corsConfiguration.addAllowedMethod("*"); //允许所有的请求类型
corsConfiguration.setMaxAge(3600L);
corsConfiguration.setAllowCredentials(true); //允许请求携带验证信息(cookie)
return corsConfiguration;
}
@Bean
public CorsFilter corsFilter() {
//存储request与跨域配置信息的容器,基于url的映射
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", corsConfig());
return new CorsFilter(source);
}
}

5
src/main/java/com/biutag/supervision/config/InterceptorConfig.java

@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@ -37,12 +38,14 @@ public class InterceptorConfig implements WebMvcConfigurer {
registry.addInterceptor(new DefaultInterceptor()) registry.addInterceptor(new DefaultInterceptor())
.addPathPatterns("/**") .addPathPatterns("/**")
.excludePathPatterns("/api/**") .excludePathPatterns("/api/**")
.excludePathPatterns("/crx/ajhc/**")
// 登录 // 登录
.excludePathPatterns("/login", "/jit/**") .excludePathPatterns("/login", "/jit/**", "/app/login")
.excludePathPatterns("/file/stream/**", "/templates/**") .excludePathPatterns("/file/stream/**", "/templates/**")
.excludePathPatterns("/datav/risk/**") .excludePathPatterns("/datav/risk/**")
.excludePathPatterns("/score/**") .excludePathPatterns("/score/**")
.excludePathPatterns("/common/**") .excludePathPatterns("/common/**")
.excludePathPatterns("/app/**")
// excel导出 // excel导出
.excludePathPatterns("/data/petitionComplaint12337/export/result", "/negative/books/export/**") .excludePathPatterns("/data/petitionComplaint12337/export/result", "/negative/books/export/**")
.excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**")); .excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**"));

5
src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java

@ -10,5 +10,8 @@ public enum TaskTypeEnum {
testing_alcohol, testing_alcohol,
// 督察任务 // 督察任务
inspection; inspection,
// 自查任务
selfexamination;
} }

3
src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java

@ -7,9 +7,6 @@ package com.biutag.supervision.constants.enums;
*/ */
public enum TestingAlcoholStateEnum { public enum TestingAlcoholStateEnum {
// 未检测
not_detected,
// 未饮酒 // 未饮酒
not_drinking, not_drinking,

73
src/main/java/com/biutag/supervision/controller/AppController.java

@ -0,0 +1,73 @@
package com.biutag.supervision.controller;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.Method;
import io.swagger.v3.oas.annotations.Operation;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.Objects;
/**
* @author wxc
* @date 2025/4/18
*/
@Slf4j
@RequestMapping("app")
@Controller
public class AppController {
@Operation(summary = "数据入口")
@ResponseBody
@PostMapping("forward")
public String forward(@RequestBody Request request) {
log.info("APP 请求地址:{} 请求方式:{} 授权码:{}", request.getUrl(), request.getMethod(), request.getToken());
if (Objects.nonNull(request.getBody())) {
log.info("APP 请求参数:{}", request.getBody());
}
HttpResponse httpResponse = HttpRequest.of(String.format("http://127.0.0.1:8080" + request.getUrl()))
.method(getMethod(request.getMethod()))
.auth(request.getToken())
.body(request.body)
.execute();
return httpResponse.body();
}
@Operation(summary = "文件预览")
@GetMapping("file/stream/forward")
public String fileSteamForward(String filepath) {
log.info("APP 文件预览,文件路径:{}", filepath);
return "forward:/file/stream" + filepath;
}
public Method getMethod(String method) {
if ("GET".equals(method)) {
return Method.GET;
}
if ("DELETE".equals(method)) {
return Method.DELETE;
}
if ("PUT".equals(method)) {
return Method.PUT;
}
return Method.POST;
}
@Setter
@Getter
public static class Request {
private String url;
private String method;
private String token;
private String body;
}
}

37
src/main/java/com/biutag/supervision/controller/FileController.java

@ -1,9 +1,13 @@
package com.biutag.supervision.controller; package com.biutag.supervision.controller;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.StrUtil;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.FileBase64Dto;
import com.biutag.supervision.pojo.vo.FileVo; import com.biutag.supervision.pojo.vo.FileVo;
import com.biutag.supervision.service.FileService; import com.biutag.supervision.service.FileService;
import com.biutag.supervision.util.ImgUtil;
import com.biutag.supervision.util.WordUtil; import com.biutag.supervision.util.WordUtil;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
@ -13,8 +17,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.Base64;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@ -34,6 +40,23 @@ public class FileController {
.setFilePath(filePath)); .setFilePath(filePath));
} }
@ResponseBody
@PostMapping("upload/base64")
public Result<FileVo> upload(@RequestBody FileBase64Dto file) {
log.info("文件BASE64上传 upload------------------------------");
String base64 = file.getBase64();
if (base64.contains(",")) {
base64 = base64.substring(base64.indexOf(",") + 1);
}
byte[] decodedBytes = Base64.getDecoder().decode(base64);
ByteArrayInputStream is = new ByteArrayInputStream(decodedBytes);
String filePath = fileService.upload(is, is.available(), FileUtil.extName(file.getOriginalFilename()));
return Result.success(new FileVo()
.setFileName(file.getOriginalFilename())
.setFilePath(filePath));
}
@GetMapping("stream/**") @GetMapping("stream/**")
public void download(HttpServletRequest request, HttpServletResponse response) throws IOException { public void download(HttpServletRequest request, HttpServletResponse response) throws IOException {
String filePath = request.getRequestURI().substring(12); String filePath = request.getRequestURI().substring(12);
@ -49,4 +72,18 @@ public class FileController {
IoUtil.copy(is, response.getOutputStream()); IoUtil.copy(is, response.getOutputStream());
} }
@ResponseBody
@GetMapping("base64")
public Result<String> getBase64(String filepath) throws IOException {
if (StrUtil.isBlank(filepath)) {
return Result.success(null);
}
InputStream is = fileService.download(filepath);
String base64 = Base64.getEncoder().encodeToString(is.readAllBytes());
if (ImgUtil.isImg(filepath)) {
base64 = String.format("data:image/%s;base64,", FileUtil.extName(filepath).toLowerCase()) + base64;
}
return Result.success(base64);
}
} }

14
src/main/java/com/biutag/supervision/controller/LoginController.java

@ -4,11 +4,13 @@ import cn.com.jit.JitAuthClient;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.domain.AppUser;
import com.biutag.supervision.pojo.dto.AccountDto; import com.biutag.supervision.pojo.dto.AccountDto;
import com.biutag.supervision.pojo.entity.BaseAccount; import com.biutag.supervision.pojo.entity.BaseAccount;
import com.biutag.supervision.pojo.entity.SupPolice;
import com.biutag.supervision.pojo.vo.TokenVo; import com.biutag.supervision.pojo.vo.TokenVo;
import com.biutag.supervision.service.BaseAccountService; import com.biutag.supervision.service.BaseAccountService;
import com.biutag.supervision.service.SupPoliceService;
import com.biutag.supervision.service.UserLoginService; import com.biutag.supervision.service.UserLoginService;
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;
@ -33,6 +35,8 @@ public class LoginController {
private final UserLoginService userLoginService; private final UserLoginService userLoginService;
private final SupPoliceService policeService;
@Operation(summary = "登录") @Operation(summary = "登录")
@PostMapping("login") @PostMapping("login")
public Result<TokenVo> login(@RequestBody AccountDto account) { public Result<TokenVo> login(@RequestBody AccountDto account) {
@ -87,4 +91,12 @@ public class LoginController {
String token = userLoginService.login(idCode); String token = userLoginService.login(idCode);
return Result.success(new TokenVo().setToken(token)); return Result.success(new TokenVo().setToken(token));
} }
@Operation(summary = "App登录")
@PostMapping("app/login")
public Result<AppUser> appLogin(String empNo) {
SupPolice police = policeService.getByEmpNo(empNo);
return Result.success(userLoginService.loginByApp(police.getIdCode()));
}
} }

41
src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java

@ -2,9 +2,19 @@ package com.biutag.supervision.controller.datav;
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.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.NegativeProblemRelation;
import com.biutag.supervision.pojo.entity.News; import com.biutag.supervision.pojo.entity.News;
import com.biutag.supervision.pojo.vo.AuditOverview;
import com.biutag.supervision.pojo.vo.NewsVo; import com.biutag.supervision.pojo.vo.NewsVo;
import com.biutag.supervision.service.NegativeBlameService;
import com.biutag.supervision.service.NegativeProblemRelationService;
import com.biutag.supervision.service.NegativeService;
import com.biutag.supervision.service.NewsService; import com.biutag.supervision.service.NewsService;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -16,6 +26,8 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.biutag.supervision.constants.WorkDynamicConstants.SJGZDT; import static com.biutag.supervision.constants.WorkDynamicConstants.SJGZDT;
@ -34,6 +46,23 @@ public class DataVAuditController {
private final NewsService newsService; private final NewsService newsService;
private final NegativeService negativeService;
private final NegativeBlameService negativeBlameService;
@GetMapping("/overview")
public Result<AuditOverview> overview(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<Negative> negatives = negativeService.list(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, DateUtil.endOfDay(endTime))
.in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.ZFTZSJ.getValue(), ProblemSourcesEnum.ZFSACFSS.getValue(), ProblemSourcesEnum.JJZRSJ.getValue(), ProblemSourcesEnum.ZXSJ.getValue())));
long accountableNumber = negativeBlameService.count(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negatives.stream().map(Negative::getId).collect(Collectors.toSet()))
.ne(NegativeBlame::getHandleResultName, "不予追责"));
AuditOverview overview = new AuditOverview();
overview.setNegativeNumber(negatives.size());
overview.setAccountableNumber(accountableNumber);
return Result.success(overview);
}
@GetMapping("/getWorkDynamics") @GetMapping("/getWorkDynamics")
public Result<List<News>> getWorkDynamics(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<List<News>> getWorkDynamics(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
@ -41,5 +70,17 @@ public class DataVAuditController {
return Result.success(newsList); return Result.success(newsList);
} }
@GetMapping("/problems")
public Result<List<PieItem>> problems(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime = DateUtil.endOfDay(endTime);
List<Negative> negatives = negativeService.list(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime)
.in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.ZFTZSJ.getValue(), ProblemSourcesEnum.ZFSACFSS.getValue(), ProblemSourcesEnum.JJZRSJ.getValue(), ProblemSourcesEnum.ZXSJ.getValue())));
Map<String, List<Negative>> collect = negatives.stream().collect(Collectors.groupingBy(Negative::getProblemSources));
List<PieItem> result = collect.keySet().stream().map(name -> {
return new PieItem(name, collect.get(name).size());
}).toList();
return Result.success(result);
}
} }

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

@ -1,10 +1,16 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
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.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.DataMailService;
import com.biutag.supervision.service.NegativeService;
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;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -33,6 +39,10 @@ public class DataVGlobalController {
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final DataMailService dataMailService;
private final NegativeService negativeService;
//region 左边 //region 左边
/** /**
@ -46,6 +56,7 @@ public class DataVGlobalController {
@GetMapping("/getOrganizationRank") @GetMapping("/getOrganizationRank")
public Result<JSONObject> getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getOrganizationRank(@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<OrganizeProblemRankVo> fxsjlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime); List<OrganizeProblemRankVo> fxsjlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime);
List<OrganizeProblemRankVo> jsdwlist = negativeMapper.selectOrganizeProblemRank(4, beginTime, endTime); List<OrganizeProblemRankVo> jsdwlist = negativeMapper.selectOrganizeProblemRank(4, beginTime, endTime);
JSONObject res = new JSONObject() JSONObject res = new JSONObject()
@ -87,8 +98,14 @@ public class DataVGlobalController {
@GetMapping("/getAllGlobalCount") @GetMapping("/getAllGlobalCount")
public Result<JSONObject> getAllGlobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getAllGlobalCount(@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);
// 获取数据大屏中央总数概览 // 获取数据大屏中央总数概览
GlobalOverViewVo overview = negativeMapper.getAllGlobalCount(beginTime, endTime); GlobalOverViewVo overview = negativeMapper.getAllGlobalCount(beginTime, endTime);
MailOverviewVo vo = dataMailService.mailCount(beginTime, endTime);
// 局长信箱
long mailboxNumber = negativeService.count(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime).eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue()));
overview.setMailboxNumber(mailboxNumber);
overview.setComplaintPro(vo.getCountryMail() + vo.getPoliceMail() + vo.getNumberMail());
JSONObject data = new JSONObject().fluentPut("overview", overview); JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data); return Result.success(data);
} }
@ -141,6 +158,7 @@ public class DataVGlobalController {
@GetMapping("/getStrongProblemRate") @GetMapping("/getStrongProblemRate")
public Result<JSONObject> getStrongProblemRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getStrongProblemRate(@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.selectStrongProblemRank(beginTime, endTime); List<StrongProblemRank> tcwtlist = negativeMapper.selectStrongProblemRank(beginTime, endTime);
for (int i = 1; i <= tcwtlist.size(); i++) { for (int i = 1; i <= tcwtlist.size(); i++) {
@ -167,7 +185,5 @@ public class DataVGlobalController {
JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist); JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist);
return Result.success(res); return Result.success(res);
} }
//endregion
} }

4
src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java

@ -1,5 +1,6 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.constants.enums.RepeatEnum; import com.biutag.supervision.constants.enums.RepeatEnum;
import com.biutag.supervision.mapper.DataPetition12337Mapper; import com.biutag.supervision.mapper.DataPetition12337Mapper;
@ -50,6 +51,7 @@ public class DataVMailViewController {
@GetMapping("/getFirstAndRepeatMail") @GetMapping("/getFirstAndRepeatMail")
public Result<JSONObject> getFirstAndRepeatMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getFirstAndRepeatMail(@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);
// 初访重访情况总览 // 初访重访情况总览
MailFirstAndRepeatOverviewVo fxjsFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 3); MailFirstAndRepeatOverviewVo fxjsFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 3);
MailFirstAndRepeatOverviewVo bwzdFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 4); MailFirstAndRepeatOverviewVo bwzdFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 4);
@ -88,7 +90,7 @@ public class DataVMailViewController {
public Result<JSONObject> getAllMailCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getAllMailCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 信访数据总数概览 // 信访数据总数概览
MailOverviewVo overview = dataMailService.allMailCount(beginTime, endTime); MailOverviewVo overview = dataMailService.allMailCount(beginTime, DateUtil.endOfDay(endTime));
System.out.println("信访总览================================"); System.out.println("信访总览================================");
System.out.println(overview); System.out.println(overview);
// MailOverviewVo overview = dataMailService.getAllMailCount(beginTime, endTime); // MailOverviewVo overview = dataMailService.getAllMailCount(beginTime, endTime);

156
src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java

@ -1,19 +1,20 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
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.RpcApplyTypeEnum;
import com.biutag.supervision.mapper.RpcApplyMapper; import com.biutag.supervision.mapper.RpcApplyMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.RpcApply;
import com.biutag.supervision.pojo.model.DataRightsComfortModel; import com.biutag.supervision.pojo.model.DataRightsComfortModel;
import com.biutag.supervision.pojo.vo.ComfortCountVO;
import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.pojo.vo.RightsComfortMapVo;
import com.biutag.supervision.service.DataRightsComfortService; import com.biutag.supervision.service.DataRightsComfortService;
import com.biutag.supervision.service.RpcApplyService;
import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
/** /**
* 维权抚慰大屏相关 * 维权抚慰大屏相关
@ -35,98 +38,61 @@ public class DataVRightsComfortController {
private final DataRightsComfortService dataRightsComfortService; private final DataRightsComfortService dataRightsComfortService;
private final RpcApplyService rpcApplyService;
private final RpcApplyMapper rpcApplyMapper; private final RpcApplyMapper rpcApplyMapper;
@GetMapping @GetMapping
public Result<DataRightsComfortModel> rightsComfort(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { public Result<DataRightsComfortModel> rightsComfort(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// DataRightsComfortModel result = new DataRightsComfortModel(); @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 维权案件总数 DataRightsComfortModel result = new DataRightsComfortModel();
// 异步
// 受侵害人数 Date finalEndTime = DateUtil.endOfDay(endTime);
CompletableFuture.allOf(
// 抚慰人数 CompletableFutureUtil.runSyncObject(() -> {
// result.setComfortPersonNumber(dataRightsComfortService.countComfortPersonNumber(beginTime, endTime)); List<RpcApply> list = rpcApplyService.list(new LambdaQueryWrapper<RpcApply>()
// 打击处理人数 .between(RpcApply::getCrtTime, beginTime, finalEndTime)
// result.setHitPersonNumber(dataRightsComfortService.countHitPersonNumber(beginTime, endTime)); .eq(RpcApply::getType, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()));
// 抚慰金额(万元) Set<String> caseNumbers = list.stream().map(RpcApply::getCaseNumber).collect(Collectors.toSet());
// result.setComfortMoney(dataRightsComfortService.countComfortMoney(beginTime, endTime)); // 维权案件总数
// 维权案件情况 result.setRightsNumber(caseNumbers.size());
// 受侵害人数
// 案件类别占比 result.setVictimNumber(list.size());
// 打击处理人数
// 打处情况 result.setHitPersonNumber(list.size() + 1);
// result.setPunishmentSituation(dataRightsComfortService.selectPunishmentSituation(beginTime, endTime));
// 抚慰情况 Map<String, List<RpcApply>> collect = list.stream().collect(Collectors.groupingBy(RpcApply::getInfringerHandle));
// result.setComfortSituation(dataRightsComfortService.selectComfortSituation(beginTime, endTime)); // 打处情况
// 民辅警受伤情况 result.setPunishmentSituation(collect.keySet().stream().map(name -> {
return new PieItem(name, collect.get(name).size());
// 发案情况占比 }).toList());
}),
// return Result.success(result); CompletableFutureUtil.runSyncObject(() -> {
return null; // 抚慰人数
} result.setComfortPersonNumber(rpcApplyService.count(beginTime, finalEndTime, RpcApplyTypeEnum.COMFORT.getValue()));
}),
CompletableFutureUtil.runSyncObject(() -> {
// region 左边 // 抚慰金额(万元)
// 维权案件和抚慰金情况 result.setComfortMoney(dataRightsComfortService.countComfortMoney(beginTime, finalEndTime));
@GetMapping("/getRightsAndComfortRank") }),
public Result<JSONObject> getRightsAndComfortRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, CompletableFutureUtil.runSyncObject(() -> {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 抚慰金额情况 - 分县市局
List<OrganizeProblemRankVo> fxsjRightsRankList = rpcApplyMapper.getRightsRank(beginTime, endTime, 3);; // 分县市局维权排名 result.setCountyComfortMoneyBarList(rpcApplyMapper.selectComfortMoneyBarList(beginTime, finalEndTime, 3));
List<OrganizeProblemRankVo> jsdwRightsRankList = rpcApplyMapper.getRightsRank(beginTime, endTime, 4);; // 分县市局维权排名 }),
JSONObject data = new JSONObject() CompletableFutureUtil.runSyncObject(() -> {
.fluentPut("fxsjRightsRankList", fxsjRightsRankList) // 抚慰金额情况 - 局属单位
.fluentPut("jsdwRightsRankList", jsdwRightsRankList); result.setBureauComfortMoneyBarList(rpcApplyMapper.selectComfortMoneyBarList(beginTime, finalEndTime, 4));
return Result.success(data); }),
} CompletableFutureUtil.runSyncObject(() -> {
// 民辅警受伤情况
// 案件类别占比 result.setComfortPoliceInjurySituation(rpcApplyMapper.selectComfortPoliceInjurySituation(beginTime, finalEndTime));
@GetMapping("/getCaseTypeRate") }),
public Result<JSONObject> getCaseTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, CompletableFutureUtil.runSyncObject(() -> {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 民辅警受伤类别
return null; result.setComfortInjuryCategory(rpcApplyMapper.selectComfortInjuryCategory(beginTime, finalEndTime));
} })
).join();
// endregion return Result.success(result);
// region 中间
// 抚慰大屏中央总览数据
@GetMapping("/getALlComfortCount")
public Result<JSONObject> getALlComfortCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数
Integer hitTotal = dataRightsComfortService.countHitPersonNumber(beginTime, endTime); // 打击处理人数
Double comfortMoney = dataRightsComfortService.countComfortMoney(beginTime, endTime); // 抚慰金额
ComfortCountVO comfortOverview = new ComfortCountVO();
comfortOverview.setComfortTotal(comfortTotal);
comfortOverview.setHitTotal(hitTotal);
comfortOverview.setComfortMoney(comfortMoney);
comfortOverview.setComfortCaseTotal(0);
comfortOverview.setHurtTotal(0);
JSONObject data = new JSONObject().fluentPut("comfortOverview", comfortOverview);
return Result.success(data);
}
// 地图图标数据
@GetMapping("/getComfortMapIcon")
@Cacheable(cacheNames = "Supervision:Screen:ComfortMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getComfortMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<RightsComfortMapVo> comfortMapVoList = dataRightsComfortService.getComfortMapIcon(beginTime, endTime);
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("comfortMapVoList", comfortMapVoList);
return Result.success(jsonObject);
}
// 打处情况
@GetMapping("/getPunishmentSituation")
public Result<JSONObject> getPunishmentSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<PieItem> punishmentSituationList = dataRightsComfortService.selectPunishmentSituation(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("punishmentSituationList", punishmentSituationList);
return Result.success(data);
} }
// 抚慰情况 // 抚慰情况
@ -170,6 +136,6 @@ public class DataVRightsComfortController {
.fluentPut("incidentOrgList", incidentOrgList); .fluentPut("incidentOrgList", incidentOrgList);
return Result.success(data); return Result.success(data);
} }
// endregion
} }

57
src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java

@ -1,17 +1,25 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
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.NegativeBlame;
import com.biutag.supervision.pojo.entity.News; import com.biutag.supervision.pojo.entity.News;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.NegativeBlameService;
import com.biutag.supervision.service.NewsService; import com.biutag.supervision.service.NewsService;
import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil;
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;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -20,9 +28,9 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.CompletableFuture;
import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT; import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT;
import static com.biutag.supervision.constants.WorkDynamicConstants.SJGZDT;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.XCDC; import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.XCDC;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC; import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC;
@ -40,6 +48,7 @@ public class DataVSupervisionNotifyController {
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final NewsService newsService; private final NewsService newsService;
private final NegativeBlameService negativeBlameService;
// region 左边 // region 左边
@ -78,14 +87,10 @@ public class DataVSupervisionNotifyController {
public Result<JSONObject> getProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> wtlxList = negativeMapper.getProblemTypeRatio(beginTime, endTime); List<EchartsVo> wtlxList = negativeMapper.getProblemTypeRatio(beginTime, endTime);
// List<EchartsVo> wtlxList = dataSupervisionNotifyService.getProblemTypeRatio(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList); JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList);
return Result.success(data); return Result.success(data);
} }
// endregion
// region 中间
/** /**
* 获取现场督察大屏中央总览 * 获取现场督察大屏中央总览
@ -96,11 +101,38 @@ public class DataVSupervisionNotifyController {
*/ */
@Operation(summary = "中央总览数据") @Operation(summary = "中央总览数据")
@GetMapping("/getSupervisionNotifyCount") @GetMapping("/getSupervisionNotifyCount")
public Result<JSONObject> getSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<SupervisionNotifyOverView> getSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SupervisionNotifyOverView overview = negativeMapper.getAllSupervisionNotifyCount(beginTime, endTime); endTime = DateUtil.endOfDay(endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview); List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime)
return Result.success(data); .in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.LMGZ.getValue(), ProblemSourcesEnum.ZXDC.getValue(), ProblemSourcesEnum.SPDC.getValue())));
SupervisionNotifyOverView overView = new SupervisionNotifyOverView();
List<String> negativeIds = negatives.stream().filter(item -> InspectCaseEnum.isItTure(item.getCheckStatus())).map(Negative::getId).toList();
overView.setProblemNumber(negatives.size());
overView.setCompletedNumber(negatives.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).count());
overView.setProcessingNumber(negatives.size() - overView.getCompletedNumber());
// 办结率
overView.setCompletedRate(overView.getProblemNumber() == 0 ? 0: NumberUtil.roundHalfEven(NumberUtil.mul(NumberUtil.div(overView.getCompletedNumber(), overView.getProblemNumber()), 100), 0).doubleValue());
CompletableFuture.allOf(
CompletableFutureUtil.runSyncObject(() -> {
long personNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negativeIds)
.eq(NegativeBlame::getType, "personal")
.ne(NegativeBlame::getHandleResultName, "不予追责")
.isNotNull(NegativeBlame::getHandleResultName)
.ne(NegativeBlame::getHandleResultName, ""));
overView.setPersonNumber(personNumber);
}),
CompletableFutureUtil.runSyncObject(() -> {
long departNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negativeIds)
.eq(NegativeBlame::getType, "department")
.ne(NegativeBlame::getHandleResultName, "不予追责")
.isNotNull(NegativeBlame::getHandleResultName)
.ne(NegativeBlame::getHandleResultName, ""));
overView.setDepartNumber(departNumber);
})
).join();
return Result.success(overView);
} }
/** /**
@ -108,11 +140,10 @@ public class DataVSupervisionNotifyController {
* *
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return List<SuperviseMapIconVo>
*/ */
@Operation(summary = "地图Icon数据") @Operation(summary = "地图Icon数据")
@GetMapping("/getSupervisionNotifyMap") @GetMapping("/getSupervisionNotifyMap")
@Cacheable(cacheNames = "Supervision:Screen:SupervisionNotifyMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getSupervisionNotifyMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getSupervisionNotifyMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
//地图数据 //地图数据
@ -180,8 +211,6 @@ public class DataVSupervisionNotifyController {
return Result.success(newsList); return Result.success(newsList);
} }
// endregion
} }

10
src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java

@ -1,5 +1,6 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.mapper.WvpDeviceChannelMapper; import com.biutag.supervision.mapper.WvpDeviceChannelMapper;
@ -9,7 +10,6 @@ import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.pojo.vo.VideoSuperviseCountVo; import com.biutag.supervision.pojo.vo.VideoSuperviseCountVo;
import com.biutag.supervision.pojo.vo.VideoSuperviseMapIconVo; import com.biutag.supervision.pojo.vo.VideoSuperviseMapIconVo;
import com.biutag.supervision.service.VideoSuperviseService;
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;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -38,7 +38,6 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC;
@RequestMapping("datav/videoSupervise") @RequestMapping("datav/videoSupervise")
public class DataVVideoSuperviseController { public class DataVVideoSuperviseController {
private final VideoSuperviseService videoSuperviseService;
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final WvpDeviceChannelMapper wvpDeviceChannelMapper; private final WvpDeviceChannelMapper wvpDeviceChannelMapper;
@ -83,6 +82,7 @@ public class DataVVideoSuperviseController {
@GetMapping("/getVideoSuperviseProblemRank") @GetMapping("/getVideoSuperviseProblemRank")
public Result<JSONObject> getVideoSuperviseProblemRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getVideoSuperviseProblemRank(@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<OrganizeProblemRankVo> fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3); List<OrganizeProblemRankVo> fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> jsdwVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 4); List<OrganizeProblemRankVo> jsdwVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 4);
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
@ -107,7 +107,6 @@ public class DataVVideoSuperviseController {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 获取视频督察中央数据 // 获取视频督察中央数据
VideoSuperviseCountVo overview = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime); VideoSuperviseCountVo overview = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime);
// VideoSuperviseCountVo overview = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview); JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data); return Result.success(data);
} }
@ -121,10 +120,8 @@ public class DataVVideoSuperviseController {
*/ */
@Operation(summary = "地图Icon数据") @Operation(summary = "地图Icon数据")
@GetMapping("/getVideoSuperviseMap") @GetMapping("/getVideoSuperviseMap")
@Cacheable(cacheNames = "Supervision:Screen:VideoSuperviseMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getVideoSuperviseMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getVideoSuperviseMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 地图数据 // 地图数据
List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime)). List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime)).
orElseGet(ArrayList::new); orElseGet(ArrayList::new);
@ -155,8 +152,5 @@ public class DataVVideoSuperviseController {
return Result.success(jsonObject); return Result.success(jsonObject);
} }
// endregion
} }

51
src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java

@ -1,14 +1,28 @@
package com.biutag.supervision.controller.mobileSupervision; package com.biutag.supervision.controller.mobileSupervision;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.TaskInspectionDto; import com.biutag.supervision.pojo.dto.TaskInspectionDto;
import com.biutag.supervision.pojo.dto.TaskProblemDto;
import com.biutag.supervision.pojo.dto.TaskInspectionProblemQueryParam;
import com.biutag.supervision.pojo.entity.SupTaskInspection;
import com.biutag.supervision.pojo.entity.SupTaskProblem;
import com.biutag.supervision.pojo.param.TaskInspectionQueryParam; import com.biutag.supervision.pojo.param.TaskInspectionQueryParam;
import com.biutag.supervision.pojo.vo.FileVo;
import com.biutag.supervision.pojo.vo.TaskInspectionProblemVo;
import com.biutag.supervision.pojo.vo.TaskInspectionVo; import com.biutag.supervision.pojo.vo.TaskInspectionVo;
import com.biutag.supervision.service.SupTaskProblemService;
import com.biutag.supervision.service.SupTaskInspectionService; import com.biutag.supervision.service.SupTaskInspectionService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* @author wxc * @author wxc
* @date 2025/4/9 * @date 2025/4/9
@ -20,6 +34,8 @@ public class InspectionController {
private final SupTaskInspectionService taskInspectionService; private final SupTaskInspectionService taskInspectionService;
private final SupTaskProblemService taskProblemService;
@GetMapping @GetMapping
public Result<Page<TaskInspectionVo>> page(TaskInspectionQueryParam queryParam) { public Result<Page<TaskInspectionVo>> page(TaskInspectionQueryParam queryParam) {
return Result.success(taskInspectionService.page(queryParam)); return Result.success(taskInspectionService.page(queryParam));
@ -30,5 +46,40 @@ public class InspectionController {
return Result.success(taskInspectionService.save(dto)); return Result.success(taskInspectionService.save(dto));
} }
@GetMapping("{taskId}")
public Result<SupTaskInspection> get(@PathVariable Integer taskId) {
return Result.success(taskInspectionService.getById(taskId));
}
@GetMapping("{taskId}/problem")
public Result<Page<TaskInspectionProblemVo>> listProblem(@PathVariable Integer taskId, TaskInspectionProblemQueryParam queryParam) {
LambdaQueryWrapper<SupTaskProblem> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SupTaskProblem::getTaskId, taskId)
.orderByDesc(SupTaskProblem::getCreateTime);
Page<SupTaskProblem> page = taskProblemService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
List<TaskInspectionProblemVo> records = page.getRecords().stream().map(item -> {
TaskInspectionProblemVo vo = new TaskInspectionProblemVo();
BeanUtils.copyProperties(item, vo);
if (StrUtil.isNotBlank(item.getPeoples())) {
vo.setPeoples(JSON.parseArray(item.getPeoples(), TaskProblemDto.People.class));
}
if (StrUtil.isNotBlank(item.getFiles())) {
vo.setFiles(JSON.parseArray(item.getFiles(), FileVo.class));
}
return vo;
}).toList();
return Result.success(new Page<TaskInspectionProblemVo>().setRecords(records).setTotal(page.getTotal()));
}
@PostMapping("{taskId}/sign")
public Result<Void> sign(@PathVariable Integer taskId) {
taskInspectionService.update(new LambdaUpdateWrapper<SupTaskInspection>().eq(SupTaskInspection::getTaskId, taskId).set(SupTaskInspection::getHasSign, true));
return Result.success();
}
@PostMapping("{taskId}/problem")
public Result<Boolean> addProblem(@PathVariable Integer taskId, @RequestBody TaskProblemDto dto) {
dto.setTaskId(taskId);
return Result.success(taskProblemService.save(dto));
}
} }

54
src/main/java/com/biutag/supervision/controller/mobileSupervision/PhotoController.java

@ -0,0 +1,54 @@
package com.biutag.supervision.controller.mobileSupervision;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.SupPhoto;
import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.vo.PhotoGroupVo;
import com.biutag.supervision.service.SupPhotoService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author wxc
* @date 2025/4/20
*/
@RequestMapping("photo")
@RequiredArgsConstructor
@RestController
public class PhotoController {
private final SupPhotoService photoService;
@GetMapping
public Result<List<PhotoGroupVo>> list() {
UserAuth user = UserContextHolder.getCurrentUser();
List<SupPhoto> list = photoService.list(new LambdaQueryWrapper<SupPhoto>().eq(SupPhoto::getCreateUsername, user.getUserName()).orderByDesc(SupPhoto::getCreateTime));
Map<String, List<SupPhoto>> collect = list.stream().collect(Collectors.groupingBy(SupPhoto::getDate));
List<PhotoGroupVo> result = collect.keySet().stream().sorted(Comparator.reverseOrder()).map(date -> {
PhotoGroupVo vo = new PhotoGroupVo();
vo.setDate(date);
vo.setPhotos(collect.get(date));
return vo;
}).toList();
return Result.success(result);
}
@PostMapping
public Result<Boolean> add(@RequestBody SupPhoto photo) {
photo.setCreateTime(LocalDateTime.now());
photo.setDate(LocalDate.now().toString());
UserAuth user = UserContextHolder.getCurrentUser();
photo.setCreateUsername(user.getUserName());
return Result.success(photoService.save(photo));
}
}

47
src/main/java/com/biutag/supervision/controller/mobileSupervision/SelfexaminationController.java

@ -0,0 +1,47 @@
package com.biutag.supervision.controller.mobileSupervision;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.TaskSelfexaminationDto;
import com.biutag.supervision.pojo.entity.SupTaskSelfexamination;
import com.biutag.supervision.pojo.param.TaskInspectionQueryParam;
import com.biutag.supervision.pojo.vo.TaskSelfexaminationDetailVo;
import com.biutag.supervision.pojo.vo.TaskSelfexaminationVo;
import com.biutag.supervision.service.SupTaskSelfexaminationService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
/**
* @author wxc
* @date 2025/4/30
*/
@RequiredArgsConstructor
@RestController
@RequestMapping("task/selfexamination")
public class SelfexaminationController {
private final SupTaskSelfexaminationService taskSelfexaminationService;
@GetMapping
public Result<Page<TaskSelfexaminationVo>> page(TaskInspectionQueryParam queryParam) {
return Result.success(taskSelfexaminationService.page(queryParam));
}
@GetMapping("{taskId}")
public Result<TaskSelfexaminationDetailVo> get(@PathVariable Integer taskId) {
return Result.success(taskSelfexaminationService.get(taskId));
}
@PostMapping
public Result<Boolean> add(@RequestBody TaskSelfexaminationDto dto) {
return Result.success(taskSelfexaminationService.save(dto));
}
@PostMapping("{taskId}/sign")
public Result<Void> sign(@PathVariable Integer taskId) {
taskSelfexaminationService.update(new LambdaUpdateWrapper<SupTaskSelfexamination>().eq(SupTaskSelfexamination::getTaskId, taskId).set(SupTaskSelfexamination::getHasSign, true));
return Result.success();
}
}

43
src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskController.java

@ -0,0 +1,43 @@
package com.biutag.supervision.controller.mobileSupervision;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.constants.enums.TaskStatusEnum;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.SupTask;
import com.biutag.supervision.pojo.vo.TaskCountVo;
import com.biutag.supervision.pojo.vo.TaskVo;
import com.biutag.supervision.pojo.param.TaskQueryParam;
import com.biutag.supervision.service.SupTaskService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
/**
* @author wxc
* @date 2025/4/11
*/
@RequiredArgsConstructor
@RequestMapping("task")
@RestController
public class TaskController {
private final SupTaskService taskService;
@GetMapping
public Result<Page<TaskVo>> myTodo(TaskQueryParam queryParam) {
return Result.success(taskService.pageTask(queryParam));
}
@GetMapping("count")
public Result<TaskCountVo> count() {
return Result.success(taskService.getTaskCount());
}
@PostMapping("{taskId}/submit")
public Result<Void> submit(@PathVariable String taskId) {
taskService.update(new LambdaUpdateWrapper<SupTask>().eq(SupTask::getId, taskId).set(SupTask::getTaskStatus, TaskStatusEnum.done.name()));
return Result.success();
}
}

40
src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java

@ -0,0 +1,40 @@
package com.biutag.supervision.controller.mobileSupervision;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.SupTaskPerson;
import com.biutag.supervision.pojo.entity.SupTaskProblem;
import com.biutag.supervision.pojo.param.TaskProblemQueryParam;
import com.biutag.supervision.service.SupTaskProblemService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.stream.Collectors;
/**
* @author wxc
* @date 2025/5/7
*/
@RequestMapping("task/problem")
@RequiredArgsConstructor
@RestController
public class TaskProblemController {
private final SupTaskProblemService taskProblemService;
@GetMapping
public Result<Page<SupTaskProblem>> page(TaskProblemQueryParam queryParam) {
Page<SupTaskProblem> page = taskProblemService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()));
page.getRecords().forEach(item -> {
if (StrUtil.isNotBlank(item.getPeoples())) {
item.setPeoples(JSON.parseArray(item.getPeoples(), SupTaskPerson.class).stream().map(SupTaskPerson::getName).collect(Collectors.joining("、")));
}
});
return Result.success(page);
}
}

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

@ -2,17 +2,22 @@ package com.biutag.supervision.controller.mobileSupervision;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.constants.enums.TaskStatusEnum;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.TaskTestingAlcoholDto; import com.biutag.supervision.pojo.dto.TaskTestingAlcoholDto;
import com.biutag.supervision.pojo.dto.TaskTestingAlcoholPeopleDto;
import com.biutag.supervision.pojo.dto.TestingAlcoholFilter; import com.biutag.supervision.pojo.dto.TestingAlcoholFilter;
import com.biutag.supervision.pojo.entity.SupPolice; import com.biutag.supervision.pojo.entity.SupPolice;
import com.biutag.supervision.pojo.entity.SupTask;
import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople;
import com.biutag.supervision.pojo.param.TaskTestingAlcoholPeopleQueryParam;
import com.biutag.supervision.pojo.param.TaskTestingAlcoholQueryParam; import com.biutag.supervision.pojo.param.TaskTestingAlcoholQueryParam;
import com.biutag.supervision.pojo.vo.TaskCountVo;
import com.biutag.supervision.pojo.vo.TaskTestingAlcoholPeopleVo;
import com.biutag.supervision.pojo.vo.TaskTestingAlcoholVo; import com.biutag.supervision.pojo.vo.TaskTestingAlcoholVo;
import com.biutag.supervision.service.SupDepartService; import com.biutag.supervision.service.*;
import com.biutag.supervision.service.SupPoliceService;
import com.biutag.supervision.service.SupTaskTestingAlcoholService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -33,6 +38,8 @@ public class TestingAlcoholController {
private final SupDepartService departService; private final SupDepartService departService;
private final SupTaskTestingAlcoholPeopleService testingAlcoholPeopleService;
@GetMapping @GetMapping
public Result<Page<TaskTestingAlcoholVo>> page(TaskTestingAlcoholQueryParam queryParam) { public Result<Page<TaskTestingAlcoholVo>> page(TaskTestingAlcoholQueryParam queryParam) {
return Result.success(taskTestingAlcoholService.page(queryParam)); return Result.success(taskTestingAlcoholService.page(queryParam));
@ -41,9 +48,11 @@ public class TestingAlcoholController {
@GetMapping("getPersonNumber") @GetMapping("getPersonNumber")
public Result<List<SupTaskTestingAlcoholPeople>> getPersonNumber(TestingAlcoholFilter condition) { public Result<List<SupTaskTestingAlcoholPeople>> getPersonNumber(TestingAlcoholFilter condition) {
List<String> departIds = departService.getAllNodeIds(condition.getDepartId()); List<String> departIds = departService.getAllNodeIds(condition.getDepartId());
List<SupTaskTestingAlcoholPeople> polices = policeService.list(new LambdaQueryWrapper<SupPolice>().in(SupPolice::getOrgId, departIds) List<SupTaskTestingAlcoholPeople> polices = policeService.list(new LambdaQueryWrapper<SupPolice>()
.in(CollectionUtil.isNotEmpty(condition.getPersonType()), SupPolice::getPersonType, condition.getPersonType()) .in(SupPolice::getOrgId, departIds)
.in(CollectionUtil.isNotEmpty(condition.getPosition()), SupPolice::getPosition, condition.getPosition())) .isNotNull(SupPolice::getEmpNo)
.in(CollectionUtil.isNotEmpty(condition.getPersonType()), SupPolice::getPersonType, condition.getPersonType())
.in(CollectionUtil.isNotEmpty(condition.getPosition()), SupPolice::getPosition, condition.getPosition()))
.stream().map(item -> { .stream().map(item -> {
SupTaskTestingAlcoholPeople people = new SupTaskTestingAlcoholPeople(); SupTaskTestingAlcoholPeople people = new SupTaskTestingAlcoholPeople();
people.setName(item.getName()); people.setName(item.getName());
@ -55,14 +64,29 @@ public class TestingAlcoholController {
return Result.success(polices); return Result.success(polices);
} }
@GetMapping("{taskId}/people")
public Result<Page<TaskTestingAlcoholPeopleVo>> page(@PathVariable String taskId, TaskTestingAlcoholPeopleQueryParam queryParam) {
return Result.success(testingAlcoholPeopleService.page(taskId, queryParam));
}
@GetMapping("{taskId}/people/count")
public Result<TaskCountVo> count(@PathVariable String taskId) {
long todoCount = testingAlcoholPeopleService.count(new LambdaQueryWrapper<SupTaskTestingAlcoholPeople>().eq(SupTaskTestingAlcoholPeople::getTaskId, taskId).eq(SupTaskTestingAlcoholPeople::getStatus, TaskStatusEnum.todo.name()));
long doneCount = testingAlcoholPeopleService.count(new LambdaQueryWrapper<SupTaskTestingAlcoholPeople>().eq(SupTaskTestingAlcoholPeople::getTaskId, taskId).eq(SupTaskTestingAlcoholPeople::getStatus, TaskStatusEnum.done.name()));
return Result.success(new TaskCountVo(todoCount, doneCount));
}
@PutMapping("{taskId}/people")
public Result<Boolean> update(@PathVariable String taskId, @RequestBody TaskTestingAlcoholPeopleDto dto) {
dto.setTaskId(taskId);
return Result.success(testingAlcoholPeopleService.update(dto));
}
@PostMapping @PostMapping
public Result<Boolean> add(@RequestBody TaskTestingAlcoholDto dto) { public Result<Boolean> add(@RequestBody TaskTestingAlcoholDto dto) {
return Result.success(taskTestingAlcoholService.save(dto)); return Result.success(taskTestingAlcoholService.save(dto));
} }
@PostMapping("genPeople")
public Result<List<SupTaskTestingAlcoholPeople>> genPeople(@RequestBody TaskTestingAlcoholDto dto) {
return Result.success();
}
} }

2
src/main/java/com/biutag/supervision/controller/rightsComfort/RightPersonController.java

@ -63,7 +63,7 @@ public class RightPersonController {
@PutMapping @PutMapping
public Result<Void> update(@RequestBody RpcRightPerson rpcRightPerson) { public Result<Void> update(@RequestBody RpcRightPerson rpcRightPerson) {
rpcRightPersonService.save(rpcRightPerson); rpcRightPersonService.updateById(rpcRightPerson);
return Result.success(); return Result.success();
} }

4
src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java

@ -137,7 +137,7 @@ public class ProfileDepartController {
profileDepart.setPoliceBarList(policeBarList); profileDepart.setPoliceBarList(policeBarList);
List<BarItem> problemTypeList = profileDepartMapper.selectProblemType(departId, beginTime, endTime); List<BarItem> problemTypeList = profileDepartMapper.selectProblemType(departId, beginTime, endTime);
int max = problemTypeList.stream().mapToInt(BarItem::getValue).max().getAsInt(); int max = problemTypeList.stream().mapToInt(item -> item.getValue().intValue()).max().getAsInt();
List<ProfileDepart.RadarIndicatorItem> problemTypeRadarIndicator = problemTypeList.stream().map(item -> { List<ProfileDepart.RadarIndicatorItem> problemTypeRadarIndicator = problemTypeList.stream().map(item -> {
ProfileDepart.RadarIndicatorItem radarIndicatorItem = new ProfileDepart.RadarIndicatorItem(); ProfileDepart.RadarIndicatorItem radarIndicatorItem = new ProfileDepart.RadarIndicatorItem();
radarIndicatorItem.setMax(max); radarIndicatorItem.setMax(max);
@ -150,7 +150,7 @@ public class ProfileDepartController {
List<NegativeProblemRelation> negativeProblemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>().in(NegativeProblemRelation::getNegativeId, negativeIds)); List<NegativeProblemRelation> negativeProblemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>().in(NegativeProblemRelation::getNegativeId, negativeIds));
Map<String, List<NegativeProblemRelation>> collect = negativeProblemRelations.stream().collect(Collectors.groupingBy(item -> item.getOneLevelContent() + " / " + item.getTwoLevelContent() + " / " + item.getThreeLevelContent())); Map<String, List<NegativeProblemRelation>> collect = negativeProblemRelations.stream().collect(Collectors.groupingBy(item -> item.getOneLevelContent() + " / " + item.getTwoLevelContent() + " / " + item.getThreeLevelContent()));
List<BarItem> problemTypeBarList = collect.keySet().stream().map(key -> { List<BarItem> problemTypeBarList = collect.keySet().stream().map(key -> {
return new BarItem(key, collect.get(key).size()); return new BarItem(key, new BigDecimal(collect.get(key).size()));
}).sorted(Comparator.comparing(BarItem::getValue).reversed()).toList(); }).sorted(Comparator.comparing(BarItem::getValue).reversed()).toList();
profileDepart.setProblemTypeBarList(problemTypeBarList); profileDepart.setProblemTypeBarList(problemTypeBarList);

2
src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java

@ -40,7 +40,7 @@ public class SubOneRightsController {
public Result<JSONObject> getALlComfortCount(@RequestParam Integer departId, public Result<JSONObject> getALlComfortCount(@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) {
Integer comfortTotal = rpcApplyMapper.countSubOneComfortPersonNumber(beginTime, endTime, departId); Long comfortTotal = rpcApplyMapper.countSubOneComfortPersonNumber(beginTime, endTime, departId);
// Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数 // Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数
Integer hitTotal = dataRightsComfortService.countSubOneHitPersonNumber(beginTime, endTime, departId); // 打击处理人数 Integer hitTotal = dataRightsComfortService.countSubOneHitPersonNumber(beginTime, endTime, departId); // 打击处理人数
Double comfortMoney = rpcApplyMapper.countSubOneComfortMoney(beginTime, endTime, departId); Double comfortMoney = rpcApplyMapper.countSubOneComfortMoney(beginTime, endTime, departId);

2
src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java

@ -113,11 +113,9 @@ public class SubOneSupervisionNotifyController {
* @param departId 部门id (分县市局ID) * @param departId 部门id (分县市局ID)
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return List<SuperviseMapIconVo>
*/ */
@Operation(summary = "地图小卡片") @Operation(summary = "地图小卡片")
@GetMapping("/getSubOneSupervisionMap") @GetMapping("/getSubOneSupervisionMap")
@Cacheable(cacheNames = "Supervision:Screen:SubOneSupervisionMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()")
public Result<JSONObject> getSubOneSupervisionMap(@RequestParam Integer departId, public Result<JSONObject> getSubOneSupervisionMap(@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) {

4
src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java

@ -1,5 +1,6 @@
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.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
@ -78,7 +79,7 @@ public class SubOneVideoSuperviseController {
public Result<JSONObject> getSubOneAllVideoSuperviseCount(@RequestParam Integer departId, public Result<JSONObject> getSubOneAllVideoSuperviseCount(@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) {
VideoSuperviseCountVo overview = subOneVideoSuperviseService.getSubOneAllVideoSuperviseCount(beginTime, endTime, departId); VideoSuperviseCountVo overview = subOneVideoSuperviseService.getSubOneAllVideoSuperviseCount(beginTime, DateUtil.endOfDay(endTime), departId);
JSONObject data = new JSONObject().fluentPut("overview", overview); JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data); return Result.success(data);
} }
@ -94,7 +95,6 @@ public class SubOneVideoSuperviseController {
*/ */
@Operation(summary = "地图Icon数据") @Operation(summary = "地图Icon数据")
@GetMapping("/getSubOneVideoSuperviseMap") @GetMapping("/getSubOneVideoSuperviseMap")
@Cacheable(cacheNames = "Supervision:Screen:SubOneVideoSuperviseMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()")
public Result<JSONObject> getSubOneVideoSuperviseMap(@RequestParam Integer departId, public Result<JSONObject> getSubOneVideoSuperviseMap(@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) {

1
src/main/java/com/biutag/supervision/controller/system/PoliceController.java

@ -119,6 +119,7 @@ public class PoliceController {
.set(SupPolice::getPoliceRole, police.getPoliceRole()) .set(SupPolice::getPoliceRole, police.getPoliceRole())
.set(SupPolice::getMobile, police.getMobile()) .set(SupPolice::getMobile, police.getMobile())
.set(SupPolice::getEmploymentDate, police.getEmploymentDate()) .set(SupPolice::getEmploymentDate, police.getEmploymentDate())
.set(SupPolice::getAvatarUrl, police.getAvatarUrl())
.set(SupPolice::getUpdatedAt, DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT)); .set(SupPolice::getUpdatedAt, DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT));
return Result.success(policeService.update(updateWrapper)); return Result.success(policeService.update(updateWrapper));
} }

21
src/main/java/com/biutag/supervision/controller/system/UserController.java

@ -1,12 +1,19 @@
package com.biutag.supervision.controller.system; package com.biutag.supervision.controller.system;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.UserDto; import com.biutag.supervision.pojo.dto.UserDto;
import com.biutag.supervision.pojo.dto.UserPasswordDto;
import com.biutag.supervision.pojo.entity.BaseAccount;
import com.biutag.supervision.pojo.model.UserModel; import com.biutag.supervision.pojo.model.UserModel;
import com.biutag.supervision.pojo.param.UserQueryParam; import com.biutag.supervision.pojo.param.UserQueryParam;
import com.biutag.supervision.service.BaseAccountService;
import com.biutag.supervision.service.BaseUserService; import com.biutag.supervision.service.BaseUserService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor @RequiredArgsConstructor
@ -16,6 +23,8 @@ public class UserController {
private final BaseUserService baseUserService; private final BaseUserService baseUserService;
private final BaseAccountService accountService;
@GetMapping @GetMapping
public Result<Page<UserModel>> list(UserQueryParam queryParam) { public Result<Page<UserModel>> list(UserQueryParam queryParam) {
Page<UserModel> baseUserPage = baseUserService.page(queryParam); Page<UserModel> baseUserPage = baseUserService.page(queryParam);
@ -32,4 +41,16 @@ public class UserController {
return Result.success(baseUserService.update(userDto)); return Result.success(baseUserService.update(userDto));
} }
@PutMapping("password")
public Result<Boolean> updatePsd(@RequestBody UserPasswordDto userPasswordDto) {
BaseAccount baseAccount = accountService.getByAccount(userPasswordDto.getAccount());
if (!BCrypt.checkpw(userPasswordDto.getPassword(), baseAccount.getPassword())) {
throw new RuntimeException("密码错误!");
}
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
String passwordEncoder = encoder.encode(userPasswordDto.getNewPassword());
accountService.update(new LambdaUpdateWrapper<BaseAccount>().eq(BaseAccount::getAccount, userPasswordDto.getAccount()).set(BaseAccount::getPassword, passwordEncoder));
return Result.success();
}
} }

1
src/main/java/com/biutag/supervision/controller/system/VideoConfigController.java

@ -40,6 +40,7 @@ public class VideoConfigController {
public Result<Page<VideoConfig>> list(VideoConfigQueryParam queryParam) { public Result<Page<VideoConfig>> list(VideoConfigQueryParam queryParam) {
LambdaQueryWrapper<VideoConfig> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<VideoConfig> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(StrUtil.isNotBlank(queryParam.getDepartId()), VideoConfig::getDepartId, queryParam.getDepartId()) queryWrapper.eq(StrUtil.isNotBlank(queryParam.getDepartId()), VideoConfig::getDepartId, queryParam.getDepartId())
.orderByAsc(VideoConfig::getDepartId)
.orderByDesc(VideoConfig::getCreateTime); .orderByDesc(VideoConfig::getCreateTime);
return Result.success(videoConfigService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper)); return Result.success(videoConfigService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper));
} }

3
src/main/java/com/biutag/supervision/controller/work/NegativeController.java

@ -120,7 +120,6 @@ public class NegativeController {
.set(Negative::getProblemSources, negativeDto.getProblemSources()) .set(Negative::getProblemSources, negativeDto.getProblemSources())
.set(Negative::getProblemSourcesCode, negativeDto.getProblemSourcesCode()) .set(Negative::getProblemSourcesCode, negativeDto.getProblemSourcesCode())
.set(Negative::getBusinessTypeCode, negativeDto.getBusinessTypeCode()) .set(Negative::getBusinessTypeCode, negativeDto.getBusinessTypeCode())
.set(Negative::getBusinessTypeName, negativeDto.getBusinessTypeName())
.set(Negative::getCaseNumber, negativeDto.getCaseNumber()) .set(Negative::getCaseNumber, negativeDto.getCaseNumber())
.set(Negative::getInvolveProblem, JSON.toJSONString(negativeDto.getInvolveProblem())) .set(Negative::getInvolveProblem, JSON.toJSONString(negativeDto.getInvolveProblem()))
.set(Negative::getPoliceType, negativeDto.getPoliceType()) .set(Negative::getPoliceType, negativeDto.getPoliceType())
@ -142,6 +141,8 @@ public class NegativeController {
updateWrapper.set(Negative::getInvolveProblem, null); updateWrapper.set(Negative::getInvolveProblem, null);
} }
negativeService.update(updateWrapper); negativeService.update(updateWrapper);
// 更新问题来源
negativeWorkService.update(new LambdaUpdateWrapper<NegativeWork>().set(NegativeWork::getProblemSourcesCode, negativeDto.getProblemSourcesCode()).eq(NegativeWork::getNegativeId, negativeDto.getId()));
return Result.success(); return Result.success();
} }

2
src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java

@ -125,10 +125,8 @@ public class NegativeImportController {
BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getByLabel(item.getBusinessTypeName()); BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getByLabel(item.getBusinessTypeName());
if (businessTypeEnum != null) { if (businessTypeEnum != null) {
negativeDto.setBusinessTypeCode(businessTypeEnum.getValue()); negativeDto.setBusinessTypeCode(businessTypeEnum.getValue());
negativeDto.setBusinessTypeName(businessTypeEnum.getLabel());
} else { } else {
negativeDto.setBusinessTypeCode(BusinessTypeEnum.QT.getValue()); negativeDto.setBusinessTypeCode(BusinessTypeEnum.QT.getValue());
negativeDto.setBusinessTypeName(BusinessTypeEnum.QT.getLabel());
} }
ProblemSourcesEnum problemSourcesEnum = ProblemSourcesEnum.getByLabel(item.getProblemSources()); ProblemSourcesEnum problemSourcesEnum = ProblemSourcesEnum.getByLabel(item.getProblemSources());
if (problemSourcesEnum != null) { if (problemSourcesEnum != null) {

1
src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java

@ -1,6 +1,5 @@
package com.biutag.supervision.controller.work; package com.biutag.supervision.controller.work;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;

11
src/main/java/com/biutag/supervision/job/DepartJob.java

@ -40,17 +40,6 @@ public class DepartJob {
private final NegativeService negativeService; private final NegativeService negativeService;
@Async
public void updateDepartPath() {
List<SupDepart> departs = departService.list();
departs.forEach(item -> {
String pathTrace = departService.getPathTrace(item);
if (!pathTrace.equals(item.getPathTrace())) {
departService.update(new LambdaUpdateWrapper<SupDepart>().eq(SupDepart::getId, item.getId()).set(SupDepart::getPathTrace, pathTrace));
}
});
}
/** /**
* 每天更新一次 * 每天更新一次

49
src/main/java/com/biutag/supervision/job/Job.java

@ -1,26 +1,15 @@
package com.biutag.supervision.job; package com.biutag.supervision.job;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.biutag.supervision.constants.enums.BusinessTypeEnum;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum; import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.mapper.MailBlameMapper;
import com.biutag.supervision.mapper.MailMapper;
import com.biutag.supervision.pojo.entity.Negative; 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.entity.SupDepart;
import com.biutag.supervision.pojo.entity.SupPolice;
import com.biutag.supervision.pojo.entity.mailbox.Mail;
import com.biutag.supervision.pojo.entity.mailbox.MailBlame;
import com.biutag.supervision.service.*; import com.biutag.supervision.service.*;
import com.biutag.supervision.util.TimeUtil; import com.biutag.supervision.util.TimeUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -29,7 +18,6 @@ import java.time.ZoneId;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import static com.biutag.supervision.util.TimeUtil.SECONDS_OF_A_DAY; import static com.biutag.supervision.util.TimeUtil.SECONDS_OF_A_DAY;
@ -40,45 +28,10 @@ public class Job {
private final NegativeService negativeService; private final NegativeService negativeService;
private final SupDepartService departService;
private final BusinessPoliceService businessPoliceService; private final BusinessPoliceService businessPoliceService;
private final BusinessDepartService businessDepartService; private final BusinessDepartService businessDepartService;
private final ModelClueService modelClueService;
// 10分钟
// 更新流程状态
@Scheduled(fixedRate = 600000)
public void updateNegativeProcessingStatus() {
List<Negative> list = negativeService.list(new LambdaQueryWrapper<Negative>().isNull(Negative::getProcessingStatus).isNotNull(Negative::getCheckStatus));
list.forEach(item -> {
negativeService.update(new LambdaUpdateWrapper<Negative>().set(Negative::getProcessingStatus, ProcessingStatusEnum.completed).eq(Negative::getId, item.getId()));
});
}
// 更新办理单位
@Scheduled(fixedRate = 600000)
public void updateHandleDepart() {
List<Negative> list = negativeService.list(new LambdaQueryWrapper<Negative>()
.isNotNull(Negative::getInvolveDepartId)
.isNull(Negative::getHandleThreeDepartId)
.isNull(Negative::getFlowKey));
list.forEach(item -> {
SupDepart depart = departService.getById(item.getInvolveDepartId());
if (depart.getLevel() == 3) {
SupDepart parent = departService.getById(depart.getPid());
negativeService.update(new LambdaUpdateWrapper<Negative>()
.set(Negative::getHandleThreeDepartId, depart.getId())
.set(Negative::getHandleThreeDepartName, depart.getShortName())
.set(Negative::getHandleSecondDepartId, parent.getId())
.set(Negative::getHandleSecondDepartName, parent.getShortName())
.eq(Negative::getId, item.getId()));
}
});
}
// 更新办理超时 // 更新办理超时
@Scheduled(fixedRate = 600000) @Scheduled(fixedRate = 600000)
public void updateHandleTimeout() { public void updateHandleTimeout() {
@ -98,7 +51,7 @@ public class Job {
} }
// 每日04:00更新基础数据 // 每日04:00更新基础数据
// @Scheduled(cron = "0 0 4 * * ?") @Scheduled(cron = "0 0 4 * * ?")
public void updateBaseData() { public void updateBaseData() {
List<Date> happenTime = new ArrayList<>(); List<Date> happenTime = new ArrayList<>();
Date start = Date.from(LocalDateTime.now().minusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefault()).toInstant()); Date start = Date.from(LocalDateTime.now().minusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefault()).toInstant());

23
src/main/java/com/biutag/supervision/job/ScoreJob.java

@ -1,23 +0,0 @@
package com.biutag.supervision.job;
import com.biutag.supervision.service.*;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author wxc
* @date 2024/11/10
*/
@RequiredArgsConstructor
@Component
public class ScoreJob {
private final NegativeScoreService negativeScoreService;
// @Scheduled(fixedRate = 600000)
public void updateScore() {
}
}

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

@ -32,7 +32,7 @@ public interface DataCaseVerifMapper extends BaseMapper<DataCaseVerif> {
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " + "INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus <>3 " + "WHERE ng.checkStatus <>3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20) " + "AND ng.problemSourcesCode IN (17, 18, 19, 20) " +
"AND businessTypeCode = #{businessId} " + "AND businessTypeCode = #{businessId} " +
"GROUP BY threeLevelContent ") "GROUP BY threeLevelContent ")

51
src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java

@ -16,7 +16,6 @@ import java.util.List;
public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComplaint> { public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComplaint> {
Page<DataPetitionComplaintVo> queryPage(@Param("page") Page<DataPetitionComplaint> page, @Param(Constants.WRAPPER) QueryWrapper<DataPetitionComplaint> queryWrapper); Page<DataPetitionComplaintVo> queryPage(@Param("page") Page<DataPetitionComplaint> page, @Param(Constants.WRAPPER) QueryWrapper<DataPetitionComplaint> queryWrapper);
/** /**
@ -61,21 +60,19 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"IFNULL(SUM( IF( initial_petition=2, 1, 0) ), 0) AS repeatMail, " + "IFNULL(SUM( IF( initial_petition=2, 1, 0) ), 0) AS repeatMail, " +
"IFNULL(SUM( IF(receiving_leader_name is NOT NULL, 1, 0) ), 0) AS leaderMail " + "IFNULL(SUM( IF(receiving_leader_name is NOT NULL, 1, 0) ), 0) AS leaderMail " +
"FROM data_petition_complaint dpc " + "FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + "LEFT JOIN sup_depart sd on dpc.second_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + "WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND sd.statistics_group_id=#{groupId}")
"AND sd1.statistics_group_id=#{groupId}; ")
MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime, Integer groupId); MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT " + @Select("SELECT " +
"sd1.short_name AS label, " + "sd.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " + "count(*) AS `value` FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + "LEFT JOIN sup_depart sd on dpc.second_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE dpc.initial_petition=#{isRepeat} " + "WHERE dpc.initial_petition=#{isRepeat} " +
"AND sd1.statistics_group_id=#{groupId} " + "AND sd.statistics_group_id=#{groupId} " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, Integer groupId, Integer isRepeat); List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, Integer groupId, Integer isRepeat);
@ -88,7 +85,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + "LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE dpc.receiving_leader_name is NOT NULL " + "WHERE dpc.receiving_leader_name is NOT NULL " +
"AND sd1.statistics_group_id=#{groupId} " + "AND sd1.statistics_group_id=#{groupId} " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.short_name " + "GROUP BY sd1.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
@ -102,7 +99,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"FROM data_petition_complaint dpc " + "FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + "LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 on sd.pid=sd1.id " + "LEFT JOIN sup_depart sd1 on sd.pid=sd1.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + "WHERE create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.statistics_group_id=#{groupId}; ") "AND sd1.statistics_group_id=#{groupId}; ")
MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime, Integer groupId); MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime, Integer groupId);
@ -115,7 +112,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + "LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE sd1.statistics_group_id=#{groupId} " + "WHERE sd1.statistics_group_id=#{groupId} " +
"AND dpc.entanglement_visits =1 " + "AND dpc.entanglement_visits =1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.short_name " + "GROUP BY sd1.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC;") "ORDER BY `value` DESC;")
@ -129,7 +126,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + "LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE sd1.statistics_group_id=#{groupId} " + "WHERE sd1.statistics_group_id=#{groupId} " +
"AND dpc.mass_visits =1 " + "AND dpc.mass_visits =1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.short_name " + "GROUP BY sd1.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC;") "ORDER BY `value` DESC;")
@ -152,7 +149,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderMail " + "COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderMail " +
"FROM data_petition_complaint dpc " + "FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + "LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + "WHERE create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND sd.statistics_group_id = 10;") "AND sd.statistics_group_id = 10;")
MailFirstAndRepeatOverviewVo getSubOnePoliceFirstAndRepeatOverview(Date beginTime, Date endTime, Integer departId); MailFirstAndRepeatOverviewVo getSubOnePoliceFirstAndRepeatOverview(Date beginTime, Date endTime, Integer departId);
@ -163,7 +160,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderMail " + "COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderMail " +
"FROM data_petition_complaint dpc " + "FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + "LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + "WHERE create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND sd.statistics_group_id != 10;") "AND sd.statistics_group_id != 10;")
MailFirstAndRepeatOverviewVo getTeamFirstAndRepeatOverview(Date beginTime, Date endTime, Integer departId); MailFirstAndRepeatOverviewVo getTeamFirstAndRepeatOverview(Date beginTime, Date endTime, Integer departId);
@ -177,7 +174,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"AND sd.pid = #{departId} " + "AND sd.pid = #{departId} " +
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
"AND dpc.second_depart_name is not NULL " + "AND dpc.second_depart_name is not NULL " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC") "ORDER BY `value` DESC")
@ -192,7 +189,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"AND sd.pid = #{departId} " + "AND sd.pid = #{departId} " +
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
"AND dpc.second_depart_name is not NULL " + "AND dpc.second_depart_name is not NULL " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC") "ORDER BY `value` DESC")
@ -204,7 +201,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"WHERE dpc.receiving_leader_name is NOT NULL " + "WHERE dpc.receiving_leader_name is NOT NULL " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND sd.statistics_group_id = 10 " + "AND sd.statistics_group_id = 10 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
@ -217,7 +214,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"WHERE dpc.receiving_leader_name is NOT NULL " + "WHERE dpc.receiving_leader_name is NOT NULL " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND sd.statistics_group_id != 10 " + "AND sd.statistics_group_id != 10 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
@ -244,7 +241,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"COALESCE(SUM(IF(mass_visits=1, 1, 0)), 0) AS mass " + "COALESCE(SUM(IF(mass_visits=1, 1, 0)), 0) AS mass " +
"FROM data_petition_complaint dpc " + "FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + "LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + "WHERE create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND sd.statistics_group_id=10;") "AND sd.statistics_group_id=10;")
MailEntanglementMassOverviewVo getPoliceEntanglementAndMassOverview(Date beginTime, Date endTime, Integer departId); MailEntanglementMassOverviewVo getPoliceEntanglementAndMassOverview(Date beginTime, Date endTime, Integer departId);
@ -254,7 +251,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"COALESCE(SUM(IF(mass_visits=1, 1, 0)), 0) AS mass " + "COALESCE(SUM(IF(mass_visits=1, 1, 0)), 0) AS mass " +
"FROM data_petition_complaint dpc " + "FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + "LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + "WHERE create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND sd.statistics_group_id!=10;") "AND sd.statistics_group_id!=10;")
MailEntanglementMassOverviewVo getTeamEntanglementAndMassOverview(Date beginTime, Date endTime, Integer departId); MailEntanglementMassOverviewVo getTeamEntanglementAndMassOverview(Date beginTime, Date endTime, Integer departId);
@ -267,7 +264,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"WHERE sd.statistics_group_id=10 " + "WHERE sd.statistics_group_id=10 " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND dpc.entanglement_visits =1 " + "AND dpc.entanglement_visits =1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC;") "ORDER BY `value` DESC;")
@ -281,7 +278,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"WHERE sd.statistics_group_id!=10 " + "WHERE sd.statistics_group_id!=10 " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND dpc.entanglement_visits =1 " + "AND dpc.entanglement_visits =1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC;") "ORDER BY `value` DESC;")
@ -295,7 +292,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"WHERE sd.statistics_group_id=10 " + "WHERE sd.statistics_group_id=10 " +
"AND dpc.mass_visits =1 " + "AND dpc.mass_visits =1 " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC;") "ORDER BY `value` DESC;")
@ -310,7 +307,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"WHERE sd.statistics_group_id!=10 " + "WHERE sd.statistics_group_id!=10 " +
"AND dpc.mass_visits =1 " + "AND dpc.mass_visits =1 " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + "AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"HAVING label is not NULL " + "HAVING label is not NULL " +
"ORDER BY `value` DESC;") "ORDER BY `value` DESC;")

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

@ -33,9 +33,8 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT(DISTINCT ng.id ) AS `value` " + "COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=#{groupType} " + "AND sd.statistics_group_id=#{groupType} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> selectOrganizeProblemRank(Integer groupType, Date beginTime, Date endTime); List<OrganizeProblemRankVo> selectOrganizeProblemRank(Integer groupType, Date beginTime, Date endTime);
@ -44,7 +43,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT " + @Select("SELECT " +
"businessTypeName as name, " + "businessTypeName as name, " +
"count(*) value FROM negative " + "count(*) value FROM negative " +
"WHERE discoveryTime BETWEEN #{beginTime} and #{endTime} " + "WHERE crtTime BETWEEN #{beginTime} and #{endTime} " +
"and checkStatus in (1, 2) " + "and checkStatus in (1, 2) " +
"GROUP BY businessTypeName") "GROUP BY businessTypeName")
List<EchartsVo> selectBusinessRate(Date beginTime, Date endTime); List<EchartsVo> selectBusinessRate(Date beginTime, Date endTime);
@ -52,14 +51,13 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// 中央总览 // 中央总览
@Select("SELECT " + @Select("SELECT " +
"COALESCE(SUM(IF(problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30), 1, 0)), 0) AS totalPro, " + "count(ng.id) AS totalPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (13,15,16), 1, 0)), 0) AS supervisionPro, " + "COALESCE(SUM(IF(problemSourcesCode IN (13,14,15,16), 1, 0)), 0) AS supervisionPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (17,18,19,20), 1, 0)), 0) AS caseVerificationPro, " + "COALESCE(SUM(IF(problemSourcesCode IN (17,18,19,20), 1, 0)), 0) AS caseVerificationPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (21,22,23,24,25), 1, 0)), 0) AS complaintPro, " + // "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, " + "COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro " +
"COALESCE(SUM(IF(problemSourcesCode IN (27,28,29,30), 1, 0)), 0) AS auditPro " +
"FROM negative ng " + "FROM negative ng " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ")
GlobalOverViewVo getAllGlobalCount(Date beginTime, Date endTime); GlobalOverViewVo getAllGlobalCount(Date beginTime, Date endTime);
@ -68,7 +66,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"sd.short_name AS `name`, " + "sd.short_name AS `name`, " +
"sd.id AS departId, " + "sd.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " + "COUNT( DISTINCT ng.id ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " + "SUM( IF(problemSourcesCode IN (13,15,16, 14), 1, 0) ) AS supervisePro, " +
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " + "SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " + "SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " + "SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " +
@ -76,7 +74,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM sup_depart sd " + "FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " + "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE sd.statistics_group_id=3 " + "WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY totalPro DESC;") "ORDER BY totalPro DESC;")
@ -98,7 +96,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"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 checkStatus IN (1, 2) " +
"AND discoveryTime 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 " +
" LIMIT 10 OFFSET 1 ") " LIMIT 10 OFFSET 1 ")
@ -111,14 +109,14 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT " + @Select("SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " + "COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber, " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " + "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE problemSourcesCode IN (13) " + "WHERE problemSourcesCode IN (13) " +
"AND sd.statistics_group_id=#{groupId} " + "AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime};") "AND crtTime BETWEEN #{beginTime} AND #{endTime};")
DayTimeSuperviseVo getSupervisionRank(Date beginTime, Date endTime, Integer groupId); DayTimeSuperviseVo getSupervisionRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT " + @Select("SELECT " +
@ -126,48 +124,37 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"sd.id AS departId, " + "sd.id AS departId, " +
"COUNT(DISTINCT ng.id) AS denominator, " + "COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rate, " + "ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rate, " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " + "ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE problemSourcesCode IN (13) " + "WHERE problemSourcesCode IN (13) " +
"AND sd.statistics_group_id=#{groupId} " + "AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY rate desc") "ORDER BY rate desc, denominator desc")
List<RankVo> getChangedRateRank(Date beginTime, Date endTime, Integer groupId); List<RankVo> getChangedRateRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " + @Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " +
"WHERE ng.id = npr.negativeId " + "WHERE ng.id = npr.negativeId " +
"AND ng.problemSourcesCode in (13, 15) " + "AND ng.problemSourcesCode in (13, 15) " +
"and ng.checkStatus<>3 " + "and ng.checkStatus<>3 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND oneLevelContent is NOT NULL " + "AND oneLevelContent is NOT NULL " +
"GROUP BY oneLevelContent ") "GROUP BY oneLevelContent ")
List<EchartsVo> getProblemTypeRatio(Date beginTime, Date endTime); List<EchartsVo> getProblemTypeRatio(Date beginTime, Date endTime);
@Select("SELECT COUNT(DISTINCT c.id) AS problem_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS rectifing_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS rectifed_number, " +
"COUNT(DISTINCT c.involveDepartId) AS depart_number, " +
"COUNT(DISTINCT d.blameIdCode) AS person_number, " +
"ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS rectify_rate " +
"FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId " +
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)")
RankVoSupTwo getTemp(Date beginTime, Date endTime);
@Select("SELECT " + @Select("SELECT " +
"COALESCE(COUNT(DISTINCT ng.id), 0) AS problemNumber, " + "COALESCE(COUNT(DISTINCT ng.id), 0) AS problemNumber, " +
"COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL)), 0) AS rectifingNumber, " + "COALESCE(COUNT(DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL)), 0) AS processingNumber, " +
"COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)), 0) AS rectifedNumber, " + "COALESCE(COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)), 0) AS completedNumber, " +
"COALESCE(COUNT(DISTINCT ng.involveDepartId), 0) AS departNumber, " + "COUNT(IF(nb.type ='department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS departNumber, " +
"COALESCE(COUNT(DISTINCT nb.blameIdCode), 0) AS personNumber, " + "COUNT(IF(nb.type ='personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS personNumber, " +
"COALESCE(ROUND(COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id) * 100, 1), 0) AS rectifyRate " + "COALESCE(ROUND(COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id) * 100, 1), 0) AS completedRate " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.problemSourcesCode IN (13, 15) " + "WHERE ng.problemSourcesCode IN (13, 15) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ")
SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime); SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime);
@ -177,15 +164,15 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT( DISTINCT ng.id ) AS totalPro, " + "COUNT( DISTINCT ng.id ) AS totalPro, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " + "COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " + "COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " +
"COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " + "COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNum, " + "COUNT( DISTINCT nb.blameIdCode ) AS personNum, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS changedRate " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " +
"FROM sup_depart sd " + "FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND ng.problemSourcesCode IN (13, 15)" + "AND ng.problemSourcesCode IN (13, 15)" +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.statistics_group_id=3 " + "WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
@ -195,15 +182,15 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT " + @Select("SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " + "COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE problemSourcesCode IN (15) " + "WHERE problemSourcesCode IN (15) " +
"AND ng.special_supervision=#{queryType} " + "AND ng.special_supervision=#{queryType} " +
"AND sd.statistics_group_id=#{groupId} " + "AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") "AND crtTime BETWEEN #{beginTime} AND #{endTime}; ")
DayTimeSuperviseVo getYellowBetOverview(Date beginTime, Date endTime, Integer groupId, String queryType); DayTimeSuperviseVo getYellowBetOverview(Date beginTime, Date endTime, Integer groupId, String queryType);
@Select("SELECT " + @Select("SELECT " +
@ -214,26 +201,25 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE problemSourcesCode IN (15) " + "WHERE problemSourcesCode IN (15) " +
"AND ng.special_supervision=#{queryType} " + "AND ng.special_supervision=#{queryType} " +
"AND sd.statistics_group_id=#{groupId} " + "AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY `value` DESC;") "ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getYellowBetRankList(Date beginTime, Date endTime, Integer groupId, String queryType); List<OrganizeProblemRankVo> getYellowBetRankList(Date beginTime, Date endTime, Integer groupId, String queryType);
// endregion
// region 视频督察大屏 // region 视频督察大屏
@Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " + @Select("SELECT " +
"COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " + "COUNT(DISTINCT ng.id) total," +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " + "COUNT(DISTINCT IF(ng.checkStatus IN ('1','2'), ng.id, NULL)) AS discoverProblem, " +
"COUNT(DISTINCT nb.blameName) AS relativePer, " + "COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " + "COUNT(IF(nb.type ='department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS relativeOrg, " +
"COUNT(IF(nb.type ='personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS relativePer, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS completionRate " +
"FROM sup_depart sd " + "FROM sup_depart sd " +
"INNER JOIN negative ng ON sd.id = ng.involveDepartId " + "INNER JOIN negative ng ON sd.id = ng.involveDepartId " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.checkStatus IN ('1','2') " + "WHERE problemSourcesCode = 16 " +
"AND problemSourcesCode = 16 " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}")
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
VideoSuperviseCountVo getAllVideoSuperviseCount(Date beginTime, Date endTime); VideoSuperviseCountVo getAllVideoSuperviseCount(Date beginTime, Date endTime);
@Select("SELECT npr.threeLevelContent AS `name`, " + @Select("SELECT npr.threeLevelContent AS `name`, " +
@ -243,19 +229,19 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"on ng.id=npr.negativeId " + "on ng.id=npr.negativeId " +
"WHERE ng.problemSourcesCode=16 " + "WHERE ng.problemSourcesCode=16 " +
"AND checkStatus <> 3 " + "AND checkStatus <> 3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent ") "GROUP BY npr.threeLevelContent ")
List<EchartsVo> getVideoSuperviseProblemTypeRate(Date beginTime, Date endTime); List<EchartsVo> getVideoSuperviseProblemTypeRate(Date beginTime, Date endTime);
@Select("SELECT sd1.short_name AS label, " + @Select("SELECT d.short_name AS label, " +
"count(*) as `value`" + "count(ng.id) as `value`" +
" FROM negative ng " + " FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "INNER JOIN sup_depart d ON ng.second_involve_depart_id = d.id " +
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + "WHERE ng.checkStatus in (1, 2) " +
"WHERE checkStatus <> 3 " + "AND ng.problemSourcesCode = 16 " +
"AND problemSourcesCode=16 " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND d.statistics_group_id = #{groupId} " +
"GROUP BY sd1.short_name " + "GROUP BY d.short_name " +
"ORDER BY `value` DESC") "ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getVideoSuperviseProblemRank(Date beginTime, Date endTime, Integer groupId); List<OrganizeProblemRankVo> getVideoSuperviseProblemRank(Date beginTime, Date endTime, Integer groupId);
@ -263,15 +249,15 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"sd.short_name AS `name`, " + "sd.short_name AS `name`, " +
"sd.id AS departId, " + "sd.id AS departId, " +
"COUNT( DISTINCT ng.id) AS discoverProblem, " + "COUNT( DISTINCT ng.id) AS discoverProblem, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changedProblem, " + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completionProblem, " +
"COUNT( DISTINCT ng.involveDepartId) AS relativeOrg, " + "COUNT( DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT( DISTINCT nb.blameName ) AS relativePer, " + "COUNT( DISTINCT nb.blameName ) AS relativePer, " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS changedRate " + "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS completionRate " +
"FROM sup_depart sd " + "FROM sup_depart sd " +
"LEFT JOIN negative ng ON sd.id=ng.second_involve_depart_id " + "LEFT JOIN negative ng ON sd.id=ng.second_involve_depart_id " +
"AND checkStatus <>3 " + "AND checkStatus <>3 " +
"AND problemSourcesCode =16 " + "AND problemSourcesCode =16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.statistics_group_id=3 " + "WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name; ") "GROUP BY sd.short_name; ")
@ -286,7 +272,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT( DISTINCT ng.id ) AS `value` " + "COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=#{groupId} " + "AND sd.statistics_group_id=#{groupId} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
@ -295,14 +281,14 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT count(DISTINCT ng.id) AS total, " + @Select("SELECT count(DISTINCT ng.id) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS confirmed, " +
"COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT nb.blameName ) AS punishPre, " + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishPre, " +
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishOrg, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND problemSourcesCode in (17, 18, 19, 20) ") "AND problemSourcesCode in (17, 18, 19, 20) ")
CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime); CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime);
@ -319,7 +305,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM sup_depart sd " + "FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.statistics_group_id=3 " + "WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name;") "GROUP BY sd.short_name;")
@ -329,7 +315,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id " + "INNER JOIN negative_blame nb ON nb.negativeId=ng.id " +
"WHERE handleResultName is NOT NULL " + "WHERE handleResultName is NOT NULL " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20) " + "AND ng.problemSourcesCode in (17, 18, 19, 20) " +
"AND ng.checkStatus <>3 " + "AND ng.checkStatus <>3 " +
"GROUP BY nb.handleResultName") "GROUP BY nb.handleResultName")
@ -339,20 +325,11 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"count(DISTINCT(ng.id)) as `value` FROM negative ng " + "count(DISTINCT(ng.id)) as `value` FROM negative ng " +
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id AND nb.superviseMeasuresCode=#{type} " + "INNER JOIN negative_blame nb ON nb.negativeId=ng.id AND nb.superviseMeasuresCode=#{type} " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " + "INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus<>3 " + "WHERE ng.checkStatus in (1, 2) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent") "GROUP BY npr.threeLevelContent")
List<EchartsVo> getConfinementAndPause(Date beginTime, Date endTime, Integer type); List<EchartsVo> getConfinementAndPause(Date beginTime, Date endTime, Integer type);
@Select("SELECT count(DISTINCT ng.id) AS totalMail, " +
"COUNT( ng.problemSourcesCode=21 ) AS countryMail, " +
"COUNT( ng.problemSourcesCode=22 ) AS policeMail, " +
"COUNT( ng.problemSourcesCode=24 ) AS numberMail, " +
"COUNT( ng.problemSourcesCode=23 ) AS manageMail " +
"FROM negative ng WHERE ng.checkStatus <> 3 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode in(21, 22, 23, 24)")
MailOverviewVo getAllMailCount(Date beginTime, Date endTime);
List<EchartsVo> getMailTrend(Integer year, Integer type); List<EchartsVo> getMailTrend(Integer year, Integer type);
@ -368,7 +345,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT(DISTINCT ng.id ) AS `value` " + "COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " + "LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " + "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
@ -381,7 +358,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT(DISTINCT ng.id ) AS `value` " + "COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " + "LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " + "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
@ -394,7 +371,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"count(*) value " + "count(*) value " +
"FROM negative " + "FROM negative " +
"WHERE checkStatus in (1, 2) " + "WHERE checkStatus in (1, 2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND negative.second_involve_depart_id=#{departId} " + "AND negative.second_involve_depart_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);
@ -406,7 +383,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COALESCE(SUM(IF(problemSourcesCode IN (21, 22, 23, 24, 25), 1, 0)), 0) AS complaintPro, " + "COALESCE(SUM(IF(problemSourcesCode IN (21, 22, 23, 24, 25), 1, 0)), 0) AS complaintPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro, " + "COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (27, 28, 29, 30), 1, 0)), 0) AS auditPro " + "COALESCE(SUM(IF(problemSourcesCode IN (27, 28, 29, 30), 1, 0)), 0) AS auditPro " +
"FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "FROM negative ng WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} ") "AND ng.second_involve_depart_id=#{departId} ")
GlobalOverViewVo getSuoOneAllGlobalCount(Integer departId, Date beginTime, Date endTime); GlobalOverViewVo getSuoOneAllGlobalCount(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " + @Select("SELECT " +
@ -422,7 +399,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " + "SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " +
"FROM county_street_dept csd " + "FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " + "LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY csd.dept_name " + "GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} ") "HAVING csd.dept_pid=#{departId} ")
@ -435,7 +412,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"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 checkStatus IN (1, 2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" + "AND crtTime BETWEEN #{beginTime} AND #{endTime}" +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY npr.threeLevelContent " + "GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc " + "ORDER BY `value` desc " +
@ -448,138 +425,13 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"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) " + "WHERE checkStatus in (1,2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND npr.oneLevelContent is not NULL " + "AND npr.oneLevelContent is not NULL " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_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);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS one, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16) " +
"AND ng.second_involve_depart_id = #{departId} " +
"AND sd.statistics_group_id=10 ")
SubOneOverViewVo getSubOneGlobalPoliceSupervisionRankOverView(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS one, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16) " +
"AND ng.second_involve_depart_id = #{departId} " +
"AND sd.statistics_group_id!=10")
SubOneOverViewVo getSubOneGlobalTeamSupervisionRankOverView(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY rate DESC, denominator DESC")
List<RankVo> getSubOneGlobalPrecinctSupervisionRank(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16)" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY rate DESC, denominator DESC")
List<RankVo> getSubOneGlobalTeamSupervisionRank(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT count(DISTINCT ng.id) AS one, " +
"COUNT( DISTINCT( if(processing_status='processing', ng.id, NULL) ) ) AS two, " +
"count(DISTINCT involveDepartId) AS three, " +
"count(DISTINCT nb.blameIdCode) AS four, " +
"ifnull(ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1),0) AS five " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.pid= #{departPId} " +
"AND ng.discoveryTime BETWEEN #{beginTime} and #{endTime} ")
SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS one," +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20)" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10")
SubOneOverViewVo getGlobalPoliceCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS one," +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20)" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10")
SubOneOverViewVo getGlobalTeamCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS value," +
"COUNT( DISTINCT ng.id ) AS numerator, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY value DESC ")
List<RankVo> getGlobalPoliceCaseVerifyRank(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS value," +
"COUNT( DISTINCT ng.id ) AS numerator, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY value DESC ")
List<RankVo> getGlobalTeamCaseVerifyRank(Integer departPId, Date beginTime, Date endTime);
// endregion
// region 二级大屏视频督察 // region 二级大屏视频督察
@ -590,7 +442,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND sd.pid=#{departId} AND sd.statistics_group_id=10 " + "AND sd.pid=#{departId} AND sd.statistics_group_id=10 " +
"WHERE checkStatus <> 3 " + "WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " + "AND problemSourcesCode=16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"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);
@ -602,7 +454,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND sd.pid=#{departId} AND sd.statistics_group_id!=10 " + "AND sd.pid=#{departId} AND sd.statistics_group_id!=10 " +
"WHERE checkStatus <> 3 " + "WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " + "AND problemSourcesCode=16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"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);
@ -610,16 +462,16 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getSubOneVideoSuperviseTrend(String year, String problemCode, String departId); List<EchartsVo> getSubOneVideoSuperviseTrend(String year, String problemCode, String departId);
@Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " + @Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " + "COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " + "COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT(DISTINCT nb.blameName) AS relativePer, " + "COUNT(DISTINCT nb.blameName) AS relativePer, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " + "IFNULL( ROUND((COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS completionRate " +
"FROM sup_depart sd " + "FROM sup_depart sd " +
"INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " + "INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.checkStatus IN ('1','2') " + "WHERE ng.checkStatus IN ('1','2') " +
"AND problemSourcesCode = 16 " + "AND problemSourcesCode = 16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ")
VideoSuperviseCountVo getSubOneAllVideoSuperviseCount(Date beginTime, Date endTime, Integer departId); VideoSuperviseCountVo getSubOneAllVideoSuperviseCount(Date beginTime, Date endTime, Integer departId);
@Select("SELECT npr.threeLevelContent AS `name`, " + @Select("SELECT npr.threeLevelContent AS `name`, " +
@ -630,13 +482,11 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"on ng.id=npr.negativeId " + "on ng.id=npr.negativeId " +
"WHERE ng.problemSourcesCode=16 " + "WHERE ng.problemSourcesCode=16 " +
"AND checkStatus <> 3 " + "AND checkStatus <> 3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent ") "GROUP BY npr.threeLevelContent ")
List<EchartsVo> getSubOneVideoSuperviseProblemTypeRate(Integer departId, Date beginTime, Date endTime); List<EchartsVo> getSubOneVideoSuperviseProblemTypeRate(Integer departId, Date beginTime, Date endTime);
// endregion
// region 二级大屏现场督察 // region 二级大屏现场督察
@Select("SELECT " + @Select("SELECT " +
@ -649,7 +499,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.problemSourcesCode IN (13) " + "WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") "AND crtTime BETWEEN #{beginTime} AND #{endTime} ")
DayTimeSuperviseVo getPoliceRankOverview(Integer departId, Date beginTime, Date endTime); DayTimeSuperviseVo getPoliceRankOverview(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " + @Select("SELECT " +
@ -662,7 +512,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.problemSourcesCode IN (13) " + "WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") "AND crtTime BETWEEN #{beginTime} AND #{endTime} ")
DayTimeSuperviseVo getTeamRankOverview(Integer departId, Date beginTime, Date endTime); DayTimeSuperviseVo getTeamRankOverview(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " + @Select("SELECT " +
@ -676,7 +526,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.problemSourcesCode IN (13) " + "WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY value DESC;") "ORDER BY value DESC;")
List<RankVo> getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime); List<RankVo> getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime);
@ -692,21 +542,11 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.problemSourcesCode IN (13) " + "WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY value DESC;") "ORDER BY value DESC;")
List<RankVo> getTeamChangedRankList(Integer departId, Date beginTime, Date endTime); List<RankVo> getTeamChangedRankList(Integer departId, Date beginTime, Date endTime);
// @Select("SELECT count(DISTINCT(ng.id)) as proTotal, " +
// "count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
// "count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
// "COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " +
// "INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " +
// "WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " +
// "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ")
// DayTimeSuperviseVo getTeamChangedRankOverView(Integer departId, Date beginTime, Date endTime);
@Select("SELECT sd.short_name as label, " + @Select("SELECT sd.short_name as label, " +
"sd.id AS departId, " + "sd.id AS departId, " +
"count( DISTINCT ng.id) AS denominator, " + "count( DISTINCT ng.id) AS denominator, " +
@ -718,7 +558,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb on ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode=13 " + "WHERE ng.problemSourcesCode=13 " +
"AND ng.checkStatus<>3 " + "AND ng.checkStatus<>3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " + "GROUP BY label " +
"order by rate desc;") "order by rate desc;")
List<RankVo> getSubOnePoliceChangedRateRank(Integer departId, Date beginTime, Date endTime); List<RankVo> getSubOnePoliceChangedRateRank(Integer departId, Date beginTime, Date endTime);
@ -734,7 +574,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb on ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode=13 " + "WHERE ng.problemSourcesCode=13 " +
"AND ng.checkStatus<>3 " + "AND ng.checkStatus<>3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " + "GROUP BY label " +
"order by rate desc;") "order by rate desc;")
List<RankVo> getSubOneTeamChangedRateRank(Integer departId, Date beginTime, Date endTime); List<RankVo> getSubOneTeamChangedRateRank(Integer departId, Date beginTime, Date endTime);
@ -746,23 +586,23 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"WHERE ng.problemSourcesCode in (13, 15) " + "WHERE ng.problemSourcesCode in (13, 15) " +
"and ng.checkStatus<>3 " + "and ng.checkStatus<>3 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND oneLevelContent is NOT NULL " + "AND oneLevelContent is NOT NULL " +
"GROUP BY oneLevelContent ") "GROUP BY oneLevelContent ")
List<EchartsVo> getSubOneProblemTypeRatio(Integer departId, Date beginTime, Date endTime); List<EchartsVo> getSubOneProblemTypeRatio(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " + @Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS problemNumber, " + "COUNT( DISTINCT ng.id ) AS problemNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS rectifingNumber, " + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber, " + "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " +
"COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " + "COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " + "COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rectifyRate " + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id) * 100, 1) AS rectifyRate " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode IN (13, 15) " + "WHERE ng.problemSourcesCode IN (13, 15) " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} ")
SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime); SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime);
@ -770,8 +610,8 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN " + "LEFT JOIN " +
"( " + "( " +
"SELECT ng.* FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id WHERE sd.pid=#{departId} AND ng.checkStatus != 3 AND ng.problemSourcesCode IN (13, 15) " + "SELECT ng.* FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id WHERE sd.pid=#{departId} AND ng.checkStatus != 3 AND ng.problemSourcesCode IN (13, 15) " +
") AS temp ON DATE_FORMAT(temp.discoveryTime, '%m') = m.month " + ") AS temp ON DATE_FORMAT(temp.crtTime, '%m') = m.month " +
"AND YEAR(temp.discoveryTime) = #{year} " + "AND YEAR(temp.crtTime) = #{year} " +
"GROUP by m.month_name " + "GROUP by m.month_name " +
"ORDER BY m.month ASC;") "ORDER BY m.month ASC;")
List<EchartsVo> getSubOneSupervisionTrend(Integer departId, String year); List<EchartsVo> getSubOneSupervisionTrend(Integer departId, String year);
@ -788,7 +628,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.special_supervision=#{specialType} " + "AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") "AND crtTime BETWEEN #{beginTime} AND #{endTime}; ")
DayTimeSuperviseVo getSubOnePoliceYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); DayTimeSuperviseVo getSubOnePoliceYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT " + @Select("SELECT " +
@ -802,7 +642,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.special_supervision=#{specialType} " + "AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") "AND crtTime BETWEEN #{beginTime} AND #{endTime}; ")
DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT " + @Select("SELECT " +
@ -814,7 +654,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.special_supervision=#{specialType} " + "AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); List<OrganizeProblemRankVo> getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType);
@ -828,7 +668,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.special_supervision=#{specialType} " + "AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); List<OrganizeProblemRankVo> getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType);
@ -842,7 +682,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT( DISTINCT ng.id ) AS `value` " + "COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)" + "AND ng.problemSourcesCode IN (17, 18, 19, 20)" +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
@ -855,7 +695,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT( DISTINCT ng.id ) AS `value` " + "COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)" + "AND ng.problemSourcesCode IN (17, 18, 19, 20)" +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
@ -870,7 +710,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.checkStatus!=3 " + "WHERE ng.checkStatus!=3 " +
"AND sd.pid = #{departId} " + "AND sd.pid = #{departId} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.businessTypeCode = #{businessType} " + "AND ng.businessTypeCode = #{businessType} " +
"GROUP BY npr.threeLevelContent " + "GROUP BY npr.threeLevelContent " +
"ORDER BY `value` DESC ") "ORDER BY `value` DESC ")
@ -884,7 +724,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20); ") "AND ng.problemSourcesCode in (17, 18, 19, 20); ")
CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId); CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId);
@ -903,7 +743,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM county_street_dept csd " + "FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " + "LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " + "GROUP BY csd.dept_name " +
@ -916,7 +756,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_dict_problem_source sdps ON ng.problemSourcesCode= sdps.id " + "LEFT JOIN sup_dict_problem_source sdps ON ng.problemSourcesCode= sdps.id " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"GROUP BY sdps.label") "GROUP BY sdps.label")
List<EchartsVo> getSuboOneCaseSourceRate(Date beginTime, Date endTime, Integer departId); List<EchartsVo> getSuboOneCaseSourceRate(Date beginTime, Date endTime, Integer departId);
@ -927,7 +767,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"inner JOIN sup_depart sd on ng.involveDepartId=sd.id AND sd.pid=#{departId} " + "inner JOIN sup_depart sd on ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"INNER JOIN negative_blame nb ON ng.id=nb.negativeId " + "INNER JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE nb.handleResultName IS NOT NULL " + "WHERE nb.handleResultName IS NOT NULL " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.checkStatus <>3 " + "AND ng.checkStatus <>3 " +
"GROUP BY nb.handleResultName") "GROUP BY nb.handleResultName")
@ -938,7 +778,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT problemSources AS name, count(ng.id) AS value " + @Select("SELECT problemSources AS name, count(ng.id) AS value " +
"FROM negative ng " + "FROM negative ng " +
"WHERE problemSourcesCode IN (17, 18, 19, 20) AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE problemSourcesCode IN (17, 18, 19, 20) AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY problemSources") "GROUP BY problemSources")
List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime); List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime);
@ -954,7 +794,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"count(*) `value` FROM negative_problem_relation npr " + "count(*) `value` 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) " + "WHERE checkStatus in (1, 2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND npr.oneLevelContent is not NULL " + "AND npr.oneLevelContent is not NULL " +
"GROUP BY npr.oneLevelContent " + "GROUP BY npr.oneLevelContent " +
"ORDER BY `value` desc") "ORDER BY `value` desc")
@ -974,7 +814,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN negative ng ON csd.dept_id=ng.three_involve_depart_id " + "LEFT JOIN negative ng ON csd.dept_id=ng.three_involve_depart_id " +
"AND checkStatus <>3 " + "AND checkStatus <>3 " +
"AND problemSourcesCode =16 " + "AND problemSourcesCode =16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " + "GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId}; ") "HAVING csd.dept_pid=#{departId}; ")
@ -997,7 +837,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM county_street_dept csd " + "FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " + "LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.problemSourcesCode IN (13, 15) " + "AND ng.problemSourcesCode IN (13, 15) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " + "GROUP BY csd.dept_name " +

35
src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java

@ -4,11 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.dto.common.BarItem;
import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.RpcApply; import com.biutag.supervision.pojo.entity.RpcApply;
import com.biutag.supervision.pojo.entity.RpcInfringerResult; import com.biutag.supervision.pojo.entity.RpcInfringerResult;
import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.pojo.vo.RpcApplyVo; import com.biutag.supervision.pojo.vo.RpcApplyVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
@ -18,39 +18,16 @@ import java.util.List;
public interface RpcApplyMapper extends BaseMapper<RpcApply> { public interface RpcApplyMapper extends BaseMapper<RpcApply> {
@Select("SELECT COUNT(a.rpc_id) FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " +
"WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2")
Integer countComfortPersonNumber(Date beginTime, Date endTime);
@Select("SELECT a.tort_name FROM rpc_infringer_result a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " +
"WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2")
List<String> getHitPeople(Date beginTime, Date endTime);
@Select("SELECT COALESCE(SUM(a.provide_relief), 0.0) FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " + @Select("SELECT COALESCE(SUM(a.provide_relief), 0.0) FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " +
"WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2") "WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2")
Double countComfortMoney(Date beginTime, Date endTime); Double countComfortMoney(Date beginTime, Date endTime);
@Select("select tort_name, defend_handle_way_name from rpc_infringer_result a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " +
"WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2")
List<RpcInfringerResult> selectPunishmentSituation(Date beginTime, Date endTime);
@Select("SELECT c.job name, COUNT(c.job) value FROM sup_police c JOIN " + @Select("SELECT c.job name, COUNT(c.job) value FROM sup_police c JOIN " +
"(SELECT a.emp_no FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " + "(SELECT a.emp_no FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " +
"WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2) d on c.emp_no = d.emp_no " + "WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2) d on c.emp_no = d.emp_no " +
"GROUP BY c.job") "GROUP BY c.job")
List<PieItem> selectComfortSituation(Date beginTime, Date endTime); List<PieItem> selectComfortSituation(Date beginTime, Date endTime);
@Select("SELECT sd1.short_name AS label, " +
"count(*) AS VALUE " +
"FROM sup_depart sd1 inner JOIN " +
"(SELECT ra.depart_name, sd.short_name, sd.pid, ra.apply_date, ra.type FROM rpc_apply ra INNER JOIN sup_depart sd on ra.depart_id=sd.id) temp " +
"on sd1.id = temp.pid AND sd1.statistics_group_id=#{groupId} " +
"WHERE temp.apply_date BETWEEN #{beginTime} AND #{endTime} " +
"AND temp.type=1 " +
"GROUP BY sd1.short_name " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getRightsRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT " + @Select("SELECT " +
"sdd.dict_label AS `name`, " + "sdd.dict_label AS `name`, " +
"count(*) AS `value` " + "count(*) AS `value` " +
@ -104,7 +81,7 @@ public interface RpcApplyMapper extends BaseMapper<RpcApply> {
"WHERE ra.apply_date BETWEEN #{beginTime} AND #{endTime} " + "WHERE ra.apply_date BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " + "AND sd.pid=#{departId} " +
"AND ra.type=2;") "AND ra.type=2;")
Integer countSubOneComfortPersonNumber(Date beginTime, Date endTime, Integer departId); Long countSubOneComfortPersonNumber(Date beginTime, Date endTime, Integer departId);
@Select("SELECT count(*) " + @Select("SELECT count(*) " +
"FROM rpc_infringer_result rir " + "FROM rpc_infringer_result rir " +
@ -181,4 +158,12 @@ public interface RpcApplyMapper extends BaseMapper<RpcApply> {
@Select("select max(number_index) from rpc_apply where year = #{year}") @Select("select max(number_index) from rpc_apply where year = #{year}")
Integer selectMaxNuberIndex(Integer year); Integer selectMaxNuberIndex(Integer year);
@Select("select d.short_name label, ROUND(sum(p.provide_relief) / 10000, 2) value from rpc_apply_person p left join rpc_apply r on p.rpc_id = r.rpc_id left join sup_depart d on r.second_depart_id = d.id where d.statistics_group_id = #{departGroupId} and r.crt_time between #{beginTime} and #{endTime} and r.type = 2 GROUP BY d.short_name order by value desc")
List<BarItem> selectComfortMoneyBarList(Date beginTime, Date endTime, Integer departGroupId);
@Select("select p.person_type_name name, count(r.rpc_id) value from rpc_apply r left join rpc_apply_person p on r.rpc_id = p.rpc_id where r.crt_time between #{beginTime} and #{endTime} and r.type = 2 GROUP BY p.person_type_name")
List<PieItem> selectComfortPoliceInjurySituation(Date beginTime, Date endTime);
@Select("select p.injury_severity_name name, count(r.rpc_id) value from rpc_apply r left join rpc_apply_person p on r.rpc_id = p.rpc_id where r.crt_time between #{beginTime} and #{endTime} and r.type = 2 GROUP BY p.injury_severity_name")
List<PieItem> selectComfortInjuryCategory(Date beginTime, Date endTime);
} }

1
src/main/java/com/biutag/supervision/mapper/StatisticsGroupMapper.java

@ -27,4 +27,5 @@ public interface StatisticsGroupMapper extends BaseMapper<StatisticsGroup> {
@Select("${newSql}") @Select("${newSql}")
List<Map<String, Object>> selectByUniqueKeys(@org.apache.ibatis.annotations.Param("newSql") String newSql); List<Map<String, Object>> selectByUniqueKeys(@org.apache.ibatis.annotations.Param("newSql") String newSql);
} }

8
src/main/java/com/biutag/supervision/mapper/SupPhotoMapper.java

@ -0,0 +1,8 @@
package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.SupPhoto;
public interface SupPhotoMapper extends BaseMapper<SupPhoto> {
}

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

@ -1,8 +1,18 @@
package com.biutag.supervision.mapper; package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.vo.TaskCountVo;
import com.biutag.supervision.pojo.vo.TaskVo;
import com.biutag.supervision.pojo.entity.SupTask; import com.biutag.supervision.pojo.entity.SupTask;
import org.apache.ibatis.annotations.Param;
public interface SupTaskMapper extends BaseMapper<SupTask> { public interface SupTaskMapper extends BaseMapper<SupTask> {
Page<TaskVo> queryTask(@Param("page") Page<SupTask> page, @Param(Constants.WRAPPER) QueryWrapper<SupTask> queryWrapper);
TaskCountVo queryTaskCount(@Param(Constants.WRAPPER) QueryWrapper<SupTask> queryWrapper);
} }

8
src/main/java/com/biutag/supervision/mapper/SupTaskProblemMapper.java

@ -0,0 +1,8 @@
package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.SupTaskProblem;
public interface SupTaskProblemMapper extends BaseMapper<SupTaskProblem> {
}

8
src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationContentMapper.java

@ -0,0 +1,8 @@
package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent;
public interface SupTaskSelfexaminationContentMapper extends BaseMapper<SupTaskSelfexaminationContent> {
}

16
src/main/java/com/biutag/supervision/mapper/SupTaskSelfexaminationMapper.java

@ -0,0 +1,16 @@
package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.entity.SupTaskSelfexamination;
import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople;
import com.biutag.supervision.pojo.vo.TaskSelfexaminationVo;
import org.apache.ibatis.annotations.Param;
public interface SupTaskSelfexaminationMapper extends BaseMapper<SupTaskSelfexamination> {
Page<TaskSelfexaminationVo> queryPage(@Param("page") Page<SupTaskSelfexamination> page, @Param(Constants.WRAPPER) QueryWrapper<SupTaskSelfexamination> queryWrapper);
}

8
src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java

@ -1,8 +1,16 @@
package com.biutag.supervision.mapper; package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.entity.SupTaskTestingAlcohol;
import com.biutag.supervision.pojo.vo.TaskTestingAlcoholPeopleVo;
import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople;
import org.apache.ibatis.annotations.Param;
public interface SupTaskTestingAlcoholPeopleMapper extends BaseMapper<SupTaskTestingAlcoholPeople> { public interface SupTaskTestingAlcoholPeopleMapper extends BaseMapper<SupTaskTestingAlcoholPeople> {
Page<TaskTestingAlcoholPeopleVo> queryPage(@Param("page") Page<SupTaskTestingAlcoholPeople> page, @Param(Constants.WRAPPER) QueryWrapper<SupTaskTestingAlcoholPeople> queryWrapper);
} }

21
src/main/java/com/biutag/supervision/pojo/domain/AppUser.java

@ -0,0 +1,21 @@
package com.biutag.supervision.pojo.domain;
import com.biutag.supervision.pojo.model.UserAuth;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/4/11
*/
@AllArgsConstructor
@Setter
@Getter
public class AppUser {
private String token;
private UserAuth user;
}

6
src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java

@ -164,6 +164,12 @@ public class NegativeVo {
// 延期天数 // 延期天数
private Integer extensionDays; private Integer extensionDays;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天) // 最大延期时长(天)
private Integer maxExtensionDuration; private Integer maxExtensionDuration;

17
src/main/java/com/biutag/supervision/pojo/dto/FileBase64Dto.java

@ -0,0 +1,17 @@
package com.biutag.supervision.pojo.dto;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/4/15
*/
@Setter
@Getter
public class FileBase64Dto {
private String originalFilename;
private String base64;
}

3
src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java

@ -43,9 +43,6 @@ public class NegativeDto {
@NotBlank(message = "业务类别不能为空", groups = {AddGroup.class, EditGroup.class}) @NotBlank(message = "业务类别不能为空", groups = {AddGroup.class, EditGroup.class})
private String businessTypeCode; private String businessTypeCode;
// 业务类别名称
@NotBlank(message = "业务类别不能为空", groups = {AddGroup.class, EditGroup.class})
private String businessTypeName;
private String policeTypeName; private String policeTypeName;

2
src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java

@ -27,6 +27,8 @@ public class TaskInspectionDto {
// 督察内容 // 督察内容
private String taskContent; private String taskContent;
private String taskContentHtml;
private List<LocalDateTime> times = new ArrayList<>(); private List<LocalDateTime> times = new ArrayList<>();

16
src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionProblemQueryParam.java

@ -0,0 +1,16 @@
package com.biutag.supervision.pojo.dto;
import com.biutag.supervision.pojo.param.BasePage;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/4/17
*/
@Setter
@Getter
public class TaskInspectionProblemQueryParam extends BasePage {
}

43
src/main/java/com/biutag/supervision/pojo/dto/TaskProblemDto.java

@ -0,0 +1,43 @@
package com.biutag.supervision.pojo.dto;
import com.biutag.supervision.pojo.vo.FileVo;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author wxc
* @date 2025/4/17
*/
@Setter
@Getter
public class TaskProblemDto {
private Integer taskId;
// 是否存在督察问题
private Boolean hasProblem;
private String departId;
private String problemType;
private List<People> peoples;
// 具体情况
private String thingDesc;
// 附件
private List<FileVo> files;
private Integer contentId;
@Setter
@Getter
public static class People {
private String name;
private String empNo;
private String idCode;
}
}

39
src/main/java/com/biutag/supervision/pojo/dto/TaskSelfexaminationDto.java

@ -0,0 +1,39 @@
package com.biutag.supervision.pojo.dto;
import com.biutag.supervision.pojo.entity.SupTaskSelfexamination;
import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2025/4/30
*/
@Setter
@Getter
public class TaskSelfexaminationDto {
private String taskName;
// 自查单位
private Integer supDepartId;
// 自查类型
private String type;
private List<LocalDateTime> times = new ArrayList<>();
// 任务要求
private String requirement;
// 任务要求
private String requirementHtml;
// 内容
private List<SupTaskSelfexaminationContent> contents = new ArrayList<>();
}

44
src/main/java/com/biutag/supervision/pojo/dto/TaskTestingAlcoholPeopleDto.java

@ -0,0 +1,44 @@
package com.biutag.supervision.pojo.dto;
import com.biutag.supervision.pojo.vo.FileVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2025/4/15
*/
@Setter
@Getter
public class TaskTestingAlcoholPeopleDto {
// 警号
private String empNo;
private String taskId;
// 检测情况
private String testingResult;
// 饮酒结果
private String drinkResult;
// 酒精含量
private Double alcoholContent;
// 测酒时间
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime testingTime;
// 未检测情况说明
private String unTestingDesc;
// 检测照片
private List<FileVo> testingFiles = new ArrayList<>();
}

16
src/main/java/com/biutag/supervision/pojo/dto/UserPasswordDto.java

@ -0,0 +1,16 @@
package com.biutag.supervision.pojo.dto;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class UserPasswordDto {
private String account;
private String password;
private String newPassword;
}

4
src/main/java/com/biutag/supervision/pojo/dto/common/BarItem.java

@ -4,6 +4,8 @@ import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.math.BigDecimal;
/** /**
* @author wxc * @author wxc
* @date 2024/10/29 * @date 2024/10/29
@ -14,5 +16,5 @@ import lombok.Setter;
public class BarItem { public class BarItem {
private String label; private String label;
private Integer value; private BigDecimal value;
} }

3
src/main/java/com/biutag/supervision/pojo/entity/DataPetition12337.java

@ -612,4 +612,7 @@ public class DataPetition12337 implements Serializable {
@TableField(value="is_real") @TableField(value="is_real")
private Integer isReal; private Integer isReal;
private LocalDateTime createTime;
} }

38
src/main/java/com/biutag/supervision/pojo/entity/SupPhoto.java

@ -0,0 +1,38 @@
package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Setter
@Getter
public class SupPhoto {
//
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
//
@TableField("file_path")
private String filePath;
//
@TableField("file_name")
private String fileName;
//
@TableField("create_time")
private LocalDateTime createTime;
//
@TableField("date")
private String date;
// 创建用户
private String createUsername;
}

2
src/main/java/com/biutag/supervision/pojo/entity/SupTask.java

@ -22,7 +22,7 @@ public class SupTask {
// 督察单位 // 督察单位
@TableField("sup_depart_id") @TableField("sup_depart_id")
private Integer supDepartId; private String supDepartId;
// 督察单位 // 督察单位
@TableField("sup_depart_name") @TableField("sup_depart_name")

5
src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java

@ -21,4 +21,9 @@ public class SupTaskInspection {
@TableField("task_content") @TableField("task_content")
private String taskContent; private String taskContent;
private String taskContentHtml;
private Boolean hasSign;
} }

61
src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java

@ -0,0 +1,61 @@
package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Setter
@Getter
public class SupTaskProblem {
//
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
//
@TableField("task_id")
private Integer taskId;
// 是否存在督察问题
@TableField("has_problem")
private Boolean hasProblem;
//
@TableField("depart_id")
private String departId;
private String departName;
//
@TableField("problem_type")
private String problemType;
private String problemTypeCode;
// 被督察人员 json
@TableField("peoples")
private String peoples;
private Integer peopleNumber;
// 具体情况
private String thingDesc;
// 附件
@TableField("files")
private String files;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@TableField("create_time")
private LocalDateTime createTime;
private String distributionState;
private String taskType;
}

32
src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexamination.java

@ -0,0 +1,32 @@
package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Setter
@Getter
public class SupTaskSelfexamination {
//
@TableId(value = "task_id")
private Integer taskId;
//
@TableField("type")
private String type;
// 任务要求
@TableField("requirement")
private String requirement;
private String requirementHtml;
private Boolean hasSign;
}

38
src/main/java/com/biutag/supervision/pojo/entity/SupTaskSelfexaminationContent.java

@ -0,0 +1,38 @@
package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Setter
@Getter
public class SupTaskSelfexaminationContent {
//
@TableId(type = IdType.AUTO)
private Integer id;
//
@TableField("task_id")
private Integer taskId;
//
@TableField("title")
private String title;
//
@TableField("content")
private String content;
//
@TableField("create_time")
private LocalDateTime createTime;
private String status;
}

16
src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java

@ -37,10 +37,24 @@ public class SupTaskTestingAlcoholPeople {
private String departId; private String departId;
// 状态 // 状态
@TableField("status")
private String status; private String status;
// 检测情况
private String testingResult;
// 饮酒结果
private String drinkResult;
// 酒精含量
private Double alcoholContent;
// 测酒时间 // 测酒时间
private LocalDateTime testingTime; private LocalDateTime testingTime;
// 未检测情况说明
private String unTestingDesc;
// 检测照片
private String testingFiles;
} }

30
src/main/java/com/biutag/supervision/pojo/model/DataRightsComfortModel.java

@ -1,28 +1,46 @@
package com.biutag.supervision.pojo.model; package com.biutag.supervision.pojo.model;
import com.biutag.supervision.pojo.dto.common.BarItem;
import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.dto.common.PieItem;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Setter @Setter
@Getter @Getter
public class DataRightsComfortModel { public class DataRightsComfortModel {
// 维权案件总数 // 维权案件总数
private Integer rightsNumber;
// 受侵害人数 // 受侵害人数
private Integer victimNumber;
// 抚慰人数 // 抚慰人数
private Integer comfortPersonNumber; private Long comfortPersonNumber;
// 打击处理人数 // 打击处理人数
Integer hitPersonNumber; Integer hitPersonNumber;
// 抚慰金额(万元) // 抚慰金额(万元)
Double comfortMoney; Double comfortMoney;
// 维权案件情况 // 维权案件情况 - 分县市局
// List<BarItem> countyRightsBarList = new ArrayList<>();
// // 维权案件情况 - 局属单位
// List<BarItem> bureauRightsBarList = new ArrayList<>();
// 抚慰金额情况 - 分县市局
List<BarItem> countyComfortMoneyBarList = new ArrayList<>();
// 抚慰金额情况 - 局属单位
List<BarItem> bureauComfortMoneyBarList = new ArrayList<>();
// 案件类别占比 // 案件类别占比
// 打处情况 // 打处情况
List<PieItem> punishmentSituation; List<PieItem> punishmentSituation = new ArrayList<>();
// 抚慰情况 // 民辅警抚慰情况占比
List<PieItem> comfortSituation; List<PieItem> comfortPoliceTypeProportion = new ArrayList<>();
// 民辅警受伤情况 // 民辅警受伤情况
// 发案情况占比 List<PieItem> comfortPoliceInjurySituation = new ArrayList<>();
// 民辅警受伤类别
List<PieItem> comfortInjuryCategory = new ArrayList<>();
} }

5
src/main/java/com/biutag/supervision/pojo/model/UserAuth.java

@ -26,12 +26,17 @@ public class UserAuth implements Serializable {
private String departName; private String departName;
// 职位
private String position;
// 警号 // 警号
private String empNo; private String empNo;
// 手机号 // 手机号
private String mobile; private String mobile;
private String avatarUrl;
// 角色编号 // 角色编号
private List<String> roleCodes; private List<String> roleCodes;

1
src/main/java/com/biutag/supervision/pojo/param/DataPetitionComplaintQueryParam.java

@ -1,6 +1,5 @@
package com.biutag.supervision.pojo.param; package com.biutag.supervision.pojo.param;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;

7
src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java

@ -41,7 +41,7 @@ public class NegativeQueryParam extends BasePage {
private String businessTypeCode; private String businessTypeCode;
private String checkStatus; private List<String> checkStatus;
private String isRectifyCode; private String isRectifyCode;
@ -49,9 +49,6 @@ public class NegativeQueryParam extends BasePage {
// 办结是否超时 // 办结是否超时
private Boolean timeoutFlag; private Boolean timeoutFlag;
// 办理中是否超时
private Boolean handleTimeoutFlag;
private String involveDepartId; private String involveDepartId;
private String handleDepartId; private String handleDepartId;
@ -83,5 +80,7 @@ public class NegativeQueryParam extends BasePage {
private String initialPetition; private String initialPetition;
// 操作人姓名
private String operator;
} }

2
src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java

@ -15,4 +15,6 @@ public class TaskInspectionQueryParam extends BasePage {
private String supDepartId; private String supDepartId;
private String type;
} }

13
src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java

@ -0,0 +1,13 @@
package com.biutag.supervision.pojo.param;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/5/7
*/
@Setter
@Getter
public class TaskProblemQueryParam extends BasePage {
}

18
src/main/java/com/biutag/supervision/pojo/param/TaskQueryParam.java

@ -0,0 +1,18 @@
package com.biutag.supervision.pojo.param;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/4/11
*/
@Setter
@Getter
public class TaskQueryParam extends BasePage {
private String taskStatus;
private String taskName;
}

26
src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholPeopleQueryParam.java

@ -0,0 +1,26 @@
package com.biutag.supervision.pojo.param;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/4/7
*/
@Setter
@Getter
public class TaskTestingAlcoholPeopleQueryParam extends BasePage {
private String status;
private String name;
private String empNo;
// 检测情况
private String testingResult;
// 饮酒结果
private String drinkResult;
}

19
src/main/java/com/biutag/supervision/pojo/vo/AuditOverview.java

@ -0,0 +1,19 @@
package com.biutag.supervision.pojo.vo;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/4/24
*/
@Setter
@Getter
public class AuditOverview {
// 查出问题数
private Integer negativeNumber;
// 追责问责数
private Long accountableNumber;
}

2
src/main/java/com/biutag/supervision/pojo/vo/ComfortCountVO.java

@ -11,7 +11,7 @@ import lombok.Data;
public class ComfortCountVO { public class ComfortCountVO {
private Integer comfortCaseTotal; // 维权案件总数 private Integer comfortCaseTotal; // 维权案件总数
private Integer hurtTotal; // 受侵害人数 private Integer hurtTotal; // 受侵害人数
private Integer comfortTotal; // 抚慰人数 private Long comfortTotal; // 抚慰人数
private Integer hitTotal; // 打击处理人数 private Integer hitTotal; // 打击处理人数
private Double comfortMoney; // 抚慰金额 private Double comfortMoney; // 抚慰金额
} }

6
src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java

@ -14,8 +14,8 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
public class DayTimeSuperviseVo { public class DayTimeSuperviseVo {
private Integer proTotal; private Integer proTotal;
private Integer changing; private Long processingNumber;
private Integer changed; private Long completedNumber;
private Double correctionRate; private Double completedRate;
} }

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

@ -15,5 +15,4 @@ public class FileVo {
private Integer fileClassId; private Integer fileClassId;
} }

2
src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java

@ -15,5 +15,7 @@ public class GlobalOverViewVo {
Long talkPro; // 民意感知 Long talkPro; // 民意感知
Long auditPro; Long auditPro;
Long totalPro; Long totalPro;
private Long mailboxNumber;
} }

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

@ -11,6 +11,7 @@ import java.io.Serializable;
*/ */
@Data @Data
public class MailOverviewVo implements Serializable { public class MailOverviewVo implements Serializable {
// 信访总问题数
private Long totalMail; private Long totalMail;
private Long countryMail; private Long countryMail;
private Long policeMail; private Long policeMail;

21
src/main/java/com/biutag/supervision/pojo/vo/PhotoGroupVo.java

@ -0,0 +1,21 @@
package com.biutag.supervision.pojo.vo;
import com.biutag.supervision.pojo.entity.SupPhoto;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2025/4/20
*/
@Setter
@Getter
public class PhotoGroupVo {
private String date;
private List<SupPhoto> photos = new ArrayList<>();
}

6
src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java

@ -14,10 +14,10 @@ public class SuperviseMapIconVo implements Serializable {
private String name; // 分县市局名 private String name; // 分县市局名
private String departId; private String departId;
private String totalPro; private String totalPro;
private String changing; private Long processingNumber;
private String changed; private Long completedNumber;
private String relationOrg; private String relationOrg;
private String personNum; private String personNum;
private String changedRate; private String completedRate;
} }

16
src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java

@ -9,11 +9,17 @@ import lombok.Data;
*/ */
@Data @Data
public class SupervisionNotifyOverView { public class SupervisionNotifyOverView {
// 问题数
private Integer problemNumber; private Integer problemNumber;
private Integer rectifingNumber; // 办理中
private Integer rectifedNumber; private Long processingNumber;
private Integer departNumber; // 已办结
private Integer personNumber; private Long completedNumber;
private Integer rectifyRate; // 问责单位数
private Long departNumber;
// 问责人数
private Long personNumber;
// 办结率
private Double completedRate;
} }

22
src/main/java/com/biutag/supervision/pojo/vo/TaskCountVo.java

@ -0,0 +1,22 @@
package com.biutag.supervision.pojo.vo;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/4/12
*/
@AllArgsConstructor
@Setter
@Getter
public class TaskCountVo {
private Long todoCount;
private Long doneCount;
public TaskCountVo() {
}
}

47
src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionProblemVo.java

@ -0,0 +1,47 @@
package com.biutag.supervision.pojo.vo;
import com.biutag.supervision.pojo.dto.TaskProblemDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2025/4/17
*/
@Setter
@Getter
public class TaskInspectionProblemVo {
private Integer id;
private Integer taskId;
// 是否存在督察问题
private Boolean hasProblem;
private String departId;
private String departName;
private String problemType;
private String problemTypeCode;
// 具体情况
private String detail;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime createTime;
// 附件
private List<FileVo> files = new ArrayList<>();
private List<TaskProblemDto.People> peoples = new ArrayList<>();
}

6
src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java

@ -45,4 +45,10 @@ public class TaskInspectionVo {
private Integer drinkNumber; private Integer drinkNumber;
private String taskStatus;
private Integer departNumber;
private Integer problemNumber;
} }

51
src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationDetailVo.java

@ -0,0 +1,51 @@
package com.biutag.supervision.pojo.vo;
import com.biutag.supervision.pojo.entity.SupTaskSelfexaminationContent;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2025/5/6
*/
@Setter
@Getter
public class TaskSelfexaminationDetailVo {
private Integer id;
// 任务名称
private String taskName;
private String supDepartId;
// 督察单位
private String supDepartName;
// 开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime beginTime;
// 结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime endTime;
private String type;
// 任务要求
private String requirement;
private String requirementHtml;
private String taskStatus;
private Boolean hasSign;
private List<SupTaskSelfexaminationContent> contents = new ArrayList<>();
}

42
src/main/java/com/biutag/supervision/pojo/vo/TaskSelfexaminationVo.java

@ -0,0 +1,42 @@
package com.biutag.supervision.pojo.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/**
* @author wxc
* @date 2025/5/6
*/
@Setter
@Getter
public class TaskSelfexaminationVo {
private Integer id;
// 任务名称
private String taskName;
// 督察单位
private String supDepartName;
// 开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime beginTime;
// 结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime endTime;
private String type;
// 任务要求
private String requirement;
private String taskStatus;
}

60
src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholPeopleVo.java

@ -0,0 +1,60 @@
package com.biutag.supervision.pojo.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2025/4/14
*/
@Setter
@Getter
public class TaskTestingAlcoholPeopleVo {
private String taskId;
private String name;
// 警号
private String empNo;
// 身份证
private String idCode;
// 测酒状态
private String status;
private String departName;
// 职位
private String position = "/";
private String avatarUrl;
// 检测情况
private String testingResult;
// 饮酒结果
private String drinkResult;
// 酒精含量
private Double alcoholContent;
// 测酒时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime testingTime;
// 未检测情况说明
private String unTestingDesc;
// 检测照片
private String testingFiles;
private List<FileVo> testingFileList = new ArrayList<>();
}

56
src/main/java/com/biutag/supervision/pojo/vo/TaskVo.java

@ -0,0 +1,56 @@
package com.biutag.supervision.pojo.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/**
* @author wxc
* @date 2025/4/11
*/
@Setter
@Getter
public class TaskVo {
private Integer id;
private String taskName;
// 督察单位
private String supDepartName;
// 任务类型
private String taskType;
// 开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime beginTime;
// 结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime endTime;
// 创建时间
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDateTime createTime;
// 任务状态
private String taskStatus;
// 督察类型
private String supervisionType;
private String taskContent;
private Boolean hasSign;
// 抽检人员
private Integer totalNumber;
private String requirement;
private String type;
}

6
src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseCountVo.java

@ -14,10 +14,12 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class VideoSuperviseCountVo { public class VideoSuperviseCountVo {
private Long total;
private Integer discoverProblem; private Integer discoverProblem;
private Integer changedProblem; private Integer completionProblem;
private Integer relativeOrg; private Integer relativeOrg;
private Integer relativePer; private Integer relativePer;
private Double changedRate; private Double completionRate;
} }

6
src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseMapIconVo.java

@ -16,14 +16,14 @@ import java.io.Serializable;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Builder @Builder
public class VideoSuperviseMapIconVo implements Serializable { public class VideoSuperviseMapIconVo {
private String name; private String name;
private String departId; private String departId;
private Integer discoverProblem; private Integer discoverProblem;
private Integer changedProblem; private Integer completionProblem;
private Integer relativeOrg; private Integer relativeOrg;
private Integer relativePer; private Integer relativePer;
private Integer changedRate; private Integer completionRate;
} }

31
src/main/java/com/biutag/supervision/service/BusinessDepartService.java

@ -1,5 +1,6 @@
package com.biutag.supervision.service; package com.biutag.supervision.service;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -7,9 +8,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.mapper.*; import com.biutag.supervision.mapper.*;
import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.entity.BusinessDepart;
import com.biutag.supervision.pojo.entity.BusinessLog;
import com.biutag.supervision.pojo.entity.GBaseAJJBXX;
import com.biutag.supervision.pojo.entity.GBaseJJD;
import com.biutag.supervision.pojo.model.BusinessPoliceModel; import com.biutag.supervision.pojo.model.BusinessPoliceModel;
import com.biutag.supervision.pojo.model.DataRightsComfortModel;
import com.biutag.supervision.pojo.param.BusinessQueryParam; import com.biutag.supervision.pojo.param.BusinessQueryParam;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -44,19 +47,18 @@ public class BusinessDepartService extends ServiceImpl<BusinessDepartMapper, Bus
private final SupExternalDepartMapper supExternalDepartMapper; private final SupExternalDepartMapper supExternalDepartMapper;
private final DataRightsComfortService dataRightsComfortService;
private final DataMigrationServiceImpl dataMigrationServiceImpl;
public Page<BusinessPoliceModel> page(BusinessQueryParam businessQueryParam) { public Page<BusinessPoliceModel> page(BusinessQueryParam businessQueryParam) {
// 测基础数据 // 测基础数据
if (businessQueryParam.getDepartName() != null && businessQueryParam.getDepartName().equals("开始导入今年所有的数据")) { if (businessQueryParam.getDepartName() != null && businessQueryParam.getDepartName().equals("开始导入今年所有的数据")) {
LocalDate start = LocalDate.parse("2024-01-01"); Date now = new Date();
LocalDate end = LocalDate.parse("2024-12-25"); LocalDate start = DateUtil.beginOfYear(now).toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate end = now.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
for (LocalDate date = start; !date.isAfter(end); date = date.plusDays(1)) { for (LocalDate date = start; !date.isAfter(end); date = date.plusDays(1)) {
List<Date> happenTime = new ArrayList<>(); List<Date> happenTime = new ArrayList<>();
Date startDate = Date.from(date.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); Date from = Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant());
Date endDate = Date.from(date.atTime(23, 59, 59).atZone(ZoneId.systemDefault()).toInstant()); Date startDate = DateUtil.beginOfDay(from);
Date endDate = DateUtil.endOfDay(from);
happenTime.add(startDate); happenTime.add(startDate);
happenTime.add(endDate); happenTime.add(endDate);
generate(happenTime); generate(happenTime);
@ -64,8 +66,8 @@ public class BusinessDepartService extends ServiceImpl<BusinessDepartMapper, Bus
} }
} else if (businessQueryParam.getDepartName() != null && businessQueryParam.getDepartName().equals("开始导入今天所有的数据")) { } else if (businessQueryParam.getDepartName() != null && businessQueryParam.getDepartName().equals("开始导入今天所有的数据")) {
List<Date> happenTime = new ArrayList<>(); List<Date> happenTime = new ArrayList<>();
Date start = Date.from(LocalDateTime.parse("2024-09-17T00:00:00", DateTimeFormatter.ISO_DATE_TIME).atZone(ZoneId.systemDefault()).toInstant()); Date start = DateUtil.beginOfDay(new Date());
Date end = Date.from(LocalDateTime.parse("2024-09-17T23:59:59", DateTimeFormatter.ISO_DATE_TIME).atZone(ZoneId.systemDefault()).toInstant()); Date end = DateUtil.endOfDay(new Date());
happenTime.add(start); happenTime.add(start);
happenTime.add(end); happenTime.add(end);
generate(happenTime); generate(happenTime);
@ -78,13 +80,6 @@ public class BusinessDepartService extends ServiceImpl<BusinessDepartMapper, Bus
modelClueService.generate(testNumber); modelClueService.generate(testNumber);
System.out.println("测试" + testNumber + "执行完毕"); System.out.println("测试" + testNumber + "执行完毕");
} }
if (departName != null && departName.equals("测大屏")) {
Date beginTime = Date.from(LocalDateTime.parse("2024-10-01T00:00:00", DateTimeFormatter.ISO_DATE_TIME).atZone(ZoneId.systemDefault()).toInstant());
Date endTime = Date.from(LocalDateTime.parse("2024-10-02T00:00:00", DateTimeFormatter.ISO_DATE_TIME).atZone(ZoneId.systemDefault()).toInstant());
DataRightsComfortModel result = new DataRightsComfortModel();
int i = 0;
}
// 测导入单位关联表 // 测导入单位关联表
if (businessQueryParam.getDepartName() != null && businessQueryParam.getDepartName().equals("导入单位")) { if (businessQueryParam.getDepartName() != null && businessQueryParam.getDepartName().equals("导入单位")) {

2
src/main/java/com/biutag/supervision/service/DataCaseVerifService.java

@ -92,7 +92,7 @@ public class DataCaseVerifService extends ServiceImpl<DataCaseVerifMapper, DataC
// negativeDto.setBusinessTypeCode(BusinessTypeEnum.ABWW); // negativeDto.setBusinessTypeCode(BusinessTypeEnum.ABWW);
// negativeDto.setBusinessTypeName(); // negativeDto.setBusinessTypeName();
negativeDto.setBusinessTypeCode(BusinessTypeEnum.getByLabel(item.getBusinessTypeName()).getValue()); negativeDto.setBusinessTypeCode(BusinessTypeEnum.getByLabel(item.getBusinessTypeName()).getValue());
negativeDto.setBusinessTypeName(item.getBusinessTypeName());
negativeDto.setResponderName(item.getResponderName()); // 投诉人 negativeDto.setResponderName(item.getResponderName()); // 投诉人
negativeDto.setContactPhone(item.getResponderPhone()); negativeDto.setContactPhone(item.getResponderPhone());
negativeDto.setThingDesc(item.getThingDesc()); // 投诉详情 negativeDto.setThingDesc(item.getThingDesc()); // 投诉详情

34
src/main/java/com/biutag/supervision/service/DataMailService.java

@ -1,10 +1,13 @@
package com.biutag.supervision.service; package com.biutag.supervision.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.mapper.*; import com.biutag.supervision.mapper.*;
import com.biutag.supervision.pojo.entity.DataPetition12337; import com.biutag.supervision.pojo.entity.DataPetition12337;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint; import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.SupDepart; import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.entity.mailbox.Mail; import com.biutag.supervision.pojo.entity.mailbox.Mail;
import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.EchartsVo;
@ -29,44 +32,43 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
private final DataPetition12337Mapper dataPetition12337Mapper; private final DataPetition12337Mapper dataPetition12337Mapper;
private final SupDepartMapper supDepartMapper; private final SupDepartMapper supDepartMapper;
private final MailMapper mailMapper; private final MailMapper mailMapper;
private final NegativeService negativeService;
private final String VALID_SIGN = "terminated"; // 有效标识 private final String VALID_SIGN = "terminated"; // 有效标识
private final String EX_SOURCE = "局长信箱"; // 映射来源 private final String EX_SOURCE = "局长信箱"; // 映射来源
// 一级信访大屏数据中央统计 // 一级信访大屏数据中央统计
public MailOverviewVo allMailCount(Date beginTime, Date endTime) { public MailOverviewVo allMailCount(Date beginTime, Date endTime) {
MailOverviewVo temp = new MailOverviewVo(); MailOverviewVo vo = mailCount(beginTime, endTime);
long totalMail = vo.getCountryMail() + vo.getPoliceMail() + vo.getNumberMail();
vo.setTotalMail(totalMail);
return vo;
}
public MailOverviewVo mailCount(Date beginTime, Date endTime) {
MailOverviewVo temp = new MailOverviewVo();
// 国家信访 // 国家信访
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>(); QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21); countryQueryWrapper.eq("problem_sources_code", 21);
countryQueryWrapper.between("discovery_time", beginTime, endTime); countryQueryWrapper.between("create_time", beginTime, endTime);
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper); Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper);
// 公安部信访 // 公安部信访
QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>(); QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
policeQueryWrapper.eq("problem_sources_code", 22); policeQueryWrapper.eq("problem_sources_code", 22);
policeQueryWrapper.between("discovery_time", beginTime, endTime); policeQueryWrapper.between("create_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper); Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
// 12337 // 12337
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>(); long mail12337 = negativeService.count(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime).eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.XF12337.getValue()));
queryWrapper12337.between("discover_time", beginTime, endTime);
Long numberMail = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 局长信箱 // 局长信箱
QueryWrapper<Mail> mailQueryWrapper = new QueryWrapper<>(); long mailCount = negativeService.count(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime).eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue()));
mailQueryWrapper.ne("mail_state", VALID_SIGN);
mailQueryWrapper.between("create_time", beginTime, endTime);
Long manageMail = mailMapper.selectCount(mailQueryWrapper);
// 总数
Long totalMail = countryMail + policeMail + numberMail;
temp.setCountryMail(countryMail); temp.setCountryMail(countryMail);
temp.setPoliceMail(policeMail); temp.setPoliceMail(policeMail);
temp.setNumberMail(numberMail); temp.setNumberMail(mail12337);
temp.setTotalMail(totalMail); temp.setManageMail(mailCount);
temp.setManageMail(manageMail);
return temp; return temp;
} }

2
src/main/java/com/biutag/supervision/service/DataPetition12337Service.java

@ -119,6 +119,7 @@ public class DataPetition12337Service extends ServiceImpl<DataPetition12337Mappe
dataPetition12337.setSecondDepartId(parent.getId()); dataPetition12337.setSecondDepartId(parent.getId());
dataPetition12337.setSecondDepartName(parent.getShortName()); dataPetition12337.setSecondDepartName(parent.getShortName());
} }
dataPetition12337.setCreateTime(LocalDateTime.now());
return dataPetition12337; return dataPetition12337;
}).toList(); }).toList();
saveOrUpdateBatch(list); saveOrUpdateBatch(list);
@ -142,7 +143,6 @@ public class DataPetition12337Service extends ServiceImpl<DataPetition12337Mappe
negativeDto.setProblemSourcesCode(ProblemSourcesEnum.XF12337.getValue()); // 来源分类 negativeDto.setProblemSourcesCode(ProblemSourcesEnum.XF12337.getValue()); // 来源分类
negativeDto.setProblemSources(ProblemSourcesEnum.XF12337.getLabel()); negativeDto.setProblemSources(ProblemSourcesEnum.XF12337.getLabel());
negativeDto.setBusinessTypeCode(distributeData.getBusinessTypeCode()); negativeDto.setBusinessTypeCode(distributeData.getBusinessTypeCode());
negativeDto.setBusinessTypeName(distributeData.getBusinessTypeName());
negativeDto.setResponderName(item.getName()); // 投诉人 negativeDto.setResponderName(item.getName()); // 投诉人
negativeDto.setContactPhone(item.getPhone()); negativeDto.setContactPhone(item.getPhone());
negativeDto.setThingDesc(item.getWjwfProject()); negativeDto.setThingDesc(item.getWjwfProject());

3
src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java

@ -52,7 +52,7 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
queryWrapper.eq("pc.third_Depart_Id", queryParam.getDepartId()); queryWrapper.eq("pc.third_Depart_Id", queryParam.getDepartId());
} }
} }
queryWrapper.eq("pc.problem_sources_code", queryParam.getProblemSourcesCode()) queryWrapper.eq(StrUtil.isNotBlank(queryParam.getProblemSourcesCode()), "pc.problem_sources_code", queryParam.getProblemSourcesCode())
.like(StrUtil.isNotBlank(queryParam.getOriginId()), "pc.origin_Id", queryParam.getOriginId()) .like(StrUtil.isNotBlank(queryParam.getOriginId()), "pc.origin_Id", queryParam.getOriginId())
.like(StrUtil.isNotBlank(queryParam.getThingDesc()), "pc.thing_desc", queryParam.getThingDesc()) .like(StrUtil.isNotBlank(queryParam.getThingDesc()), "pc.thing_desc", queryParam.getThingDesc())
.eq(StrUtil.isNotBlank(queryParam.getDistributionState()), "pc.distribution_state", queryParam.getDistributionState()) .eq(StrUtil.isNotBlank(queryParam.getDistributionState()), "pc.distribution_state", queryParam.getDistributionState())
@ -115,7 +115,6 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
negativeDto.setProblemSourcesCode(item.getProblemSourcesCode()); negativeDto.setProblemSourcesCode(item.getProblemSourcesCode());
negativeDto.setProblemSources(ProblemSourcesEnum.get(item.getProblemSourcesCode()).getLabel()); negativeDto.setProblemSources(ProblemSourcesEnum.get(item.getProblemSourcesCode()).getLabel());
negativeDto.setBusinessTypeCode(dataDistribute.getBusinessTypeCode()); negativeDto.setBusinessTypeCode(dataDistribute.getBusinessTypeCode());
negativeDto.setBusinessTypeName(dataDistribute.getBusinessTypeName());
negativeDto.setPoliceType(dataDistribute.getPoliceType()); negativeDto.setPoliceType(dataDistribute.getPoliceType());
negativeDto.setInvolveProblem(dataDistribute.getInvolveProblem()); negativeDto.setInvolveProblem(dataDistribute.getInvolveProblem());
negativeDto.setResponderName(item.getResponderName()); negativeDto.setResponderName(item.getResponderName());

85
src/main/java/com/biutag/supervision/service/DataRightsComfortService.java

@ -1,18 +1,11 @@
package com.biutag.supervision.service; package com.biutag.supervision.service;
import com.biutag.supervision.mapper.RpcApplyMapper; import com.biutag.supervision.mapper.RpcApplyMapper;
import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.RpcInfringerResult;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.vo.RightsComfortMapVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.Date;
import java.util.stream.Collectors; import java.util.List;
import static com.biutag.supervision.constants.enums.DepartGroupEnum.COUNTY_CITY_BUREAUS;
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
@ -20,85 +13,11 @@ public class DataRightsComfortService {
private final RpcApplyMapper rpcApplyMapper; private final RpcApplyMapper rpcApplyMapper;
private final SupDepartMapper supDepartMapper;
// 抚慰人数
public Integer countComfortPersonNumber(Date beginTime, Date endTime) {
return rpcApplyMapper.countComfortPersonNumber(beginTime, endTime);
}
// 打击处理人数
public Integer countHitPersonNumber(Date beginTime, Date endTime) {
List<String> hitPeople = rpcApplyMapper.getHitPeople(beginTime, endTime);
int totalPeople = 0;
if (hitPeople == null || hitPeople.isEmpty()) {
return 0;
}
for (String hitPerson : hitPeople) {
if (hitPerson.isEmpty()) {
continue;
}
if (hitPerson.contains(",")) {
String[] people = hitPerson.split(",");
totalPeople += people.length;
} else {
totalPeople += 1;
}
}
return totalPeople;
}
public Double countComfortMoney(Date beginTime, Date endTime) { public Double countComfortMoney(Date beginTime, Date endTime) {
return rpcApplyMapper.countComfortMoney(beginTime, endTime) / 10000.0; return rpcApplyMapper.countComfortMoney(beginTime, endTime) / 10000.0;
} }
public List<PieItem> selectPunishmentSituation(Date beginTime, Date endTime) {
List<RpcInfringerResult> rpcInfringerResults = rpcApplyMapper.selectPunishmentSituation(beginTime, endTime);
if (rpcInfringerResults == null || rpcInfringerResults.isEmpty()) {
return new ArrayList<>();
}
Map<String, Integer> countMap = new HashMap<>();
for (RpcInfringerResult rpcInfringerResult : rpcInfringerResults) {
String defendHandleWayName = rpcInfringerResult.getDefendHandleWayName();
String tortName = rpcInfringerResult.getTortName();
String[] names = tortName.split(",");
int count = names.length;
countMap.put(defendHandleWayName, countMap.getOrDefault(defendHandleWayName, 0) + count);
}
return countMap.entrySet().stream().map(entry -> new PieItem(entry.getKey(), entry.getValue())).collect(Collectors.toList());
}
public List<PieItem> selectComfortSituation(Date beginTime, Date endTime) {
return rpcApplyMapper.selectComfortSituation(beginTime, endTime);
}
// 维权抚慰地图图标数据
public List<RightsComfortMapVo> getComfortMapIcon(Date beginTime, Date endTime) {
List<RightsComfortMapVo> res = new ArrayList<>();
// 查询所有区县局
List<SupDepart> supDeparts = supDepartMapper.selectDepartsByGroupType(COUNTY_CITY_BUREAUS.getId());
for (SupDepart supDepart : supDeparts) {
RightsComfortMapVo mapIconVo = new RightsComfortMapVo();
mapIconVo.setName(supDepart.getShortName());
mapIconVo.setDepartId(supDepart.getId());
res.add(mapIconVo);
}
for (RightsComfortMapVo re : res) {
String departId = re.getDepartId();
re.setTotalCase(0);
re.setHitPro(0);
re.setComfortPer(0);
re.setVictimPer(0);
re.setComfortMon(0.0);
}
return res;
}
// 打击处理人数 // 打击处理人数
public Integer countSubOneHitPersonNumber(Date beginTime, Date endTime, Integer departId) { public Integer countSubOneHitPersonNumber(Date beginTime, Date endTime, Integer departId) {
List<String> hitPeople = rpcApplyMapper.getSubOneHitPeople(beginTime, endTime, departId); List<String> hitPeople = rpcApplyMapper.getSubOneHitPeople(beginTime, endTime, departId);

1
src/main/java/com/biutag/supervision/service/ModelClueService.java

@ -168,7 +168,6 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
negative.setBusinessTypeCode(model.getBusinessTypeCode()); negative.setBusinessTypeCode(model.getBusinessTypeCode());
} else { } else {
negative.setBusinessTypeCode(BusinessTypeEnum.QT.getValue()); negative.setBusinessTypeCode(BusinessTypeEnum.QT.getValue());
negative.setBusinessTypeName(BusinessTypeEnum.QT.getLabel());
} }
negative.setPoliceType(model.getPoliceType()); negative.setPoliceType(model.getPoliceType());

8
src/main/java/com/biutag/supervision/service/NegativeCountersignService.java

@ -8,17 +8,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.constants.enums.DepartLevelEnum; import com.biutag.supervision.constants.enums.DepartLevelEnum;
import com.biutag.supervision.constants.enums.OrderEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.constants.enums.RoleCodeEnum; import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.mapper.NegativeCountersignMapper;
import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame; import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.NegativeCountersign; import com.biutag.supervision.pojo.entity.NegativeCountersign;
import com.biutag.supervision.mapper.NegativeCountersignMapper;
import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.NegativeQueryParam; import com.biutag.supervision.pojo.param.NegativeQueryParam;
import com.biutag.supervision.pojo.vo.DepartTree; import com.biutag.supervision.pojo.vo.DepartTree;
import com.biutag.supervision.pojo.vo.NegativeQueryVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -53,7 +50,6 @@ public class NegativeCountersignService extends ServiceImpl<NegativeCountersignM
} else { } else {
q.in("a.create_role_code", user.getRoleCodes()).in("a.create_depart_id", user.getAuthDepartIds()); q.in("a.create_role_code", user.getRoleCodes()).in("a.create_depart_id", user.getAuthDepartIds());
} }
}); });
}); });
queryWrapper.and(StrUtil.isNotBlank(param.getOriginId()), (qw) -> { queryWrapper.and(StrUtil.isNotBlank(param.getOriginId()), (qw) -> {
@ -64,7 +60,7 @@ public class NegativeCountersignService extends ServiceImpl<NegativeCountersignM
.like(StrUtil.isNotBlank(param.getThingDesc()), "n.thingDesc", param.getThingDesc()) .like(StrUtil.isNotBlank(param.getThingDesc()), "n.thingDesc", param.getThingDesc())
.in(CollectionUtil.isNotEmpty(param.getProblemSourcesCode()), "n.problemSourcesCode", param.getProblemSourcesCode()) .in(CollectionUtil.isNotEmpty(param.getProblemSourcesCode()), "n.problemSourcesCode", param.getProblemSourcesCode())
.eq(StrUtil.isNotBlank(param.getBusinessTypeCode()), "n.businessTypeCode", param.getBusinessTypeCode()) .eq(StrUtil.isNotBlank(param.getBusinessTypeCode()), "n.businessTypeCode", param.getBusinessTypeCode())
.eq(StrUtil.isNotBlank(param.getCheckStatus()), "n.checkStatus", param.getCheckStatus()) .in(CollectionUtil.isNotEmpty(param.getCheckStatus()), "n.checkStatus", param.getCheckStatus())
.eq(StrUtil.isNotBlank(param.getIsRectifyCode()), "n.isRectifyCode", param.getIsRectifyCode()) .eq(StrUtil.isNotBlank(param.getIsRectifyCode()), "n.isRectifyCode", param.getIsRectifyCode())
.eq(StrUtil.isNotBlank(param.getSpecialSupervision()), "n.special_Supervision", param.getSpecialSupervision()) .eq(StrUtil.isNotBlank(param.getSpecialSupervision()), "n.special_Supervision", param.getSpecialSupervision())
.like(StrUtil.isNotBlank(param.getReportNumber()), "n.report_Number", param.getReportNumber()) .like(StrUtil.isNotBlank(param.getReportNumber()), "n.report_Number", param.getReportNumber())

27
src/main/java/com/biutag/supervision/service/NegativeQueryService.java

@ -77,7 +77,7 @@ public class NegativeQueryService {
// 通报期数 // 通报期数
.like(StrUtil.isNotBlank(param.getReportNumber()), Negative::getReportNumber, param.getReportNumber()) .like(StrUtil.isNotBlank(param.getReportNumber()), Negative::getReportNumber, param.getReportNumber())
// 是否属实 // 是否属实
.eq(StrUtil.isNotBlank(param.getCheckStatus()), Negative::getCheckStatus, param.getCheckStatus()) .in(CollectionUtil.isNotEmpty(param.getCheckStatus()), Negative::getCheckStatus, param.getCheckStatus())
// 是否整改 // 是否整改
.eq(StrUtil.isNotBlank(param.getIsRectifyCode()), Negative::getIsRectifyCode, param.getIsRectifyCode()); .eq(StrUtil.isNotBlank(param.getIsRectifyCode()), Negative::getIsRectifyCode, param.getIsRectifyCode());
// 涉及单位 // 涉及单位
@ -135,22 +135,25 @@ public class NegativeQueryService {
break; break;
} }
} }
// 办理中是否超时
if (Objects.nonNull(param.getHandleTimeoutFlag())) { // 是否超时
if (param.getHandleTimeoutFlag()) {
queryWrapper.ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).lt(Negative::getHandleRemainingTime, 0);
} else {
queryWrapper.ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).ge(Negative::getHandleRemainingTime, 0);
}
}
// 办结是否超时
if (Objects.nonNull(param.getTimeoutFlag())) { if (Objects.nonNull(param.getTimeoutFlag())) {
if (param.getTimeoutFlag()) { if (param.getTimeoutFlag()) {
queryWrapper.eq(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).gt(Negative::getHandleTimeout, 0); queryWrapper
.and(query -> {
query.and(q -> {
q.lt(Negative::getHandleRemainingTime, 0).ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name());
}).or().gt(Negative::getHandleTimeout, 0).eq(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name());
});
} else { } else {
queryWrapper queryWrapper
.and(query -> { .and(query -> {
query.ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).or().gt(Negative::getHandleTimeout, 0); query.and(q -> {
q.ge(Negative::getHandleRemainingTime, 0).ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name());
}).or().eq(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name())
.and(q -> {
q.eq(Negative::getHandleTimeout, 0).or().isNull(Negative::getHandleTimeout);
});
}); });
} }
} }

10
src/main/java/com/biutag/supervision/service/NegativeService.java

@ -173,14 +173,24 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
return getOne(new LambdaUpdateWrapper<Negative>().eq(Negative::getOriginId, originId)); return getOne(new LambdaUpdateWrapper<Negative>().eq(Negative::getOriginId, originId));
} }
private final SupDictDataService dictDataService;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Negative save(NegativeDto negativeDto) { public Negative save(NegativeDto negativeDto) {
Negative negative = new Negative(); Negative negative = new Negative();
BeanUtil.copyProperties(negativeDto, negative); BeanUtil.copyProperties(negativeDto, negative);
if (StrUtil.isBlank(negativeDto.getOriginId())) { if (StrUtil.isBlank(negativeDto.getOriginId())) {
String originId = generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode()); String originId = generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode());
negative.setOriginId(originId); // 如果是空就生成随机的线索源 negative.setOriginId(originId); // 如果是空就生成随机的线索源
} }
if (StrUtil.isNotBlank(negativeDto.getBusinessTypeCode())) {
SupDictData dictData = dictDataService.get("businessType", negativeDto.getBusinessTypeCode());
// 业务类型
negative.setBusinessTypeName(Optional.ofNullable(dictData).map(SupDictData::getDictLabel).orElse(null));
}
// 涉及单位 // 涉及单位
SupDepart depart = departService.getById(negative.getInvolveDepartId()); SupDepart depart = departService.getById(negative.getInvolveDepartId());
if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save