Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
54fb20f6c3
  1. 2
      src/main/java/com/biutag/supervision/config/InterceptorConfig.java
  2. 8
      src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java
  3. 9
      src/main/java/com/biutag/supervision/constants/enums/PersonTypeEnum.java
  4. 40
      src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java
  5. 48
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java
  6. 11
      src/main/java/com/biutag/supervision/controller/work/NegativeController.java
  7. 198
      src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java
  8. 6
      src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
  9. 1
      src/main/java/com/biutag/supervision/flow/action/SaveAction.java
  10. 14
      src/main/java/com/biutag/supervision/pojo/domain/RiskPersonalDetail.java
  11. 16
      src/main/java/com/biutag/supervision/pojo/dto/HdtNegativeBlameImportDto.java
  12. 49
      src/main/java/com/biutag/supervision/pojo/dto/HdtNegativeImportDto.java
  13. 1
      src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java
  14. 15
      src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java
  15. 3
      src/main/java/com/biutag/supervision/pojo/entity/Negative.java
  16. 2
      src/main/java/com/biutag/supervision/pojo/entity/RiskModelTaskClue.java
  17. 2
      src/main/java/com/biutag/supervision/pojo/entity/RiskScoreRule.java
  18. 7
      src/main/java/com/biutag/supervision/service/NegativeScoreService.java
  19. 7
      src/main/java/com/biutag/supervision/service/NegativeService.java
  20. BIN
      src/main/resources/static/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf
  21. BIN
      src/main/resources/static/templates/黄赌问题问题下发模板.xls
  22. 2
      src/test/java/com/biutag/supervision/StrUtil.java
  23. 40
      src/test/java/com/biutag/supervision/tools/ExcelTest.java
  24. 14
      src/test/java/com/biutag/supervision/tools/HdtNegativeBlameImportDto.java
  25. 43
      src/test/java/com/biutag/supervision/tools/HdtNegativeImportDto.java
  26. 19
      src/test/java/com/biutag/supervision/tools/dto/AccountDto.java
  27. 23
      src/test/java/com/biutag/supervision/tools/dto/ActionDto.java
  28. 17
      src/test/java/com/biutag/supervision/tools/dto/CaseVerifDepart.java
  29. 37
      src/test/java/com/biutag/supervision/tools/dto/DataCaseVerifDistribute.java
  30. 72
      src/test/java/com/biutag/supervision/tools/dto/DataCaseVerifImportDto.java
  31. 37
      src/test/java/com/biutag/supervision/tools/dto/DataDataPetitionComplainDistribute.java
  32. 37
      src/test/java/com/biutag/supervision/tools/dto/DataDataPetitionComplainDistribute12337.java
  33. 20
      src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintAddDto.java
  34. 94
      src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintDto.java
  35. 85
      src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintImportDto.java
  36. 41
      src/test/java/com/biutag/supervision/tools/dto/DictDataDto.java
  37. 23
      src/test/java/com/biutag/supervision/tools/dto/DictTypeDto.java
  38. 41
      src/test/java/com/biutag/supervision/tools/dto/MenuDto.java
  39. 16
      src/test/java/com/biutag/supervision/tools/dto/ModelClueDepartDto.java
  40. 48
      src/test/java/com/biutag/supervision/tools/dto/ModelClueTaskDistribute.java
  41. 111
      src/test/java/com/biutag/supervision/tools/dto/NegativeDto.java
  42. 39
      src/test/java/com/biutag/supervision/tools/dto/PoliceImport.java
  43. 37
      src/test/java/com/biutag/supervision/tools/dto/UserDto.java
  44. 18
      src/test/java/com/biutag/supervision/tools/dto/common/BarItem.java
  45. 18
      src/test/java/com/biutag/supervision/tools/dto/common/PieItem.java
  46. 11
      src/test/java/com/biutag/supervision/tools/dto/flow/ApproveData.java
  47. 42
      src/test/java/com/biutag/supervision/tools/dto/flow/ConfirmationCompletionData.java
  48. 16
      src/test/java/com/biutag/supervision/tools/dto/flow/ExtensionApplyData.java
  49. 37
      src/test/java/com/biutag/supervision/tools/dto/flow/FirstDistributeData.java
  50. 14
      src/test/java/com/biutag/supervision/tools/dto/flow/SecondDistributeData.java
  51. 11
      src/test/java/com/biutag/supervision/tools/dto/flow/SignReturnData.java
  52. 240
      src/test/java/com/biutag/supervision/tools/dto/flow/VerifyData.java
  53. 111
      src/test/java/com/biutag/supervision/tools/dto/jwdc/NegativeApiDto.java

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

@ -34,7 +34,7 @@ public class InterceptorConfig implements WebMvcConfigurer {
.excludePathPatterns("/login") .excludePathPatterns("/login")
.excludePathPatterns("/auth/self") .excludePathPatterns("/auth/self")
.excludePathPatterns("/file/stream/**", "/templates/**") .excludePathPatterns("/file/stream/**", "/templates/**")
.excludePathPatterns("/score/police", "/score/depart") .excludePathPatterns("/score/**")
.excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**")); .excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**"));
registry.addInterceptor(new ApiInterceptor()) registry.addInterceptor(new ApiInterceptor())

8
src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java

@ -9,14 +9,16 @@ import lombok.Getter;
public enum InspectCaseEnum { public enum InspectCaseEnum {
// 属实 // 属实
TRUE("1"), TRUE("1", "属实"),
// 部分属实 // 部分属实
PARTIALLY_TRUE("2"), PARTIALLY_TRUE("2", "部分属实"),
// 不属实 // 不属实
FALSE("3"); FALSE("3", "不属实");
private String value; private String value;
private String label;
public static boolean isItTure(String value) { public static boolean isItTure(String value) {
return StrUtil.isNotBlank(value); return StrUtil.isNotBlank(value);
} }

9
src/main/java/com/biutag/supervision/constants/enums/PersonTypeEnum.java

@ -25,4 +25,13 @@ public enum PersonTypeEnum {
return List.of(works.getValue(), aux.getValue(), clerk.getValue(), xj.getValue()); return List.of(works.getValue(), aux.getValue(), clerk.getValue(), xj.getValue());
} }
public static PersonTypeEnum get(String value) {
for (PersonTypeEnum personTypeEnum : values()) {
if (personTypeEnum.getValue().equals(value)) {
return personTypeEnum;
}
}
return null;
}
} }

40
src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java

@ -4,9 +4,16 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.domain.RiskPersonalDetail;
import com.biutag.supervision.pojo.entity.Model;
import com.biutag.supervision.pojo.entity.RiskModelTaskClue;
import com.biutag.supervision.pojo.entity.RiskPersonal; import com.biutag.supervision.pojo.entity.RiskPersonal;
import com.biutag.supervision.pojo.entity.RiskScoreRule;
import com.biutag.supervision.pojo.param.RiskPersonalQueryParam; import com.biutag.supervision.pojo.param.RiskPersonalQueryParam;
import com.biutag.supervision.service.ModelService;
import com.biutag.supervision.service.RiskModelTaskClueService;
import com.biutag.supervision.service.RiskPersonalService; import com.biutag.supervision.service.RiskPersonalService;
import com.biutag.supervision.service.RiskScoreRuleService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -14,6 +21,7 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Objects; import java.util.Objects;
/** /**
@ -34,13 +42,39 @@ public class RiskPersonalController {
.eq(StrUtil.isNotBlank(param.getGender()), RiskPersonal::getGender, param.getGender()) .eq(StrUtil.isNotBlank(param.getGender()), RiskPersonal::getGender, param.getGender())
.eq(Objects.nonNull(param.getAge()), RiskPersonal::getAge, param.getAge()) .eq(Objects.nonNull(param.getAge()), RiskPersonal::getAge, param.getAge())
.eq(StrUtil.isNotBlank(param.getControlDepartId()), RiskPersonal::getControlDepartId, param.getControlDepartId()); .eq(StrUtil.isNotBlank(param.getControlDepartId()), RiskPersonal::getControlDepartId, param.getControlDepartId());
queryWrapper.orderByDesc(RiskPersonal::getRiskScore).orderByDesc(RiskPersonal::getCreateTime);
return Result.success(riskPersonalService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper)); return Result.success(riskPersonalService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper));
} }
@GetMapping("{id}") private final RiskScoreRuleService riskScoreRuleService;
public Result<Page<RiskPersonal>> list(@PathVariable Integer id) {
private final RiskModelTaskClueService riskModelTaskClueService;
return Result.success(); private final ModelService modelService;
@GetMapping("{id}")
public Result<RiskPersonalDetail> list(@PathVariable Integer id) {
List<RiskScoreRule> rules1 = riskScoreRuleService.list(new LambdaQueryWrapper<RiskScoreRule>().eq(RiskScoreRule::getLevel, 1));
RiskPersonal riskPersonal = riskPersonalService.getById(id);
List<RiskPersonalDetail.RiskRule> list = rules1.stream().map(rule -> {
RiskPersonalDetail.RiskRule riskRule = new RiskPersonalDetail.RiskRule();
riskRule.setRiskName(rule.getRiskName());
List<RiskScoreRule> rules2 = riskScoreRuleService.list(new LambdaQueryWrapper<RiskScoreRule>().eq(RiskScoreRule::getPid, rule.getId())
.eq(RiskScoreRule::getLevel, 2));
List<Model> models = modelService.list(new LambdaQueryWrapper<Model>().in(Model::getRiskScoreRuleId, rules2.stream().map(RiskScoreRule::getId)));
List<RiskModelTaskClue> records = riskModelTaskClueService.page(Page.of(1, 5), new LambdaQueryWrapper<RiskModelTaskClue>()
.eq(RiskModelTaskClue::getIdCode, riskPersonal.getIdCode())
.in(RiskModelTaskClue::getModelId, models.stream().map(Model::getId).toList())
.eq(RiskModelTaskClue::getDel, "1")
.orderByDesc(RiskModelTaskClue::getScore)
.orderByAsc(RiskModelTaskClue::getCreateTime)).getRecords();
riskRule.setClues(records);
return riskRule;
}).toList();
RiskPersonalDetail riskPersonalDetail = new RiskPersonalDetail();
riskPersonalDetail.setRiskPersonal(riskPersonal);
riskPersonalDetail.setRiskClueList(list);
return Result.success(riskPersonalDetail);
} }
} }

48
src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java

@ -1,11 +1,14 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitivePerception;
import cn.hutool.core.util.NumberUtil;
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.biutag.supervision.mapper.DepartScoreMapper; import com.biutag.supervision.mapper.DepartScoreMapper;
import com.biutag.supervision.mapper.PoliceScoreMapper; import com.biutag.supervision.mapper.PoliceScoreMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.service.NegativeScoreService; import com.biutag.supervision.service.*;
import com.biutag.supervision.service.RiskPersonalService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -16,6 +19,8 @@ import java.time.LocalDateTime;
import java.time.ZoneId; import java.time.ZoneId;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/** /**
* @author wxc * @author wxc
@ -75,10 +80,43 @@ public class ScoreController {
private final RiskPersonalService riskPersonalService; private final RiskPersonalService riskPersonalService;
@RequestMapping("personal") private final RiskScoreRuleService riskScoreRuleService;
public Result<String> updatePersonalScore() {
List<RiskPersonal> riskPersonals = riskPersonalService.list(); private final ModelService modelService;
private final RiskModelTaskClueService riskModelTaskClueService;
@RequestMapping("personal")
public Result<String> updatePersonalScore(Integer size) {
if (Objects.isNull(size)) {
size = 1000000;
}
List<RiskPersonal> riskPersonals = riskPersonalService.page(Page.of(1, size), new LambdaQueryWrapper<RiskPersonal>().eq(RiskPersonal::getDel, "1")
.ne(RiskPersonal::getRiskScore, 0)).getRecords();
List<RiskScoreRule> rules1 = riskScoreRuleService.list(new LambdaQueryWrapper<RiskScoreRule>().eq(RiskScoreRule::getLevel, 1));
riskPersonals.forEach(personal -> {
log.info("{}-{} 开始打分--------------------------------------", personal.getName(), personal.getIdCode());
double riskScore = rules1.stream().mapToDouble(rule -> {
List<RiskScoreRule> rules2 = riskScoreRuleService.list(new LambdaQueryWrapper<RiskScoreRule>().eq(RiskScoreRule::getPid, rule.getId())
.eq(RiskScoreRule::getLevel, 2));
double score2 = rules2.stream().mapToDouble(rule2 -> {
Model model = modelService.getOne(new LambdaQueryWrapper<Model>().eq(Model::getRiskScoreRuleId, rule2.getId()));
double score3 = riskModelTaskClueService.list(new LambdaQueryWrapper<RiskModelTaskClue>()
.eq(RiskModelTaskClue::getModelId, model.getId())
.eq(RiskModelTaskClue::getIdCode, personal.getIdCode())
.eq(RiskModelTaskClue::getDel, "1"))
.stream().mapToDouble(RiskModelTaskClue::getScore).sum();
score3 = Math.min(rule2.getScore(), score3);
log.info("{} 分值 = {}", rule2.getRiskName(), score3);
return score3;
}).sum();
log.info("{} 分值 = {}", rule.getRiskName(), score2);
return score2 / rule.getScore() * rule.getWeight();
}).sum();
riskScore = NumberUtil.round(riskScore, 2).doubleValue();
log.info("{}-{}的 分值 = {}", personal.getName(), personal.getIdCode(), riskScore);
riskPersonalService.update(new LambdaUpdateWrapper<RiskPersonal>().eq(RiskPersonal::getIdCode, personal.getIdCode()).set(RiskPersonal::getRiskScore, riskScore));
});
return Result.success("success"); return Result.success("success");
} }

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

@ -6,26 +6,24 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.common.validation.AddGroup; import com.biutag.supervision.common.validation.AddGroup;
import com.biutag.supervision.common.validation.EditGroup; import com.biutag.supervision.common.validation.EditGroup;
import com.biutag.supervision.flow.FlowService; import com.biutag.supervision.flow.FlowService;
import com.biutag.supervision.mapper.SupDictContentMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.domain.NegativeDetail; import com.biutag.supervision.pojo.domain.NegativeDetail;
import com.biutag.supervision.pojo.dto.ActionDto; import com.biutag.supervision.pojo.dto.ActionDto;
import com.biutag.supervision.pojo.dto.NegativeDto; import com.biutag.supervision.pojo.dto.NegativeDto;
import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.entity.DepartNegativeRate;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeTask;
import com.biutag.supervision.pojo.param.NegativeQueryParam; import com.biutag.supervision.pojo.param.NegativeQueryParam;
import com.biutag.supervision.pojo.vo.NegativeConfirmationCompletionVo; import com.biutag.supervision.pojo.vo.NegativeConfirmationCompletionVo;
import com.biutag.supervision.pojo.vo.NegativeQueryVo; import com.biutag.supervision.pojo.vo.NegativeQueryVo;
import com.biutag.supervision.service.*; import com.biutag.supervision.service.*;
import com.biutag.supervision.util.JSON; import com.biutag.supervision.util.JSON;
import com.biutag.supervision.util.ScoreRule;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Objects;
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("negative") @RequestMapping("negative")
@ -60,7 +58,8 @@ public class NegativeController {
@PostMapping @PostMapping
public Result<Boolean> add(@Validated(AddGroup.class) @RequestBody NegativeDto negativeDto) { public Result<Boolean> add(@Validated(AddGroup.class) @RequestBody NegativeDto negativeDto) {
return Result.success(negativeService.save(negativeDto)); negativeService.save(negativeDto);
return Result.success();
} }
@PutMapping @PutMapping

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

@ -0,0 +1,198 @@
package com.biutag.supervision.controller.work;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.constants.enums.*;
import com.biutag.supervision.flow.FlowService;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.*;
import com.biutag.supervision.pojo.dto.flow.VerifyData;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.service.*;
import com.biutag.supervision.util.SpringUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.*;
@RequiredArgsConstructor
@RequestMapping("negative/import")
@RestController
public class NegativeImportController {
private final NegativeService negativeService;
private final SupDepartService departService;
private final NegativeWorkService workService;
private final SupPoliceService policeService;
private final SupDictContentService supDictContentService;
private static Map<String, String> problemMaps = new HashMap<>();
static {
problemMaps.put("执法办案-执法记录仪使用-未及时上传、保存、正确关联执法记录仪视频", "196");
problemMaps.put("执法办案-执法记录仪使用-未按规定佩戴、使用执法记录仪", "55");
problemMaps.put("执法办案-接处警与现场处置-接处警不及时", "51");
problemMaps.put("执法办案-接处警与现场处置-现场处置不规范", "336");
problemMaps.put("执法办案-执法办案场所管理-嫌疑人进、出执法场所违规", "200");
problemMaps.put("执法办案-执法记录仪使用-其他", "197");
problemMaps.put("执法办案-接处警与现场处置-警情反馈不及时、不规范", "191");
problemMaps.put("执法办案-案件办理-不及时、不如实受立案", "53");
problemMaps.put("执法办案-案件办理-调查取证不及时、不全面", "54");
problemMaps.put("执法办案-接处警与现场处置-现场处置不规范", "336");
problemMaps.put("执法办案-执法办案场所管理-嫌疑人进、出执法场所违规", "200");
}
@PostMapping
@Transactional(rollbackFor = Exception.class)
public Result<List<PoliceImport>> importExcel(@RequestPart("file") MultipartFile file) throws IOException {
List<HdtNegativeImportDto> negatives = new ArrayList<>();
List<HdtNegativeBlameImportDto> blames = new ArrayList<>();
EasyExcel.read(file.getInputStream(), HdtNegativeImportDto.class, new ReadListener<HdtNegativeImportDto>() {
@Override
public void invoke(HdtNegativeImportDto data, AnalysisContext analysisContext) {
negatives.add(data);
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
System.out.println(analysisContext);
}
}).build().read(EasyExcel.readSheet(0).build()).close();
EasyExcel.read(file.getInputStream(), HdtNegativeBlameImportDto.class, new ReadListener<HdtNegativeBlameImportDto>() {
@Override
public void invoke(HdtNegativeBlameImportDto data, AnalysisContext analysisContext) {
blames.add(data);
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
System.out.println(analysisContext);
}
}).build().read(EasyExcel.readSheet(1).build()).close();
int i = 0;
// 过滤ID为空的数据
List<HdtNegativeImportDto> list = negatives.stream().filter(item -> StrUtil.isNotBlank(item.getId())).toList();
for (HdtNegativeImportDto item : list) {
i++;
SupDepart parent = departService.getOne(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getShortName, item.getSecondDepartName()).eq(SupDepart::getLevel, 2));
if (Objects.isNull(parent)) {
throw new RuntimeException(String.format("第条%s数据【%s】匹配不到单位", i, item.getSecondDepartName()));
}
SupDepart depart = departService.getOne(new LambdaQueryWrapper<SupDepart>()
.eq(SupDepart::getPid, parent.getId())
.eq(SupDepart::getShortName, item.getDepartName()).eq(SupDepart::getLevel, 3));
if (Objects.isNull(depart)) {
throw new RuntimeException(String.format("第条%s数据【%s】匹配不到部门", i, item.getDepartName()));
}
String departId = depart.getId();
String departName = depart.getShortName();
NegativeDto negativeDto = new NegativeDto();
negativeDto.setDiscoveryTime(item.getDiscoveryTime());
negativeDto.setCaseNumber(item.getCaseNumber());
negativeDto.setBusinessTypeCode(BusinessTypeEnum.JCJ_110.getValue());
negativeDto.setBusinessTypeName(BusinessTypeEnum.JCJ_110.getLabel());
if (StrUtil.isBlank(item.getThingDesc())) {
negativeDto.setThingDesc(item.getProType());
} else {
negativeDto.setThingDesc(item.getThingDesc());
}
negativeDto.setTimeLimit(TimeLimitEnum.WORK_137.getValue());
negativeDto.setProblemSources(ProblemSourcesEnum.ZXDC.getLabel());
negativeDto.setProblemSourcesCode(ProblemSourcesEnum.ZXDC.getValue());
negativeDto.setSpecialSupervision("1");
negativeDto.setDepartId(departId);
negativeDto.setDepartName(departName);
negativeDto.setInvolveDepartId(departId);
negativeDto.setInvolveDepartName(departName);
negativeDto.setApprovalFlow("3");
// 三级主办
negativeDto.setHostLevel(HostLevelEnums.THREE.getValue());
Negative negative = negativeService.save(negativeDto);
List<NegativeWork> works = workService.list(new LambdaQueryWrapper<NegativeWork>().eq(NegativeWork::getNegativeId, negative.getId()));
if (!works.isEmpty()) {
List<VerifyData.Blame> blameList = blames.stream().filter(j -> StrUtil.isNotBlank(j.getId()) && j.getId().equals(item.getId())).map(j -> {
List<String> nodeIds = departService.getAllNodeIds(departId);
SupPolice police = policeService.getOne(new LambdaQueryWrapper<SupPolice>().eq(SupPolice::getName, j.getName()).in(SupPolice::getOrgId, nodeIds));
VerifyData.Blame blame = new VerifyData.Blame();
blame.setProblems(new ArrayList<>());
if (police != null) {
blame.setBlameName(police.getName());
blame.setBlameIdCode(police.getIdCode());
blame.setBlameEmpNo(police.getEmpNo());
blame.setIvPersonTypeCode(police.getPersonType());
blame.setIvPersonType(Optional.ofNullable(PersonTypeEnum.get(police.getPersonType())).map(PersonTypeEnum::getValue).orElse(null));
blame.setType("personal");
if (StrUtil.isNotBlank(j.getProblemType())) {
List<VerifyData.Problem> problems = Arrays.stream(j.getProblemType().split(",")).filter(k -> problemMaps.get(k) != null).map(k -> {
String code = problemMaps.get(k);
SupDictProblemType problemType = supDictContentService.getById(code);
VerifyData.Problem problem = new VerifyData.Problem();
problem.setThreeLevelCode(problemType.getCode());
problem.setThreeLevelContent(problemType.getName());
SupDictProblemType problemType2 = supDictContentService.getById(problemType.getParentCode());
problem.setTwoLevelCode(problemType2.getId());
problem.setTwoLevelContent(problemType2.getName());
SupDictProblemType problemType3 = supDictContentService.getById(problemType2.getParentCode());
problem.setOneLevelCode(problemType3.getId());
problem.setOneLevelContent(problemType3.getName());
return problem;
}).toList();
blame.setProblems(problems);
}
}
return blame;
}).toList();
ActionDto actionDto1 = new ActionDto()
.setActionKey("three_sign")
.setActionName("已签收")
.setNegativeId(negative.getId())
.setWorkId(works.get(0).getId())
.setNextFlowKey(FlowNodeEnum.VERIFY.getKey())
.setData(null);
SpringUtil.getBean(FlowService.class).execute(actionDto1);
VerifyData verifyData = new VerifyData();
verifyData.setCheckStatusDesc(item.getCheckStatusDesc());
verifyData.setCheckStatus(InspectCaseEnum.TRUE.getValue());
verifyData.setCheckStatusName(InspectCaseEnum.TRUE.getLabel());
if (StrUtil.isNotBlank(item.getRectifyDesc())) {
verifyData.setIsRectifyCode(IsRectifyEnum.YES.getValue());
verifyData.setRectifyDesc(item.getRectifyDesc());
} else {
verifyData.setIsRectifyCode(IsRectifyEnum.NOT.getValue());
}
verifyData.setAccountabilityTarget("1");
verifyData.setCaseNumber(item.getCaseNumber());
verifyData.setBlames(blameList);
ActionDto actionDto = new ActionDto()
.setActionKey("save")
.setActionName("保存信息")
.setNegativeId(negative.getId())
.setWorkId(works.get(0).getId())
.setNextFlowKey(FlowNodeEnum.VERIFY.getKey())
.setData(verifyData);
SpringUtil.getBean(FlowService.class).execute(actionDto); // 保存
}
}
return Result.success();
}
}

6
src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java

@ -71,6 +71,7 @@ public class ApplyCompletionAction implements Action {
.set(Negative::getIsRectifyName, verifyData.getIsRectifyName()) .set(Negative::getIsRectifyName, verifyData.getIsRectifyName())
.set(Negative::getAccountabilityTarget, verifyData.getAccountabilityTarget()) .set(Negative::getAccountabilityTarget, verifyData.getAccountabilityTarget())
.set(Negative::getCaseNumber, verifyData.getCaseNumber()) .set(Negative::getCaseNumber, verifyData.getCaseNumber())
.set(Negative::getRectifyDesc, verifyData.getRectifyDesc())
// 当前处理对象 // 当前处理对象
.set(Negative::getCurrentProcessingObject, negative.getIsSecondHandle() ? "市局专班" : String.format("%s专班", negative.getHandleSecondDepartName())); .set(Negative::getCurrentProcessingObject, negative.getIsSecondHandle() ? "市局专班" : String.format("%s专班", negative.getHandleSecondDepartName()));
// 未整改 // 未整改
@ -92,10 +93,7 @@ public class ApplyCompletionAction implements Action {
.setNegativeId(negativeId) .setNegativeId(negativeId)
.setCrtTime(now) .setCrtTime(now)
.setUpdTime(now); .setUpdTime(now);
if (Objects.nonNull(item.getAssistTime()) && item.getAssistTime().size() >= 2) {
negativeBlame.setAssistStartTime(item.getAssistTime().get(0))
.setAssistEndTime(item.getAssistTime().get(1));
}
problemRelations.addAll(item.getProblems().stream().filter(problem -> StrUtil.isNotBlank(problem.getOneLevelCode())).map(problem -> { problemRelations.addAll(item.getProblems().stream().filter(problem -> StrUtil.isNotBlank(problem.getOneLevelCode())).map(problem -> {
NegativeProblemRelation problemRelation = new NegativeProblemRelation(); NegativeProblemRelation problemRelation = new NegativeProblemRelation();
BeanUtil.copyProperties(problem, problemRelation); BeanUtil.copyProperties(problem, problemRelation);

1
src/main/java/com/biutag/supervision/flow/action/SaveAction.java

@ -51,6 +51,7 @@ public class SaveAction implements Action {
.set(Negative::getCheckStatusDesc, verifyData.getCheckStatusDesc()) .set(Negative::getCheckStatusDesc, verifyData.getCheckStatusDesc())
.set(Negative::getCaseNumber, verifyData.getCaseNumber()) .set(Negative::getCaseNumber, verifyData.getCaseNumber())
.set(Negative::getCheckStatus, verifyData.getCheckStatus()) .set(Negative::getCheckStatus, verifyData.getCheckStatus())
.set(Negative::getRectifyDesc, verifyData.getRectifyDesc())
.set(Negative::getCheckStatusName, verifyData.getCheckStatusName()); .set(Negative::getCheckStatusName, verifyData.getCheckStatusName());
// 核查情况是否属实 // 核查情况是否属实
if (InspectCaseEnum.isItTure(verifyData.getCheckStatus())) { if (InspectCaseEnum.isItTure(verifyData.getCheckStatus())) {

14
src/main/java/com/biutag/supervision/pojo/domain/RiskPersonalDetail.java

@ -1,9 +1,13 @@
package com.biutag.supervision.pojo.domain; package com.biutag.supervision.pojo.domain;
import com.biutag.supervision.pojo.entity.RiskModelTaskClue;
import com.biutag.supervision.pojo.entity.RiskPersonal; import com.biutag.supervision.pojo.entity.RiskPersonal;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/** /**
* @author wxc * @author wxc
* @date 2024/11/14 * @date 2024/11/14
@ -14,4 +18,14 @@ public class RiskPersonalDetail {
private RiskPersonal riskPersonal; private RiskPersonal riskPersonal;
private List<RiskRule> riskClueList = new ArrayList<>();
@Setter
@Getter
public static class RiskRule {
private String riskName;
private Double score;
private List<RiskModelTaskClue> clues = new ArrayList<>();
}
} }

16
src/test/java/com/biutag/supervision/tools/HdtExcelDto.java → src/main/java/com/biutag/supervision/pojo/dto/HdtNegativeBlameImportDto.java

@ -1,4 +1,4 @@
package com.biutag.supervision.tools; package com.biutag.supervision.pojo.dto;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Getter; import lombok.Getter;
@ -12,15 +12,15 @@ import java.time.LocalDateTime;
*/ */
@Setter @Setter
@Getter @Getter
public class HdtExcelDto { public class HdtNegativeBlameImportDto {
@ExcelProperty("姓名") @ExcelProperty("ID")
private String departId; private String id;
@ExcelProperty("部门")
private String departName;
@ExcelProperty("姓名") @ExcelProperty("姓名")
private LocalDateTime discoveryTime; private String name;
@ExcelProperty("问题类型")
private String problemType;
} }

49
src/main/java/com/biutag/supervision/pojo/dto/HdtNegativeImportDto.java

@ -0,0 +1,49 @@
package com.biutag.supervision.pojo.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/**
* @author wxc
* @date 2024/11/13
*/
@Setter
@Getter
public class HdtNegativeImportDto {
@ExcelProperty("ID")
private String id;
@ExcelProperty("姓名")
private String departId;
@ExcelProperty("单位")
private String secondDepartName;
@ExcelProperty("部门")
private String departName;
@ExcelProperty("问题类型")
private String proType;
@ExcelProperty("具体问题情况")
private String thingDesc;
@ExcelProperty("报警时间")
private LocalDateTime discoveryTime;
@ExcelProperty("接警编号")
private String caseNumber;
@ExcelProperty("核查情况")
private String checkStatusDesc;
// 问题整改情况
@ExcelProperty("整改情况")
private String rectifyDesc;
}

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

@ -107,4 +107,5 @@ public class NegativeDto {
// 通报期数 // 通报期数
private String reportNumber; private String reportNumber;
} }

15
src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java

@ -48,6 +48,9 @@ public class VerifyData {
// 涉及单位 // 涉及单位
private String involveDepartId; private String involveDepartId;
// 问题整改情况
private String rectifyDesc;
@Size(min = 1) @Size(min = 1)
private List<Blame> blames = new ArrayList<>(); private List<Blame> blames = new ArrayList<>();
@ -135,18 +138,6 @@ public class VerifyData {
@NotBlank @NotBlank
private String protectRightsName; private String protectRightsName;
// 帮扶对象
@NotBlank
private String assistCaseCode;
// 帮扶对象
@NotBlank
private String assistCaseName;
// 帮扶时间 (开始时间、结束时间)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private List<LocalDateTime> assistTime = new ArrayList<>();
// 问题类型 // 问题类型
private List<Problem> problems; private List<Problem> problems;

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

@ -210,6 +210,9 @@ public class Negative {
// 问题核查情况 // 问题核查情况
private String checkStatusDesc; private String checkStatusDesc;
// 问题整改情况
private String rectifyDesc;
// 整改限制天数 // 整改限制天数
private Integer rectifyRestrictionDays; private Integer rectifyRestrictionDays;

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

@ -63,7 +63,7 @@ public class RiskModelTaskClue {
// 分数 // 分数
@TableField("score") @TableField("score")
private Integer score; private Double score;
// 发生时间 // 发生时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

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

@ -27,7 +27,7 @@ public class RiskScoreRule {
// 分值 // 分值
@TableField("score") @TableField("score")
private String score; private Double score;
// 规则描述 // 规则描述
@TableField("rule_desc") @TableField("rule_desc")

7
src/main/java/com/biutag/supervision/service/NegativeScoreService.java

@ -308,6 +308,8 @@ public class NegativeScoreService {
Double totalScore = scoreDeparts.stream().mapToDouble(NegativeScoreDepart::getScore).sum(); Double totalScore = scoreDeparts.stream().mapToDouble(NegativeScoreDepart::getScore).sum();
List<String> expressionArr = new ArrayList<>(); List<String> expressionArr = new ArrayList<>();
StringBuilder remarks = new StringBuilder(); StringBuilder remarks = new StringBuilder();
List<Double> scores = new ArrayList<>();
List<Double> weights = new ArrayList<>();
double policeScore = Arrays.stream(BusinessTypeEnum.values()).mapToDouble(businessTypeEnum -> { double policeScore = Arrays.stream(BusinessTypeEnum.values()).mapToDouble(businessTypeEnum -> {
List<NegativeScoreDepart> businessScoreDeparts = scoreDeparts.stream().filter(item -> item.getBusinessTypeCode().equals(businessTypeEnum.getValue())).toList(); List<NegativeScoreDepart> businessScoreDeparts = scoreDeparts.stream().filter(item -> item.getBusinessTypeCode().equals(businessTypeEnum.getValue())).toList();
// 业务加权问题数 // 业务加权问题数
@ -351,11 +353,14 @@ public class NegativeScoreService {
remarks.append(String.format("%s:", businessTypeEnum.getLabel())).append("\n"); remarks.append(String.format("%s:", businessTypeEnum.getLabel())).append("\n");
remarks.append(String.format("业务涉及人数 %s", departSize)).append("\n"); remarks.append(String.format("业务涉及人数 %s", departSize)).append("\n");
remarks.append(String.format("业务差异值 %s", diff)).append("\n"); remarks.append(String.format("业务差异值 %s", diff)).append("\n");
scores.add(NumberUtil.round(businessScore, 2).doubleValue());
weights.add(NumberUtil.round(businessWeight * 100, 2).doubleValue());
return NumberUtil.mul(businessScore, businessWeight); return NumberUtil.mul(businessScore, businessWeight);
}).sum(); }).sum();
BigDecimal score = NumberUtil.roundHalfEven(policeScore, 2); BigDecimal score = NumberUtil.roundHalfEven(policeScore, 2);
String expression = String.join(" + ", expressionArr); String expression = String.join(" + ", expressionArr);
return List.of(score, expression); return List.of(score, expression, remarks, scores, weights);
} }
} }

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

@ -161,7 +161,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean 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())) {
@ -212,7 +212,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setNextFlowKey(FlowNodeEnum.SECOND_SIGN.getKey()) .setNextFlowKey(FlowNodeEnum.SECOND_SIGN.getKey())
.setData(firstDistributeData); .setData(firstDistributeData);
SpringUtil.getBean(FlowService.class).execute(actionDto); // 创建一条历史数据 SpringUtil.getBean(FlowService.class).execute(actionDto); // 创建一条历史数据
return true; return negative;
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -234,9 +234,6 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setProblemSourcesCode(ProblemSourcesEnum.JWDC.getValue()) .setProblemSourcesCode(ProblemSourcesEnum.JWDC.getValue())
// 警务调查默认为137工作制 // 警务调查默认为137工作制
.setTimeLimit(TimeLimitEnum.WORK_137.getValue()) .setTimeLimit(TimeLimitEnum.WORK_137.getValue())
.setMaxSignDuration(TimeLimitEnum.WORK_137.getMaxSignDuration())
.setMaxHandleDuration(TimeLimitEnum.WORK_137.getMaxHandleDuration())
.setMaxExtensionDuration(TimeLimitEnum.WORK_137.getMaxHandleDuration())
.setApprovalFlow(ApprovalFlowEnum.SECOND_APPROVAL.getValue()) .setApprovalFlow(ApprovalFlowEnum.SECOND_APPROVAL.getValue())
// 下发时间 // 下发时间
.setFirstDistributeTime(now) .setFirstDistributeTime(now)

BIN
src/main/resources/static/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf

Binary file not shown.

BIN
src/main/resources/static/templates/黄赌问题问题下发模板.xls

Binary file not shown.

2
src/test/java/com/biutag/supervision/StrUtil.java

@ -17,10 +17,8 @@ public class StrUtil {
@Test @Test
public void testSubstr() { public void testSubstr() {
LocalDate now = LocalDate.now();
for (int i = 0; i < 12; i++) { for (int i = 0; i < 12; i++) {
System.out.println(now.minusMonths(i));
} }
} }
} }

40
src/test/java/com/biutag/supervision/tools/ExcelTest.java

@ -1,20 +1,15 @@
package com.biutag.supervision.tools; package com.biutag.supervision.tools;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener; import com.alibaba.excel.read.listener.ReadListener;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.junit.jupiter.api.Test;
import com.biutag.supervision.pojo.dto.DataCaseVerifImportDto;
import com.biutag.supervision.pojo.entity.SupDepart;
import jakarta.validation.ConstraintViolation;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.util.Set; import java.util.ArrayList;
import java.util.stream.Collectors; import java.util.List;
/** /**
* @author wxc * @author wxc
@ -22,20 +17,39 @@ import java.util.stream.Collectors;
*/ */
public class ExcelTest { public class ExcelTest {
@Test
public void test() throws FileNotFoundException { public void test() throws FileNotFoundException {
File file = new File(""); File file = new File("C:\\Users\\ldj\\Desktop\\黄赌\\【2024】黄赌问题统计表 - 副本.xls");
ExcelReader excelReader = EasyExcel.read(new FileInputStream(file), HdtExcelDto.class, new ReadListener<DataCaseVerifImportDto>() { List<HdtNegativeImportDto> negatives = new ArrayList<>();
List<HdtNegativeBlameImportDto> blames = new ArrayList<>();
EasyExcel.read(new FileInputStream(file), HdtNegativeImportDto.class, new ReadListener<HdtNegativeImportDto>() {
@Override @Override
public void invoke(DataCaseVerifImportDto data, AnalysisContext analysisContext) { public void invoke(HdtNegativeImportDto data, AnalysisContext analysisContext) {
negatives.add(data);
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
System.out.println(analysisContext);
}
}).build().read(EasyExcel.readSheet(0).build()).close();
EasyExcel.read(new FileInputStream(file), HdtNegativeBlameImportDto.class, new ReadListener<HdtNegativeBlameImportDto>() {
@Override
public void invoke(HdtNegativeBlameImportDto data, AnalysisContext analysisContext) {
blames.add(data);
} }
@Override @Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) { public void doAfterAllAnalysed(AnalysisContext analysisContext) {
System.out.println(analysisContext);
} }
}).build(); }).build().read(EasyExcel.readSheet(1).build()).close();
} }
} }

14
src/test/java/com/biutag/supervision/tools/HdtNegativeBlameImportDto.java

@ -0,0 +1,14 @@
package com.biutag.supervision.tools;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2024/11/13
*/
@Setter
@Getter
public class HdtNegativeBlameImportDto {
}

43
src/test/java/com/biutag/supervision/tools/HdtNegativeImportDto.java

@ -0,0 +1,43 @@
package com.biutag.supervision.tools;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/**
* @author wxc
* @date 2024/11/13
*/
@Setter
@Getter
public class HdtNegativeImportDto {
@ExcelProperty("ID")
private String id;
@ExcelProperty("姓名")
private String departId;
@ExcelProperty("部门")
private String departName;
@ExcelProperty("报警时间")
private LocalDateTime discoveryTime;
@ExcelProperty("接警编号")
private String caseNumber;
@ExcelProperty("具体问题情况")
private String thingDesc;
@ExcelProperty("核查情况")
private String checkStatusDesc;
// 问题整改情况
@ExcelProperty("整改情况")
private String rectifyDesc;
}

19
src/test/java/com/biutag/supervision/tools/dto/AccountDto.java

@ -0,0 +1,19 @@
package com.biutag.supervision.tools.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class AccountDto {
@Schema(description = "用户名")
@NotBlank(message = "请您输入用户名")
private String account;
@Schema(description = "密码")
@NotBlank(message = "请您输入密码")
private String password;
}

23
src/test/java/com/biutag/supervision/tools/dto/ActionDto.java

@ -0,0 +1,23 @@
package com.biutag.supervision.tools.dto;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
@Accessors(chain = true)
@Setter
@Getter
public class ActionDto {
private String negativeId;
private Integer workId;
private String actionKey;
private String nextFlowKey;
private String actionName;
private Object data;
}

17
src/test/java/com/biutag/supervision/tools/dto/CaseVerifDepart.java

@ -0,0 +1,17 @@
package com.biutag.supervision.tools.dto;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2024/10/29
*/
@Setter
@Getter
public class CaseVerifDepart {
private String label;
private String departId;
private Integer value;
}

37
src/test/java/com/biutag/supervision/tools/dto/DataCaseVerifDistribute.java

@ -0,0 +1,37 @@
package com.biutag.supervision.tools.dto;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2024/10/24
*/
@Setter
@Getter
public class DataCaseVerifDistribute {
List<DataCaseVerif> data = new ArrayList<>();
// 办理时限
@NotBlank
private String timeLimit;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天)
private Integer maxExtensionDuration;
// 审批流程
@NotBlank
private String approvalFlow;
}

72
src/test/java/com/biutag/supervision/tools/dto/DataCaseVerifImportDto.java

@ -0,0 +1,72 @@
package com.biutag.supervision.tools.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Schema(description = "案件核查")
@Setter
@Getter
public class DataCaseVerifImportDto {
// 信件编号
@ExcelProperty({"问题基本信息", "案件编号"})
private String originId;
// 登记时间
@ExcelProperty({"问题基本信息", "受理时间"})
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime discoveryTime;
// 登记时间
@ExcelProperty({"问题基本信息", "问题发生时间"})
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime happenTime;
@ExcelProperty({"问题基本信息", "问题来源"})
private String problemSources;
// 投诉人
@ExcelProperty({"问题基本信息", "投诉人"})
private String responderName;
// 投诉人电话
@ExcelProperty({"问题基本信息", "投诉人电话"})
private String contactPhone;
@ExcelProperty({"问题基本信息", "业务类别"})
private String businessTypeName;
@ExcelProperty({"问题基本信息", "涉嫌问题"})
private String involveProblem;
@ExcelProperty({"问题基本信息", "涉及警种"})
private String policeTypeName;
// 被投诉机构
private String secondDepartId;
@ExcelProperty({"问题基本信息", "涉及单位(二级机构)"})
private String secondDepartName;
// 被投诉机构
@ExcelProperty({"问题基本信息", "涉及单位(三级机构)"})
private String thirdDepartName;
private String thirdDepartId;
// 具体内容
@ExcelProperty({"问题基本信息", "具体内容"})
@NotBlank(message = "具体内容为空")
private String thingDesc;
private String state;
private String errMsg;
}

37
src/test/java/com/biutag/supervision/tools/dto/DataDataPetitionComplainDistribute.java

@ -0,0 +1,37 @@
package com.biutag.supervision.tools.dto;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2024/10/24
*/
@Setter
@Getter
public class DataDataPetitionComplainDistribute {
List<DataPetitionComplaint> data = new ArrayList<>();
// 办理时限
@NotBlank
private String timeLimit;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天)
private Integer maxExtensionDuration;
// 审批流程
@NotBlank
private String approvalFlow;
}

37
src/test/java/com/biutag/supervision/tools/dto/DataDataPetitionComplainDistribute12337.java

@ -0,0 +1,37 @@
package com.biutag.supervision.tools.dto;
import com.biutag.supervision.pojo.entity.DataPetition12337;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2024/10/24
*/
@Setter
@Getter
public class DataDataPetitionComplainDistribute12337 {
List<DataPetition12337> data = new ArrayList<>();
// 办理时限
@NotBlank
private String timeLimit;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天)
private Integer maxExtensionDuration;
// 审批流程
@NotBlank
private String approvalFlow;
}

20
src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintAddDto.java

@ -0,0 +1,20 @@
package com.biutag.supervision.tools.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
@Setter
@Getter
public class DataPetitionComplaintAddDto {
// 更新方式
private String dataUpdateMethod;
// 来源
private String problemSourcesCode;
List<DataPetitionComplaintImportDto> data = new ArrayList<>();
}

94
src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintDto.java

@ -0,0 +1,94 @@
package com.biutag.supervision.tools.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Schema(description = "信访投诉")
@Setter
@Getter
public class DataPetitionComplaintDto {
// 信件编号
@Schema(description = "信件编号")
@NotBlank
private String letterId;
// 投诉渠道
@Schema(description = "投诉渠道")
private String channelForFilingComplaints;
// 受理层级
@Schema(description = "受理层级")
@NotBlank
private String acceptanceLevel;
// 登记时间
@Schema(description = "登记时间(问题发现时间) 示例:2024-08-28 11:00:00")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@NotNull
private LocalDateTime discoveryTime;
// 投诉人
@Schema(description = "投诉人")
@NotBlank
private String responderName;
// 投诉人电话
@Schema(description = "投诉人电话")
@NotBlank
private String responderPhone;
// 初重信访
@Schema(description = "初重信访")
@NotBlank
private String initialPetition;
// 缠访闹访
@Schema(description = "缠访闹访")
@NotBlank
private String entanglementVisits;
// 群众集访
@Schema(description = "群众集访")
@NotBlank
private String massVisits;
// 涉嫌问题
@Schema(description = "涉嫌问题")
@NotBlank
private String involveProblem;
// 业务类别
@Schema(description = "业务类别")
@NotBlank
private String businessTypeName;
// 涉及警种
@Schema(description = "涉及警种")
@NotBlank
private String policeTypeName;
// 被投诉机构
@Schema(description = "被投诉机构")
@NotBlank
private String complainedDepartName;
// 具体内容
@Schema(description = "具体内容")
@NotBlank
private String thingDesc;
@Schema(description = "办结时间 示例:2024-08-28 11:00:00")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime completedTime;
@Schema(description = "办结状态")
private String completedState;
}

85
src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintImportDto.java

@ -0,0 +1,85 @@
package com.biutag.supervision.tools.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
@Schema(description = "信访投诉")
@Setter
@Getter
public class DataPetitionComplaintImportDto {
// 投诉渠道
@ExcelProperty({"信访基本信息", "投诉渠道"})
private String channelForFilingComplaints;
// 信件编号
@ExcelProperty({"信访基本信息", "信件编号"})
private String originId;
// 受理层级
@ExcelProperty({"信访基本信息", "受理层级"})
private String acceptanceLevel;
// 登记时间
@ExcelProperty({"信访基本信息", "登记时间"})
private String discoveryTime;
// 投诉人
@ExcelProperty({"信访基本信息", "投诉人"})
private String responderName;
// 投诉人电话
@ExcelProperty({"信访基本信息", "投诉人电话"})
private String contactPhone;
// 初重信访
@ExcelProperty({"信访基本信息", "初重信访"})
@NotBlank(message = "初重信访为空或值描述不准确")
private String initialPetition;
// 缠访闹访
@ExcelProperty({"信访基本信息", "缠访闹访"})
private String entanglementVisitsLabel;
private Boolean entanglementVisits;
// 群众集访
@ExcelProperty({"信访基本信息", "群众集访"})
private String massVisitsLabel;
private Boolean massVisits;
// 涉嫌问题
@ExcelProperty({"信访基本信息", "涉嫌问题"})
private String involveProblem;
// 业务类别
@ExcelProperty({"信访基本信息", "业务类别"})
private String businessTypeName;
@ExcelProperty({"信访基本信息", "被投诉二级机构"})
private String involveSecondDepartName;
// 被投诉机构
@ExcelProperty({"信访基本信息", "被投诉所队"})
private String involveThirdDepartName;
@NotBlank(message = "涉及二级机构为空或与系统未匹配上")
private String involveSecondDepartId;
private String involveThirdDepartId;
// 具体内容
@ExcelProperty({"信访基本信息", "具体内容"})
@NotBlank(message = "具体内容为空")
private String thingDesc;
private String state;
private String errMsg;
}

41
src/test/java/com/biutag/supervision/tools/dto/DictDataDto.java

@ -0,0 +1,41 @@
package com.biutag.supervision.tools.dto;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class DictDataDto {
private Long dictCode;
// 字典标签
private String dictLabel;
// 字典键值
private String dictValue;
// 字典类型
private String dictType;
// 样式属性(其他样式扩展)
private String cssClass;
// 表格回显样式
private String listClass;
// 是否默认(1是 0否)
private String isDefault;
// 字典排序
private Integer dictSort;
// 状态(0正常 1停用)
private String status;
// 备注
private String remark;
}

23
src/test/java/com/biutag/supervision/tools/dto/DictTypeDto.java

@ -0,0 +1,23 @@
package com.biutag.supervision.tools.dto;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class DictTypeDto {
private Long dictId;
// 字典名称
private String dictName;
// 字典类型
private String dictType;
// 状态(0正常 1停用)
private String status;
private String remark;
}

41
src/test/java/com/biutag/supervision/tools/dto/MenuDto.java

@ -0,0 +1,41 @@
package com.biutag.supervision.tools.dto;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class MenuDto {
private Integer id;
private Integer pid;
// 菜单类型
private String menuType;
// 菜单名称
private String menuName;
// 菜单图标
private String icon;
// 路径
private String paths;
private String component;
// 排序
private Integer menuSort;
private String perms;
private Integer isCache;
private Integer isShow;
private Integer isDisable;
// 是否打开新页面 默认为false
private Boolean openNewPage;
}

16
src/test/java/com/biutag/supervision/tools/dto/ModelClueDepartDto.java

@ -0,0 +1,16 @@
package com.biutag.supervision.tools.dto;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2024/10/22
*/
@Setter
@Getter
public class ModelClueDepartDto {
private String departId;
}

48
src/test/java/com/biutag/supervision/tools/dto/ModelClueTaskDistribute.java

@ -0,0 +1,48 @@
package com.biutag.supervision.tools.dto;
import com.biutag.supervision.pojo.entity.ModelClue;
import com.biutag.supervision.pojo.vo.FileVo;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* 模型线索手动分发
* @author wxc
* @date 2024/10/18
*/
@Setter
@Getter
public class ModelClueTaskDistribute {
private List<ModelClue> modelClues = new ArrayList<>();
private String taskName;
// 办理时限
@NotBlank
private String timeLimit;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天)
private Integer maxExtensionDuration;
// 下发流程
private String distributionFlow;
// 审批流程
@NotBlank
private String approvalFlow;
private List<FileVo> thingFiles = new ArrayList<>();
}

111
src/test/java/com/biutag/supervision/tools/dto/NegativeDto.java

@ -0,0 +1,111 @@
package com.biutag.supervision.tools.dto;
import com.biutag.supervision.common.validation.AddGroup;
import com.biutag.supervision.common.validation.EditGroup;
import com.biutag.supervision.pojo.vo.FileVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Setter
@Getter
public class NegativeDto {
@NotBlank(message = "问题来源不能为空", groups = {EditGroup.class})
private String id;
private String originId;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime happenTime;
// 问题发现时间
@NotNull(groups = {AddGroup.class, EditGroup.class})
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime discoveryTime;
// 问题来源
@NotBlank(message = "问题来源不能为空", groups = {AddGroup.class, EditGroup.class})
private String problemSourcesCode;
// 问题来源
@NotBlank(message = "问题来源不能为空", groups = {AddGroup.class, EditGroup.class})
private String problemSources;
// 业务类别
@NotBlank(message = "业务类别不能为空", groups = {AddGroup.class, EditGroup.class})
private String businessTypeCode;
// 业务类别名称
@NotBlank(message = "业务类别不能为空", groups = {AddGroup.class, EditGroup.class})
private String businessTypeName;
private String policeTypeName;
// 涉及警种
private String policeType;
// 涉嫌问题JSON
private List<Map<String, String>> involveProblem;
// 反映人姓名
private String responderName;
// 联系电话
private String contactPhone;
// 简要描述
@NotBlank(message = "简要描述不能为空", groups = {AddGroup.class, EditGroup.class})
private String thingDesc;
private List<FileVo> thingFiles = new ArrayList<>();
private String involveDepartName;
// 涉及单位
private String involveDepartId;
@NotBlank(message = "主办层级不能为空", groups = {AddGroup.class})
private String hostLevel;
// 办理时限
@NotBlank(message = "办理时限不能为空", groups = {AddGroup.class})
private String timeLimit;
// 审批流程
@NotBlank(message = "审批流程不能为空", groups = {AddGroup.class})
private String approvalFlow;
@NotBlank(message = "指定具体办理单位不能为空", groups = {AddGroup.class})
private String departId;
@NotBlank(message = "指定具体办理单位不能为空", groups = {AddGroup.class})
private String departName;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天)
private Integer maxExtensionDuration;
// 涉及案件/警情编号
private String caseNumber;
// 专项督察
private String specialSupervision;
// 通报期数
private String reportNumber;
}

39
src/test/java/com/biutag/supervision/tools/dto/PoliceImport.java

@ -0,0 +1,39 @@
package com.biutag.supervision.tools.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2024/10/30
*/
@Setter
@Getter
public class PoliceImport {
@NotBlank(message = "姓名为空")
@ExcelProperty("姓名")
private String name;
@NotBlank(message = "警号为空")
@ExcelProperty("警号")
private String empNo;
@NotBlank(message = "身份证为空")
@ExcelProperty("身份证")
private String idCode;
@NotBlank(message = "二级单位为空")
@ExcelProperty("二级单位")
private String secondDepartName;
@ExcelProperty("三级单位")
private String thirdDepartName;
@NotBlank(message = "角色为空")
@ExcelProperty("角色")
private String role;
}

37
src/test/java/com/biutag/supervision/tools/dto/UserDto.java

@ -0,0 +1,37 @@
package com.biutag.supervision.tools.dto;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Setter
@Getter
public class UserDto {
private String userId;
// 登陆账号
private String userName;
// 昵称
private String nickName;
// 邮箱
private String email;
// 手机号
private String mobile;
// 用户类型:super-超级管理员 normal-普通管理员
private String userType;
// 描述
private String userDesc;
// 状态:0-禁用 1-正常 2-锁定
private Integer status;
private List<String> roleIds;
}

18
src/test/java/com/biutag/supervision/tools/dto/common/BarItem.java

@ -0,0 +1,18 @@
package com.biutag.supervision.tools.dto.common;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2024/10/29
*/
@Setter
@Getter
@AllArgsConstructor
public class BarItem {
private String label;
private Integer value;
}

18
src/test/java/com/biutag/supervision/tools/dto/common/PieItem.java

@ -0,0 +1,18 @@
package com.biutag.supervision.tools.dto.common;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2024/10/29
*/
@Setter
@Getter
@AllArgsConstructor
public class PieItem {
private String name;
private Integer value;
}

11
src/test/java/com/biutag/supervision/tools/dto/flow/ApproveData.java

@ -0,0 +1,11 @@
package com.biutag.supervision.tools.dto.flow;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class ApproveData {
private String comments;
}

42
src/test/java/com/biutag/supervision/tools/dto/flow/ConfirmationCompletionData.java

@ -0,0 +1,42 @@
package com.biutag.supervision.tools.dto.flow;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2024/11/8
*/
@Setter
@Getter
public class ConfirmationCompletionData {
// 核查办理情况
private String verifySituation;
// 佐证材料情况
private String verifyFileSituation;
// 认定办结意见
private String completionComment;
private List<Blame> blames = new ArrayList<>();
@Setter
@Getter
public static class Blame {
private String blameIdCode;
// 严重等级
private String negativeLevel;
private Double baseScore = 0.0;
private Double frequencyScore = 0.0;
}
}

16
src/test/java/com/biutag/supervision/tools/dto/flow/ExtensionApplyData.java

@ -0,0 +1,16 @@
package com.biutag.supervision.tools.dto.flow;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class ExtensionApplyData {
// 延期天数
private Integer extensionDays;
// 延期理由
private String comments;
}

37
src/test/java/com/biutag/supervision/tools/dto/flow/FirstDistributeData.java

@ -0,0 +1,37 @@
package com.biutag.supervision.tools.dto.flow;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class FirstDistributeData {
@NotBlank
private String hostLevel;
// 办理时限
@NotBlank
private String timeLimit;
// 审批流程
@NotBlank
private String approvalFlow;
@NotBlank
private String departId;
@NotBlank
private String departName;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天)
private Integer maxExtensionDuration;
}

14
src/test/java/com/biutag/supervision/tools/dto/flow/SecondDistributeData.java

@ -0,0 +1,14 @@
package com.biutag.supervision.tools.dto.flow;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class SecondDistributeData {
private String departId;
private String departName;
}

11
src/test/java/com/biutag/supervision/tools/dto/flow/SignReturnData.java

@ -0,0 +1,11 @@
package com.biutag.supervision.tools.dto.flow;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class SignReturnData {
private String comments;
}

240
src/test/java/com/biutag/supervision/tools/dto/flow/VerifyData.java

@ -0,0 +1,240 @@
package com.biutag.supervision.tools.dto.flow;
import com.biutag.supervision.pojo.vo.FileVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@Setter
@Getter
public class VerifyData {
// 核查情况
@NotBlank
private String checkStatus;
// 核查情况
@NotBlank
private String checkStatusName;
// 是否整改
@NotBlank
private String isRectifyCode;
// 是否整改
@NotBlank
private String isRectifyName;
// 问题核查情况
@NotBlank
private String checkStatusDesc;
// 整改限制天数
private Integer rectifyRestrictionDays;
// 追责对象
@NotBlank
private String accountabilityTarget;
// 涉及案件/警情编号
private String caseNumber;
// 涉及单位
private String involveDepartId;
// 问题整改情况
private String rectifyDesc;
@Size(min = 1)
private List<Blame> blames = new ArrayList<>();
private List<BlameLeader> blameLeaders = new ArrayList<>();
private List<FileVo> files = new ArrayList<>();
@Setter
@Getter
public static class Blame {
// 涉及姓名
@NotBlank
private String blameName;
// 涉及身份证
@NotBlank
private String blameIdCode;
// 涉及警号
@NotBlank
private String blameEmpNo;
// 警种
@NotBlank
private String policeTypeName;
// 警种
@NotBlank
private String policeTypeCode;
@NotBlank
private String ivPersonType;
// 人员属性
@NotBlank
private String ivPersonTypeCode;
// 核查情况code
@NotBlank
private String inspectCaseCode;
// 核查情况
@NotBlank
private String inspectCaseName;
// 督察措施
@NotBlank
private String superviseMeasuresCode;
// 督察措施
@NotBlank
private String superviseMeasuresName;
// 主观方面
@NotBlank
private String subjectiveAspectCode;
// 主观方面
@NotBlank
private String subjectiveAspectName;
// 责任类别
@NotBlank
private String responsibilityTypeCode;
// 责任类别
@NotBlank
private String responsibilityTypeName;
// 处理结果
@NotBlank
private String handleResultCode;
// 处理结果
@NotBlank
private String handleResultName;
// 维权容错
@NotBlank
private String protectRightsCode;
// 维权容错
@NotBlank
private String protectRightsName;
// 帮扶对象
@NotBlank
private String assistCaseCode;
// 帮扶对象
@NotBlank
private String assistCaseName;
// 帮扶时间 (开始时间、结束时间)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private List<LocalDateTime> assistTime = new ArrayList<>();
// 问题类型
private List<Problem> problems;
private String type;
}
@Setter
@Getter
public static class BlameLeader {
private List<String> blameIdCodes = new ArrayList<>();
// 责任领导
@NotBlank
private String leadName;
// 责任领导警号
@NotBlank
private String leadEmpNo;
// 责任领导身份证
@NotBlank
private String leadIdCode;
// 三级机构
@NotBlank
private String leadThreeDepartName;
// 领导督察措施
@NotBlank
private String leadMeasuresName;
// 领导督察措施
@NotBlank
private String leadMeasuresCode;
// 领导责任类别
@NotBlank
private String leadResponsibilityTypeName;
// 领导责任类别
@NotBlank
private String leadResponsibilityTypeCode;
// 领导处理结果
@NotBlank
private String leadHandleResultCode;
// 领导处理结果
@NotBlank
private String leadHandleResultName;
// 领导维权容错
@NotBlank
private String leadProtectRightsName;
// 领导维权容错
@NotBlank
private String leadProtectRightsCode;
}
@Setter
@Getter
public static class Problem {
@NotBlank
private String oneLevelCode;
@NotBlank
private String twoLevelCode;
@NotBlank
private String oneLevelContent;
@NotBlank
private String twoLevelContent;
@NotBlank
private String threeLevelCode;
@NotBlank
private String threeLevelContent;
}
}

111
src/test/java/com/biutag/supervision/tools/dto/jwdc/NegativeApiDto.java

@ -0,0 +1,111 @@
package com.biutag.supervision.tools.dto.jwdc;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.ValidationException;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;
import java.util.Date;
@Setter
@Getter
public class NegativeApiDto {
// 来源ID
@NotBlank
private String originId;
// 反映人姓名
@NotBlank
private String responderName;
// 联系电话
@NotBlank
private String contactPhone;
// 发生时间
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date happenTime;
// 发现时间
@NotNull
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private Date discoveryTime;
// 业务类型名称
@NotBlank
private String businessTypeName;
// 涉及单位名称
@NotBlank
private String departName;
@NotBlank
private String departCode;
// 简要描述
@NotBlank
private String thingDesc;
public NegativeApiDto toEntity() {
NegativeApiDto negative = new NegativeApiDto();
BeanUtils.copyProperties(this, negative);
return negative;
}
@AllArgsConstructor
public enum BusinessType {
// 业务类型
JCJ_110("1", "110接处警", "警令", "1"), // 警令
JCJ_122("2", "122接处警", "交警", "11"), // 交警
RJCKFW("3", "人境窗口服务", "人境", "18"), // 人境
CJGFF("4", "车驾管服务", "交警", "11"), // 交警
//JJCF(5, "交警执法"),
ZFBA("6", "执法办案", "法制", "21") // 法制
// , ZXGZ(7, "专项工作"),
// ABWW(8, "安保维稳"),
// ZAFK(9, "治安防控"),
// XZGL(10, "行政管理"),
// FWJC(11, "服务基层"),
// DWGL(12, "队伍管理"),
// OTHER(13, "其他")
;
@Getter
private String code;
private String name;
private String policeTypeName;
private String policeType;
public static String getCode(String name) {
for (BusinessType businessType : values()) {
if (businessType.name.equals(name)) {
return businessType.code;
}
}
throw new ValidationException("没有该业务类型");
}
public static String getPoliceTypeName(String name) {
for (BusinessType businessType : values()) {
if (businessType.name.equals(name)) {
return businessType.policeTypeName;
}
}
throw new ValidationException("没有该业务类型");
}
public static String getPoliceType(String name) {
for (BusinessType businessType : values()) {
if (businessType.name.equals(name)) {
return businessType.policeType;
}
}
throw new ValidationException("没有该业务类型");
}
}
}
Loading…
Cancel
Save