diff --git a/src/main/java/com/biutag/supervision/config/InterceptorConfig.java b/src/main/java/com/biutag/supervision/config/InterceptorConfig.java index 32a62c9..08673e5 100644 --- a/src/main/java/com/biutag/supervision/config/InterceptorConfig.java +++ b/src/main/java/com/biutag/supervision/config/InterceptorConfig.java @@ -34,7 +34,7 @@ public class InterceptorConfig implements WebMvcConfigurer { .excludePathPatterns("/login") .excludePathPatterns("/auth/self") .excludePathPatterns("/file/stream/**", "/templates/**") - .excludePathPatterns("/score/police", "/score/depart") + .excludePathPatterns("/score/**") .excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**")); registry.addInterceptor(new ApiInterceptor()) diff --git a/src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java b/src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java index 6d12901..2e1bc90 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java @@ -9,14 +9,16 @@ import lombok.Getter; public enum InspectCaseEnum { // 属实 - TRUE("1"), + TRUE("1", "属实"), // 部分属实 - PARTIALLY_TRUE("2"), + PARTIALLY_TRUE("2", "部分属实"), // 不属实 - FALSE("3"); + FALSE("3", "不属实"); private String value; + private String label; + public static boolean isItTure(String value) { return StrUtil.isNotBlank(value); } diff --git a/src/main/java/com/biutag/supervision/constants/enums/PersonTypeEnum.java b/src/main/java/com/biutag/supervision/constants/enums/PersonTypeEnum.java index 95163f9..1702e5d 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/PersonTypeEnum.java +++ b/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()); } + public static PersonTypeEnum get(String value) { + for (PersonTypeEnum personTypeEnum : values()) { + if (personTypeEnum.getValue().equals(value)) { + return personTypeEnum; + } + } + return null; + } + } diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java index 6731a36..56f6837 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java +++ b/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.extension.plugins.pagination.Page; 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.RiskScoreRule; 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.RiskScoreRuleService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; 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.RestController; +import java.util.List; import java.util.Objects; /** @@ -34,13 +42,39 @@ public class RiskPersonalController { .eq(StrUtil.isNotBlank(param.getGender()), RiskPersonal::getGender, param.getGender()) .eq(Objects.nonNull(param.getAge()), RiskPersonal::getAge, param.getAge()) .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)); } - @GetMapping("{id}") - public Result> list(@PathVariable Integer id) { + private final RiskScoreRuleService riskScoreRuleService; + + private final RiskModelTaskClueService riskModelTaskClueService; - return Result.success(); + private final ModelService modelService; + + @GetMapping("{id}") + public Result list(@PathVariable Integer id) { + List rules1 = riskScoreRuleService.list(new LambdaQueryWrapper().eq(RiskScoreRule::getLevel, 1)); + RiskPersonal riskPersonal = riskPersonalService.getById(id); + List list = rules1.stream().map(rule -> { + RiskPersonalDetail.RiskRule riskRule = new RiskPersonalDetail.RiskRule(); + riskRule.setRiskName(rule.getRiskName()); + List rules2 = riskScoreRuleService.list(new LambdaQueryWrapper().eq(RiskScoreRule::getPid, rule.getId()) + .eq(RiskScoreRule::getLevel, 2)); + List models = modelService.list(new LambdaQueryWrapper().in(Model::getRiskScoreRuleId, rules2.stream().map(RiskScoreRule::getId))); + List records = riskModelTaskClueService.page(Page.of(1, 5), new LambdaQueryWrapper() + .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); } } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java index 1496d05..ea9c862 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java @@ -1,11 +1,14 @@ 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.PoliceScoreMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.entity.*; -import com.biutag.supervision.service.NegativeScoreService; -import com.biutag.supervision.service.RiskPersonalService; +import com.biutag.supervision.service.*; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestMapping; @@ -16,6 +19,8 @@ import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; /** * @author wxc @@ -75,10 +80,43 @@ public class ScoreController { private final RiskPersonalService riskPersonalService; - @RequestMapping("personal") - public Result updatePersonalScore() { - List riskPersonals = riskPersonalService.list(); + private final RiskScoreRuleService riskScoreRuleService; + + private final ModelService modelService; + + private final RiskModelTaskClueService riskModelTaskClueService; + @RequestMapping("personal") + public Result updatePersonalScore(Integer size) { + if (Objects.isNull(size)) { + size = 1000000; + } + List riskPersonals = riskPersonalService.page(Page.of(1, size), new LambdaQueryWrapper().eq(RiskPersonal::getDel, "1") + .ne(RiskPersonal::getRiskScore, 0)).getRecords(); + List rules1 = riskScoreRuleService.list(new LambdaQueryWrapper().eq(RiskScoreRule::getLevel, 1)); + riskPersonals.forEach(personal -> { + log.info("{}-{} 开始打分--------------------------------------", personal.getName(), personal.getIdCode()); + double riskScore = rules1.stream().mapToDouble(rule -> { + List rules2 = riskScoreRuleService.list(new LambdaQueryWrapper().eq(RiskScoreRule::getPid, rule.getId()) + .eq(RiskScoreRule::getLevel, 2)); + double score2 = rules2.stream().mapToDouble(rule2 -> { + Model model = modelService.getOne(new LambdaQueryWrapper().eq(Model::getRiskScoreRuleId, rule2.getId())); + double score3 = riskModelTaskClueService.list(new LambdaQueryWrapper() + .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().eq(RiskPersonal::getIdCode, personal.getIdCode()).set(RiskPersonal::getRiskScore, riskScore)); + }); return Result.success("success"); } diff --git a/src/main/java/com/biutag/supervision/controller/work/NegativeController.java b/src/main/java/com/biutag/supervision/controller/work/NegativeController.java index 3179d61..9563408 100644 --- a/src/main/java/com/biutag/supervision/controller/work/NegativeController.java +++ b/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.EditGroup; import com.biutag.supervision.flow.FlowService; -import com.biutag.supervision.mapper.SupDictContentMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.domain.NegativeDetail; import com.biutag.supervision.pojo.dto.ActionDto; 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.vo.NegativeConfirmationCompletionVo; import com.biutag.supervision.pojo.vo.NegativeQueryVo; import com.biutag.supervision.service.*; import com.biutag.supervision.util.JSON; -import com.biutag.supervision.util.ScoreRule; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Objects; @RequiredArgsConstructor @RequestMapping("negative") @@ -60,7 +58,8 @@ public class NegativeController { @PostMapping public Result add(@Validated(AddGroup.class) @RequestBody NegativeDto negativeDto) { - return Result.success(negativeService.save(negativeDto)); + negativeService.save(negativeDto); + return Result.success(); } @PutMapping diff --git a/src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java b/src/main/java/com/biutag/supervision/controller/work/NegativeImportController.java new file mode 100644 index 0000000..b0ae0bf --- /dev/null +++ b/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 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> importExcel(@RequestPart("file") MultipartFile file) throws IOException { + List negatives = new ArrayList<>(); + List blames = new ArrayList<>(); + + EasyExcel.read(file.getInputStream(), HdtNegativeImportDto.class, new ReadListener() { + @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() { + @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 list = negatives.stream().filter(item -> StrUtil.isNotBlank(item.getId())).toList(); + for (HdtNegativeImportDto item : list) { + i++; + SupDepart parent = departService.getOne(new LambdaQueryWrapper().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() + .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 works = workService.list(new LambdaQueryWrapper().eq(NegativeWork::getNegativeId, negative.getId())); + if (!works.isEmpty()) { + List blameList = blames.stream().filter(j -> StrUtil.isNotBlank(j.getId()) && j.getId().equals(item.getId())).map(j -> { + List nodeIds = departService.getAllNodeIds(departId); + SupPolice police = policeService.getOne(new LambdaQueryWrapper().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 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(); + } + + + +} diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java index 6cf3fb7..e97914d 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/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::getAccountabilityTarget, verifyData.getAccountabilityTarget()) .set(Negative::getCaseNumber, verifyData.getCaseNumber()) + .set(Negative::getRectifyDesc, verifyData.getRectifyDesc()) // 当前处理对象 .set(Negative::getCurrentProcessingObject, negative.getIsSecondHandle() ? "市局专班" : String.format("%s专班", negative.getHandleSecondDepartName())); // 未整改 @@ -92,10 +93,7 @@ public class ApplyCompletionAction implements Action { .setNegativeId(negativeId) .setCrtTime(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 -> { NegativeProblemRelation problemRelation = new NegativeProblemRelation(); BeanUtil.copyProperties(problem, problemRelation); diff --git a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java index faccd99..705ee8d 100644 --- a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java +++ b/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::getCaseNumber, verifyData.getCaseNumber()) .set(Negative::getCheckStatus, verifyData.getCheckStatus()) + .set(Negative::getRectifyDesc, verifyData.getRectifyDesc()) .set(Negative::getCheckStatusName, verifyData.getCheckStatusName()); // 核查情况是否属实 if (InspectCaseEnum.isItTure(verifyData.getCheckStatus())) { diff --git a/src/main/java/com/biutag/supervision/pojo/domain/RiskPersonalDetail.java b/src/main/java/com/biutag/supervision/pojo/domain/RiskPersonalDetail.java index c6c5b96..191db51 100644 --- a/src/main/java/com/biutag/supervision/pojo/domain/RiskPersonalDetail.java +++ b/src/main/java/com/biutag/supervision/pojo/domain/RiskPersonalDetail.java @@ -1,9 +1,13 @@ package com.biutag.supervision.pojo.domain; +import com.biutag.supervision.pojo.entity.RiskModelTaskClue; import com.biutag.supervision.pojo.entity.RiskPersonal; import lombok.Getter; import lombok.Setter; +import java.util.ArrayList; +import java.util.List; + /** * @author wxc * @date 2024/11/14 @@ -14,4 +18,14 @@ public class RiskPersonalDetail { private RiskPersonal riskPersonal; + private List riskClueList = new ArrayList<>(); + + @Setter + @Getter + public static class RiskRule { + private String riskName; + private Double score; + private List clues = new ArrayList<>(); + } + } diff --git a/src/test/java/com/biutag/supervision/tools/HdtExcelDto.java b/src/main/java/com/biutag/supervision/pojo/dto/HdtNegativeBlameImportDto.java similarity index 50% rename from src/test/java/com/biutag/supervision/tools/HdtExcelDto.java rename to src/main/java/com/biutag/supervision/pojo/dto/HdtNegativeBlameImportDto.java index bf6a5f7..4032f62 100644 --- a/src/test/java/com/biutag/supervision/tools/HdtExcelDto.java +++ b/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 lombok.Getter; @@ -12,15 +12,15 @@ import java.time.LocalDateTime; */ @Setter @Getter -public class HdtExcelDto { +public class HdtNegativeBlameImportDto { - @ExcelProperty("姓名") - private String departId; - - @ExcelProperty("部门") - private String departName; + @ExcelProperty("ID") + private String id; @ExcelProperty("姓名") - private LocalDateTime discoveryTime; + private String name; + + @ExcelProperty("问题类型") + private String problemType; } diff --git a/src/main/java/com/biutag/supervision/pojo/dto/HdtNegativeImportDto.java b/src/main/java/com/biutag/supervision/pojo/dto/HdtNegativeImportDto.java new file mode 100644 index 0000000..e497a83 --- /dev/null +++ b/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; + + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java b/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java index c45dba9..c5134a2 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java @@ -107,4 +107,5 @@ public class NegativeDto { // 通报期数 private String reportNumber; + } diff --git a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java index cb7b7e0..65ae198 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java @@ -48,6 +48,9 @@ public class VerifyData { // 涉及单位 private String involveDepartId; + // 问题整改情况 + private String rectifyDesc; + @Size(min = 1) private List blames = new ArrayList<>(); @@ -135,18 +138,6 @@ public class VerifyData { @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 assistTime = new ArrayList<>(); - // 问题类型 private List problems; diff --git a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java index 2c5fb37..44c9b3c 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java @@ -210,6 +210,9 @@ public class Negative { // 问题核查情况 private String checkStatusDesc; + // 问题整改情况 + private String rectifyDesc; + // 整改限制天数 private Integer rectifyRestrictionDays; diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RiskModelTaskClue.java b/src/main/java/com/biutag/supervision/pojo/entity/RiskModelTaskClue.java index 3dbdd7c..67570a2 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/RiskModelTaskClue.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/RiskModelTaskClue.java @@ -63,7 +63,7 @@ public class RiskModelTaskClue { // 分数 @TableField("score") - private Integer score; + private Double score; // 发生时间 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RiskScoreRule.java b/src/main/java/com/biutag/supervision/pojo/entity/RiskScoreRule.java index 51730ce..4272a9f 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/RiskScoreRule.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/RiskScoreRule.java @@ -27,7 +27,7 @@ public class RiskScoreRule { // 分值 @TableField("score") - private String score; + private Double score; // 规则描述 @TableField("rule_desc") diff --git a/src/main/java/com/biutag/supervision/service/NegativeScoreService.java b/src/main/java/com/biutag/supervision/service/NegativeScoreService.java index af8d0a3..4848b2e 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeScoreService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeScoreService.java @@ -308,6 +308,8 @@ public class NegativeScoreService { Double totalScore = scoreDeparts.stream().mapToDouble(NegativeScoreDepart::getScore).sum(); List expressionArr = new ArrayList<>(); StringBuilder remarks = new StringBuilder(); + List scores = new ArrayList<>(); + List weights = new ArrayList<>(); double policeScore = Arrays.stream(BusinessTypeEnum.values()).mapToDouble(businessTypeEnum -> { List 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", departSize)).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); }).sum(); BigDecimal score = NumberUtil.roundHalfEven(policeScore, 2); String expression = String.join(" + ", expressionArr); - return List.of(score, expression); + return List.of(score, expression, remarks, scores, weights); } } diff --git a/src/main/java/com/biutag/supervision/service/NegativeService.java b/src/main/java/com/biutag/supervision/service/NegativeService.java index 0fed256..718bed9 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeService.java @@ -161,7 +161,7 @@ public class NegativeService extends ServiceImpl { } @Transactional(rollbackFor = Exception.class) - public boolean save(NegativeDto negativeDto) { + public Negative save(NegativeDto negativeDto) { Negative negative = new Negative(); BeanUtil.copyProperties(negativeDto, negative); if (StrUtil.isBlank(negativeDto.getOriginId())) { @@ -212,7 +212,7 @@ public class NegativeService extends ServiceImpl { .setNextFlowKey(FlowNodeEnum.SECOND_SIGN.getKey()) .setData(firstDistributeData); SpringUtil.getBean(FlowService.class).execute(actionDto); // 创建一条历史数据 - return true; + return negative; } @Transactional(rollbackFor = Exception.class) @@ -234,9 +234,6 @@ public class NegativeService extends ServiceImpl { .setProblemSourcesCode(ProblemSourcesEnum.JWDC.getValue()) // 警务调查默认为137工作制 .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()) // 下发时间 .setFirstDistributeTime(now) diff --git a/src/main/resources/static/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf b/src/main/resources/static/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf index 9e3379e..1f96dd8 100644 Binary files a/src/main/resources/static/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf and b/src/main/resources/static/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf differ diff --git a/src/main/resources/static/templates/黄赌问题问题下发模板.xls b/src/main/resources/static/templates/黄赌问题问题下发模板.xls new file mode 100644 index 0000000..bcb83be Binary files /dev/null and b/src/main/resources/static/templates/黄赌问题问题下发模板.xls differ diff --git a/src/test/java/com/biutag/supervision/StrUtil.java b/src/test/java/com/biutag/supervision/StrUtil.java index 2d872cf..572ac80 100644 --- a/src/test/java/com/biutag/supervision/StrUtil.java +++ b/src/test/java/com/biutag/supervision/StrUtil.java @@ -17,10 +17,8 @@ public class StrUtil { @Test public void testSubstr() { - LocalDate now = LocalDate.now(); for (int i = 0; i < 12; i++) { - System.out.println(now.minusMonths(i)); } } } diff --git a/src/test/java/com/biutag/supervision/tools/ExcelTest.java b/src/test/java/com/biutag/supervision/tools/ExcelTest.java index dc24199..bb3006a 100644 --- a/src/test/java/com/biutag/supervision/tools/ExcelTest.java +++ b/src/test/java/com/biutag/supervision/tools/ExcelTest.java @@ -1,20 +1,15 @@ package com.biutag.supervision.tools; -import cn.hutool.core.util.StrUtil; import com.alibaba.excel.EasyExcel; -import com.alibaba.excel.ExcelReader; 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.pojo.dto.DataCaseVerifImportDto; -import com.biutag.supervision.pojo.entity.SupDepart; -import jakarta.validation.ConstraintViolation; +import org.junit.jupiter.api.Test; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.util.Set; -import java.util.stream.Collectors; +import java.util.ArrayList; +import java.util.List; /** * @author wxc @@ -22,20 +17,39 @@ import java.util.stream.Collectors; */ public class ExcelTest { + @Test 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() { + List negatives = new ArrayList<>(); + List blames = new ArrayList<>(); + + EasyExcel.read(new FileInputStream(file), HdtNegativeImportDto.class, new ReadListener() { @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() { + @Override + public void invoke(HdtNegativeBlameImportDto data, AnalysisContext analysisContext) { + blames.add(data); } @Override public void doAfterAllAnalysed(AnalysisContext analysisContext) { - + System.out.println(analysisContext); } - }).build(); + }).build().read(EasyExcel.readSheet(1).build()).close(); + + } + + } diff --git a/src/test/java/com/biutag/supervision/tools/HdtNegativeBlameImportDto.java b/src/test/java/com/biutag/supervision/tools/HdtNegativeBlameImportDto.java new file mode 100644 index 0000000..1f40158 --- /dev/null +++ b/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 { + +} diff --git a/src/test/java/com/biutag/supervision/tools/HdtNegativeImportDto.java b/src/test/java/com/biutag/supervision/tools/HdtNegativeImportDto.java new file mode 100644 index 0000000..5c68b2d --- /dev/null +++ b/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; + + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/AccountDto.java b/src/test/java/com/biutag/supervision/tools/dto/AccountDto.java new file mode 100644 index 0000000..eec3575 --- /dev/null +++ b/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; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/ActionDto.java b/src/test/java/com/biutag/supervision/tools/dto/ActionDto.java new file mode 100644 index 0000000..e00ab3e --- /dev/null +++ b/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; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/CaseVerifDepart.java b/src/test/java/com/biutag/supervision/tools/dto/CaseVerifDepart.java new file mode 100644 index 0000000..a5ff65e --- /dev/null +++ b/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; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/DataCaseVerifDistribute.java b/src/test/java/com/biutag/supervision/tools/dto/DataCaseVerifDistribute.java new file mode 100644 index 0000000..7528028 --- /dev/null +++ b/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 data = new ArrayList<>(); + + // 办理时限 + @NotBlank + private String timeLimit; + + // 最大签收时长(天) + private Integer maxSignDuration; + + // 最大办理时长(天) + private Integer maxHandleDuration; + + // 最大延期时长(天) + private Integer maxExtensionDuration; + + // 审批流程 + @NotBlank + private String approvalFlow; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/DataCaseVerifImportDto.java b/src/test/java/com/biutag/supervision/tools/dto/DataCaseVerifImportDto.java new file mode 100644 index 0000000..41e0e37 --- /dev/null +++ b/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; + +} \ No newline at end of file diff --git a/src/test/java/com/biutag/supervision/tools/dto/DataDataPetitionComplainDistribute.java b/src/test/java/com/biutag/supervision/tools/dto/DataDataPetitionComplainDistribute.java new file mode 100644 index 0000000..9f03579 --- /dev/null +++ b/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 data = new ArrayList<>(); + + // 办理时限 + @NotBlank + private String timeLimit; + + // 最大签收时长(天) + private Integer maxSignDuration; + + // 最大办理时长(天) + private Integer maxHandleDuration; + + // 最大延期时长(天) + private Integer maxExtensionDuration; + + // 审批流程 + @NotBlank + private String approvalFlow; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/DataDataPetitionComplainDistribute12337.java b/src/test/java/com/biutag/supervision/tools/dto/DataDataPetitionComplainDistribute12337.java new file mode 100644 index 0000000..fd0c90f --- /dev/null +++ b/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 data = new ArrayList<>(); + + // 办理时限 + @NotBlank + private String timeLimit; + + // 最大签收时长(天) + private Integer maxSignDuration; + + // 最大办理时长(天) + private Integer maxHandleDuration; + + // 最大延期时长(天) + private Integer maxExtensionDuration; + + // 审批流程 + @NotBlank + private String approvalFlow; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintAddDto.java b/src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintAddDto.java new file mode 100644 index 0000000..cbc48f9 --- /dev/null +++ b/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 data = new ArrayList<>(); +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintDto.java b/src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintDto.java new file mode 100644 index 0000000..3c486cf --- /dev/null +++ b/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; + +} \ No newline at end of file diff --git a/src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintImportDto.java b/src/test/java/com/biutag/supervision/tools/dto/DataPetitionComplaintImportDto.java new file mode 100644 index 0000000..16010a0 --- /dev/null +++ b/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; + +} \ No newline at end of file diff --git a/src/test/java/com/biutag/supervision/tools/dto/DictDataDto.java b/src/test/java/com/biutag/supervision/tools/dto/DictDataDto.java new file mode 100644 index 0000000..66a2638 --- /dev/null +++ b/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; + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/DictTypeDto.java b/src/test/java/com/biutag/supervision/tools/dto/DictTypeDto.java new file mode 100644 index 0000000..937f28c --- /dev/null +++ b/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; + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/MenuDto.java b/src/test/java/com/biutag/supervision/tools/dto/MenuDto.java new file mode 100644 index 0000000..f38011e --- /dev/null +++ b/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; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/ModelClueDepartDto.java b/src/test/java/com/biutag/supervision/tools/dto/ModelClueDepartDto.java new file mode 100644 index 0000000..494b390 --- /dev/null +++ b/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; + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/ModelClueTaskDistribute.java b/src/test/java/com/biutag/supervision/tools/dto/ModelClueTaskDistribute.java new file mode 100644 index 0000000..a33b5d9 --- /dev/null +++ b/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 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 thingFiles = new ArrayList<>(); + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/NegativeDto.java b/src/test/java/com/biutag/supervision/tools/dto/NegativeDto.java new file mode 100644 index 0000000..2b35056 --- /dev/null +++ b/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> involveProblem; + + // 反映人姓名 + private String responderName; + + // 联系电话 + private String contactPhone; + + // 简要描述 + @NotBlank(message = "简要描述不能为空", groups = {AddGroup.class, EditGroup.class}) + private String thingDesc; + + private List 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; + + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/PoliceImport.java b/src/test/java/com/biutag/supervision/tools/dto/PoliceImport.java new file mode 100644 index 0000000..e6ff35b --- /dev/null +++ b/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; + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/UserDto.java b/src/test/java/com/biutag/supervision/tools/dto/UserDto.java new file mode 100644 index 0000000..d7c5534 --- /dev/null +++ b/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 roleIds; + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/common/BarItem.java b/src/test/java/com/biutag/supervision/tools/dto/common/BarItem.java new file mode 100644 index 0000000..43de9d6 --- /dev/null +++ b/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; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/common/PieItem.java b/src/test/java/com/biutag/supervision/tools/dto/common/PieItem.java new file mode 100644 index 0000000..28f040d --- /dev/null +++ b/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; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/flow/ApproveData.java b/src/test/java/com/biutag/supervision/tools/dto/flow/ApproveData.java new file mode 100644 index 0000000..8f2e016 --- /dev/null +++ b/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; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/flow/ConfirmationCompletionData.java b/src/test/java/com/biutag/supervision/tools/dto/flow/ConfirmationCompletionData.java new file mode 100644 index 0000000..451e311 --- /dev/null +++ b/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 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; + + } + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/flow/ExtensionApplyData.java b/src/test/java/com/biutag/supervision/tools/dto/flow/ExtensionApplyData.java new file mode 100644 index 0000000..5f863b7 --- /dev/null +++ b/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; + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/flow/FirstDistributeData.java b/src/test/java/com/biutag/supervision/tools/dto/flow/FirstDistributeData.java new file mode 100644 index 0000000..0fe1b2d --- /dev/null +++ b/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; + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/flow/SecondDistributeData.java b/src/test/java/com/biutag/supervision/tools/dto/flow/SecondDistributeData.java new file mode 100644 index 0000000..479fe91 --- /dev/null +++ b/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; + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/flow/SignReturnData.java b/src/test/java/com/biutag/supervision/tools/dto/flow/SignReturnData.java new file mode 100644 index 0000000..41e240d --- /dev/null +++ b/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; +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/flow/VerifyData.java b/src/test/java/com/biutag/supervision/tools/dto/flow/VerifyData.java new file mode 100644 index 0000000..b56e420 --- /dev/null +++ b/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 blames = new ArrayList<>(); + + private List blameLeaders = new ArrayList<>(); + + private List 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 assistTime = new ArrayList<>(); + + // 问题类型 + private List problems; + + private String type; + + } + + @Setter + @Getter + public static class BlameLeader { + + private List 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; + + } + +} diff --git a/src/test/java/com/biutag/supervision/tools/dto/jwdc/NegativeApiDto.java b/src/test/java/com/biutag/supervision/tools/dto/jwdc/NegativeApiDto.java new file mode 100644 index 0000000..5a878ec --- /dev/null +++ b/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("没有该业务类型"); + } + + } +}