diff --git a/pom.xml b/pom.xml index 141936a..727cdcc 100644 --- a/pom.xml +++ b/pom.xml @@ -31,32 +31,34 @@ - - - org.jsoup - jsoup - 1.11.3 + org.springframework.boot + spring-boot-starter-web - - com.google.code.gson - gson - 2.10.1 + org.springframework.boot + spring-boot-starter-validation - - org.apache.httpcomponents - httpclient - 4.5.13 + org.springframework.boot + spring-boot-starter-data-redis-reactive + + + + + + + + - org.springframework.boot - spring-boot-starter-web + com.mysql + mysql-connector-j + runtime @@ -86,28 +88,36 @@ 1.1.1 + - org.springframework.boot - spring-boot-starter-validation + com.gbase + gbase-jdbc + system + 8.3.81.53-build55.2.1-bin + ${project.basedir}/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar + + - org.springframework.boot - spring-boot-starter-data-redis-reactive + com.dameng + DmJdbcDriver18 + 8.1.3.140 - - - - - - + + + org.postgresql + postgresql + 42.7.4 + - com.mysql - mysql-connector-j - runtime + com.alibaba + druid-spring-boot-starter + 1.2.22 + org.projectlombok lombok @@ -118,11 +128,6 @@ spring-boot-starter-test test - - io.projectreactor - reactor-test - test - com.baomidou @@ -142,7 +147,6 @@ 2.17.0 - cn.hutool hutool-core @@ -185,38 +189,20 @@ 4.1.0 - - com.gbase - gbase-jdbc - system - 8.3.81.53-build55.2.1-bin - ${project.basedir}/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar - - - - - com.alibaba - druid-spring-boot-starter - 1.2.22 - - com.alibaba fastjson 2.0.53 - - com.dameng - DmJdbcDriver18 - 8.1.3.140 - + net.logstash.logback logstash-logback-encoder 4.9 + com.aspose aspose-words @@ -227,17 +213,17 @@ spring-boot-starter-actuator - - org.postgresql - postgresql - 42.7.4 - - + cn.com.jit authSDK 3.0.3 + + commons-httpclient + commons-httpclient + 3.0.1 + diff --git a/sql/20250212.sql b/sql/20250212.sql new file mode 100644 index 0000000..3075ef0 --- /dev/null +++ b/sql/20250212.sql @@ -0,0 +1,9 @@ +CREATE TABLE `rpc_apply_work` ( + `id` int NOT NULL AUTO_INCREMENT, + `rpc_id` varchar(40) + `handle_id_code` varchar(40) COMMENT '办理人身份证', + `handle_depart_id` varchar(40) COMMENT '办理单位', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `status` varchar(255) COMMENT '状态', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1; \ No newline at end of file diff --git a/sql/20250213.sql b/sql/20250213.sql new file mode 100644 index 0000000..2d96f3a --- /dev/null +++ b/sql/20250213.sql @@ -0,0 +1,37 @@ +CREATE TABLE `rpc_apply_work` ( + `id` int NOT NULL AUTO_INCREMENT, + `rpc_id` varchar(40) , + `handle_id_code` varchar(40) CHARACTER SET utf8mb4 COMMENT '办理人身份证', + `handle_depart_id` varchar(40) CHARACTER SET utf8mb4 COMMENT '办理单位', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `status` varchar(255) CHARACTER SET utf8mb4 COMMENT '状态', + `council` tinyint DEFAULT NULL, + `step` int DEFAULT NULL, + `update_time` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1; + +update rpc_apply set rpc_status = 'completed'; + + +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 ( 1, '受到暴力袭击的;', '1', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '受到暴力袭击的;'); +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 ( 2, '被车辆冲撞、碾压、拖拽、剐蹭的;', '2', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '被车辆冲撞、碾压、拖拽、剐蹭的;'); +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 ( 3, '被聚众哄闹、围堵拦截、冲击、阻碍的;', '3', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '被聚众哄闹、围堵拦截、冲击、阻碍的;'); +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 ( 4, '受到扣押、撕咬、拉扯、推搡等侵害的;', '4', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '受到扣押、撕咬、拉扯、推搡等侵害的;'); +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 ( 5, '本人及其亲近家属受到威胁、恐吓、侮辱、诽谤、骚扰的;', '5', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '本人及其亲近家属受到威胁、恐吓、侮辱、诽谤、骚扰的;'); +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 ( 6, '本人及其近亲属受到诬告陷害、打击报复的;', '6', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '本人及其近亲属受到诬告陷害、打击报复的;'); +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 ( 7, '被恶意投诉、炒作的;', '7', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '被恶意投诉、炒作的;'); +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 ( 8, '本人及其亲近家属个人隐私被侵犯的;', '8', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '本人及其亲近家属个人隐私被侵犯的;'); +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 ( 9, '被错误追究责任或者受到不公正处分、处理的;', '9', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '被错误追究责任或者受到不公正处分、处理的;'); +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 ( 10, '执法权威受到侵犯的其他情形;', '10', 'formsOfTort', '', '', '0', '0', '', NULL, '', NULL, '执法权威受到侵犯的其他情形;'); +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 ( 2, '轻微伤', '3000', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, '轻微伤'); +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 ( 3, '轻伤', '5000', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, '轻伤'); +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 ( 4, '重伤', '10000', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, '重伤'); +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 ( 5, '精神伤害', '0', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, ''); +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 ( 7, '一般性损伤', '2000', 'injurySeverity', '', '', '0', '0', '', NULL, '', NULL, '一般性损伤'); +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 ( 1, '110接处警', '1', 'incidentLink', '', '', '0', '0', '', NULL, '', NULL, '接处警'); +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 ( 2, '传唤抓捕', '2', 'incidentLink', '', '', '0', '0', '', NULL, '', NULL, '传呼抓捕'); +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 ( 3, '交通执法', '3', 'incidentLink', '', '', '0', '0', '', NULL, '', NULL, '交通管理执法'); +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 ( 4, '其他执法活动', '4', 'incidentLink', '', '', '0', '0', '', NULL, '', NULL, '维稳处突'); +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, '待审批', 'approval', 'comfortStatus', '', '', '0', '0', '', '2025-02-11 16:10:18', '', '2025-02-11 16:10:18', ''); +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, '已办结', 'completed', 'comfortStatus', '', '', '0', '0', '', '2025-02-11 16:10:41', '', '2025-02-11 16:10:41', ''); diff --git a/sql/250124.sql b/sql/250124.sql index 427e89c..eaeed7a 100644 --- a/sql/250124.sql +++ b/sql/250124.sql @@ -7,7 +7,6 @@ INSERT INTO `negative`.`sup_dict_data`(`dict_code`, `dict_sort`, `dict_label`, ` 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 +-- 11.32.30.103 wjccfwq.oss-cn-langfang-mps22s-d01-a.yun.ga diff --git a/src/main/java/com/biutag/supervision/constants/enums/ComfortStatus.java b/src/main/java/com/biutag/supervision/constants/enums/ComfortStatus.java new file mode 100644 index 0000000..2ecfa88 --- /dev/null +++ b/src/main/java/com/biutag/supervision/constants/enums/ComfortStatus.java @@ -0,0 +1,14 @@ +package com.biutag.supervision.constants.enums; + +/** + * @author wxc + * @date 2025/2/11 + */ +public enum ComfortStatus { + + approval, + // 已退回 + returned, + completed + +} diff --git a/src/main/java/com/biutag/supervision/constants/enums/RpcApplyTypeEnum.java b/src/main/java/com/biutag/supervision/constants/enums/RpcApplyTypeEnum.java new file mode 100644 index 0000000..91761c5 --- /dev/null +++ b/src/main/java/com/biutag/supervision/constants/enums/RpcApplyTypeEnum.java @@ -0,0 +1,25 @@ +package com.biutag.supervision.constants.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author wxc + * @date 2025/2/7 + */ +@AllArgsConstructor +public enum RpcApplyTypeEnum { + + // 维权 + RIGHTS_PROTECTION("1"), + + // 抚慰 + COMFORT("2"), + + // 容错 + FAULT_TOLERANT("3"); + + + @Getter + private String value; +} diff --git a/src/main/java/com/biutag/supervision/controller/LoginController.java b/src/main/java/com/biutag/supervision/controller/LoginController.java index e1ee729..6946827 100644 --- a/src/main/java/com/biutag/supervision/controller/LoginController.java +++ b/src/main/java/com/biutag/supervision/controller/LoginController.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.dto.AccountDto; + import com.biutag.supervision.pojo.entity.BaseAccount; import com.biutag.supervision.pojo.vo.TokenVo; import com.biutag.supervision.service.BaseAccountService; @@ -19,8 +20,8 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; +import java.util.List; import java.util.Map; -import java.util.Objects; @Tag(name = "登录接口") @Slf4j @@ -35,9 +36,13 @@ public class LoginController { @Operation(summary = "登录") @PostMapping("login") public Result login(@RequestBody AccountDto account) { - BaseAccount baseAccount = accountService.getByLogin(account.getAccount()); + List baseAccounts = accountService.getByLogin(account.getAccount()); + if (baseAccounts.isEmpty()) { + throw new RuntimeException("用户名或密码有误,请重新输入"); + } + BaseAccount baseAccount = baseAccounts.get(0); try { - if (Objects.isNull(baseAccount) || !BCrypt.checkpw(account.getPassword(), baseAccount.getPassword())) { + if (!BCrypt.checkpw(account.getPassword(), baseAccount.getPassword())) { throw new RuntimeException(); } } catch (RuntimeException e) { diff --git a/src/main/java/com/biutag/supervision/controller/api/plugin/CaseVerifController.java b/src/main/java/com/biutag/supervision/controller/api/plugin/CaseVerifController.java index 90c926f..c76be88 100644 --- a/src/main/java/com/biutag/supervision/controller/api/plugin/CaseVerifController.java +++ b/src/main/java/com/biutag/supervision/controller/api/plugin/CaseVerifController.java @@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.*; import java.io.InputStream; import java.time.LocalDateTime; import java.util.List; +import java.util.Objects; /** * @author wxc @@ -113,9 +114,12 @@ public class CaseVerifController { if (InspectCaseEnum.TRUE.getValue().equals(dataCaseVerifExt.getCheckStatus()) || InspectCaseEnum.PARTIALLY_TRUE.getValue().equals(dataCaseVerifExt.getCheckStatus())) { DataCaseVerif dataCaseVerif = dataCaseVerifService.getOne(new LambdaUpdateWrapper().eq(DataCaseVerif::getOuterId, body.getOuterId())); - Negative negative = new Negative(); - negative.setId(IdUtil.getSnowflakeNextIdStr()) // negative唯一标识 雪花 - .setProcessingStatus(ProcessingStatusEnum.processing.name()) + Negative negative = negativeService.getOne(new LambdaQueryWrapper().eq(Negative::getOriginId, dataCaseVerif.getOriginId())); + if (Objects.isNull(negative)) { + negative = new Negative(); + negative.setId(IdUtil.getSnowflakeNextIdStr()); + } + negative.setProcessingStatus(ProcessingStatusEnum.processing.name()) .setCrtTime(LocalDateTime.now()) .setUpdTime(LocalDateTime.now()) .setOriginId(dataCaseVerif.getOriginId()) @@ -131,8 +135,12 @@ public class CaseVerifController { .setBusinessTypeCode(BusinessTypeEnum.ZFBA.getValue()) .setBusinessTypeName(BusinessTypeEnum.ZFBA.getLabel()) // 主办层级 - .setHostLevel(HostLevelEnums.FIRST.getValue()); - negativeService.save(negative); + .setHostLevel(HostLevelEnums.FIRST.getValue()) + // 核查情况 + .setCheckStatus(dataCaseVerifExt.getCheckStatus()) + .setCheckStatusName(dataCaseVerifExt.getCheckStatusName()) + .setCheckStatusDesc(dataCaseVerifExt.getCheckStatusDesc()); + negativeService.saveOrUpdate(negative); } return Result.success(); } @@ -185,4 +193,32 @@ public class CaseVerifController { return Result.success(); } + @Operation(summary = "获取问题查实情况") + @GetMapping("trueSituation") + public Result trueSituation(String outerId) { + // 不需要填表则返回 true + // 1 填过表了 + // 2 不属实 + // 3 找不到案件 + DataCaseVerifExt dataCaseVerifExt = dataCaseVerifExtService.getOne(new LambdaUpdateWrapper().eq(DataCaseVerifExt::getOuterId, outerId)); + if (Objects.isNull(dataCaseVerifExt)) { + return Result.success(true); + } + if (InspectCaseEnum.FALSE.getValue().equals(dataCaseVerifExt.getCheckStatus())) { + return Result.success(true); + } + DataCaseVerif dataCaseVerif = dataCaseVerifService.getOne(new LambdaUpdateWrapper().eq(DataCaseVerif::getOuterId, outerId)); + if (Objects.isNull(dataCaseVerif)) { + return Result.success(true); + } + Negative negative = negativeService.getOne(new LambdaUpdateWrapper().eq(Negative::getOriginId, dataCaseVerif.getOriginId())); + if (Objects.isNull(negative)) { + return Result.success(true); + } + if (ProcessingStatusEnum.completed.name().equals(negative.getProcessingStatus())) { + return Result.success(true); + } + return Result.success(false); + } + } 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 8613cce..982e4cd 100644 --- a/src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java +++ b/src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java @@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; +import java.util.ArrayList; import java.util.List; /** @@ -57,8 +58,19 @@ public class VideoInspectionController { @GetMapping public Result> list(VideoInspectionQueryParam param) { QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.like(StrUtil.isNotBlank(param.getSystemKeyName()), "d.systemKeyName", param.getSystemKeyName()) - .like(StrUtil.isNotBlank(param.getSystemKeyName()), "d.title", param.getSystemKeyName()); + .like(StrUtil.isNotBlank(param.getSystemKeyName()), "d.title", param.getTitle()); + if (StrUtil.isNotBlank(param.getDepartId())) { + // 发生单位代码 + List externalDepartList = externalDepartService.list(new LambdaUpdateWrapper().eq(SupExternalDepart::getInternalId, param.getDepartId()).eq(SupExternalDepart::getSource, + "视频督察")); + if (externalDepartList.isEmpty()) { + return Result.success(new Page().setRecords(new ArrayList<>()).setTotal(0)); + } + queryWrapper.in("", externalDepartList.stream().map(SupExternalDepart::getExternalId).toList()); + } + return Result.success(dataAlarmDispositionInfoMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper)); } diff --git a/src/main/java/com/biutag/supervision/controller/rightsComfort/ComfortController.java b/src/main/java/com/biutag/supervision/controller/rightsComfort/ComfortController.java new file mode 100644 index 0000000..75f6f6c --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/rightsComfort/ComfortController.java @@ -0,0 +1,185 @@ +package com.biutag.supervision.controller.rightsComfort; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.IdUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.common.UserContextHolder; +import com.biutag.supervision.constants.enums.ComfortStatus; +import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; +import com.biutag.supervision.constants.enums.WorkStatusEnum; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.domain.RpcApplyDetail; +import com.biutag.supervision.pojo.dto.RpcApplyApproveDto; +import com.biutag.supervision.pojo.dto.RpcApplyDto; +import com.biutag.supervision.pojo.entity.RpcApply; +import com.biutag.supervision.pojo.entity.RpcApplyPerson; +import com.biutag.supervision.pojo.entity.RpcApplyWork; +import com.biutag.supervision.pojo.entity.RpcPerson; +import com.biutag.supervision.pojo.param.RpcApplyQueryParam; +import com.biutag.supervision.pojo.vo.RpcApplyVo; +import com.biutag.supervision.service.*; +import com.biutag.supervision.util.JSON; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; + +/** + * @author wxc + * @date 2025/1/20 + */ +@RequiredArgsConstructor +@RequestMapping("comfort") +@RestController +public class ComfortController { + + private final RpcApplyService rpcApplyService; + + private final RpcPersonService rpcPersonService; + + private final RpcApplyPersonService rpcApplyPersonService; + + private final RpcApplyWorkService rpcApplyWorkService; + + private final RpcApplyApproveService rpcApplyApproveService; + + @GetMapping + public Result> list(RpcApplyQueryParam queryParam) { + return Result.success(rpcApplyService.page(queryParam, RpcApplyTypeEnum.COMFORT.getValue())); + } + + // 待办 + @GetMapping("todo") + public Result> todos(RpcApplyQueryParam queryParam) { + return Result.success(rpcApplyWorkService.pageTodo(queryParam)); + } + + // 已办 + @GetMapping("done") + public Result> done(RpcApplyQueryParam queryParam) { + return Result.success(rpcApplyWorkService.pageDone(queryParam)); + } + + @GetMapping("{id}") + public Result get(@PathVariable String id) { + RpcApplyDetail rpcApplyDetail = new RpcApplyDetail(); + rpcApplyDetail.setApply(rpcApplyService.getById(id)); + rpcApplyDetail.setPerson(rpcPersonService.getOne(new LambdaUpdateWrapper().eq(RpcPerson::getRpcId, id))); + rpcApplyDetail.setApplyPerson(rpcApplyPersonService.getOne(new LambdaUpdateWrapper().eq(RpcApplyPerson::getRpcId, id))); + rpcApplyDetail.setApproves(rpcApplyApproveService.list(id)); + return Result.success(rpcApplyDetail); + } + + @Transactional(rollbackFor = Exception.class) + @PostMapping + public Result add(@RequestBody RpcApplyDto applyDto) { + RpcApply rpcApply = new RpcApply(); + BeanUtils.copyProperties(applyDto, rpcApply); + rpcApply.setRpcId(IdUtil.fastSimpleUUID()); + rpcApply.setCrtTime(LocalDateTime.now()); + rpcApply.setUptTime(LocalDateTime.now()); + // 警号 + rpcApply.setApplicantEmpNo(applyDto.getEmpNo()); + rpcApply.setType(RpcApplyTypeEnum.COMFORT.getValue()); + int year = DateUtil.year(applyDto.getApplyDate()); + rpcApply.setNumberIndex(rpcApplyService.getNewNumberIndex(year)); + rpcApply.setYear(year); + rpcApply.setNumber(String.format("长公抚申〔%s〕%s号", year, String.format("%03d", rpcApply.getNumberIndex()))); + if (CollectionUtil.isNotEmpty(applyDto.getDocumentFile())) { + rpcApply.setDocumentFile(JSON.toJSONString(applyDto.getDocumentFile())); + } + rpcApply.setRpcStatus(ComfortStatus.approval.name()); + rpcApply.setStep(2); + rpcApplyService.save(rpcApply); + // 已办 + RpcApplyWork done = new RpcApplyWork(); + done.setRpcId(rpcApply.getRpcId()); + done.setStatus(WorkStatusEnum.done.name()); + done.setHandleIdCode(UserContextHolder.getCurrentUser().getUserName()); + done.setCreateTime(LocalDateTime.now()); + done.setStep(2); + rpcApplyWorkService.save(done); + + // 待办 + RpcApplyWork todo = new RpcApplyWork(); + todo.setRpcId(rpcApply.getRpcId()); + todo.setStatus(WorkStatusEnum.todo.name()); + todo.setHandleDepartId(applyDto.getHandleDepartId()); + todo.setStep(2); + todo.setCreateTime(LocalDateTime.now()); + + rpcApplyWorkService.save(todo); + + RpcApplyPerson rpcApplyPerson = new RpcApplyPerson(); + BeanUtils.copyProperties(applyDto, rpcApplyPerson); + rpcApplyPerson.setRpcId(rpcApply.getRpcId()); + rpcApplyPerson.setCreatTime(LocalDateTime.now()); + rpcApplyPerson.setUdpTime(LocalDateTime.now()); + rpcApplyPerson.setType(RpcApplyTypeEnum.COMFORT.getValue()); + rpcApplyPersonService.save(rpcApplyPerson); + + RpcPerson rpcPerson = new RpcPerson(); + BeanUtils.copyProperties(applyDto, rpcPerson); + rpcPerson.setRpcId(rpcApply.getRpcId()); + rpcPersonService.save(rpcPerson); + return Result.success(); + } + + @DeleteMapping("{id}") + public Result del(@PathVariable String id) { + rpcApplyService.removeById(id); + rpcPersonService.remove(new LambdaQueryWrapper().eq(RpcPerson::getRpcId, id)); + rpcApplyPersonService.remove(new LambdaQueryWrapper().eq(RpcApplyPerson::getRpcId, id)); + rpcApplyWorkService.remove(new LambdaQueryWrapper().eq(RpcApplyWork::getRpcId, id)); + return Result.success(); + } + + @Transactional(rollbackFor = Exception.class) + @PostMapping("approve") + public Result approve(@RequestBody RpcApplyApproveDto rpcApplyApproveDto) { + RpcApply rpcApply = rpcApplyService.getById(rpcApplyApproveDto.getRpcId()); + rpcApplyWorkService.update(new LambdaUpdateWrapper().eq(RpcApplyWork::getRpcId, rpcApplyApproveDto.getRpcId()) + .eq(RpcApplyWork::getStep, rpcApply.getStep()) + .set(RpcApplyWork::getStatus, WorkStatusEnum.done.name()) + .set(RpcApplyWork::getUpdateTime, LocalDateTime.now())); + if (rpcApplyApproveDto.getReturnFlag()) { + // 退回 + rpcApplyWorkService.update(new LambdaUpdateWrapper().eq(RpcApplyWork::getRpcId, rpcApplyApproveDto.getRpcId()) + .eq(RpcApplyWork::getStep, 1) + .set(RpcApplyWork::getStatus, WorkStatusEnum.todo.name()) + .set(RpcApplyWork::getUpdateTime, LocalDateTime.now())); + rpcApplyService.update(new LambdaUpdateWrapper().eq(RpcApply::getRpcId, rpcApplyApproveDto.getRpcId()) + .set(RpcApply::getStep, 1) + .set(RpcApply::getRpcStatus, ComfortStatus.returned.name()) + .set(RpcApply::getUptTime, LocalDateTime.now())); + + } else { + if (rpcApply.getStep() == 2) { + rpcApplyWorkService.remove(new LambdaQueryWrapper().eq(RpcApplyWork::getRpcId, rpcApply.getRpcId()).eq(RpcApplyWork::getStep, 3)); + // 待办 + RpcApplyWork todo = new RpcApplyWork(); + todo.setRpcId(rpcApply.getRpcId()); + todo.setStatus(WorkStatusEnum.todo.name()); + todo.setStep(3); + todo.setCouncil(true); + todo.setCreateTime(LocalDateTime.now()); + rpcApplyWorkService.save(todo); + rpcApplyService.update(new LambdaUpdateWrapper().eq(RpcApply::getRpcId, rpcApplyApproveDto.getRpcId()) + .set(RpcApply::getStep, 3) + .set(RpcApply::getUptTime, LocalDateTime.now())); + } else { + // 办结 + rpcApplyService.update(new LambdaUpdateWrapper().eq(RpcApply::getRpcId, rpcApplyApproveDto.getRpcId()) + .set(RpcApply::getRpcStatus, ComfortStatus.completed.name()) + .set(RpcApply::getUptTime, LocalDateTime.now())); + } + } + return Result.success(); + } + +} diff --git a/src/main/java/com/biutag/supervision/controller/work/ComfortController.java b/src/main/java/com/biutag/supervision/controller/rightsComfort/RightsController.java similarity index 51% rename from src/main/java/com/biutag/supervision/controller/work/ComfortController.java rename to src/main/java/com/biutag/supervision/controller/rightsComfort/RightsController.java index 62f108c..62610fd 100644 --- a/src/main/java/com/biutag/supervision/controller/work/ComfortController.java +++ b/src/main/java/com/biutag/supervision/controller/rightsComfort/RightsController.java @@ -1,8 +1,10 @@ -package com.biutag.supervision.controller.work; +package com.biutag.supervision.controller.rightsComfort; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; import com.biutag.supervision.pojo.Result; -import com.biutag.supervision.pojo.entity.RpcApply; +import com.biutag.supervision.pojo.param.RpcApplyQueryParam; +import com.biutag.supervision.pojo.vo.RpcApplyVo; import com.biutag.supervision.service.RpcApplyService; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; @@ -11,18 +13,17 @@ import org.springframework.web.bind.annotation.RestController; /** * @author wxc - * @date 2025/1/20 + * @date 2025/2/13 */ @RequiredArgsConstructor -@RequestMapping("comfort") +@RequestMapping("rights") @RestController -public class ComfortController { +public class RightsController { private final RpcApplyService rpcApplyService; @GetMapping - public Result> list() { - return Result.success(rpcApplyService.page(Page.of(1, 10))); + public Result> list(RpcApplyQueryParam queryParam) { + return Result.success(rpcApplyService.page(queryParam, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue())); } - } diff --git a/src/main/java/com/biutag/supervision/controller/system/PoliceController.java b/src/main/java/com/biutag/supervision/controller/system/PoliceController.java index c93f33c..1dd59fc 100644 --- a/src/main/java/com/biutag/supervision/controller/system/PoliceController.java +++ b/src/main/java/com/biutag/supervision/controller/system/PoliceController.java @@ -53,6 +53,12 @@ public class PoliceController { return Result.success(policeService.page(param)); } + // 异常人员 + @GetMapping("abnormal") + public Result> abnormalList(PoliceQueryParam param) { + return Result.success(policeService.pageByAbnormal(param)); + } + @PostMapping public Result add(@RequestBody SupPolice police) { SupPolice policeByEmpNo = policeService.getOne(new LambdaQueryWrapper().eq(SupPolice::getEmpNo, police.getEmpNo())); @@ -83,8 +89,19 @@ public class PoliceController { SupDepart depart = departService.getById(one.getOrgId()); throw new RuntimeException(String.format("该人员[%s]已存在于“%s”单位中,请联系二级机构或市局管理员以进行人员调整。", police.getIdCode(), depart.getName())); } - police.setUpdatedAt(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT)); - return Result.success(policeService.updateById(police)); + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper() + .eq(SupPolice::getId, police.getId()) + .set(SupPolice::getName, police.getName()) + .set(SupPolice::getEmpNo, police.getEmpNo()) + .set(SupPolice::getIdCode, police.getIdCode()) + .set(SupPolice::getOrgId, police.getOrgId()) + .set(SupPolice::getPersonType, police.getPersonType()) + .set(SupPolice::getPosition, police.getPosition()) + .set(SupPolice::getPoliceRole, police.getPoliceRole()) + .set(SupPolice::getMobile, police.getMobile()) + .set(SupPolice::getEmploymentDate, police.getEmploymentDate()) + .set(SupPolice::getUpdatedAt, DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT)); + return Result.success(policeService.update(updateWrapper)); } @DeleteMapping("{id}") diff --git a/src/main/java/com/biutag/supervision/controller/system/RightPersonController.java b/src/main/java/com/biutag/supervision/controller/system/RightPersonController.java new file mode 100644 index 0000000..4d29128 --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/system/RightPersonController.java @@ -0,0 +1,63 @@ +package com.biutag.supervision.controller.system; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.RpcRightPerson; +import com.biutag.supervision.pojo.param.RpcRightPersonQueryParam; +import com.biutag.supervision.service.RpcRightPersonService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Objects; + +/** + * 维权专干 + * @author wxc + * @date 2025/2/8 + */ +@RequiredArgsConstructor +@RequestMapping("rightPerson") +@RestController +public class RightPersonController { + + private final RpcRightPersonService rpcRightPersonService; + + @GetMapping + public Result> list(RpcRightPersonQueryParam queryParam) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() + .eq(Objects.nonNull(queryParam.getDepartId()), RpcRightPerson::getDepartId, queryParam.getDepartId()) + .like(StrUtil.isNotBlank(queryParam.getEmpName()), RpcRightPerson::getEmpName, queryParam.getEmpName()) + .eq(StrUtil.isNotBlank(queryParam.getEmpNo()), RpcRightPerson::getEmpNo, queryParam.getEmpNo()) + .orderByDesc(RpcRightPerson::getId); + return Result.success(rpcRightPersonService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper)); + } + + @GetMapping("depart/{departId}") + public Result> list(@PathVariable String departId) { + return Result.success(rpcRightPersonService.list(new LambdaUpdateWrapper().eq(RpcRightPerson::getDepartId, departId))); + } + + @PostMapping + public Result add(@RequestBody RpcRightPerson rpcRightPerson) { + rpcRightPersonService.save(rpcRightPerson); + return Result.success(); + } + + @PutMapping + public Result update(@RequestBody RpcRightPerson rpcRightPerson) { + rpcRightPersonService.save(rpcRightPerson); + return Result.success(); + } + + + @DeleteMapping("{id}") + public Result del(@PathVariable Integer id) { + rpcRightPersonService.removeById(id); + return Result.success(); + } + +} diff --git a/src/main/java/com/biutag/supervision/job/Job.java b/src/main/java/com/biutag/supervision/job/Job.java index 2462aac..6bd31b6 100644 --- a/src/main/java/com/biutag/supervision/job/Job.java +++ b/src/main/java/com/biutag/supervision/job/Job.java @@ -134,7 +134,7 @@ public class Job { /** * 凌晨1点执行 */ - @Scheduled(cron = "0 0 1 * * ?") +// @Scheduled(cron = "0 0 1 * * ?") public void mailbox() { List mailList = mailMapper.selectList(new LambdaUpdateWrapper().eq(Mail::getMailState, "completion") .in(Mail::getVerifyIsTrue, List.of("属实", "基本属实"))); @@ -240,4 +240,18 @@ public class Job { } } + // 每小时一次 + @Scheduled(cron = "0 0 * * * ?") + public void updateRemainingTime() { + log.info("updateRemainingTime-----------------"); + List negatives = negativeService.list(new LambdaQueryWrapper() + .isNotNull(Negative::getFirstDistributeTime) + .ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name())); + negatives.forEach(item -> { + negativeService.update(new LambdaUpdateWrapper().eq(Negative::getId, item.getId()) + .set(Negative::getHandleRemainingTime, + TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey()))); + }); + } + } diff --git a/src/main/java/com/biutag/supervision/mapper/BaseAccountMapper.java b/src/main/java/com/biutag/supervision/mapper/BaseAccountMapper.java index ffa23d0..8867672 100644 --- a/src/main/java/com/biutag/supervision/mapper/BaseAccountMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/BaseAccountMapper.java @@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.biutag.supervision.pojo.entity.BaseAccount; import org.apache.ibatis.annotations.Select; +import java.util.List; + @DS("slave") public interface BaseAccountMapper extends BaseMapper { @Select("select a.* from base_account a left join negative.sup_police p on a.account = p.id_code and p.del = 0 where a.account = #{account} or p.emp_no = #{account}") - BaseAccount selectByLogin(String account); + List selectByLogin(String account); } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplyApproveMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplyApproveMapper.java new file mode 100644 index 0000000..2b57a77 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplyApproveMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.RpcApplyApprove; + +public interface RpcApplyApproveMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java index 66d6945..6f7d261 100644 --- a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java @@ -1,11 +1,17 @@ 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.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; +import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.Date; @@ -170,5 +176,10 @@ public interface RpcApplyMapper extends BaseMapper { "GROUP BY sd.short_name " + "HAVING `name` is NOT NULL ") List getSubOneIncidentOrg(Date beginTime, Date endTime, Integer departId); + + Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + + @Select("select max(number_index) from rpc_apply where year = #{year}") + Integer selectMaxNuberIndex(Integer year); } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplyWorkMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplyWorkMapper.java new file mode 100644 index 0000000..0976b14 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplyWorkMapper.java @@ -0,0 +1,16 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.biutag.supervision.pojo.entity.RpcApply; +import com.biutag.supervision.pojo.entity.RpcApplyWork; +import com.biutag.supervision.pojo.vo.RpcApplyVo; +import org.apache.ibatis.annotations.Param; + +public interface RpcApplyWorkMapper 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/RpcPersonMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcPersonMapper.java new file mode 100644 index 0000000..98b8934 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/RpcPersonMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.RpcPerson; + +public interface RpcPersonMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/RpcRightPersonMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcRightPersonMapper.java new file mode 100644 index 0000000..4f14e90 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/RpcRightPersonMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.RpcRightPerson; + +public interface RpcRightPersonMapper 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 0e28172..a1f3fb9 100644 --- a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java +++ b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java @@ -193,6 +193,9 @@ public class NegativeVo { // 市局下发意见 private String firstDistributeComments; + // 当前处理对象 + private String currentProcessingObject; + // 涉及人员 private List blames = new ArrayList<>(); diff --git a/src/main/java/com/biutag/supervision/pojo/domain/RpcApplyDetail.java b/src/main/java/com/biutag/supervision/pojo/domain/RpcApplyDetail.java new file mode 100644 index 0000000..ba09f09 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/domain/RpcApplyDetail.java @@ -0,0 +1,28 @@ +package com.biutag.supervision.pojo.domain; + +import com.biutag.supervision.pojo.entity.RpcApply; +import com.biutag.supervision.pojo.entity.RpcApplyApprove; +import com.biutag.supervision.pojo.entity.RpcApplyPerson; +import com.biutag.supervision.pojo.entity.RpcPerson; +import lombok.Getter; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author wxc + * @date 2025/2/12 + */ +@Setter +@Getter +public class RpcApplyDetail { + + private RpcApply apply; + + private RpcPerson person; + + private RpcApplyPerson applyPerson; + + private List approves = new ArrayList<>(); +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/RpcApplyApproveDto.java b/src/main/java/com/biutag/supervision/pojo/dto/RpcApplyApproveDto.java new file mode 100644 index 0000000..c832e8d --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/RpcApplyApproveDto.java @@ -0,0 +1,20 @@ +package com.biutag.supervision.pojo.dto; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/2/13 + */ +@Setter +@Getter +public class RpcApplyApproveDto { + + private String rpcId; + + private String comments; + + private Boolean returnFlag = false; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/RpcApplyDto.java b/src/main/java/com/biutag/supervision/pojo/dto/RpcApplyDto.java new file mode 100644 index 0000000..ad55626 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/RpcApplyDto.java @@ -0,0 +1,116 @@ +package com.biutag.supervision.pojo.dto; + +import com.biutag.supervision.pojo.vo.FileVo; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.Date; +import java.util.List; + +/** + * @author wxc + * @date 2025/2/7 + */ +@Setter +@Getter +public class RpcApplyDto { + + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date applyDate; + + // 主办单位 + private String handleDepartId; + + private String handleDepartName; + + // 是否为本人申请 + private String isSelf; + + // 关系 + private String relation; + + + // 申请人姓名 + private String applicantEmpName; + + // 性别 0代表男 1代表女 + private Integer sex; + + private String birthday; + + // 文化程度 + private String levelEducation; + + // 政治面貌 + private String politicCountenance; + + // 身份证号 + private String idCode; + + // 联系方式 + private String mobile; + + // 申请人所在单位 + private String departId; + + // 申请人所在单位 + private String departName; + + // 警号 + private String empNo; + + // 职位 + private String job; + + // 警种 + private String policeTypes; + + // 警衔 + private String policeRank; + + // 开户行 + private String bankCard; + + // 支行信息 + private String bankBranch; + + // 银行卡 + private String bankCardAccount; + + // 事发时间 + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm") + private LocalDateTime happenTime; + + // 事实及理由 + private String factReason; + + // 案发环节 + private String incidentLink; + + private String incidentLinkName; + + // 受伤程度 + private String injurySeverity; + private String injurySeverityName; + + // 侵权形式 + private String formsOfTort; + private String formsOfTortName; + + // 侵权人姓名 + private String infringerName; + + // 侵权人处理方式 + private String infringerHandle; + + + private List documentFile; + + private String status; + + private String approver; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerifExt.java b/src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerifExt.java index cd4afe3..ec4c3e1 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerifExt.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerifExt.java @@ -33,6 +33,7 @@ public class DataCaseVerifExt { private String blameIdCode; + // 处置情况说明 private String disposalSituationDescription; private LocalDateTime createTime; 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 6094984..2b57019 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java @@ -303,4 +303,7 @@ public class Negative { // 经办人 private String handlePolices; + // 剩余办理时间 + private Long handleRemainingTime; + } \ No newline at end of file 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 1c2f4cc..0f8744e 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java @@ -7,6 +7,7 @@ import lombok.Getter; import lombok.Setter; import java.time.LocalDateTime; +import java.util.Date; @Setter @Getter @@ -20,7 +21,7 @@ public class RpcApply { // 申请时间 @TableField("apply_date") @JsonFormat(pattern="yyyy-MM-dd HH:mm") - private LocalDateTime applyDate; + private Date applyDate; // 发生时间 @JsonFormat(pattern="yyyy-MM-dd HH:mm") @@ -37,6 +38,8 @@ public class RpcApply { private String applicantEmpName; + private String applicantEmpNo; + // 类型,1维权,2,抚慰,3容错 @TableField("type") private String type; @@ -45,4 +48,48 @@ public class RpcApply { @TableField("rpc_status") private String rpcStatus; + // 事实及理由 + private String factReason; + + // 案发环节 + private String incidentLink; + + private String incidentLinkName; + + // 侵权形式 + private String formsOfTort; + + private String formsOfTortName; + + // 侵权人姓名 + private String infringerName; + + // 侵权人处理方式 + private String infringerHandle; + + private String isSelf; + + private String relation; + + // 主办单位 + private String handleDepartId; + + private String handleDepartName; + + + private LocalDateTime crtTime; + + private LocalDateTime uptTime; + + private Integer year; + + private Integer numberIndex; + + + private String documentFile; + + private String approver; + + private Integer step; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyApprove.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyApprove.java new file mode 100644 index 0000000..0841454 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyApprove.java @@ -0,0 +1,43 @@ +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 RpcApplyApprove { + + // + @TableId(value = "id") + private Integer id; + + // + @TableField("rpc_id") + private String rpcId; + + // 审批意见 + @TableField("comments") + private String comments; + + // 是否退回 + @TableField("return_flag") + private Boolean returnFlag; + + // + @TableField("create_time") + private LocalDateTime createTime; + + // 操作人 + @TableField("handle_name") + private String handleName; + + // + @TableField("step") + private Integer step; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java index 6068748..7968a3b 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java @@ -1,6 +1,5 @@ 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; @@ -28,4 +27,15 @@ public class RpcApplyPerson { @TableField("provide_relief") private String provideRelief; + // 受伤程度 + private String injurySeverity; + private String injurySeverityName; + + // 类型,1维权,2,抚慰,3容错 + private String type; + + private LocalDateTime creatTime; + + private LocalDateTime udpTime; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyWork.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyWork.java new file mode 100644 index 0000000..affb52a --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcApplyWork.java @@ -0,0 +1,45 @@ +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 RpcApplyWork { + + // + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + // + @TableField("rpc_id") + private String rpcId; + + // + @TableField("handle_id_code") + private String handleIdCode; + + // + @TableField("handle_depart_id") + private String handleDepartId; + + // + @TableField("create_time") + private LocalDateTime createTime; + + private LocalDateTime updateTime; + + // 市局维权专干 true=是,false=不是 + private Boolean council = false; + + private String status; + + private Integer step; + + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcPerson.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcPerson.java new file mode 100644 index 0000000..467790f --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcPerson.java @@ -0,0 +1,85 @@ +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 RpcPerson { + + // + @TableId(value = "id") + private String id; + + private String rpcId; + + // 警号 + @TableField("emp_no") + private String empNo; + + // 姓名 + @TableField("name") + private String name; + + // 性别 0代表男 1代表女 + @TableField("sex") + private Integer sex; + + // + @TableField("birthday") + private String birthday; + + // 文化程度 + @TableField("level_education") + private String levelEducation; + + // 政治面貌 + @TableField("politic_countenance") + private String politicCountenance; + + // 身份证号 + @TableField("id_code") + private String idCode; + + // 联系方式 + @TableField("mobile") + private String mobile; + + // 部门id + @TableField("depart_id") + private String departId; + + // 部门名称 + @TableField("depart_name") + private String departName; + + // 职位 + @TableField("job") + private String job; + + // 警种 + @TableField("police_types") + private String policeTypes; + + // 警衔 + @TableField("police_rank") + private String policeRank; + + // 开户行 + @TableField("bank_card") + private String bankCard; + + // 支行信息 + @TableField("bank_branch") + private String bankBranch; + + // 银行卡 + @TableField("bank_card_account") + private String bankCardAccount; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/RpcRightPerson.java b/src/main/java/com/biutag/supervision/pojo/entity/RpcRightPerson.java new file mode 100644 index 0000000..a5f6272 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/RpcRightPerson.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; + +@Setter +@Getter +public class RpcRightPerson { + + @TableId(type = IdType.AUTO) + private Integer id; + + // 维权专干所属二级部门或市局id + private String departId; + + private String departName; + + // 维权专干警号 + @TableField("emp_no") + private String empNo; + + private String idCode; + + // 维权专干名字 + @TableField("emp_name") + private String empName; + + // 市局维权专干 1=是,0=不是 + @TableField("council") + private String council; + + // 民警呼声处理人 1=是,0=不是 + @TableField("is_voice_emp") + private String isVoiceEmp; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java b/src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java index 793a6dc..c19e5e0 100644 --- a/src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java +++ b/src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java @@ -108,5 +108,7 @@ public class PoliceModel { private String role; + // 刪除原因 + private String delReason; } diff --git a/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java index 26f28c7..ba7513e 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java @@ -46,9 +46,12 @@ public class NegativeQueryParam extends BasePage { private String isRectifyCode; - // 是否超时 + // 办结是否超时 private Boolean timeoutFlag; + // 办理中是否超时 + private Boolean handleTimeoutFlag; + private String involveDepartId; private String handleDepartId; diff --git a/src/main/java/com/biutag/supervision/pojo/param/RpcApplyQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/RpcApplyQueryParam.java new file mode 100644 index 0000000..1069ac3 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/RpcApplyQueryParam.java @@ -0,0 +1,27 @@ +package com.biutag.supervision.pojo.param; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; +import java.util.List; + +/** + * @author wxc + * @date 2025/2/6 + */ +@Setter +@Getter +public class RpcApplyQueryParam extends BasePage { + + @DateTimeFormat(pattern = "yyyy-MM-dd") + private List applyDate; + + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private List happenTime; + + private String applicantEmpName; + + private String departId; +} diff --git a/src/main/java/com/biutag/supervision/pojo/param/RpcRightPersonQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/RpcRightPersonQueryParam.java new file mode 100644 index 0000000..8a29438 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/RpcRightPersonQueryParam.java @@ -0,0 +1,20 @@ +package com.biutag.supervision.pojo.param; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2025/2/11 + */ +@Setter +@Getter +public class RpcRightPersonQueryParam extends BasePage { + + private String departId; + + private String empName; + + private String empNo; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/param/VideoInspectionQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/VideoInspectionQueryParam.java index a47873e..37c9c8d 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/VideoInspectionQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/VideoInspectionQueryParam.java @@ -16,4 +16,7 @@ public class VideoInspectionQueryParam extends BasePage { // 案事件名称 private String title; + + private String departId; + } 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 0371e6c..24b603b 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java @@ -2,6 +2,7 @@ package com.biutag.supervision.pojo.vo; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Getter; import lombok.Setter; @@ -24,6 +25,7 @@ public class DataPetitionComplaintVo { private String acceptanceLevel; // 登记时间 + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm") private LocalDateTime discoveryTime; // 投诉人 diff --git a/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeBlameVo.java b/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeBlameVo.java new file mode 100644 index 0000000..231431a --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeBlameVo.java @@ -0,0 +1,66 @@ +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; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class ExportNegativeBlameVo { + + @ExcelProperty({"问题编号"}) + private String id; + + // 简要描述 + @ExcelProperty({"简要描述"}) + private String thingDesc; + + // 办理单位 二级 + @ExcelProperty({"办理单位(二级)"}) + private String handleSecondDepartName; + + // 办理单位 三级 + @ExcelProperty({"办理单位(三级)"}) + private String handleThreeDepartName; + + // 核查情况 + @ExcelProperty({"核查情况(是否属实)"}) + private String checkStatusName; + + // 是否整改 + @ExcelProperty({"是否整改"}) + private String isRectifyName; + + // 问题整改情况 + @ExcelProperty({"整改情况"}) + private String rectifyDesc; + + // 追责对象 + @ExcelProperty({"追责对象"}) + private String accountabilityTarget; + + @ExcelProperty({"涉及人员姓名"}) + private String blameName; + + // 涉及警号 + @ExcelProperty({"警号"}) + private String blameEmpNo; + + // 涉及身份证 + @ExcelProperty({"身份证"}) + private String blameIdCode; + + @ExcelProperty({"人员属性"}) + private String ivPersonType; + + @ExcelProperty({"责任追责"}) + private String handleResultName; + + // 问题类型 + @ExcelProperty({"问题类型"}) + private String problemType; +} \ No newline at end of file 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 21ac70b..cf8aa4f 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java @@ -17,6 +17,10 @@ public class ExportNegativeVo { @ExcelProperty({"问题基本信息","样本源头编号"}) private String originId; + // 通报期数 + @ExcelProperty({"问题基本信息","通报期数"}) + private String reportNumber; + @ExcelProperty({"问题基本信息","涉及案件/警情编号"}) private String caseNumber; diff --git a/src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java b/src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java new file mode 100644 index 0000000..a83fee3 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.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/2/6 + */ +@Setter +@Getter +public class RpcApplyVo { + + private String rpcId; + + private String number; + + // 申请时间 + @JsonFormat(pattern="yyyy-MM-dd") + private LocalDateTime applyDate; + + // 发生时间 + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private LocalDateTime happenTime; + + // 部门id + private String departId; + + // 部门 + private String departName; + + + private String applicantEmpName; + + // 开户行 + private String bankCard; + + // 支行信息 + private String bankBranch; + + private String rpcStatus; + + private String approver; + +} diff --git a/src/main/java/com/biutag/supervision/service/BaseAccountService.java b/src/main/java/com/biutag/supervision/service/BaseAccountService.java index 39030f2..4c3a538 100644 --- a/src/main/java/com/biutag/supervision/service/BaseAccountService.java +++ b/src/main/java/com/biutag/supervision/service/BaseAccountService.java @@ -6,6 +6,8 @@ import com.biutag.supervision.pojo.entity.BaseAccount; import com.biutag.supervision.mapper.BaseAccountMapper; import org.springframework.stereotype.Service; +import java.util.List; + @Service public class BaseAccountService extends ServiceImpl { @@ -13,7 +15,7 @@ public class BaseAccountService extends ServiceImpl().eq(BaseAccount::getAccount, account)); } - public BaseAccount getByLogin(String account) { + public List getByLogin(String account) { return baseMapper.selectByLogin(account); } diff --git a/src/main/java/com/biutag/supervision/service/BaseUserService.java b/src/main/java/com/biutag/supervision/service/BaseUserService.java index 79e0e56..1cdfc48 100644 --- a/src/main/java/com/biutag/supervision/service/BaseUserService.java +++ b/src/main/java/com/biutag/supervision/service/BaseUserService.java @@ -50,6 +50,7 @@ public class BaseUserService extends ServiceImpl { } queryWrapper.in(BaseUser::getUserId, userIds); } + queryWrapper.orderByDesc(BaseUser::getUpdateTime); Page baseUserPage = page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); if (baseUserPage.getRecords().isEmpty()) { return new Page().setRecords(new ArrayList<>()).setTotal(0); diff --git a/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java b/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java index b3133a6..cf32e8c 100644 --- a/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java +++ b/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java @@ -2,10 +2,9 @@ package com.biutag.supervision.service; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson2.JSON; import com.biutag.supervision.mapper.CountyStreetDeptMapper; import com.biutag.supervision.pojo.entity.CountyStreetDept; -import com.biutag.supervision.pojo.vo.RankVo; -import com.google.gson.Gson; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -45,7 +44,7 @@ public class CountyStreetDeptService { properties.put("name", dept.getName()); properties.put("id", dept.getId()); feature.put("properties", properties); // 第二个键值 - feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值 + feature.put("geometry", JSON.parseObject(dept.getGeometry())); // 第三个键值 features.add(feature); } geoJson.put("features", features); diff --git a/src/main/java/com/biutag/supervision/service/NegativeBookService.java b/src/main/java/com/biutag/supervision/service/NegativeBookService.java index 9b24891..a34a66a 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeBookService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeBookService.java @@ -37,7 +37,8 @@ public class NegativeBookService { .in(!param.getProcessingStatus().isEmpty(), "n.Processing_Status", param.getProcessingStatus()) .like(StrUtil.isNotBlank(param.getThingDesc()), "pc.Thing_Desc", param.getThingDesc()) .like(StrUtil.isNotBlank(param.getCheckStatusDesc()), "n.checkStatusDesc", param.getCheckStatusDesc()) - .like(StrUtil.isNotBlank(param.getInitialPetition()), "pc.Initial_Petition", param.getInitialPetition()); + .like(StrUtil.isNotBlank(param.getInitialPetition()), "pc.Initial_Petition", param.getInitialPetition()) + .orderByDesc("pc.discovery_time"); // 涉及单位 if (StrUtil.isNotBlank(param.getInvolveDepartId())) { List departIds = departService.getAllNodeIds(param.getInvolveDepartId()); diff --git a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java index 51a1b81..9df60b8 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java @@ -112,6 +112,13 @@ public class NegativeQueryService { }); } } + if (Objects.nonNull(param.getHandleTimeoutFlag())) { + if (param.getHandleTimeoutFlag()) { + queryWrapper.ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).lt(Negative::getHandleRemainingTime, 0); + } else { + queryWrapper.ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).ge(Negative::getHandleRemainingTime, 0); + } + } // 涉及单位 if (StrUtil.isNotBlank(param.getInvolveDepartId())) { List departIds = departService.getAllNodeIds(param.getInvolveDepartId()); diff --git a/src/main/java/com/biutag/supervision/service/NegativeService.java b/src/main/java/com/biutag/supervision/service/NegativeService.java index 2914892..a49e443 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeService.java @@ -305,9 +305,11 @@ public class NegativeService extends ServiceImpl { // 涉及单位 if (DepartLevelEnum.SECOND.getValue().equals(dept.getLevel())) { negative.setSecondInvolveDepartId(dept.getId()); + roleCode = RoleCodeEnum.SECOND_ADMIN.getCode(); } else if (DepartLevelEnum.THREE.getValue().equals(dept.getLevel())) { negative.setThreeInvolveDepartId(dept.getId()); negative.setSecondInvolveDepartId(dept.getPid()); + } } else { log.error("未匹配上单位:{}, code: {}", item.getDepartName(), item.getDepartCode()); diff --git a/src/main/java/com/biutag/supervision/service/NegativeTaskService.java b/src/main/java/com/biutag/supervision/service/NegativeTaskService.java index 73dcad3..3dd2293 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeTaskService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeTaskService.java @@ -5,6 +5,8 @@ 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.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -19,6 +21,7 @@ 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; +import com.biutag.supervision.pojo.vo.ExportNegativeBlameVo; import com.biutag.supervision.pojo.vo.ExportNegativeVo; import com.biutag.supervision.pojo.vo.NegativeQueryVo; import lombok.RequiredArgsConstructor; @@ -34,6 +37,7 @@ import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; @RequiredArgsConstructor @@ -93,6 +97,7 @@ public class NegativeTaskService extends ServiceImpl data, String negativeTaskId) { List suspectProblem = dictDataService.listByDictType("suspectProblem"); List list = new ArrayList<>(); + List blameVoList = 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())); @@ -128,17 +133,39 @@ public class NegativeTaskService extends ServiceImpl blameList = blames.stream().filter(blame -> blame.getNegativeId().equals(item.getId())).toList(); String blameStr = blameList.stream() + .filter(blame -> blame.getBlameName() != null) .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("、"))); + vo.setHandleResultName(blameList.stream().map(NegativeBlame::getHandleResultName).filter(Objects::nonNull).collect(Collectors.joining("、"))); + for (NegativeBlame negativeBlame : blameList.stream().filter(blame -> StrUtil.isNotBlank(blame.getBlameName())).toList()) { + ExportNegativeBlameVo blameVo = new ExportNegativeBlameVo(); + BeanUtils.copyProperties(vo, blameVo); + BeanUtils.copyProperties(negativeBlame, blameVo); + // 问题类型 + String problemType = negativeProblemRelations.stream().filter(problem -> negativeBlame.getBlameId().equals(problem.getBlameId()) && item.getId().equals(problem.getNegativeId())).map(problem -> { + if ("其他".equals(problem.getThreeLevelContent())) { + return String.format("%s / %s / %s(%s)", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContentOther()); + } + return String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getTwoLevelContent()); + }).collect(Collectors.joining("、")); + blameVo.setProblemType(problemType); + blameVoList.add(blameVo); + } return vo; }).toList(); } ByteArrayOutputStream os = new ByteArrayOutputStream(); - EasyExcel.write(os, ExportNegativeVo.class).inMemory(Boolean.TRUE).sheet("问题台账").doWrite(list); + ExcelWriter excelWriter = EasyExcel.write(os).build(); + WriteSheet sheet1 = EasyExcel.writerSheet(0, "问题台账") + .head(ExportNegativeVo.class).build(); + WriteSheet sheet2 = EasyExcel.writerSheet(1, "问题涉及人员台账") + .head(ExportNegativeBlameVo.class).build(); + excelWriter.write(list, sheet1); + excelWriter.write(blameVoList, sheet2); + excelWriter.finish(); String filePath = fileService.upload(new ByteArrayInputStream(os.toByteArray()), os.size(), ".xlsx"); update(new LambdaUpdateWrapper().eq(NegativeTask::getId, negativeTaskId) .set(NegativeTask::getStatus, NegativeTaskStatusEnum.SUCCESS.getValue()) diff --git a/src/main/java/com/biutag/supervision/service/RpcApplyApproveService.java b/src/main/java/com/biutag/supervision/service/RpcApplyApproveService.java new file mode 100644 index 0000000..043d19a --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/RpcApplyApproveService.java @@ -0,0 +1,24 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.RpcApplyApprove; +import com.biutag.supervision.mapper.RpcApplyApproveMapper; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class RpcApplyApproveService extends ServiceImpl { + + + public List list(String rpcId) { + List list = list(new LambdaQueryWrapper().eq(RpcApplyApprove::getRpcId, rpcId).orderByDesc(RpcApplyApprove::getCreateTime)); + List result = new ArrayList<>(); + list.stream().filter(item -> 2 == item.getStep()).findFirst().ifPresent(result::add); + list.stream().filter(item -> 3 == item.getStep()).findFirst().ifPresent(result::add); + return result; + } +} diff --git a/src/main/java/com/biutag/supervision/service/RpcApplyService.java b/src/main/java/com/biutag/supervision/service/RpcApplyService.java index 9507279..5f88f66 100644 --- a/src/main/java/com/biutag/supervision/service/RpcApplyService.java +++ b/src/main/java/com/biutag/supervision/service/RpcApplyService.java @@ -1,8 +1,15 @@ package com.biutag.supervision.service; +import cn.hutool.core.util.NumberUtil; +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.pojo.entity.RpcApply; +import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; import com.biutag.supervision.mapper.RpcApplyMapper; +import com.biutag.supervision.pojo.entity.RpcApply; +import com.biutag.supervision.pojo.param.RpcApplyQueryParam; +import com.biutag.supervision.pojo.vo.RpcApplyVo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -10,4 +17,23 @@ import org.springframework.stereotype.Service; @Service public class RpcApplyService extends ServiceImpl { + public Page page(RpcApplyQueryParam queryParam, String type) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName()) + .eq(StrUtil.isNotBlank(queryParam.getDepartId()), "a.depart_id", queryParam.getDepartId()) + .eq("a.type", type) + .orderByDesc("a.crt_time"); + if (queryParam.getApplyDate() != null && queryParam.getApplyDate().size() == 2) { + queryWrapper.between("a.apply_date", queryParam.getApplyDate().get(0), queryParam.getApplyDate().get(1)); + } + if (queryParam.getHappenTime() != null && queryParam.getHappenTime().size() == 2) { + queryWrapper.between("a.happen_time", queryParam.getHappenTime().get(0), queryParam.getHappenTime().get(1)); + } + return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + } + + public Integer getNewNumberIndex(Integer year) { + return NumberUtil.nullToZero(baseMapper.selectMaxNuberIndex(year)) + 1; + } + } diff --git a/src/main/java/com/biutag/supervision/service/RpcApplyWorkService.java b/src/main/java/com/biutag/supervision/service/RpcApplyWorkService.java new file mode 100644 index 0000000..f67acd9 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/RpcApplyWorkService.java @@ -0,0 +1,80 @@ +package com.biutag.supervision.service; + +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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.common.UserContextHolder; +import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; +import com.biutag.supervision.constants.enums.WorkStatusEnum; +import com.biutag.supervision.pojo.entity.RpcApply; +import com.biutag.supervision.pojo.entity.RpcApplyWork; +import com.biutag.supervision.mapper.RpcApplyWorkMapper; +import com.biutag.supervision.pojo.entity.RpcRightPerson; +import com.biutag.supervision.pojo.model.UserAuth; +import com.biutag.supervision.pojo.param.RpcApplyQueryParam; +import com.biutag.supervision.pojo.vo.RpcApplyVo; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@RequiredArgsConstructor +@Service +public class RpcApplyWorkService extends ServiceImpl { + + private final RpcRightPersonService rpcRightPersonService; + + public Page pageTodo(RpcApplyQueryParam queryParam) { + UserAuth user = UserContextHolder.getCurrentUser(); + List rightPeoples = rpcRightPersonService.list(new LambdaUpdateWrapper().eq(RpcRightPerson::getIdCode, user.getUserName())); + if (rightPeoples.isEmpty()) { + return new Page().setTotal(0).setRecords(new ArrayList<>()); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + + if (rightPeoples.stream().anyMatch(item -> "1".equals(item.getCouncil()))) { + queryWrapper + .eq("w.council", true); + } else { + queryWrapper + .in("w.handle_depart_id", rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet())); + } + queryWrapper + .eq("w.status", WorkStatusEnum.todo.name()) + .like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName()) + .eq(StrUtil.isNotBlank(queryParam.getDepartId()), "a.depart_id", queryParam.getDepartId()) + .eq("a.type", RpcApplyTypeEnum.COMFORT.getValue()) + .orderByDesc("a.crt_time"); + if (queryParam.getApplyDate() != null && queryParam.getApplyDate().size() == 2) { + queryWrapper.between("a.apply_date", queryParam.getApplyDate().get(0), queryParam.getApplyDate().get(1)); + } + if (queryParam.getHappenTime() != null && queryParam.getHappenTime().size() == 2) { + queryWrapper.between("a.happen_time", queryParam.getHappenTime().get(0), queryParam.getHappenTime().get(1)); + } + return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + } + + public Page pageDone(RpcApplyQueryParam queryParam) { + UserAuth user = UserContextHolder.getCurrentUser(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper + .eq("w.handle_id_code", user.getUserName()) + .eq("w.status", WorkStatusEnum.done.name()) + .like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName()) + .eq(StrUtil.isNotBlank(queryParam.getDepartId()), "a.depart_id", queryParam.getDepartId()) + .eq("a.type", RpcApplyTypeEnum.COMFORT.getValue()) + .orderByDesc("a.crt_time"); + if (queryParam.getApplyDate() != null && queryParam.getApplyDate().size() == 2) { + queryWrapper.between("a.apply_date", queryParam.getApplyDate().get(0), queryParam.getApplyDate().get(1)); + } + if (queryParam.getHappenTime() != null && queryParam.getHappenTime().size() == 2) { + queryWrapper.between("a.happen_time", queryParam.getHappenTime().get(0), queryParam.getHappenTime().get(1)); + } + return baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper); + } + +} diff --git a/src/main/java/com/biutag/supervision/service/RpcPersonService.java b/src/main/java/com/biutag/supervision/service/RpcPersonService.java new file mode 100644 index 0000000..53c5fea --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/RpcPersonService.java @@ -0,0 +1,11 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.RpcPerson; +import com.biutag.supervision.mapper.RpcPersonMapper; +import org.springframework.stereotype.Service; + +@Service +public class RpcPersonService extends ServiceImpl { + +} diff --git a/src/main/java/com/biutag/supervision/service/RpcRightPersonService.java b/src/main/java/com/biutag/supervision/service/RpcRightPersonService.java new file mode 100644 index 0000000..a7a436d --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/RpcRightPersonService.java @@ -0,0 +1,11 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.RpcRightPerson; +import com.biutag.supervision.mapper.RpcRightPersonMapper; +import org.springframework.stereotype.Service; + +@Service +public class RpcRightPersonService extends ServiceImpl { + +} diff --git a/src/main/java/com/biutag/supervision/service/SupPoliceService.java b/src/main/java/com/biutag/supervision/service/SupPoliceService.java index 8e995e7..130d44d 100644 --- a/src/main/java/com/biutag/supervision/service/SupPoliceService.java +++ b/src/main/java/com/biutag/supervision/service/SupPoliceService.java @@ -71,6 +71,51 @@ public class SupPoliceService extends ServiceImpl { return baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper); } + public Page pageByAbnormal(PoliceQueryParam param) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + 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())) { + return new Page().setTotal(0).setRecords(new ArrayList<>()); + } + List orgIds = departService.getAllNodeIds(user.getAuthDepartIds()); + queryWrapper.in("p.org_id", orgIds); + } + queryWrapper + .eq("p.del", AppConstants.DEL) + .like(StrUtil.isNotBlank(param.getName()), "p.name", StrUtil.trim(param.getName())); + queryWrapper.like(StrUtil.isNotBlank(param.getIdCode()), "p.id_code", StrUtil.trim(param.getIdCode())); + queryWrapper.like(StrUtil.isNotBlank(param.getEmpNo()), "p.emp_no", StrUtil.trim(param.getEmpNo())); + queryWrapper.like(StrUtil.isNotBlank(param.getPhone()), "p.phone", StrUtil.trim(param.getPhone())); + if (StrUtil.isNotBlank(param.getDepartId())) { + if (Objects.nonNull(param.getDepartBranch()) && param.getDepartBranch()) { + List orgIds = departService.getAllNodeIds(param.getDepartId()); + queryWrapper.in("p.org_id", orgIds); + } else { + queryWrapper.eq("p.org_id", param.getDepartId()); + } + } + queryWrapper.apply(StrUtil.isNotBlank(param.getRoleId()), String.format("find_in_set( '%s', u.role_id) > 0", param.getRoleId())); + if (param.getSortField() != null && param.getSortOrder() != null) { + if (param.getSortField().equals("depart")) { + if (param.getSortOrder().equals("ASC")) { + queryWrapper.orderByAsc("d.short_name"); + } else if (param.getSortOrder().equals("DESC")) { + queryWrapper.orderByDesc("d.short_name"); + } + } else if (param.getSortField().equals("property")) { + if (param.getSortOrder().equals("ASC")) { + queryWrapper.orderByAsc("p.person_type"); + } else if (param.getSortOrder().equals("DESC")) { + queryWrapper.orderByDesc("p.person_type"); + } + } + } + queryWrapper.orderByAsc("p.position_level").orderByDesc("p.position").orderByAsc("p.sort_id").orderByAsc("d.order_no").orderByAsc("p.person_status"); + return baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper); + } + public SupPolice getByIdCode(String idCode) { return getOne(new LambdaQueryWrapper().eq(SupPolice::getIdCode, idCode)); } diff --git a/src/main/java/com/biutag/supervision/util/HttpClientUtil.java b/src/main/java/com/biutag/supervision/util/HttpClientUtil.java deleted file mode 100644 index f4fea6e..0000000 --- a/src/main/java/com/biutag/supervision/util/HttpClientUtil.java +++ /dev/null @@ -1,276 +0,0 @@ -package com.biutag.supervision.util; - -import lombok.experimental.UtilityClass; -import lombok.extern.slf4j.Slf4j; -import org.apache.http.Header; -import org.apache.http.NameValuePair; -import org.apache.http.client.config.CookieSpecs; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpDelete; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.utils.URIBuilder; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.conn.ssl.TrustStrategy; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.message.BasicNameValuePair; -import org.apache.http.ssl.SSLContextBuilder; -import org.apache.http.util.EntityUtils; -import org.springframework.http.HttpHeaders; -import org.springframework.stereotype.Component; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.SSLContext; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URISyntaxException; -import java.security.KeyManagementException; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author kami - * @since 21:48 2020/10/19 - */ -@Slf4j -@UtilityClass -public class HttpClientUtil { - - - public static String doGet(String url, Map param, Map header) { - long time = System.currentTimeMillis(); - URIBuilder builder; - HttpGet httpGet; - RequestConfig requestConfig = RequestConfig.custom() - .setCookieSpec(CookieSpecs.STANDARD) - .setConnectionRequestTimeout(120000) - .setSocketTimeout(120000) - .setConnectTimeout(120000).build(); - try { - builder = new URIBuilder(url); - for (Map.Entry entry : param.entrySet()) { - builder.addParameter(entry.getKey(), entry.getValue()); - } - URI uri = builder.build(); - httpGet = new HttpGet(uri); - httpGet.setConfig(requestConfig); - for (Map.Entry entry : header.entrySet()) { - httpGet.setHeader(entry.getKey(), entry.getValue()); - } - - } catch (URISyntaxException e) { - e.printStackTrace(); - return null; - } - try { - SslUtil.ignoreSsl(); - } catch (Exception e) { - e.printStackTrace(); - } - // 创建Httpclient对象 - try (CloseableHttpClient httpclient = createSSLClientDefault(); - CloseableHttpResponse response = httpclient.execute(httpGet)) { - // 判断返回状态是否为200 - if (response.getStatusLine().getStatusCode() == 200) { - log.info("{}ms", System.currentTimeMillis() - time); - return EntityUtils.toString(response.getEntity(), "UTF-8"); - } - log.info("{}", response.getStatusLine().getStatusCode()); - return null; - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - public static CloseableHttpClient createSSLClientDefault() { - try { - //使用 loadTrustMaterial() 方法实现一个信任策略,信任所有证书 - // 信任所有 - SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, (TrustStrategy) (chain, authType) -> true).build(); - //NoopHostnameVerifier类: 作为主机名验证工具,实质上关闭了主机名验证,它接受任何 - //有效的SSL会话并匹配到目标主机。 - HostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE; - SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, hostnameVerifier); - return HttpClients.custom().setSSLSocketFactory(sslsf).build(); - } catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) { - e.printStackTrace(); - } - return HttpClients.createDefault(); - - } - - public static Boolean doDelete(String url, Map header) { - URIBuilder builder; - HttpDelete httpGet; - try { - builder = new URIBuilder(url); - URI uri = builder.build(); - httpGet = new HttpDelete(uri); - for (Map.Entry entry : header.entrySet()) { - httpGet.setHeader(entry.getKey(), entry.getValue()); - } - } catch (URISyntaxException e) { - log.error("exception message", e); - return null; - } - // 创建Httpclient对象 - try (CloseableHttpClient httpclient = HttpClients.createDefault(); - CloseableHttpResponse response = httpclient.execute(httpGet)) { - // 判断返回状态是否为200 - return response.getStatusLine().getStatusCode() == 200; - } catch (Exception e) { - log.error("exception message", e); - return false; - } - } - - public static String doGetResponseHead(String url,Map header,String headKey) { - URIBuilder builder; - HttpGet httpGet; - try { - builder = new URIBuilder(url); - URI uri = builder.build(); - httpGet = new HttpGet(uri); - for (Map.Entry entry : header.entrySet()) { - httpGet.setHeader(entry.getKey(), entry.getValue()); - } - } catch (URISyntaxException e) { - log.error("exception message", e); - return null; - } - // 创建Httpclient对象 - try (CloseableHttpClient httpclient = HttpClients.createDefault(); - CloseableHttpResponse response = httpclient.execute(httpGet)) { - // 判断返回状态是否为200 - if (response.getStatusLine().getStatusCode() == 200) { - return response.getFirstHeader(headKey).getValue(); - } - return null; - } catch (Exception e) { - log.error("exception message", e); - return null; - } - } - - public static String doGet(String url, Map header) { - return doGet(url, new HashMap<>(0), header); - } - - public static String doPost(String url, Map param, Map headers) { - HttpPost httpPost = new HttpPost(url); - RequestConfig requestConfig = RequestConfig.custom() - .setCookieSpec(CookieSpecs.STANDARD) - .setConnectionRequestTimeout(120000) - .setSocketTimeout(120000) - .setConnectTimeout(120000).build(); - httpPost.setConfig(requestConfig); - // 创建参数列表 - List paramList = new ArrayList<>(); - for (Map.Entry entry : param.entrySet()) { - paramList.add(new BasicNameValuePair(entry.getKey(), entry.getValue())); - } - if(!paramList.isEmpty()) { - try { - httpPost.setEntity(new UrlEncodedFormEntity(paramList)); - } catch (UnsupportedEncodingException e) { - log.error("exception message", e); - return null; - } - } - for (Map.Entry entry : headers.entrySet()) { - httpPost.setHeader(entry.getKey(), entry.getValue()); - } - // 创建Httpclient对象 - try (CloseableHttpClient httpClient = HttpClients.createDefault(); - CloseableHttpResponse response = httpClient.execute(httpPost)) { - return EntityUtils.toString(response.getEntity(), "utf-8"); - } catch (Exception e) { - log.error("exception message", e); - return null; - } - } - - public static String doPostJson(String url, String json, Map map) { - long time = System.currentTimeMillis(); - HttpPost httpPost = new HttpPost(url); - RequestConfig requestConfig = RequestConfig.custom() - .setCookieSpec(CookieSpecs.STANDARD) - .setConnectionRequestTimeout(120000) - .setSocketTimeout(120000) - .setConnectTimeout(120000).build(); - httpPost.setConfig(requestConfig); - for (Map.Entry entry : map.entrySet()) { - httpPost.setHeader(entry.getKey(), entry.getValue()); - } - log.info("请求body: {}",json); - httpPost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON)); - // 创建Httpclient对象 - try (CloseableHttpClient httpClient = HttpClients.createDefault(); - CloseableHttpResponse response = httpClient.execute(httpPost)) { - log.info("{}ms", System.currentTimeMillis() - time); - return EntityUtils.toString(response.getEntity(), "utf-8"); - } catch (Exception e) { - log.error("exception message", e); - return null; - } - } - - public static String doPostJsonCmcc(String url, String json, HttpHeaders headers) { - long time = System.currentTimeMillis(); - HttpPost httpPost = new HttpPost(url); - -// httpPost.setHeader("Authorization", map.get("Authorization")); -// httpPost.setHeader("X-Req-Time", map.get("X-Req-Time")); -// httpPost.setHeader("X-Req-Version", map.get("X-Req-Version")); -// httpPost.setHeader("X-Req-AppId", map.get("X-Req-AppId")); -// httpPost.setHeader("X-Req-ClientIP", map.get("X-Req-ClientIP")); -// httpPost.setHeader("X-Req-SignType", map.get("X-Req-SignType")); -// httpPost.setHeader("X-Req-Seq", map.get("X-Req-Seq")); -// httpPost.setHeader("Content-Type", "application/json"); -// httpPost.setHeader("X-Req-Hmac", map.get("X-Req-Hmac")); - for (Header header : httpPost.getAllHeaders()) { - System.out.println(header.getName() + ": " + header.getValue()); - } - log.info(json); - httpPost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON)); - // 创建Httpclient对象 - try (CloseableHttpClient httpClient = HttpClients.createDefault(); - CloseableHttpResponse response = httpClient.execute(httpPost)) { - - log.info("{}ms", System.currentTimeMillis() - time); - return EntityUtils.toString(response.getEntity(), "utf-8"); - } catch (Exception e) { - log.error("exception message", e); - return null; - } - } - - public static Boolean doPostJsonEmpty(String url, String json, Map map) { - HttpPost httpPost = new HttpPost(url); - for (Map.Entry entry : map.entrySet()) { - httpPost.setHeader(entry.getKey(), entry.getValue()); - } - httpPost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON)); - // 创建Httpclient对象 - try (CloseableHttpClient httpClient = HttpClients.createDefault(); - CloseableHttpResponse response = httpClient.execute(httpPost)) { - if (response.getStatusLine().getStatusCode() == 200) { - return true; - } - } catch (Exception e) { - log.error("exception message", e); - } - return false; - } -} diff --git a/src/main/resources/mapper/RpcApplyMapper.xml b/src/main/resources/mapper/RpcApplyMapper.xml new file mode 100644 index 0000000..d59d061 --- /dev/null +++ b/src/main/resources/mapper/RpcApplyMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/RpcApplyWorkMapper.xml b/src/main/resources/mapper/RpcApplyWorkMapper.xml new file mode 100644 index 0000000..edcfe35 --- /dev/null +++ b/src/main/resources/mapper/RpcApplyWorkMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SupPoliceMapper.xml b/src/main/resources/mapper/SupPoliceMapper.xml index c2f3e43..9170f24 100644 --- a/src/main/resources/mapper/SupPoliceMapper.xml +++ b/src/main/resources/mapper/SupPoliceMapper.xml @@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" p.person_type, p.police_role, p.employment_date, + p.del_reason, d.NAME depart_name, d.short_name depart_short_name, d1.short_name parent_depart_short_name, diff --git a/src/main/resources/static/templates/长沙市公安局数字督察一体化平台-操作手册V1.pdf b/src/main/resources/static/templates/长沙市公安局数字督察一体化平台-操作手册V1.pdf new file mode 100644 index 0000000..28afd18 Binary files /dev/null and b/src/main/resources/static/templates/长沙市公安局数字督察一体化平台-操作手册V1.pdf differ diff --git a/src/test/java/com/biutag/supervision/StrUtil.java b/src/test/java/com/biutag/supervision/StrUtil.java index a097758..42e3c7b 100644 --- a/src/test/java/com/biutag/supervision/StrUtil.java +++ b/src/test/java/com/biutag/supervision/StrUtil.java @@ -2,24 +2,20 @@ package com.biutag.supervision; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; +import cn.hutool.core.date.DateUtil; import com.biutag.supervision.pojo.entity.DataCaseVerifExt; import org.junit.jupiter.api.Test; import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.util.Date; public class StrUtil { @Test public void testSubstr() throws FileNotFoundException { - DataCaseVerifExt dataCaseVerifExt = new DataCaseVerifExt(); - dataCaseVerifExt.setOuterId("1"); - dataCaseVerifExt.setCheckStatusName("123"); - DataCaseVerifExt obj = new DataCaseVerifExt(); - obj.setBlameEmpNo("ABC"); - obj.setCheckStatusName("3"); - obj.setOuterId("1"); - BeanUtil.copyProperties(dataCaseVerifExt, obj, CopyOptions.create().setIgnoreNullValue(true)); - System.out.println(obj); + FileOutputStream fileOutputStream = new FileOutputStream("D:\\deploy\\test.xlxs"); + } } diff --git a/src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java b/src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java index b5a1587..df78b13 100644 --- a/src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java +++ b/src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java @@ -1,12 +1,9 @@ package com.biutag.supervision.controller.datav; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson2.JSON; import com.biutag.supervision.pojo.entity.CountyStreetDept; -import com.biutag.supervision.pojo.vo.EchartsVo; -import com.biutag.supervision.pojo.vo.RankVo; import com.biutag.supervision.service.CountyStreetDeptService; -import com.biutag.supervision.service.SubOneService; -import com.google.gson.Gson; import jakarta.annotation.Resource; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @@ -16,15 +13,12 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; - @SpringBootTest public class SubOneControllerTest { @Resource private CountyStreetDeptService countyStreetDeptService; - @Resource - private SubOneService subOneService; + @Test public void testSubstr() { List depts = countyStreetDeptService.getTest(4062); @@ -42,7 +36,7 @@ public class SubOneControllerTest { properties.put("id", dept.getId()); feature.put("properties", properties); // 第二个键值 - feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值 + feature.put("geometry", JSON.parseObject(dept.getGeometry())); // 第三个键值 features.add(feature); } geoJson.put("features", features); diff --git a/src/test/java/com/biutag/supervision/tools/GenCodeTests.java b/src/test/java/com/biutag/supervision/tools/GenCodeTests.java index 15f3231..2632b3d 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 = "data_alarm_yjzj"; + String tableName = "rpc_apply_approve"; String tableSchema = "negative"; boolean genMapper = true; boolean genService = true;