diff --git a/sql/20250218.sql b/sql/20250218.sql deleted file mode 100644 index e69de29..0000000 diff --git a/sql/20250401.sql b/sql/20250401.sql new file mode 100644 index 0000000..90b2006 --- /dev/null +++ b/sql/20250401.sql @@ -0,0 +1,5 @@ +ALTER TABLE `negative`.`negative` + ADD COLUMN `verify_time` datetime NULL COMMENT '核查时间', + ADD COLUMN `project_name` varchar(255) NULL COMMENT '项目名称', + ADD COLUMN `involve_money` decimal(10, 2) NULL COMMENT '问题涉及金额', + ; \ No newline at end of file diff --git a/sql/20250410.sql b/sql/20250410.sql new file mode 100644 index 0000000..765e0d0 --- /dev/null +++ b/sql/20250410.sql @@ -0,0 +1,16 @@ +ALTER TABLE `negative`.`negative` + ADD COLUMN `resolve_situation` varchar(255) NULL COMMENT '化解情况' AFTER `involve_money`; + +ALTER TABLE `negative`.`data_petition_complaint` + ADD COLUMN `petition_processing_status` varchar(255) NULL COMMENT '信访办理情况'; + +INSERT INTO `negative`.`sup_dict_type`(`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ('化解情况', 'resolveSituation', '0', '', '2025-04-10 16:09:19', '', '2025-04-10 16:09:19', ''); + +INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '已化解', '已化解', 'resolveSituation', '', '', '0', '0', '', '2025-04-10 16:09:43', '', '2025-04-10 16:09:43', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '已化解再次信访', '已化解再次信访', 'resolveSituation', '', '', '0', '0', '', '2025-04-10 16:09:53', '', '2025-04-10 16:09:53', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '未化解', '未化解', 'resolveSituation', '', '', '0', '0', '', '2025-04-10 16:10:02', '', '2025-04-10 16:10:02', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '未化解再次信访', '未化解再次信访', 'resolveSituation', '', '', '0', '0', '', '2025-04-10 16:10:11', '', '2025-04-10 16:10:11', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '已终结', '已终结', 'resolveSituation', '', '', '0', '0', '', '2025-04-10 16:10:19', '', '2025-04-10 16:10:19', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '已终结再次信访', '已终结再次信访', 'resolveSituation', '', '', '0', '0', '', '2025-04-10 16:10:28', '', '2025-04-10 16:10:28', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '停访息访', '停访息访', 'resolveSituation', '', '', '0', '0', '', '2025-04-10 16:10:36', '', '2025-04-10 16:10:36', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '停访息访后再次信访', '停访息访后再次信访', 'resolveSituation', '', '', '0', '0', '', '2025-04-10 16:10:45', '', '2025-04-10 16:10:45', ''); 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 2e1bc90..669f723 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/InspectCaseEnum.java @@ -20,7 +20,7 @@ public enum InspectCaseEnum { private String label; public static boolean isItTure(String value) { - return StrUtil.isNotBlank(value); + return TRUE.getValue().equals(value) || PARTIALLY_TRUE.getValue().equals(value); } } diff --git a/src/main/java/com/biutag/supervision/constants/enums/TaskStatusEnum.java b/src/main/java/com/biutag/supervision/constants/enums/TaskStatusEnum.java new file mode 100644 index 0000000..e393976 --- /dev/null +++ b/src/main/java/com/biutag/supervision/constants/enums/TaskStatusEnum.java @@ -0,0 +1,10 @@ +package com.biutag.supervision.constants.enums; + +/** + * @author wxc + * @date 2025/4/7 + */ +public enum TaskStatusEnum { + todo, + done; +} diff --git a/src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java b/src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java new file mode 100644 index 0000000..b77454e --- /dev/null +++ b/src/main/java/com/biutag/supervision/constants/enums/TaskTypeEnum.java @@ -0,0 +1,14 @@ +package com.biutag.supervision.constants.enums; + +/** + * @author wxc + * @date 2025/4/7 + */ +public enum TaskTypeEnum { + + // 测酒 + testing_alcohol, + + // 督察任务 + inspection; +} diff --git a/src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java b/src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java new file mode 100644 index 0000000..a763fc2 --- /dev/null +++ b/src/main/java/com/biutag/supervision/constants/enums/TestingAlcoholStateEnum.java @@ -0,0 +1,19 @@ +package com.biutag.supervision.constants.enums; + +/** + * 测酒状态 + * @author wxc + * @date 2025/4/7 + */ +public enum TestingAlcoholStateEnum { + + // 未检测 + not_detected, + + // 未饮酒 + not_drinking, + + // 已饮酒 + drink; + +} diff --git a/src/main/java/com/biutag/supervision/controller/StatisticsController.java b/src/main/java/com/biutag/supervision/controller/StatisticsController.java index 859b932..aba1950 100644 --- a/src/main/java/com/biutag/supervision/controller/StatisticsController.java +++ b/src/main/java/com/biutag/supervision/controller/StatisticsController.java @@ -67,6 +67,7 @@ public class StatisticsController { .and(query -> { query.eq(Negative::getExtensionApplyFlag, false).or().gt(Negative::getExtensionDays, 0); }) + .in(Negative::getProcessingStatus, List.of(ProcessingStatusEnum.processing.name(), ProcessingStatusEnum.approval.name())) .in(!user.getAuthSources().isEmpty(), Negative::getProblemSourcesCode, user.getAuthSources()) .and(nonAdminAuth, query -> { query.in(Negative::getHandleSecondDepartId, user.getAuthDepartIds()).or() diff --git a/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java b/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java index 2465132..ebabad6 100644 --- a/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java +++ b/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java @@ -9,10 +9,9 @@ import com.alibaba.excel.metadata.data.WriteCellData; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.biutag.supervision.constants.enums.DepartLevelEnum; -import com.biutag.supervision.constants.enums.ProblemSourcesEnum; -import com.biutag.supervision.constants.enums.SpecialSupervisionEnum; +import com.biutag.supervision.constants.enums.*; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.dto.flow.VerifyData; import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.entity.NegativeBlame; import com.biutag.supervision.pojo.entity.NegativeFile; @@ -225,7 +224,6 @@ public class NegativeBookController { response.setHeader("Content-Disposition", headerValue); response.setContentType("application/octet-stream"); EasyExcel.write(response.getOutputStream(), DataPetitionComplaintExportGabxfVo.class).inMemory(Boolean.TRUE).sheet("案件核查数据台账").doWrite(list); - } @GetMapping("mail12337") @@ -239,15 +237,34 @@ public class NegativeBookController { param.setCurrent(1); param.setSize(100000); Page pages = dataPetition12337Service.pageExportVo(param); + List negativeIds = pages.getRecords().stream().map(DataPetition12337ExportVo::getId).toList(); + List negativeBlames = negativeIds.isEmpty() ? new ArrayList<>() : blameService.listByNegativeIds(negativeIds); + + List overProcessings = List.of(ProcessingStatusEnum.approval.name(), ProcessingStatusEnum.completed.name()); pages.getRecords().forEach(item -> { if (StrUtil.isNotBlank(item.getHandlePolices())) { - item.setReviewPersonName(JSON.parseArray(item.getHandlePolices()).getJSONObject(0).getString("name")); + List handlePolices = JSON.parseArray(item.getHandlePolices(), VerifyData.HandlePolice.class); + item.setVerification(handlePolices.stream() + .filter(handlePolice -> StrUtil.isNotBlank(handlePolice.getName())).map(VerifyData.HandlePolice::getName).collect(Collectors.joining("、"))); + item.setVerificationMobile(handlePolices.stream() + .filter(handlePolice -> StrUtil.isNotBlank(handlePolice.getName())).map(VerifyData.HandlePolice::getMobile).collect(Collectors.joining("、"))); + } + // 是否核查完结 + item.setVerifiedIsover(overProcessings.contains(item.getProcessingStatus()) ? "核查完结" : null); + // 是否处分处理 + List blames = negativeBlames.stream().filter(blame -> blame.getNegativeId().equals(item.getId())).toList(); + if (InspectCaseEnum.isItTure(item.getCheckStatus()) && blames.stream().anyMatch(blame -> !blame.getHandleResultName().contains("不予追责"))) { + item.setIsPunish("是"); + item.setProcessResType("第一种形态"); + // 处理结论结果 + item.setProcessResDes(blames.stream().map(NegativeBlame::getHandleResultName).collect(Collectors.joining("、"))); } }); String headerValue = "attachment; filename=\"" + URLEncoder.encode("12337信访投诉数据台账.xlsx", "UTF-8") + "\""; response.setHeader("Content-Disposition", headerValue); response.setContentType("application/octet-stream"); EasyExcel.write(response.getOutputStream(), DataPetition12337ExportVo.class).inMemory(Boolean.TRUE).sheet("12337信访投诉数据台账").doWrite(pages.getRecords()); + } /** diff --git a/src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java b/src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java index 9b221c4..2c66eaf 100644 --- a/src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java +++ b/src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java @@ -199,6 +199,13 @@ public class DataPetitionComplaintController { List petitionComplaints = list.stream().map(item -> { DataPetitionComplaint dataPetitionComplaint = new DataPetitionComplaint(); BeanUtils.copyProperties(item, dataPetitionComplaint); + if (StrUtil.isNotBlank(item.getHasCompleted())) { + if ("是".equals(item.getHasCompleted())) { + dataPetitionComplaint.setPetitionProcessingStatus("已办结"); + } else { + dataPetitionComplaint.setPetitionProcessingStatus("办理中"); + } + } dataPetitionComplaint.setProblemSourcesCode(ProblemSourcesEnum.GJXFPT.getValue()); dataPetitionComplaint.setCreateTime(LocalDateTime.now()); dataPetitionComplaint.setUpdateTime(LocalDateTime.now()); diff --git a/src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java b/src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java index 36246d4..1e5bab2 100644 --- a/src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java +++ b/src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java @@ -75,9 +75,9 @@ public class VideoInspectionController { if (externalDepartList.isEmpty()) { return Result.success(new Page().setRecords(new ArrayList<>()).setTotal(0)); } - queryWrapper.in("i.fsdw_gajgjgdm", externalDepartList.stream().map(SupExternalDepart::getExternalId).toList()); + queryWrapper.in("i.fsdw_gajgjgdm", departService.getAllNodeIds(externalDepartList.stream().map(SupExternalDepart::getExternalId).toList())); } - + queryWrapper.orderByDesc("i.rqsj"); return Result.success(dataAlarmDispositionInfoMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper)); } diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java new file mode 100644 index 0000000..bb28148 --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java @@ -0,0 +1,34 @@ +package com.biutag.supervision.controller.mobileSupervision; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.dto.TaskInspectionDto; +import com.biutag.supervision.pojo.param.TaskInspectionQueryParam; +import com.biutag.supervision.pojo.vo.TaskInspectionVo; +import com.biutag.supervision.service.SupTaskInspectionService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +/** + * @author wxc + * @date 2025/4/9 + */ +@RequiredArgsConstructor +@RestController +@RequestMapping("task/inspection") +public class InspectionController { + + private final SupTaskInspectionService taskInspectionService; + + @GetMapping + public Result> page(TaskInspectionQueryParam queryParam) { + return Result.success(taskInspectionService.page(queryParam)); + } + + @PostMapping + public Result add(@RequestBody TaskInspectionDto dto) { + return Result.success(taskInspectionService.save(dto)); + } + + +} diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java new file mode 100644 index 0000000..5532a8c --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java @@ -0,0 +1,68 @@ +package com.biutag.supervision.controller.mobileSupervision; + +import cn.hutool.core.collection.CollectionUtil; +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.dto.TaskTestingAlcoholDto; +import com.biutag.supervision.pojo.dto.TestingAlcoholFilter; +import com.biutag.supervision.pojo.entity.SupPolice; +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; +import com.biutag.supervision.pojo.param.TaskTestingAlcoholQueryParam; +import com.biutag.supervision.pojo.vo.TaskTestingAlcoholVo; +import com.biutag.supervision.service.SupDepartService; +import com.biutag.supervision.service.SupPoliceService; +import com.biutag.supervision.service.SupTaskTestingAlcoholService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @author wxc + * @date 2025/3/31 + */ +@RequiredArgsConstructor +@RestController +@RequestMapping("task/testingAlcohol") +public class TestingAlcoholController { + + private final SupTaskTestingAlcoholService taskTestingAlcoholService; + + private final SupPoliceService policeService; + + private final SupDepartService departService; + + @GetMapping + public Result> page(TaskTestingAlcoholQueryParam queryParam) { + return Result.success(taskTestingAlcoholService.page(queryParam)); + } + + @GetMapping("getPersonNumber") + public Result> getPersonNumber(TestingAlcoholFilter condition) { + List departIds = departService.getAllNodeIds(condition.getDepartId()); + List polices = policeService.list(new LambdaQueryWrapper().in(SupPolice::getOrgId, departIds) + .in(CollectionUtil.isNotEmpty(condition.getPersonType()), SupPolice::getPersonType, condition.getPersonType()) + .in(CollectionUtil.isNotEmpty(condition.getPosition()), SupPolice::getPosition, condition.getPosition())) + .stream().map(item -> { + SupTaskTestingAlcoholPeople people = new SupTaskTestingAlcoholPeople(); + people.setName(item.getName()); + people.setEmpNo(item.getEmpNo()); + people.setIdCode(item.getIdCode()); + people.setDepartId(item.getOrgId()); + return people; + }).toList(); + return Result.success(polices); + } + + @PostMapping + public Result add(@RequestBody TaskTestingAlcoholDto dto) { + return Result.success(taskTestingAlcoholService.save(dto)); + } + + @PostMapping("genPeople") + public Result> genPeople(@RequestBody TaskTestingAlcoholDto dto) { + return Result.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 25a6e29..75548b1 100644 --- a/src/main/java/com/biutag/supervision/controller/work/NegativeController.java +++ b/src/main/java/com/biutag/supervision/controller/work/NegativeController.java @@ -34,6 +34,7 @@ import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Objects; +import java.util.Optional; @RequiredArgsConstructor @RequestMapping("negative") @@ -56,6 +57,8 @@ public class NegativeController { private final SupDepartService departService; + private final DataCaseVerifService dataCaseVerifService; + @GetMapping public Result> list(NegativeQueryParam queryParam) { return Result.success(negativeQueryService.page(queryParam)); @@ -72,7 +75,10 @@ public class NegativeController { return Result.success(negativeService.get(id, workId)); } - private final DataCaseVerifService dataCaseVerifService; + @GetMapping("getIdByOriginId/{originId}") + public Result get(@PathVariable String originId) { + return Result.success(Optional.ofNullable(negativeService.getByOriginId(originId)).map(Negative::getId).orElse(null)); + } @GetMapping("outer/{id}") public Result outerDetail(@PathVariable String id) { diff --git a/src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java b/src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java index f07baee..4631ca2 100644 --- a/src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java +++ b/src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java @@ -1,5 +1,6 @@ package com.biutag.supervision.controller.work; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.excel.EasyExcel; @@ -14,6 +15,8 @@ import com.biutag.supervision.constants.enums.DepartLevelEnum; import com.biutag.supervision.constants.enums.PoliceTypeEnum; import com.biutag.supervision.constants.enums.ProblemSourcesEnum; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.dto.NegativeImportAuditDto; +import com.biutag.supervision.pojo.dto.NegativeImportDistributeAuditDto; import com.biutag.supervision.pojo.dto.NegativeImportDistributeDto; import com.biutag.supervision.pojo.dto.NegativeImportDto; import com.biutag.supervision.pojo.entity.NegativeTask; @@ -32,6 +35,8 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -149,4 +154,98 @@ public class NegativeTaskController { return Result.success(negativeTaskService.detailGroupByDepart(taskId)); } + @PostMapping("audit/import") + public Result> importExcelByAudit(@RequestPart("file") MultipartFile file) throws IOException { + log.info("文件导入中------------------------------"); + String fileNameType = FileUtil.extName(file.getOriginalFilename()); + if (!"xls".equals(fileNameType) && !"xlsx".equals(fileNameType)) { + throw new RuntimeException("仅支持 xls/xlsx 格式文件的导入"); + } + List list = new ArrayList<>(); + ExcelReader excelReader = EasyExcel.read(file.getInputStream(), NegativeImportAuditDto.class, new ReadListener() { + + @Override + public void invoke(NegativeImportAuditDto data, AnalysisContext analysisContext) { + if (StrUtil.isNotBlank(data.getBusinessTypeName()) && data.getBusinessTypeName().contains("必填项")) { + return; + } + Set> validate = validator.validate(data); + if (!validate.isEmpty()) { + String message = validate.stream().map(ConstraintViolation::getMessage).collect(Collectors.joining("\n")); + throw new RuntimeException(String.format("第 %s 条数据:%s", list.size() + 1, message)); + } + try { + data.setDiscoveryTime(LocalDateTime.parse(data.getDiscoveryTimeStr(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm"))); + } catch (RuntimeException e) { + throw new RuntimeException(String.format("问题发现时间日期格式错误:%s", data.getDiscoveryTimeStr())); + } + if (StrUtil.isNotBlank(data.getHappenTimeStr())) { + try { + data.setHappenTime(LocalDateTime.parse(data.getHappenTimeStr(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm"))); + } catch (RuntimeException e) { + throw new RuntimeException(String.format("问题发生时间日期格式错误:%s", data.getHappenTimeStr())); + } + } + if (StrUtil.isNotBlank(data.getInvolveMoneyStr())) { + data.setInvolveMoney(Double.parseDouble(data.getInvolveMoneyStr())); + } + if (StrUtil.isNotBlank(data.getProblemSources())) { + ProblemSourcesEnum problemSourcesEnum = ProblemSourcesEnum.getByLabel(data.getProblemSources()); + if (problemSourcesEnum == null) { + throw new RuntimeException(String.format("未匹配到该问题来源【%s】,请联系系统管理员", data.getProblemSources())); + } + data.setProblemSourcesCode(problemSourcesEnum.getValue()); + } + if (StrUtil.isNotBlank(data.getBusinessTypeName())) { + BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getByLabel(data.getBusinessTypeName()); + if (businessTypeEnum == null) { + throw new RuntimeException(String.format("未匹配到该业务类型【%s】,请联系系统管理员", data.getBusinessTypeName())); + } + data.setBusinessTypeCode(businessTypeEnum.getValue()); + } + if (StrUtil.isNotBlank(data.getPoliceTypeName())) { + PoliceTypeEnum policeTypeEnum = PoliceTypeEnum.getByLabel(data.getPoliceTypeName()); + if (policeTypeEnum == null) { + throw new RuntimeException(String.format("未匹配到该警种【%s】,请联系系统管理员", data.getPoliceTypeName())); + } + data.setPoliceType(policeTypeEnum.getValue()); + } + if (StrUtil.isNotBlank(data.getProblemsStr())) { + + } + if (StrUtil.isNotBlank(data.getInvolveDepartName())) { + String[] departNames = data.getInvolveDepartName().split("/"); + List departs = departService.list(new LambdaQueryWrapper().eq(SupDepart::getLevel, DepartLevelEnum.SECOND.getValue()) + .eq(SupDepart::getShortName, departNames[0])); + if (!departs.isEmpty()) { + if (departNames.length > 1) { + List threeDeparts = departService.list(new LambdaQueryWrapper() + .eq(SupDepart::getPid, departs.get(0).getId()) + .eq(SupDepart::getShortName, departNames[1])); + if (!threeDeparts.isEmpty()) { + data.setInvolveDepartId(threeDeparts.get(0).getId()); + data.setInvolveDepartName(threeDeparts.get(0).getShortName()); + } + } else { + data.setInvolveDepartId(departs.get(0).getId()); + data.setInvolveDepartName(departs.get(0).getShortName()); + } + } + } + list.add(data); + } + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { } + }).build(); + ReadSheet sheet = EasyExcel.readSheet("问题信息模板(审计)").build(); + excelReader.read(sheet); + excelReader.close(); + return Result.success(list); + } + + @PostMapping("audit/distribute") + public Result distribute(@RequestBody NegativeImportDistributeAuditDto distributeData) { + return Result.success(negativeTaskService.distributionByAudit(distributeData)); + } + } 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 16877e7..8107af2 100644 --- a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java @@ -59,7 +59,8 @@ public class SaveAction implements Action { .set(Negative::getCheckStatusDesc, verifyData.getCheckStatusDesc()) .set(Negative::getRectifyDesc, verifyData.getRectifyDesc()) .set(Negative::getUnrectifyReason, verifyData.getUnrectifyReason()) - .set(Negative::getCheckStatusName, verifyData.getCheckStatusName()); + .set(Negative::getCheckStatusName, verifyData.getCheckStatusName()) + .set(Negative::getResolveSituation, verifyData.getResolveSituation()); // 经办人 if (CollectionUtil.isNotEmpty(verifyData.getHandlePolices().stream().filter(item -> StrUtil.isNotBlank(item.getName())).toList())) { updateWrapper.set(Negative::getHandlePolices, JSON.toJSONString(verifyData.getHandlePolices())); @@ -101,6 +102,8 @@ public class SaveAction implements Action { BeanUtil.copyProperties(item, negativeBlame); if (CollectionUtil.isNotEmpty(item.getHandleResultCode())) { negativeBlame.setHandleResultCode(String.join(",", item.getHandleResultCode())); + } else { + negativeBlame.setHandleResultCode(null); } VerifyData.BlameLeader blameLeader = verifyData.getBlameLeaders().stream() .filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())).findFirst().orElse(null); @@ -108,6 +111,8 @@ public class SaveAction implements Action { BeanUtil.copyProperties(blameLeader, negativeBlame); if (CollectionUtil.isNotEmpty(blameLeader.getLeadHandleResultCode())) { negativeBlame.setLeadHandleResultCode(String.join(",", blameLeader.getLeadHandleResultCode())); + } else { + negativeBlame.setLeadHandleResultCode(null); } } negativeBlame.setNegativeId(negativeId) diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java index 700f80f..fff708e 100644 --- a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java @@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.entity.RpcApply; import com.biutag.supervision.pojo.entity.RpcInfringerResult; -import com.biutag.supervision.pojo.model.PoliceModel; import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.pojo.vo.RpcApplyVo; diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskInspectionMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskInspectionMapper.java new file mode 100644 index 0000000..18a9d0a --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskInspectionMapper.java @@ -0,0 +1,15 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.entity.SupTaskInspection; +import com.biutag.supervision.pojo.vo.TaskInspectionVo; +import org.apache.ibatis.annotations.Param; + +public interface SupTaskInspectionMapper extends BaseMapper { + + Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskMapper.java new file mode 100644 index 0000000..6109df1 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.SupTask; + +public interface SupTaskMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskPersonMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskPersonMapper.java new file mode 100644 index 0000000..f932b23 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskPersonMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.SupTaskPerson; + +public interface SupTaskPersonMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholMapper.java new file mode 100644 index 0000000..dc94897 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholMapper.java @@ -0,0 +1,15 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcohol; +import com.biutag.supervision.pojo.vo.TaskTestingAlcoholVo; +import org.apache.ibatis.annotations.Param; + +public interface SupTaskTestingAlcoholMapper extends BaseMapper { + + Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java b/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java new file mode 100644 index 0000000..c1f3b9f --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SupTaskTestingAlcoholPeopleMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; + +public interface SupTaskTestingAlcoholPeopleMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java index a6b248f..6762609 100644 --- a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java +++ b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java @@ -198,6 +198,14 @@ public class NegativeVo { // 当前处理对象 private String currentProcessingObject; + private String projectName; + + // 涉及问题金额 + private Double involveMoney; + + // 化解情况 + private String resolveSituation; + // 下发选择的问题类型 private List problems = new ArrayList<>(); diff --git a/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintGjImportDto.java b/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintGjImportDto.java index d822d86..92ba2e7 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintGjImportDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintGjImportDto.java @@ -61,6 +61,9 @@ public class DataPetitionComplaintGjImportDto { @ExcelProperty({"去向机构"}) private String handleDepartName; + @ExcelProperty({"是否办结"}) + private String hasCompleted; + @ExcelIgnore private String departId; diff --git a/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java b/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java index 4edbea6..b7621fa 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java @@ -87,6 +87,9 @@ public class DataPetitionComplaintImportDto { @ExcelProperty({"责任部门"}) private String involveDepartName; + @ExcelProperty({"办结状态"}) + private String petitionProcessingStatus; + @ExcelIgnore private String departId; 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 1f8c42a..9438338 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java @@ -13,7 +13,6 @@ import lombok.Setter; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; -import java.util.Map; @Setter @Getter @@ -107,6 +106,12 @@ public class NegativeDto { private String taskId; + // 项目名称 + private String projectName; + + // 涉及问题金额 + private Double involveMoney; + // 下发问题 private List problems; diff --git a/src/main/java/com/biutag/supervision/pojo/dto/NegativeImportAuditDto.java b/src/main/java/com/biutag/supervision/pojo/dto/NegativeImportAuditDto.java new file mode 100644 index 0000000..48e3f53 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/NegativeImportAuditDto.java @@ -0,0 +1,110 @@ +package com.biutag.supervision.pojo.dto; + +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.biutag.supervision.pojo.dto.flow.VerifyData; +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; + +@Setter +@Getter +public class NegativeImportAuditDto { + + @NotNull(message = "问题发现时间不能为空") + @ExcelProperty("问题发现时间") + private String discoveryTimeStr; + + // 问题发现时间 + @ExcelIgnore + private LocalDateTime discoveryTime; + + + @ExcelProperty("问题发生时间") + private String happenTimeStr; + + // 问题发生时间 + @ExcelIgnore + private LocalDateTime happenTime; + + // 问题来源 + @ExcelProperty("问题来源") + @NotBlank(message = "问题来源不能为空") + private String problemSources; + + @ExcelIgnore + private String problemSourcesCode; + + // 业务类别 + @NotBlank(message = "业务类别不能为空") + @ExcelProperty("业务类别") + private String businessTypeName; + + @ExcelIgnore + private String businessTypeCode; + + @ExcelProperty("涉及警种") + private String policeTypeName; + + @ExcelIgnore + private String policeType; + + // 问题种类 + @ExcelProperty("问题种类") + @NotBlank(message = "问题种类不能为空") + private String problemsStr; + + @ExcelIgnore + private List problems; + + // 反映人姓名 + @ExcelProperty("投诉人") + private String responderName; + + // 联系电话 + @ExcelProperty("投诉人联系电话") + private String contactPhone; + + // 简要描述 + @ExcelProperty("具体问题内容") + @NotBlank(message = "具体问题内容不能为空") + private String thingDesc; + + @ExcelProperty("涉及单位") + private String involveDepartName; + + @ExcelIgnore + private String involveDepartId; + + // 涉及案件/警情编号 + @ExcelProperty("案件/警情编号") + private String caseNumber; + + @ExcelIgnore + private String SpecialSupervision; + + // 项目名称 + @ExcelProperty("项目名称") + private String projectName; + + // 案件名称 + @ExcelProperty("案件名称") + private String caseName; + + // 涉及问题金额 + @ExcelProperty("问题金额(万元)") + private String involveMoneyStr; + + @ExcelIgnore + private Double involveMoney; + + @ExcelProperty("责任人员") + private String blames; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/NegativeImportDistributeAuditDto.java b/src/main/java/com/biutag/supervision/pojo/dto/NegativeImportDistributeAuditDto.java new file mode 100644 index 0000000..7e49d14 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/NegativeImportDistributeAuditDto.java @@ -0,0 +1,45 @@ +package com.biutag.supervision.pojo.dto; + +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/12/27 + */ +@Setter +@Getter +public class NegativeImportDistributeAuditDto { + + private List data = new ArrayList<>(); + + private String taskName; + + // 办理时限 + @NotBlank + private String timeLimit; + + // 最大签收时长(天) + private Integer maxSignDuration; + + // 最大办理时长(天) + private Integer maxHandleDuration; + + // 最大延期时长(天) + private Integer maxExtensionDuration; + + // 审批流程 + @NotBlank + private String approvalFlow; + + // 下发流程 + @NotBlank + private String distributionFlow; + + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java b/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java new file mode 100644 index 0000000..fa96eda --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/TaskInspectionDto.java @@ -0,0 +1,35 @@ +package com.biutag.supervision.pojo.dto; + +import com.biutag.supervision.pojo.entity.SupTaskPerson; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/3/31 + */ +@Setter +@Getter +public class TaskInspectionDto { + + private String taskName; + + // 督察单位 + private Integer supDepartId; + + // 督察类型 + private String supervisionType; + + // 督察内容 + private String taskContent; + + private List times = new ArrayList<>(); + + + private List persons = new ArrayList<>(); + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/TaskTestingAlcoholDto.java b/src/main/java/com/biutag/supervision/pojo/dto/TaskTestingAlcoholDto.java new file mode 100644 index 0000000..32cf263 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/TaskTestingAlcoholDto.java @@ -0,0 +1,51 @@ +package com.biutag.supervision.pojo.dto; + +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; +import com.biutag.supervision.pojo.entity.SupTaskPerson; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/3/31 + */ +@Setter +@Getter +public class TaskTestingAlcoholDto { + + private String taskName; + + // 督察单位 + private Integer supDepartId; + + // 数据生成方式 + private String dataGenerationMethod; + + // 被抽检次数少于 + private Integer filterMinSupNumber; + + // 距最后一次检测时间(天) + private String filterLastDays; + + // 有无饮酒历史 + private Boolean filterAlcoholHistory; + + // 筛选条件 抽检人数 + private Integer filterPeopleNumber; + + + private List filterPeopleConditions = new ArrayList<>(); + + + private List times = new ArrayList<>(); + + + private List persons = new ArrayList<>(); + + private List peoples = new ArrayList<>(); + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/TestingAlcoholFilter.java b/src/main/java/com/biutag/supervision/pojo/dto/TestingAlcoholFilter.java new file mode 100644 index 0000000..c15de34 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/TestingAlcoholFilter.java @@ -0,0 +1,37 @@ +package com.biutag.supervision.pojo.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +/** + * @author wxc + * @date 2025/4/2 + */ +@Setter +@Getter +public class TestingAlcoholFilter { + + // 被抽检次数少于 + private Integer filterMinSupNumber; + + // 距最后一次检测时间(天) + private String filterLastDays; + + // 有无饮酒历史 + private Boolean filterAlcoholHistory; + + // 筛选条件 抽检人数 + private Integer filterPeopleNumber; + + // 单位 + private String departId; + + private List personType; + + private List position; + + private Integer count; + +} 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 df4560b..180c059 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 @@ -54,6 +54,12 @@ public class VerifyData { // 未整改原因 private String unrectifyReason; + // 化解情况 + private String resolveSituation; + + // 核查时间 + private LocalDateTime verificationTime; + @Size(min = 1) private List blames = new ArrayList<>(); @@ -245,8 +251,8 @@ public class VerifyData { @Getter public static class HandlePolice { private String name; - private String empNo; private String idCode; + private String mobile; } } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java b/src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java index 1b569b9..25efa77 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java @@ -37,6 +37,9 @@ public class DataPetitionComplaint { @TableField("responder_phone") private String responderPhone; + // 投诉人身份证 + private String responderIdCode; + // 初重信访 @TableField("initial_petition") private String initialPetition; @@ -94,4 +97,6 @@ public class DataPetitionComplaint { // 信访形式 private String petitionType; + // 信访办理情况 + private String petitionProcessingStatus; } \ No newline at end of file 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 21f7dba..3fdc6dc 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java @@ -302,4 +302,16 @@ public class Negative { // 下发问题 private String problems; + // 核查时间 + private LocalDateTime verifyTime; + + // 项目名称 + private String projectName; + + // 涉及问题金额 + private Double involveMoney; + + // 化解情况 + private String resolveSituation; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTask.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTask.java new file mode 100644 index 0000000..bac6349 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTask.java @@ -0,0 +1,50 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class SupTask { + + // + @TableId(type = IdType.AUTO) + private Integer id; + + // 任务名称 + @TableField("task_name") + private String taskName; + + // 督察单位 + @TableField("sup_depart_id") + private Integer supDepartId; + + // 督察单位 + @TableField("sup_depart_name") + private String supDepartName; + + // 任务类型 + @TableField("task_type") + private String taskType; + + // 开始时间 + @TableField("begin_time") + private LocalDateTime beginTime; + + // 结束时间 + @TableField("end_time") + private LocalDateTime endTime; + + // 创建时间 + @TableField("create_time") + private LocalDateTime createTime; + + // 任务状态 + private String taskStatus; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java new file mode 100644 index 0000000..599a066 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskInspection.java @@ -0,0 +1,24 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class SupTaskInspection { + + // + @TableId(value = "task_id") + private Integer taskId; + + // + @TableField("supervision_type") + private String supervisionType; + + // + @TableField("task_content") + private String taskContent; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskPerson.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskPerson.java new file mode 100644 index 0000000..42568b1 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskPerson.java @@ -0,0 +1,39 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class SupTaskPerson { + + // + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + // + @TableField("task_id") + private Integer taskId; + + // + @TableField("name") + private String name; + + // + @TableField("emp_no") + private Integer empNo; + + // + @TableField("id_code") + private String idCode; + + // + @TableField("create_time") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcohol.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcohol.java new file mode 100644 index 0000000..595a8aa --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcohol.java @@ -0,0 +1,39 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class SupTaskTestingAlcohol { + + @TableId(value = "task_id") + private Integer taskId; + + // 数据生成方式 + @TableField("data_generation_method") + private String dataGenerationMethod; + + // 被抽检次数少于 + @TableField("filter_min_sup_number") + private Integer filterMinSupNumber; + + // 距最后一次检测时间(天) + @TableField("filter_last_days") + private String filterLastDays; + + // 有无饮酒历史 + @TableField("filter_alcohol_history") + private Boolean filterAlcoholHistory; + + // 筛选条件 抽检人数 + @TableField("filter_people_number") + private Integer filterPeopleNumber; + + // 抽检对象 + @TableField("filter_object") + private String filterObject; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java new file mode 100644 index 0000000..43c32b0 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupTaskTestingAlcoholPeople.java @@ -0,0 +1,46 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class SupTaskTestingAlcoholPeople { + + // + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + // + @TableField("task_id") + private Integer taskId; + + // 姓名 + @TableField("name") + private String name; + + // 警号 + @TableField("emp_no") + private String empNo; + + // 身份证 + @TableField("id_code") + private String idCode; + + // 单位ID + @TableField("depart_id") + private String departId; + + // 状态 + @TableField("status") + private String status; + + // 测酒时间 + private LocalDateTime testingTime; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java new file mode 100644 index 0000000..69a6de9 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/TaskInspectionQueryParam.java @@ -0,0 +1,18 @@ +package com.biutag.supervision.pojo.param; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/7 + */ +@Setter +@Getter +public class TaskInspectionQueryParam extends BasePage { + + private String taskName; + + private String supDepartId; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholQueryParam.java new file mode 100644 index 0000000..9d38e6d --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholQueryParam.java @@ -0,0 +1,18 @@ +package com.biutag.supervision.pojo.param; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/4/7 + */ +@Setter +@Getter +public class TaskTestingAlcoholQueryParam extends BasePage { + + private String taskName; + + private String supDepartId; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java b/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java index c16ce3d..0833b6e 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java @@ -267,31 +267,31 @@ public class DataPetition12337ExportVo implements Serializable { * 核查人 */ @ExcelProperty("核查人") - private String reviewPersonName; + private String verification; /** * 核查人联系方式 */ @ExcelProperty("核查人联系方式") - private String reviewPersonPhone; + private String verificationMobile; /** * 被核查人类别 */ @ExcelProperty("被核查人类别") - private String reviewedPersonType; + private String verifiedPersonType; /** * 被核查人是否属于领导班子成员 */ @ExcelProperty("被核查人是否属于领导班子成员") - private String reviewedPersonIsleader; + private String verifiedIsleader; /** * 是否核查完结 */ @ExcelProperty("是否核查完结") - private String reviewedIsover; + private String verifiedIsover; /** * 核查简要情况 @@ -583,6 +583,14 @@ public class DataPetition12337ExportVo implements Serializable { @ExcelIgnore private String checkStatusName; + @ExcelIgnore + private String checkStatus; + @ExcelIgnore private String id; + + // 办理状态 + @ExcelIgnore + private String processingStatus; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java b/src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java index 24b603b..ed9c11b 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java @@ -34,6 +34,9 @@ public class DataPetitionComplaintVo { // 投诉人电话 private String responderPhone; + // 投诉人电话 + private String responderIdCode; + // 初重信访 private String initialPetition; @@ -55,11 +58,10 @@ public class DataPetitionComplaintVo { // 具体内容 private String thingDesc; - - // 涉及单位 二级 private String secondDepartId; + // private String secondDepartName; // 所对 @@ -79,4 +81,7 @@ public class DataPetitionComplaintVo { private String negativeId; + // 信访办理情况 + private String petitionProcessingStatus; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java new file mode 100644 index 0000000..d719db8 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionVo.java @@ -0,0 +1,48 @@ +package com.biutag.supervision.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +/** + * @author wxc + * @date 2025/3/31 + */ +@Setter +@Getter +public class TaskInspectionVo { + + private Integer id; + + // 任务名称 + private String taskName; + + // 督察单位 + private String supDepartName; + + // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime beginTime; + + // 结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime endTime; + + private String supervisionType; + + private String taskContent; + + // 检测人员 + private String persons; + + private Integer totalNumber; + + private Integer notDetectedNumber; + + private Integer notDrinkingNumber; + + private Integer drinkNumber; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholVo.java b/src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholVo.java new file mode 100644 index 0000000..7d78c71 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholVo.java @@ -0,0 +1,44 @@ +package com.biutag.supervision.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +/** + * @author wxc + * @date 2025/3/31 + */ +@Setter +@Getter +public class TaskTestingAlcoholVo { + + private Integer id; + + // 任务名称 + private String taskName; + + // 督察单位 + private String supDepartName; + + // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime beginTime; + + // 结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime endTime; + + // 检测人员 + private String persons; + + private Integer totalNumber; + + private Integer notDetectedNumber; + + private Integer notDrinkingNumber; + + private Integer drinkNumber; + +} diff --git a/src/main/java/com/biutag/supervision/service/DataRightsComfortService.java b/src/main/java/com/biutag/supervision/service/DataRightsComfortService.java index bfe91f5..1283d39 100644 --- a/src/main/java/com/biutag/supervision/service/DataRightsComfortService.java +++ b/src/main/java/com/biutag/supervision/service/DataRightsComfortService.java @@ -5,9 +5,6 @@ import com.biutag.supervision.mapper.SupDepartMapper; import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.entity.RpcInfringerResult; import com.biutag.supervision.pojo.entity.SupDepart; -import com.biutag.supervision.pojo.vo.EchartsVo; -import com.biutag.supervision.pojo.vo.MailMapIconVo; -import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.pojo.vo.RightsComfortMapVo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -16,8 +13,6 @@ import java.util.*; import java.util.stream.Collectors; import static com.biutag.supervision.constants.enums.DepartGroupEnum.COUNTY_CITY_BUREAUS; -import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.GABXF; -import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.GJXFPT; @RequiredArgsConstructor @Service diff --git a/src/main/java/com/biutag/supervision/service/NegativeTaskService.java b/src/main/java/com/biutag/supervision/service/NegativeTaskService.java index a8f78e6..39a6f7f 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeTaskService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeTaskService.java @@ -1,6 +1,7 @@ package com.biutag.supervision.service; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.excel.EasyExcel; @@ -13,9 +14,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.constants.enums.*; import com.biutag.supervision.mapper.NegativeTaskMapper; -import com.biutag.supervision.pojo.dto.NegativeDto; -import com.biutag.supervision.pojo.dto.NegativeImportDistributeDto; -import com.biutag.supervision.pojo.dto.NegativeImportDto; +import com.biutag.supervision.pojo.dto.*; +import com.biutag.supervision.pojo.dto.flow.VerifyData; import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.model.ModelClueTaskDepartModel; import com.biutag.supervision.pojo.model.UserAuth; @@ -33,26 +33,30 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.time.LocalDate; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; +import java.util.*; import java.util.stream.Collectors; @RequiredArgsConstructor @Service public class NegativeTaskService extends ServiceImpl { - static { - System.setProperty("java.awt.headless", "true"); - } - private final FileService fileService; private final SupDepartService departService; private final NegativeService negativeService; + private final SupDictDataService dictDataService; + + private final NegativeProblemRelationService negativeProblemRelationService; + + private final NegativeBlameService negativeBlameService; + + private final SupDictProblemTypeService dictProblemTypeService; + + private final SupPoliceService policeService; + + private final NegativeBlameService blameService; public Page page(NegativeTaskQueryParam param) { @@ -83,11 +87,7 @@ public class NegativeTaskService extends ServiceImpl data, String negativeTaskId) { @@ -231,8 +231,48 @@ public class NegativeTaskService extends ServiceImpl data = distributeData.getData(); + NegativeTask negativeTask = new NegativeTask(); + negativeTask.setId(IdUtil.getSnowflakeNextIdStr()); + negativeTask.setTaskName(distributeData.getTaskName()); + negativeTask.setImportRow(data.size()); + negativeTask.setCrtTime(LocalDateTime.now()); + negativeTask.setSource("审计监督"); + UserAuth user = UserContextHolder.getCurrentUser(); + negativeTask.setCrtUser(user.getNickName()); + negativeTask.setCrtUsername(user.getUserName()); + save(negativeTask); + data.forEach(item -> { + NegativeDto negativeDto = new NegativeDto(); + BeanUtil.copyProperties(item, negativeDto); + SupDepart depart = departService.getById(item.getInvolveDepartId()); + if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { + negativeDto.setDepartId(depart.getId()); + } else if(DepartLevelEnum.THREE.getValue().equals(depart.getLevel())) { + if (DistributionFlowEnum.SECOND.getValue().equals(distributeData.getDistributionFlow())) { + SupDepart parent = departService.getById(depart.getPid()); + negativeDto.setDepartId(parent.getId()); + } else { + negativeDto.setDepartId(depart.getId()); + } + } else { + throw new RuntimeException("数据异常,请联系系统管理员"); + } negativeDto.setHostLevel(HostLevelEnums.SECOND.getValue()); negativeDto.setApprovalFlow(distributeData.getApprovalFlow()); // 审批流程 negativeDto.setTimeLimit(distributeData.getTimeLimit()); // 办理时限 @@ -240,7 +280,45 @@ public class NegativeTaskService extends ServiceImpl departIds = departService.getAllNodeIds(negativeDto.getDepartId()); + Arrays.stream(item.getBlames().split("、")).forEach(name -> { + + SupPolice blamePolice = policeService.list(new LambdaQueryWrapper() + .eq(SupPolice::getName, name).in(SupPolice::getOrgId, departIds)) + .stream().findFirst().orElse(null); + if (Objects.nonNull(blamePolice)) { + NegativeBlame blame = new NegativeBlame(); + blame.setBlameId(IdUtil.getSnowflakeNextIdStr()) + .setNegativeId(negative.getId()) + .setBlameName(blamePolice.getName()) + .setBlameEmpNo(blamePolice.getEmpNo()) + .setBlameIdCode(blamePolice.getIdCode()) + .setIvPersonType(Optional.ofNullable(PersonTypeEnum.getByLabel(blamePolice.getPersonType())).map(PersonTypeEnum::getLabel).orElse(null)) + .setIvPersonTypeCode(blamePolice.getPersonType()) + .setCrtTime(LocalDateTime.now()) + .setType("personal"); + blameService.save(blame); + if (CollectionUtil.isNotEmpty(negativeDto.getProblems())) { + List problems = negativeDto.getProblems().stream().map(problem -> { + NegativeProblemRelation problemRelation = new NegativeProblemRelation(); + BeanUtils.copyProperties(problem, problemRelation); + problemRelation.setBlameId(blame.getBlameId()); + problemRelation.setNegativeId(negative.getId()); + return problemRelation; + }).toList(); + negativeProblemRelationService.saveBatch(problems); + } + } + }); + } }); return true; } diff --git a/src/main/java/com/biutag/supervision/service/SupDictProblemTypeService.java b/src/main/java/com/biutag/supervision/service/SupDictProblemTypeService.java index 19c0cf9..3efdfba 100644 --- a/src/main/java/com/biutag/supervision/service/SupDictProblemTypeService.java +++ b/src/main/java/com/biutag/supervision/service/SupDictProblemTypeService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.constants.AppConstants; import com.biutag.supervision.mapper.SupDictProblemTypeMapper; +import com.biutag.supervision.pojo.dto.flow.VerifyData; import com.biutag.supervision.pojo.entity.SupDictProblemType; import com.biutag.supervision.pojo.vo.DictContentTree; import org.springframework.beans.BeanUtils; @@ -48,4 +49,34 @@ public class SupDictProblemTypeService extends ServiceImpl().eq(SupDictProblemType::getName, arr[0])); + if (Objects.isNull(one)) { + return problem; + } + problem.setOneLevelContent(one.getName()); + problem.setOneLevelCode(one.getCode()); + SupDictProblemType two = getOne(new LambdaQueryWrapper() + .eq(SupDictProblemType::getName, arr[1]).eq(SupDictProblemType::getParentCode, one.getCode())); + if (Objects.isNull(two)) { + return problem; + } + problem.setTwoLevelContent(two.getName()); + problem.setTwoLevelCode(two.getCode()); + SupDictProblemType three = getOne(new LambdaQueryWrapper() + .eq(SupDictProblemType::getName, arr[2]).eq(SupDictProblemType::getParentCode, two.getCode())); + if (Objects.isNull(three)) { + return problem; + } + problem.setThreeLevelContent(three.getName()); + problem.setThreeLevelCode(three.getCode()); + return problem; + } + + public List listProblemByFullName(List fullNames) { + return fullNames.stream().map(this::getProblemByFullName).toList(); + } + } diff --git a/src/main/java/com/biutag/supervision/service/SupPoliceService.java b/src/main/java/com/biutag/supervision/service/SupPoliceService.java index 130d44d..5da5958 100644 --- a/src/main/java/com/biutag/supervision/service/SupPoliceService.java +++ b/src/main/java/com/biutag/supervision/service/SupPoliceService.java @@ -31,7 +31,7 @@ public class SupPoliceService extends ServiceImpl { UserAuth user = UserContextHolder.getCurrentUser(); // 权限 if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType()) && !user.getRoleCodes().contains(RoleCodeEnum.FIRST_ADMIN.getCode())) { - if (user.getAuthDepartIds().isEmpty() || user.getRoleCodes().isEmpty() || !user.getRoleCodes().contains(RoleCodeEnum.SECOND_ADMIN.getCode()) && !user.getRoleCodes().contains(RoleCodeEnum.THREE_ADMIN.getCode())) { + if (user.getAuthDepartIds().isEmpty() || user.getRoleCodes().isEmpty()) { return new Page().setTotal(0).setRecords(new ArrayList<>()); } List orgIds = departService.getAllNodeIds(user.getAuthDepartIds()); diff --git a/src/main/java/com/biutag/supervision/service/SupTaskInspectionService.java b/src/main/java/com/biutag/supervision/service/SupTaskInspectionService.java new file mode 100644 index 0000000..11c44a3 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupTaskInspectionService.java @@ -0,0 +1,64 @@ +package com.biutag.supervision.service; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.constants.enums.TaskStatusEnum; +import com.biutag.supervision.constants.enums.TaskTypeEnum; +import com.biutag.supervision.mapper.SupTaskInspectionMapper; +import com.biutag.supervision.pojo.dto.TaskInspectionDto; +import com.biutag.supervision.pojo.entity.SupDepart; +import com.biutag.supervision.pojo.entity.SupTask; +import com.biutag.supervision.pojo.entity.SupTaskInspection; +import com.biutag.supervision.pojo.param.TaskInspectionQueryParam; +import com.biutag.supervision.pojo.vo.TaskInspectionVo; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; + +@RequiredArgsConstructor +@Service +public class SupTaskInspectionService extends ServiceImpl { + + private final SupDepartService departService; + + private final SupTaskService taskService; + + private final SupTaskPersonService taskPersonService; + + public Page page(TaskInspectionQueryParam queryParam) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("t.task_type", TaskTypeEnum.inspection.name()) + .like(StrUtil.isNotBlank(queryParam.getTaskName()), "t.task_name", queryParam.getTaskName()) + .eq(StrUtil.isNotBlank(queryParam.getSupDepartId()), "t.sup_depart_id", queryParam.getSupDepartId()); + return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + } + + @Transactional(rollbackFor = Exception.class) + public boolean save(TaskInspectionDto dto) { + SupTask task = new SupTask(); + BeanUtils.copyProperties(dto, task); + task.setCreateTime(LocalDateTime.now()); + task.setTaskType(TaskTypeEnum.inspection.name()); + task.setTaskStatus(TaskStatusEnum.todo.name()); + SupDepart depart = departService.getById(dto.getSupDepartId()); + task.setSupDepartName(depart.getShortName()); + task.setBeginTime(dto.getTimes().get(0)); + task.setEndTime(dto.getTimes().get(1)); + taskService.save(task); + SupTaskInspection testingAlcohol = new SupTaskInspection(); + BeanUtils.copyProperties(dto, testingAlcohol); + testingAlcohol.setTaskId(task.getId()); + save(testingAlcohol); + dto.getPersons().forEach(item -> { + item.setTaskId(task.getId()); + }); + taskPersonService.saveBatch(dto.getPersons()); + return true; + } + +} diff --git a/src/main/java/com/biutag/supervision/service/SupTaskPersonService.java b/src/main/java/com/biutag/supervision/service/SupTaskPersonService.java new file mode 100644 index 0000000..5a0ed2b --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupTaskPersonService.java @@ -0,0 +1,11 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.SupTaskPerson; +import com.biutag.supervision.mapper.SupTaskPersonMapper; +import org.springframework.stereotype.Service; + +@Service +public class SupTaskPersonService extends ServiceImpl { + +} diff --git a/src/main/java/com/biutag/supervision/service/SupTaskService.java b/src/main/java/com/biutag/supervision/service/SupTaskService.java new file mode 100644 index 0000000..b84d078 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupTaskService.java @@ -0,0 +1,11 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.SupTask; +import com.biutag.supervision.mapper.SupTaskMapper; +import org.springframework.stereotype.Service; + +@Service +public class SupTaskService extends ServiceImpl { + +} diff --git a/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java b/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java new file mode 100644 index 0000000..143b5a3 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java @@ -0,0 +1,11 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople; +import com.biutag.supervision.mapper.SupTaskTestingAlcoholPeopleMapper; +import org.springframework.stereotype.Service; + +@Service +public class SupTaskTestingAlcoholPeopleService extends ServiceImpl { + +} diff --git a/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholService.java b/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholService.java new file mode 100644 index 0000000..ae14be8 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholService.java @@ -0,0 +1,72 @@ +package com.biutag.supervision.service; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.constants.enums.TaskStatusEnum; +import com.biutag.supervision.constants.enums.TaskTypeEnum; +import com.biutag.supervision.constants.enums.TestingAlcoholStateEnum; +import com.biutag.supervision.mapper.SupTaskTestingAlcoholMapper; +import com.biutag.supervision.pojo.dto.TaskTestingAlcoholDto; +import com.biutag.supervision.pojo.entity.SupDepart; +import com.biutag.supervision.pojo.entity.SupTask; +import com.biutag.supervision.pojo.entity.SupTaskTestingAlcohol; +import com.biutag.supervision.pojo.param.TaskTestingAlcoholQueryParam; +import com.biutag.supervision.pojo.vo.TaskTestingAlcoholVo; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; + +@RequiredArgsConstructor +@Service +public class SupTaskTestingAlcoholService extends ServiceImpl { + + private final SupTaskService taskService; + + private final SupTaskPersonService taskPersonService; + + private final SupTaskTestingAlcoholPeopleService testingAlcoholPeopleService; + + private final SupDepartService departService; + + public Page page(TaskTestingAlcoholQueryParam queryParam) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("t.task_type", TaskTypeEnum.testing_alcohol.name()) + .like(StrUtil.isNotBlank(queryParam.getTaskName()), "t.task_name", queryParam.getTaskName()) + .eq(StrUtil.isNotBlank(queryParam.getSupDepartId()), "t.sup_depart_id", queryParam.getSupDepartId()); + return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + } + + @Transactional(rollbackFor = Exception.class) + public boolean save(TaskTestingAlcoholDto dto) { + SupTask task = new SupTask(); + BeanUtils.copyProperties(dto, task); + task.setCreateTime(LocalDateTime.now()); + task.setTaskType(TaskTypeEnum.testing_alcohol.name()); + task.setTaskStatus(TaskStatusEnum.todo.name()); + SupDepart depart = departService.getById(dto.getSupDepartId()); + task.setSupDepartName(depart.getShortName()); + task.setBeginTime(dto.getTimes().get(0)); + task.setEndTime(dto.getTimes().get(1)); + taskService.save(task); + SupTaskTestingAlcohol testingAlcohol = new SupTaskTestingAlcohol(); + BeanUtils.copyProperties(dto, testingAlcohol); + testingAlcohol.setTaskId(task.getId()); + save(testingAlcohol); + dto.getPersons().forEach(item -> { + item.setTaskId(task.getId()); + }); + taskPersonService.saveBatch(dto.getPersons()); + dto.getPeoples().forEach(item -> { + item.setTaskId(task.getId()); + item.setStatus(TestingAlcoholStateEnum.not_detected.name()); + }); + testingAlcoholPeopleService.saveBatch(dto.getPeoples()); + return true; + } + +} diff --git a/src/main/resources/mapper/DataPetition12337Mapper.xml b/src/main/resources/mapper/DataPetition12337Mapper.xml index f48a0cd..af16708 100644 --- a/src/main/resources/mapper/DataPetition12337Mapper.xml +++ b/src/main/resources/mapper/DataPetition12337Mapper.xml @@ -168,7 +168,7 @@ + SELECT + t.id, + t.task_name, + t.sup_depart_name, + t.begin_time, + t.end_time, + t.task_status, + GROUP_CONCAT( DISTINCT per.NAME, ' ') persons, + i.supervision_type, + i.task_content + FROM + sup_task t + LEFT JOIN sup_task_inspection i ON t.id = i.task_id + LEFT JOIN sup_task_person per ON t.id = per.task_id + ${ew.getCustomSqlSegment} + GROUP BY + t.id, + t.task_name, + t.sup_depart_name, + t.begin_time, + t.end_time, + t.task_status + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/NegativeMapper.xml b/src/main/resources/mapper/SupTaskPersonMapper.xml similarity index 100% rename from src/main/resources/mapper/NegativeMapper.xml rename to src/main/resources/mapper/SupTaskPersonMapper.xml diff --git a/src/main/resources/mapper/SupTaskTestingAlcoholMapper.xml b/src/main/resources/mapper/SupTaskTestingAlcoholMapper.xml new file mode 100644 index 0000000..40f51db --- /dev/null +++ b/src/main/resources/mapper/SupTaskTestingAlcoholMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/templates/公安信访投诉数据导入模板.xls b/src/main/resources/static/templates/公安信访投诉数据导入模板.xls index 698f36f..c3bbcbf 100644 Binary files a/src/main/resources/static/templates/公安信访投诉数据导入模板.xls and b/src/main/resources/static/templates/公安信访投诉数据导入模板.xls differ diff --git a/src/main/resources/static/templates/审计监督问题批量导入模板.xlsx b/src/main/resources/static/templates/审计监督问题批量导入模板.xlsx new file mode 100644 index 0000000..3b943b2 Binary files /dev/null and b/src/main/resources/static/templates/审计监督问题批量导入模板.xlsx differ diff --git a/src/main/resources/static/templates/问题批量导入标准模板.xlsx b/src/main/resources/static/templates/问题批量导入标准模板.xlsx index 6ea143a..ba3a456 100644 Binary files a/src/main/resources/static/templates/问题批量导入标准模板.xlsx and b/src/main/resources/static/templates/问题批量导入标准模板.xlsx differ diff --git a/src/test/java/com/biutag/supervision/StrUtil.java b/src/test/java/com/biutag/supervision/StrUtil.java index 0fc4bc7..5a8472d 100644 --- a/src/test/java/com/biutag/supervision/StrUtil.java +++ b/src/test/java/com/biutag/supervision/StrUtil.java @@ -1,6 +1,5 @@ package com.biutag.supervision; -import cn.hutool.core.convert.NumberChineseFormatter; import cn.hutool.core.date.DateUtil; import cn.hutool.core.io.IoUtil; import cn.hutool.core.util.ZipUtil; @@ -10,7 +9,6 @@ import freemarker.template.Configuration; import freemarker.template.Template; import freemarker.template.TemplateException; import freemarker.template.Version; -import net.logstash.logback.encoder.org.apache.commons.lang.StringEscapeUtils; import org.assertj.core.util.Arrays; import org.junit.jupiter.api.Test; @@ -98,8 +96,16 @@ public class StrUtil { @Test public void template3() { - System.out.println("你好!我们是聋哑夫妻,望城区唯罗克路,马路在康寿制药与长城钢构之间,围栏边只有左转及掉头,红绿灯等待时间长,通过时间短,导致后方\uD83D\uDE97辆增多延长,影响厂区的要上班工作人员迟到,红绿灯等待时间缩短,通过时间要长,特别是左转标线可否增加一条左转标线,希望解决上下班问题".replaceAll("[^\\u0000-\\uFFFF]", "")); - + System.out.println("SELECT " + + "npr.threeLevelContent as label, " + + "count(*) `value` " + + "FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " + + "WHERE npr.threeLevelContent is not NULL " + + "AND checkStatus IN (1, 2) " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY npr.threeLevelContent " + + "ORDER BY `value` desc " + + " LIMIT 10 OFFSET 1 "); } } diff --git a/src/test/java/com/biutag/supervision/tools/GenCodeTests.java b/src/test/java/com/biutag/supervision/tools/GenCodeTests.java index 5b8fde3..3791ed8 100644 --- a/src/test/java/com/biutag/supervision/tools/GenCodeTests.java +++ b/src/test/java/com/biutag/supervision/tools/GenCodeTests.java @@ -25,7 +25,7 @@ public class GenCodeTests { @Test public void genEntity() throws TemplateException, IOException { - String tableName = "rpc_packs_comfort"; + String tableName = "sup_task_inspection"; String tableSchema = "negative"; boolean genMapper = true; boolean genService = true;