diff --git a/sql/20250122.sql b/sql/20250122.sql new file mode 100644 index 0000000..d2c2149 --- /dev/null +++ b/sql/20250122.sql @@ -0,0 +1,3 @@ +ALTER TABLE `negative`.`negative_blame` + ADD COLUMN `handleResultNameOther` text NULL COMMENT '处理结果(其他)', + ADD COLUMN `leadHandleResultNameOther` text NULL COMMENT '领导处理结果(其他)'; \ No newline at end of file diff --git a/sql/250124.sql b/sql/250124.sql new file mode 100644 index 0000000..427e89c --- /dev/null +++ b/sql/250124.sql @@ -0,0 +1,13 @@ +INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `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 (314, 0, '不予追责', '2-1', 'departHandleResult', '', '', '0', '0', '', '2025-01-24 11:22:32', '', '2025-01-24 11:22:32', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `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 (315, 0, '单位月度考核降等', '2-2', 'departHandleResult', '', '', '0', '0', '', '2025-01-24 11:22:41', '', '2025-01-24 11:22:41', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `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 (316, 0, '单位季度考核降等', '2-3', 'departHandleResult', '', '', '0', '0', '', '2025-01-24 11:22:51', '', '2025-01-24 11:22:51', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `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 (317, 0, '单位责令书面检查', '2-4', 'departHandleResult', '', '', '0', '0', '', '2025-01-24 11:23:03', '', '2025-01-24 11:23:03', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `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 (318, 0, '单位月度考核扣分', '2-5', 'departHandleResult', '', '', '0', '0', '', '2025-01-24 11:23:11', '', '2025-01-24 11:23:11', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `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 (319, 0, '单位季度考核扣分', '2-6', 'departHandleResult', '', '', '0', '0', '', '2025-01-24 11:23:19', '', '2025-01-24 11:23:19', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `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 (320, 0, '纳入全年绩效考核', '2-7', 'departHandleResult', '', '', '0', '0', '', '2025-01-24 11:23:28', '', '2025-01-24 11:23:28', ''); +INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `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 (321, 0, '重组或撤换班子', '2-8', 'departHandleResult', '', '', '0', '0', '', '2025-01-24 11:23:37', '', '2025-01-24 11:23:37', ''); + + +-- +-- vi /etc/hosts +-- 11.32.30.103 wjccfwq.oss-cn-langfang-mps22s-d01-a.yun.ga \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/common/UserContextHolder.java b/src/main/java/com/biutag/supervision/common/UserContextHolder.java index ac449fa..e24e9f5 100644 --- a/src/main/java/com/biutag/supervision/common/UserContextHolder.java +++ b/src/main/java/com/biutag/supervision/common/UserContextHolder.java @@ -31,4 +31,4 @@ public class UserContextHolder { return getCurrentUser().getUserId(); } -} +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/config/InterceptorConfig.java b/src/main/java/com/biutag/supervision/config/InterceptorConfig.java index d0b3dfc..5422da5 100644 --- a/src/main/java/com/biutag/supervision/config/InterceptorConfig.java +++ b/src/main/java/com/biutag/supervision/config/InterceptorConfig.java @@ -37,7 +37,6 @@ public class InterceptorConfig implements WebMvcConfigurer { .excludePathPatterns("/api/**") // 登录 .excludePathPatterns("/login", "/jit/**") - .excludePathPatterns("/auth/self") .excludePathPatterns("/file/stream/**", "/templates/**") .excludePathPatterns("/datav/risk/**") .excludePathPatterns("/score/**") diff --git a/src/main/java/com/biutag/supervision/constants/enums/AccountabilityTargetEnum.java b/src/main/java/com/biutag/supervision/constants/enums/AccountabilityTargetEnum.java index ba60d9b..36a8b74 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/AccountabilityTargetEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/AccountabilityTargetEnum.java @@ -10,12 +10,23 @@ import lombok.Getter; @AllArgsConstructor public enum AccountabilityTargetEnum { - PERSONAL("1"), - - PERSONAL_AND_DEPARTMENT("2"), - DEPARTMENT("3"); + PERSONAL("1", "涉及个人"), + DEPARTMENT("2", "涉及单位"), + PERSONAL_AND_DEPARTMENT("3", "涉及个人及单位"); @Getter private String value; + @Getter + private String label; + + public static String getLabel(String value) { + for (AccountabilityTargetEnum targetEnum : values()) { + if (targetEnum.getValue().equals(value)) { + return targetEnum.getLabel(); + } + } + return ""; + } + } diff --git a/src/main/java/com/biutag/supervision/constants/enums/ApprovalFlowEnum.java b/src/main/java/com/biutag/supervision/constants/enums/ApprovalFlowEnum.java index 3278397..5fcd8cd 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/ApprovalFlowEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/ApprovalFlowEnum.java @@ -8,10 +8,18 @@ import lombok.Getter; public enum ApprovalFlowEnum { // 二级审批 所队一>二级机构 - SECOND_APPROVAL("2"), + SECOND_APPROVAL("2", "二级审批"), // 三级审批 所队一>二級机构一>市局 - THREE_APPROVAL("3"); + THREE_APPROVAL("3", "三级审批"); private String value; - + private String label; + public static String getLabel(String value) { + for (ApprovalFlowEnum flowEnum : values()) { + if (flowEnum.getValue().equals(value)) { + return flowEnum.getLabel(); + } + } + return ""; + } } diff --git a/src/main/java/com/biutag/supervision/constants/enums/BusinessTypeEnum.java b/src/main/java/com/biutag/supervision/constants/enums/BusinessTypeEnum.java index 789ab3d..e1ecc59 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/BusinessTypeEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/BusinessTypeEnum.java @@ -17,9 +17,9 @@ public enum BusinessTypeEnum { ABWW("安保维稳", "8", "AB", false), JAFK("治安防控", "9", "ZA", false), XZGL("行政管理", "10", "XZ", false), - FFJC("服务基层", "12", "FF", false), - DWGL("队伍管理", "13", "DW", false), - QT("其他", "14", "QT", false); + FFJC("服务基层", "11", "FF", false), + DWGL("队伍管理", "12", "DW", false), + QT("其他", "13", "QT", false); private String label; diff --git a/src/main/java/com/biutag/supervision/constants/enums/HostLevelEnums.java b/src/main/java/com/biutag/supervision/constants/enums/HostLevelEnums.java index f04942c..9503eb4 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/HostLevelEnums.java +++ b/src/main/java/com/biutag/supervision/constants/enums/HostLevelEnums.java @@ -7,9 +7,18 @@ import lombok.Getter; @AllArgsConstructor public enum HostLevelEnums { - FIRST("1"), - SECOND("2"), - THREE("3"); + FIRST("1", "市局主办"), + SECOND("2", "二级机构主办"), + THREE("3", "三级机构主办"); private String value; + private String label; + public static String getLabel(String value) { + for (HostLevelEnums hostLevelEnums : values()) { + if (hostLevelEnums.getValue().equals(value)) { + return hostLevelEnums.getLabel(); + } + } + return ""; + } } diff --git a/src/main/java/com/biutag/supervision/constants/enums/TimeLimitEnum.java b/src/main/java/com/biutag/supervision/constants/enums/TimeLimitEnum.java index 327509c..89b22e8 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/TimeLimitEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/TimeLimitEnum.java @@ -36,4 +36,12 @@ public enum TimeLimitEnum { throw new RuntimeException(String.format("办理时限字典[%s]未找到", value)); } + public static String getLabel(String value) { + try { + return get(value).getLabel(); + } catch (RuntimeException e) { + return ""; + } + } + } diff --git a/src/main/java/com/biutag/supervision/controller/AuthController.java b/src/main/java/com/biutag/supervision/controller/AuthController.java index 695e60b..0f2020f 100644 --- a/src/main/java/com/biutag/supervision/controller/AuthController.java +++ b/src/main/java/com/biutag/supervision/controller/AuthController.java @@ -1,11 +1,8 @@ package com.biutag.supervision.controller; import cn.hutool.core.util.StrUtil; -import cn.hutool.http.HttpResponse; -import cn.hutool.http.HttpUtil; import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.constants.AppConstants; -import com.biutag.supervision.constants.RedisKeyConstants; import com.biutag.supervision.exception.AuthException; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.domain.Self; @@ -13,20 +10,13 @@ import com.biutag.supervision.pojo.entity.Menu; import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.vo.MenuTree; import com.biutag.supervision.service.MenuService; -import com.biutag.supervision.service.UserLoginService; -import com.biutag.supervision.util.JSON; -import com.fasterxml.jackson.databind.JsonNode; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.redis.core.RedisTemplate; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; -import java.util.Objects; -import java.util.concurrent.TimeUnit; @Slf4j @RequiredArgsConstructor @@ -36,16 +26,6 @@ public class AuthController { private final MenuService menuService; - private final UserLoginService userLoginService; - - private final RedisTemplate redisTemplate; - - @Value("${spring.profiles.active}") - private String profilesActive; - - @Value("${negative.v1-user-url:''}") - private String v1UserUrl; - @GetMapping("self") public Result self() { String authorization = UserContextHolder.getCurrentToken(); @@ -53,23 +33,6 @@ public class AuthController { throw new AuthException(); } UserAuth user = UserContextHolder.getCurrentUser(); - if ("prod".equals(profilesActive)) { - if (Objects.isNull(user)) { - HttpResponse httpResponse = HttpUtil - .createGet(v1UserUrl) - .bearerAuth(authorization) - .execute(); - log.info("获取用户信息:{}", httpResponse.body()); - JsonNode jsonNode = JSON.readTree(httpResponse.body()); - String account = jsonNode.get("data") - .get("username").asText(); - user = userLoginService.buildUserAuth(account); - redisTemplate.opsForValue().set(String.format(RedisKeyConstants.LOGIN_USERINFO_KEY, authorization), user, 24, TimeUnit.HOURS); - } - } - if (Objects.isNull(user)) { - throw new AuthException(); - } boolean superFlag = AppConstants.USER_TYPE_SUPER.equals(user.getUserType()); List menus = superFlag ? menuService.listAll() : menuService.listMenuByCurrentUser(); List perms = superFlag ? List.of("*") : menuService.listPermsByCurrentUser(); diff --git a/src/main/java/com/biutag/supervision/controller/LoginController.java b/src/main/java/com/biutag/supervision/controller/LoginController.java index 4bc12eb..e1ee729 100644 --- a/src/main/java/com/biutag/supervision/controller/LoginController.java +++ b/src/main/java/com/biutag/supervision/controller/LoginController.java @@ -44,7 +44,7 @@ public class LoginController { log.error(e.getMessage(), e); throw new RuntimeException("用户名或密码有误,请重新输入"); } - String token = userLoginService.login(account.getAccount()); + String token = userLoginService.login(baseAccount.getAccount()); return Result.success(new TokenVo().setToken(token)); } 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 5a74ed0..8613cce 100644 --- a/src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java +++ b/src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java @@ -1,27 +1,29 @@ package com.biutag.supervision.controller.data; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.common.UserContextHolder; +import com.biutag.supervision.constants.enums.*; import com.biutag.supervision.mapper.DataAlarmDispositionInfoMapper; import com.biutag.supervision.pojo.Result; -import com.biutag.supervision.pojo.entity.DataAlarmAlarmInfo; -import com.biutag.supervision.pojo.entity.DataAlarmDispositionInfo; -import com.biutag.supervision.pojo.entity.DataAlarmYjzj; +import com.biutag.supervision.pojo.dto.NegativeDto; +import com.biutag.supervision.pojo.dto.VideoInspectionDistributeDto; +import com.biutag.supervision.pojo.entity.*; +import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.param.VideoInspectionQueryParam; import com.biutag.supervision.pojo.vo.VideoInspectionInfo; import com.biutag.supervision.pojo.vo.VideoInspectionVo; -import com.biutag.supervision.service.DataAlarmAlarmInfoService; -import com.biutag.supervision.service.DataAlarmDispositionInfoService; -import com.biutag.supervision.service.DataAlarmYjzjService; +import com.biutag.supervision.service.*; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; /** @@ -41,9 +43,16 @@ public class VideoInspectionController { private final DataAlarmYjzjService dataAlarmYjzjService; + private final NegativeTaskService negativeTaskService; + + private final SupDepartService departService; + + private final NegativeService negativeService; + + private final SupExternalDepartService externalDepartService; + @Value("${videoInspection.url}") private String videoInspectionUrl; -// private static final String videoInspectionUrl = "http://65.47.26.33:8090/"; @GetMapping public Result> list(VideoInspectionQueryParam param) { @@ -74,5 +83,74 @@ public class VideoInspectionController { return Result.success(info); } + /** + * 下发 + * @param distributeData + * @return + */ + @PostMapping("distribute") + @Transactional(rollbackFor = Exception.class) + public Result distribute(@RequestBody VideoInspectionDistributeDto distributeData) { + List 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()); + negativeTaskService.save(negativeTask); + data.forEach(item -> { + if (StrUtil.isBlank(item.getFsdwGajgjgdm())) { + throw new RuntimeException("发生单位编码为空"); + } + // 发生单位代码 + SupExternalDepart externalDepart = externalDepartService.getOne(new LambdaUpdateWrapper().eq(SupExternalDepart::getExternalId, item.getFsdwGajgjgdm()).eq(SupExternalDepart::getSource, + "视频督察")); + if (externalDepart == null || StrUtil.isBlank(externalDepart.getInternalId())) { + throw new RuntimeException(String.format("%s-%s 未匹配单位映射,请联系管理员", item.getFsdwGajgmc(), item.getFsdwGajgjgdm())); + } + SupDepart depart = departService.getById(externalDepart.getInternalId()); + NegativeDto negativeDto = new NegativeDto(); + negativeDto.setThingDesc(item.getContent()); + negativeDto.setDiscoveryTime(LocalDateTime.parse(item.getRqsj(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + negativeDto.setInvolveDepartId(depart.getId()); + negativeDto.setInvolveDepartName(depart.getShortName()); + negativeDto.setBusinessTypeCode(distributeData.getBusinessTypeCode()); + negativeDto.setPoliceType(distributeData.getPoliceType()); + negativeDto.setInvolveProblem(distributeData.getInvolveProblem()); + // 视频督察 + negativeDto.setProblemSourcesCode(ProblemSourcesEnum.SPDC.getValue()); + negativeDto.setProblemSources(ProblemSourcesEnum.SPDC.getLabel()); + if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { + negativeDto.setDepartId(depart.getId()); + negativeDto.setDepartName(depart.getShortName()); + } 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()); + negativeDto.setDepartName(parent.getShortName()); + } else { + negativeDto.setDepartId(depart.getId()); + negativeDto.setDepartName(depart.getShortName()); + } + } else { + throw new RuntimeException("数据异常,请联系系统管理员"); + } + negativeDto.setHostLevel(HostLevelEnums.SECOND.getValue()); + negativeDto.setApprovalFlow(distributeData.getApprovalFlow()); // 审批流程 + negativeDto.setTimeLimit(distributeData.getTimeLimit()); // 办理时限 + negativeDto.setMaxSignDuration(distributeData.getMaxSignDuration()); + negativeDto.setMaxHandleDuration(distributeData.getMaxHandleDuration()); + negativeDto.setMaxExtensionDuration(distributeData.getMaxExtensionDuration()); + negativeDto.setTaskId(negativeTask.getId()); + negativeService.save(negativeDto); + // 更新状态 + dataAlarmAlarmInfoService.update(new LambdaUpdateWrapper().eq(DataAlarmAlarmInfo::getId, item.getId()).set(DataAlarmAlarmInfo::getDistributionState, DistributionStateEnum.DISTRIBUTED.getValue())); + + }); + return Result.success(); + } } diff --git a/src/main/java/com/biutag/supervision/controller/work/ComfortController.java b/src/main/java/com/biutag/supervision/controller/work/ComfortController.java new file mode 100644 index 0000000..62f108c --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/work/ComfortController.java @@ -0,0 +1,28 @@ +package com.biutag.supervision.controller.work; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.RpcApply; +import com.biutag.supervision.service.RpcApplyService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author wxc + * @date 2025/1/20 + */ +@RequiredArgsConstructor +@RequestMapping("comfort") +@RestController +public class ComfortController { + + private final RpcApplyService rpcApplyService; + + @GetMapping + public Result> list() { + return Result.success(rpcApplyService.page(Page.of(1, 10))); + } + +} diff --git a/src/main/java/com/biutag/supervision/controller/work/NewsController.java b/src/main/java/com/biutag/supervision/controller/work/NewsController.java index 7c6c94a..b1ad897 100644 --- a/src/main/java/com/biutag/supervision/controller/work/NewsController.java +++ b/src/main/java/com/biutag/supervision/controller/work/NewsController.java @@ -30,7 +30,7 @@ public class NewsController { queryWrapper.between(News::getReleaseTime, param.getReleaseTime().get(0), param.getReleaseTime().get(1)); } queryWrapper.eq(StrUtil.isNotBlank(param.getSource()), News::getSource, param.getSource()) - .eq(StrUtil.isNotBlank(param.getWorkType()), News::getSource, param.getWorkType()) + .eq(StrUtil.isNotBlank(param.getWorkType()), News::getWorkType, param.getWorkType()) .like(StrUtil.isNotBlank(param.getContentTxt()), News::getContentTxt, param.getContentTxt()) .orderByDesc(News::getCreateTime); Page page = newsService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper); 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 d55169f..9e72da6 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -126,6 +126,9 @@ public class ApplyCompletionAction implements Action { .toList(); if(!blameLeaders.isEmpty()) { BeanUtil.copyProperties(blameLeaders.get(0), negativeBlame); + if (CollectionUtil.isNotEmpty(blameLeaders.get(0).getLeadHandleResultCode())) { + negativeBlame.setLeadHandleResultCode(String.join(",", blameLeaders.get(0).getLeadHandleResultCode())); + } } negativeBlame @@ -133,6 +136,9 @@ public class ApplyCompletionAction implements Action { .setNegativeId(negative.getId()) .setCrtTime(now) .setUpdTime(now); + if (CollectionUtil.isNotEmpty(item.getHandleResultCode())) { + negativeBlame.setHandleResultCode(String.join(",", item.getHandleResultCode())); + } problemRelations.addAll(item.getProblems().stream().filter(problem -> StrUtil.isNotBlank(problem.getOneLevelCode())).map(problem -> { NegativeProblemRelation problemRelation = new NegativeProblemRelation(); 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 dfe46ac..2bdfc76 100644 --- a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java @@ -103,6 +103,9 @@ public class SaveAction implements Action { .filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())).findFirst().orElse(null); if (Objects.nonNull(blameLeader)) { BeanUtil.copyProperties(blameLeader, negativeBlame); + if (CollectionUtil.isNotEmpty(blameLeader.getLeadHandleResultCode())) { + negativeBlame.setLeadHandleResultCode(String.join(",", blameLeader.getLeadHandleResultCode())); + } } negativeBlame.setNegativeId(negativeId) .setBlameId(IdUtil.getSnowflakeNextIdStr()) diff --git a/src/main/java/com/biutag/supervision/pojo/domain/Blame.java b/src/main/java/com/biutag/supervision/pojo/domain/Blame.java index d301431..ddc660c 100644 --- a/src/main/java/com/biutag/supervision/pojo/domain/Blame.java +++ b/src/main/java/com/biutag/supervision/pojo/domain/Blame.java @@ -87,11 +87,14 @@ public class Blame { private String responsibilityTypeName; // 处理结果 - private String handleResultCode; + private List handleResultCode; // 处理结果 private String handleResultName; + // 处理结果(其他) + private String handleResultNameOther; + // 维权容错 private String protectRightsCode; @@ -151,11 +154,14 @@ public class Blame { private String leadResponsibilityTypeCode; // 领导处理结果 - private String leadHandleResultCode; + private List leadHandleResultCode; // 领导处理结果 private String leadHandleResultName; + // 领导处理结果(其他) + private String leadHandleResultNameOther; + // 领导维权容错 private String leadProtectRightsName; diff --git a/src/main/java/com/biutag/supervision/pojo/dto/VideoInspectionDistributeDto.java b/src/main/java/com/biutag/supervision/pojo/dto/VideoInspectionDistributeDto.java new file mode 100644 index 0000000..ff1c6e9 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/VideoInspectionDistributeDto.java @@ -0,0 +1,53 @@ +package com.biutag.supervision.pojo.dto; + +import com.biutag.supervision.pojo.vo.VideoInspectionVo; +import jakarta.validation.constraints.NotBlank; +import lombok.Getter; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/1/23 + */ +@Setter +@Getter +public class VideoInspectionDistributeDto { + + private List data = 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 String handleDepartId; + + // 业务类型 + private String businessTypeCode; + + // 警种 + private String policeType; + + private List involveProblem = new ArrayList<>(); + +} 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 f10959e..df4560b 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 @@ -130,12 +130,15 @@ public class VerifyData { // 处理结果 @NotBlank - private String handleResultCode; + private List handleResultCode; // 处理结果 @NotBlank private String handleResultName; + // 其他处理结果 + private String handleResultNameOther; + // 维权容错 @NotBlank private String protectRightsCode; @@ -193,12 +196,15 @@ public class VerifyData { // 领导处理结果 @NotBlank - private String leadHandleResultCode; + private List leadHandleResultCode; // 领导处理结果 @NotBlank private String leadHandleResultName; + // 领导处理结果 + private String leadHandleResultNameOther; + // 领导维权容错 @NotBlank private String leadProtectRightsName; diff --git a/src/main/java/com/biutag/supervision/pojo/entity/DataAlarmAlarmInfo.java b/src/main/java/com/biutag/supervision/pojo/entity/DataAlarmAlarmInfo.java index aa681b7..ba1dab5 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/DataAlarmAlarmInfo.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/DataAlarmAlarmInfo.java @@ -50,7 +50,7 @@ public class DataAlarmAlarmInfo { // 发生单位代码 @TableField("FSDW_GAJGJGDM") - private String FSDW_GAJGJGDM; + private String fsdwGajgjgdm; // 发生单位名称 @TableField("FSDW_GAJGMC") @@ -104,6 +104,9 @@ public class DataAlarmAlarmInfo { @TableField("Scence") private String Scence; + // 下发状态 + private String distributionState; + @TableField(exist = false) private List AlmZJList; diff --git a/src/main/java/com/biutag/supervision/pojo/entity/NegativeBlame.java b/src/main/java/com/biutag/supervision/pojo/entity/NegativeBlame.java index 6106e46..7b02caf 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/NegativeBlame.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/NegativeBlame.java @@ -121,6 +121,10 @@ public class NegativeBlame { @TableField("handleResultName") private String handleResultName; + // 处理结果(其他) + @TableField("handleResultNameOther") + private String handleResultNameOther; + // 维权容错 @TableField("protectRightsCode") private String protectRightsCode; @@ -204,6 +208,10 @@ public class NegativeBlame { @TableField("leadHandleResultName") private String leadHandleResultName; + // 领导处理结果(其他) + @TableField("leadHandleResultNameOther") + private String leadHandleResultNameOther; + // 领导维权容错 @TableField("leadProtectRightsName") private String leadProtectRightsName; diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java index c6d41f0..1c2f4cc 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java @@ -1,8 +1,8 @@ package com.biutag.supervision.pojo.entity; -import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Getter; import lombok.Setter; @@ -15,10 +15,17 @@ public class RpcApply { @TableId(value = "rpc_id") private String rpcId; + private String number; + // 申请时间 @TableField("apply_date") + @JsonFormat(pattern="yyyy-MM-dd HH:mm") private LocalDateTime applyDate; + // 发生时间 + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private LocalDateTime happenTime; + // 部门id @TableField("depart_id") private String departId; @@ -27,6 +34,9 @@ public class RpcApply { @TableField("depart_name") private String departName; + + private String applicantEmpName; + // 类型,1维权,2,抚慰,3容错 @TableField("type") private String type; diff --git a/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java b/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java index 36378d0..21ac70b 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java @@ -1,7 +1,6 @@ package com.biutag.supervision.pojo.vo; import com.alibaba.excel.annotation.ExcelProperty; -import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Getter; import lombok.Setter; @@ -12,84 +11,116 @@ import java.time.LocalDateTime; @Getter public class ExportNegativeVo { - @ExcelProperty("样本源头编号") + @ExcelProperty({"问题基本信息","问题编号"}) + private String id; + + @ExcelProperty({"问题基本信息","样本源头编号"}) private String originId; + @ExcelProperty({"问题基本信息","涉及案件/警情编号"}) + private String caseNumber; + // 问题发生时间 - @ExcelProperty("问题发生时间") + @ExcelProperty({"问题基本信息","问题发生时间"}) @JsonFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime happenTime; // 问题发现时间 - @ExcelProperty("问题发现时间") + @ExcelProperty({"问题基本信息","问题发现时间"}) @JsonFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime discoveryTime; // 问题来源 - @ExcelProperty("问题来源") + @ExcelProperty({"问题基本信息","问题来源"}) private String problemSources; // 业务类别名称 - @ExcelProperty("业务类别") + @ExcelProperty({"问题基本信息","业务类别"}) private String businessTypeName; // 涉嫌问题 JSON - @ExcelProperty("涉嫌问题") + @ExcelProperty({"问题基本信息","涉嫌问题"}) private String involveProblem; // 简要描述 - @ExcelProperty("简要描述") + @ExcelProperty({"问题基本信息","简要描述"}) private String thingDesc; // 反映人姓名 - @ExcelProperty("投诉反映人") + @ExcelProperty({"问题基本信息","投诉反映人"}) private String responderName; // 联系电话 - @ExcelProperty("联系电话") + @ExcelProperty({"问题基本信息","联系电话"}) private String contactPhone; // 涉及警种名称 - @ExcelProperty("涉及警种") + @ExcelProperty({"问题基本信息","涉及警种"}) private String policeTypeName; // 涉及单位名称 - @ExcelProperty("涉及单位") + @ExcelProperty({"问题基本信息","涉及单位"}) private String involveDepartName; // 办理单位 二级 - @ExcelProperty("办理单位(二级)") + @ExcelProperty({"问题基本信息","办理单位(二级)"}) private String handleSecondDepartName; // 办理单位 三级 - @ExcelProperty("办理单位(三级)") + @ExcelProperty({"问题基本信息","办理单位(三级)"}) private String handleThreeDepartName; + // 主办层级 + @ExcelProperty({"流程配置","主办层级"}) + private String hostLevel; + + // 审批流程 + @ExcelProperty({"流程配置","审批流程"}) + private String approvalFlow; + + // 办理时限 + @ExcelProperty({"流程配置","办理时限"}) + private String timeLimit; + + // 核查情况 - @ExcelProperty("核查情况(是否属实)") + @ExcelProperty({"核办情况","核查情况(是否属实)"}) private String checkStatusName; // 核查情况 - @ExcelProperty("核查情况说明") + @ExcelProperty({"核办情况","核查情况说明"}) private String checkStatusDesc; // 是否整改 - @ExcelProperty("是否整改") + @ExcelProperty({"核办情况","是否整改"}) private String isRectifyName; // 问题整改情况 - @ExcelProperty("整改情况") + @ExcelProperty({"核办情况","整改情况"}) private String rectifyDesc; + // 追责对象 + @ExcelProperty({"核办情况","追责对象"}) + private String accountabilityTarget; + + @ExcelProperty({"核办情况","涉及人员"}) + private String blames; + + @ExcelProperty({"核办情况","责任追责"}) + private String handleResultName; + + @ExcelProperty({"核办情况","涉及人数"}) + private Integer blameNumber; + // 问题类型 - @ExcelProperty("问题类型") + @ExcelProperty({"核办情况","问题类型"}) private String problemTypeList; // 办理状态 - @ExcelProperty("办理状态") + @ExcelProperty({"","办理状态"}) private String processingStatus; - @ExcelProperty("办理超时情况") - private String handleTime; + @ExcelProperty({"","办理超时情况"}) + private String handleTimeout; } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/vo/NegativeQueryVo.java b/src/main/java/com/biutag/supervision/pojo/vo/NegativeQueryVo.java index 5374623..c623f85 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/NegativeQueryVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/NegativeQueryVo.java @@ -189,5 +189,8 @@ public class NegativeQueryVo { // 通报期数 private String reportNumber; + // 整改情况 + private String rectifyDesc; + } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/VideoInspectionVo.java b/src/main/java/com/biutag/supervision/pojo/vo/VideoInspectionVo.java index 58d16bf..c2849d3 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/VideoInspectionVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/VideoInspectionVo.java @@ -1,5 +1,6 @@ package com.biutag.supervision.pojo.vo; +import com.baomidou.mybatisplus.annotation.TableField; import lombok.Getter; import lombok.Setter; @@ -28,4 +29,12 @@ public class VideoInspectionVo { // 发生单位名称 private String fsdwGajgmc; + // 发生单位代码 + private String fsdwGajgjgdm; + + // 下发状态 + private String distributionState; + + private String content; + } diff --git a/src/main/java/com/biutag/supervision/service/DataPetition12337Service.java b/src/main/java/com/biutag/supervision/service/DataPetition12337Service.java index 22748a0..55d3c5f 100644 --- a/src/main/java/com/biutag/supervision/service/DataPetition12337Service.java +++ b/src/main/java/com/biutag/supervision/service/DataPetition12337Service.java @@ -120,6 +120,7 @@ public class DataPetition12337Service extends ServiceImpl { } Holiday holiday = getOne(new LambdaUpdateWrapper().eq(Holiday::getDate, date)); if (Objects.isNull(holiday)) { - // log.error("节假日 {} 数据未找到", date); + log.error("节假日 {} 数据未找到", date); return false; } redisTemplate.opsForValue().set(String.format("holiday:%s", date), holiday.getFlag()); diff --git a/src/main/java/com/biutag/supervision/service/NegativeBlameService.java b/src/main/java/com/biutag/supervision/service/NegativeBlameService.java index 0508303..616dc23 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeBlameService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeBlameService.java @@ -1,6 +1,7 @@ package com.biutag.supervision.service; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.pojo.domain.Blame; @@ -10,6 +11,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.time.LocalDateTime; +import java.util.Arrays; import java.util.List; @RequiredArgsConstructor @@ -25,6 +27,12 @@ public class NegativeBlameService extends ServiceImpl { - qw.like(Negative::getOriginId, param.getOriginId()).or().eq(Negative::getId, param.getOriginId()); + qw.like(Negative::getOriginId, param.getOriginId()).or().like(Negative::getId, param.getOriginId()); }) .in(!param.getProcessingStatus().isEmpty(), Negative::getProcessingStatus, param.getProcessingStatus()) .eq(StrUtil.isNotBlank(param.getFlowKey()), Negative::getFlowKey, param.getFlowKey()) diff --git a/src/main/java/com/biutag/supervision/service/NegativeService.java b/src/main/java/com/biutag/supervision/service/NegativeService.java index 3b72cec..2914892 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeService.java @@ -35,12 +35,10 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; import java.time.LocalDateTime; -import java.util.Date; -import java.util.List; -import java.util.Objects; -import java.util.Optional; +import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -96,13 +94,13 @@ public class NegativeService extends ServiceImpl { if (StrUtil.isNotBlank(negative.getHandlePolices())) { vo.setHandlePolices(JSON.parseArray(negative.getHandlePolices(), VerifyData.HandlePolice.class)); } - List blameVos = blameService.list(id); - vo.setBlames(blameVos); - if (!blameVos.isEmpty()) { - List blameLeaders = blameVos.stream().map(Blame::getLeadIdCode).filter(StrUtil::isNotBlank).collect(Collectors.toSet()) + List blameList = blameService.list(id); + vo.setBlames(blameList); + if (!blameList.isEmpty()) { + List blameLeaders = blameList.stream().map(Blame::getLeadIdCode).filter(StrUtil::isNotBlank).collect(Collectors.toSet()) .stream().map(leaderIdCode -> { VerifyData.BlameLeader blameLeader = new VerifyData.BlameLeader(); - List blames = blameVos.stream().filter(blameObj -> leaderIdCode.equals(blameObj.getLeadIdCode())).toList(); + List blames = blameList.stream().filter(blameObj -> leaderIdCode.equals(blameObj.getLeadIdCode())).toList(); // 取第一个 Blame blame = blames.get(0); BeanUtil.copyProperties(blame, blameLeader); diff --git a/src/main/java/com/biutag/supervision/service/NegativeTaskService.java b/src/main/java/com/biutag/supervision/service/NegativeTaskService.java index 5cb5529..73dcad3 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeTaskService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeTaskService.java @@ -2,6 +2,7 @@ package com.biutag.supervision.service; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.excel.EasyExcel; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -14,10 +15,7 @@ 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.entity.NegativeProblemRelation; -import com.biutag.supervision.pojo.entity.NegativeTask; -import com.biutag.supervision.pojo.entity.SupDepart; -import com.biutag.supervision.pojo.entity.SupDictData; +import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.model.ModelClueTaskDepartModel; import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.param.NegativeTaskQueryParam; @@ -89,12 +87,16 @@ public class NegativeTaskService extends ServiceImpl data, String negativeTaskId) { List suspectProblem = dictDataService.listByDictType("suspectProblem"); List list = new ArrayList<>(); if (!data.isEmpty()) { List negativeProblemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper().in(NegativeProblemRelation::getNegativeId, data.stream().map(NegativeQueryVo::getId).toList())); + List blames = negativeBlameService.list(new LambdaQueryWrapper().in(NegativeBlame::getNegativeId, data.stream().map(NegativeQueryVo::getId).toList())); + list = data.stream().map(item -> { ExportNegativeVo vo = new ExportNegativeVo(); BeanUtils.copyProperties(item, vo); @@ -113,6 +115,24 @@ public class NegativeTaskService extends ServiceImpl blameList = blames.stream().filter(blame -> blame.getNegativeId().equals(item.getId())).toList(); + String blameStr = blameList.stream() + .map(blame -> String.format("(%s)%s-%s", BlameType.personal.name().equals(blame.getType())?"个人": "单位", blame.getBlameName(), blame.getBlameEmpNo())) + .collect(Collectors.joining("、")); + vo.setBlames(blameStr); + vo.setBlameNumber(blameList.size()); + vo.setHandleResultName(blameList.stream().map(NegativeBlame::getHandleResultName).collect(Collectors.joining("、"))); return vo; }).toList(); } @@ -127,6 +147,26 @@ public class NegativeTaskService extends ServiceImpl { - qw.like("n.originId", param.getOriginId()).or().eq("n.id", param.getOriginId()); + qw.like("n.originId", param.getOriginId()).or().like("n.id", param.getOriginId()); }) .in(CollectionUtil.isNotEmpty(param.getProblemSourcesCode()), "n.problemSourcesCode", param.getProblemSourcesCode()) .eq(StrUtil.isNotBlank(param.getBusinessTypeCode()), "n.businessTypeCode", param.getBusinessTypeCode()) diff --git a/src/main/resources/jitMessage.properties b/src/main/resources/jitMessage.properties index 586e707..f2a56a5 100644 --- a/src/main/resources/jitMessage.properties +++ b/src/main/resources/jitMessage.properties @@ -2,4 +2,3 @@ authURL=http://172.16.22.243:6180/MessageService #\u5e94\u7528\u6807\u8bc6,\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u4fee\u6539\uff0c\u4e0e\u7f51\u5173\u4e2d\u914d\u7f6e\u7684\u5e94\u7528\u6807\u8bc6\u4e00\u81f4 appId=testApp2 - diff --git a/src/main/resources/mapper/DataAlarmDispositionInfoMapper.xml b/src/main/resources/mapper/DataAlarmDispositionInfoMapper.xml index d1f91be..33e1a1d 100644 --- a/src/main/resources/mapper/DataAlarmDispositionInfoMapper.xml +++ b/src/main/resources/mapper/DataAlarmDispositionInfoMapper.xml @@ -9,7 +9,10 @@ d.systemKeyName system_Key_Name, d.title, i.rqsj, - i.FSDW_GAJGMC + i.fsdw_gajgmc, + i.fsdw_gajgjgdm, + i.distribution_state, + i.dcyj_jyqk content FROM data_alarm_alarm_info i LEFT JOIN data_alarm_disposition_info d ON d.alarm_info_id = i.id diff --git a/src/main/resources/static/templates/信访投诉数据台账(模板).xlsx b/src/main/resources/static/templates/信访投诉数据台账(模板).xlsx deleted file mode 100644 index 56008b1..0000000 Binary files a/src/main/resources/static/templates/信访投诉数据台账(模板).xlsx and /dev/null differ