Browse Source

20250213

main
wxc 10 months ago
parent
commit
3340f86cea
  1. 106
      pom.xml
  2. 9
      sql/20250212.sql
  3. 37
      sql/20250213.sql
  4. 3
      sql/250124.sql
  5. 14
      src/main/java/com/biutag/supervision/constants/enums/ComfortStatus.java
  6. 25
      src/main/java/com/biutag/supervision/constants/enums/RpcApplyTypeEnum.java
  7. 11
      src/main/java/com/biutag/supervision/controller/LoginController.java
  8. 46
      src/main/java/com/biutag/supervision/controller/api/plugin/CaseVerifController.java
  9. 14
      src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java
  10. 185
      src/main/java/com/biutag/supervision/controller/rightsComfort/ComfortController.java
  11. 17
      src/main/java/com/biutag/supervision/controller/rightsComfort/RightsController.java
  12. 21
      src/main/java/com/biutag/supervision/controller/system/PoliceController.java
  13. 63
      src/main/java/com/biutag/supervision/controller/system/RightPersonController.java
  14. 16
      src/main/java/com/biutag/supervision/job/Job.java
  15. 4
      src/main/java/com/biutag/supervision/mapper/BaseAccountMapper.java
  16. 8
      src/main/java/com/biutag/supervision/mapper/RpcApplyApproveMapper.java
  17. 11
      src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java
  18. 16
      src/main/java/com/biutag/supervision/mapper/RpcApplyWorkMapper.java
  19. 8
      src/main/java/com/biutag/supervision/mapper/RpcPersonMapper.java
  20. 8
      src/main/java/com/biutag/supervision/mapper/RpcRightPersonMapper.java
  21. 3
      src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java
  22. 28
      src/main/java/com/biutag/supervision/pojo/domain/RpcApplyDetail.java
  23. 20
      src/main/java/com/biutag/supervision/pojo/dto/RpcApplyApproveDto.java
  24. 116
      src/main/java/com/biutag/supervision/pojo/dto/RpcApplyDto.java
  25. 1
      src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerifExt.java
  26. 3
      src/main/java/com/biutag/supervision/pojo/entity/Negative.java
  27. 49
      src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java
  28. 43
      src/main/java/com/biutag/supervision/pojo/entity/RpcApplyApprove.java
  29. 12
      src/main/java/com/biutag/supervision/pojo/entity/RpcApplyPerson.java
  30. 45
      src/main/java/com/biutag/supervision/pojo/entity/RpcApplyWork.java
  31. 85
      src/main/java/com/biutag/supervision/pojo/entity/RpcPerson.java
  32. 39
      src/main/java/com/biutag/supervision/pojo/entity/RpcRightPerson.java
  33. 2
      src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java
  34. 5
      src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java
  35. 27
      src/main/java/com/biutag/supervision/pojo/param/RpcApplyQueryParam.java
  36. 20
      src/main/java/com/biutag/supervision/pojo/param/RpcRightPersonQueryParam.java
  37. 3
      src/main/java/com/biutag/supervision/pojo/param/VideoInspectionQueryParam.java
  38. 2
      src/main/java/com/biutag/supervision/pojo/vo/DataPetitionComplaintVo.java
  39. 66
      src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeBlameVo.java
  40. 4
      src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java
  41. 48
      src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java
  42. 4
      src/main/java/com/biutag/supervision/service/BaseAccountService.java
  43. 1
      src/main/java/com/biutag/supervision/service/BaseUserService.java
  44. 5
      src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java
  45. 3
      src/main/java/com/biutag/supervision/service/NegativeBookService.java
  46. 7
      src/main/java/com/biutag/supervision/service/NegativeQueryService.java
  47. 2
      src/main/java/com/biutag/supervision/service/NegativeService.java
  48. 31
      src/main/java/com/biutag/supervision/service/NegativeTaskService.java
  49. 24
      src/main/java/com/biutag/supervision/service/RpcApplyApproveService.java
  50. 28
      src/main/java/com/biutag/supervision/service/RpcApplyService.java
  51. 80
      src/main/java/com/biutag/supervision/service/RpcApplyWorkService.java
  52. 11
      src/main/java/com/biutag/supervision/service/RpcPersonService.java
  53. 11
      src/main/java/com/biutag/supervision/service/RpcRightPersonService.java
  54. 45
      src/main/java/com/biutag/supervision/service/SupPoliceService.java
  55. 276
      src/main/java/com/biutag/supervision/util/HttpClientUtil.java
  56. 17
      src/main/resources/mapper/RpcApplyMapper.xml
  57. 17
      src/main/resources/mapper/RpcApplyWorkMapper.xml
  58. 1
      src/main/resources/mapper/SupPoliceMapper.xml
  59. BIN
      src/main/resources/static/templates/长沙市公安局数字督察一体化平台-操作手册V1.pdf
  60. 14
      src/test/java/com/biutag/supervision/StrUtil.java
  61. 12
      src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java
  62. 2
      src/test/java/com/biutag/supervision/tools/GenCodeTests.java

106
pom.xml

@ -31,32 +31,34 @@
</properties>
<dependencies>
<!-- jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.3</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-devtools</artifactId>-->
<!-- <scope>runtime</scope>-->
<!-- <optional>true</optional>-->
<!-- </dependency>-->
<!-- mysql JDBC驱动 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<!-- SQL Server JDBC驱动 -->
@ -86,28 +88,36 @@
<version>1.1.1</version>
</dependency>
<!-- gbase数据库 JDBC驱动 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<groupId>com.gbase</groupId>
<artifactId>gbase-jdbc</artifactId>
<scope>system</scope>
<version>8.3.81.53-build55.2.1-bin</version>
<systemPath>${project.basedir}/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar
</systemPath>
</dependency>
<!-- dm数据库 JDBC驱动 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
<version>8.1.3.140</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-devtools</artifactId>-->
<!-- <scope>runtime</scope>-->
<!-- <optional>true</optional>-->
<!-- </dependency>-->
<!-- postgresql JDBC驱动 -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.4</version>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.22</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
@ -118,11 +128,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
@ -142,7 +147,6 @@
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
@ -185,38 +189,20 @@
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>com.gbase</groupId>
<artifactId>gbase-jdbc</artifactId>
<scope>system</scope>
<version>8.3.81.53-build55.2.1-bin</version>
<systemPath>${project.basedir}/src/main/resources/lib/gbase-connector-java-8.3.81.53-build52.8-bin.jar
</systemPath>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.22</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.53</version>
</dependency>
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
<version>8.1.3.140</version>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>4.9</version>
</dependency>
<!-- word转换 -->
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
@ -227,17 +213,17 @@
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.4</version>
</dependency>
<!-- 数字证书 -->
<dependency>
<groupId>cn.com.jit</groupId>
<artifactId>authSDK</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>

9
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;

37
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', '');

3
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
-- 11.32.30.103 wjccfwq.oss-cn-langfang-mps22s-d01-a.yun.ga

14
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
}

25
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;
}

11
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<TokenVo> login(@RequestBody AccountDto account) {
BaseAccount baseAccount = accountService.getByLogin(account.getAccount());
List<BaseAccount> 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) {

46
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<DataCaseVerif>().eq(DataCaseVerif::getOuterId, body.getOuterId()));
Negative negative = new Negative();
negative.setId(IdUtil.getSnowflakeNextIdStr()) // negative唯一标识 雪花
.setProcessingStatus(ProcessingStatusEnum.processing.name())
Negative negative = negativeService.getOne(new LambdaQueryWrapper<Negative>().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<Boolean> trueSituation(String outerId) {
// 不需要填表则返回 true
// 1 填过表了
// 2 不属实
// 3 找不到案件
DataCaseVerifExt dataCaseVerifExt = dataCaseVerifExtService.getOne(new LambdaUpdateWrapper<DataCaseVerifExt>().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<DataCaseVerif>().eq(DataCaseVerif::getOuterId, outerId));
if (Objects.isNull(dataCaseVerif)) {
return Result.success(true);
}
Negative negative = negativeService.getOne(new LambdaUpdateWrapper<Negative>().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);
}
}

14
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<Page<VideoInspectionVo>> list(VideoInspectionQueryParam param) {
QueryWrapper<DataAlarmDispositionInfo> 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<SupExternalDepart> externalDepartList = externalDepartService.list(new LambdaUpdateWrapper<SupExternalDepart>().eq(SupExternalDepart::getInternalId, param.getDepartId()).eq(SupExternalDepart::getSource,
"视频督察"));
if (externalDepartList.isEmpty()) {
return Result.success(new Page<VideoInspectionVo>().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));
}

185
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<Page<RpcApplyVo>> list(RpcApplyQueryParam queryParam) {
return Result.success(rpcApplyService.page(queryParam, RpcApplyTypeEnum.COMFORT.getValue()));
}
// 待办
@GetMapping("todo")
public Result<Page<RpcApplyVo>> todos(RpcApplyQueryParam queryParam) {
return Result.success(rpcApplyWorkService.pageTodo(queryParam));
}
// 已办
@GetMapping("done")
public Result<Page<RpcApplyVo>> done(RpcApplyQueryParam queryParam) {
return Result.success(rpcApplyWorkService.pageDone(queryParam));
}
@GetMapping("{id}")
public Result<RpcApplyDetail> get(@PathVariable String id) {
RpcApplyDetail rpcApplyDetail = new RpcApplyDetail();
rpcApplyDetail.setApply(rpcApplyService.getById(id));
rpcApplyDetail.setPerson(rpcPersonService.getOne(new LambdaUpdateWrapper<RpcPerson>().eq(RpcPerson::getRpcId, id)));
rpcApplyDetail.setApplyPerson(rpcApplyPersonService.getOne(new LambdaUpdateWrapper<RpcApplyPerson>().eq(RpcApplyPerson::getRpcId, id)));
rpcApplyDetail.setApproves(rpcApplyApproveService.list(id));
return Result.success(rpcApplyDetail);
}
@Transactional(rollbackFor = Exception.class)
@PostMapping
public Result<Void> 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<Void> del(@PathVariable String id) {
rpcApplyService.removeById(id);
rpcPersonService.remove(new LambdaQueryWrapper<RpcPerson>().eq(RpcPerson::getRpcId, id));
rpcApplyPersonService.remove(new LambdaQueryWrapper<RpcApplyPerson>().eq(RpcApplyPerson::getRpcId, id));
rpcApplyWorkService.remove(new LambdaQueryWrapper<RpcApplyWork>().eq(RpcApplyWork::getRpcId, id));
return Result.success();
}
@Transactional(rollbackFor = Exception.class)
@PostMapping("approve")
public Result<Void> approve(@RequestBody RpcApplyApproveDto rpcApplyApproveDto) {
RpcApply rpcApply = rpcApplyService.getById(rpcApplyApproveDto.getRpcId());
rpcApplyWorkService.update(new LambdaUpdateWrapper<RpcApplyWork>().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<RpcApplyWork>().eq(RpcApplyWork::getRpcId, rpcApplyApproveDto.getRpcId())
.eq(RpcApplyWork::getStep, 1)
.set(RpcApplyWork::getStatus, WorkStatusEnum.todo.name())
.set(RpcApplyWork::getUpdateTime, LocalDateTime.now()));
rpcApplyService.update(new LambdaUpdateWrapper<RpcApply>().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<RpcApplyWork>().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<RpcApply>().eq(RpcApply::getRpcId, rpcApplyApproveDto.getRpcId())
.set(RpcApply::getStep, 3)
.set(RpcApply::getUptTime, LocalDateTime.now()));
} else {
// 办结
rpcApplyService.update(new LambdaUpdateWrapper<RpcApply>().eq(RpcApply::getRpcId, rpcApplyApproveDto.getRpcId())
.set(RpcApply::getRpcStatus, ComfortStatus.completed.name())
.set(RpcApply::getUptTime, LocalDateTime.now()));
}
}
return Result.success();
}
}

17
src/main/java/com/biutag/supervision/controller/work/ComfortController.java → 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<Page<RpcApply>> list() {
return Result.success(rpcApplyService.page(Page.of(1, 10)));
public Result<Page<RpcApplyVo>> list(RpcApplyQueryParam queryParam) {
return Result.success(rpcApplyService.page(queryParam, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()));
}
}

21
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<Page<PoliceModel>> abnormalList(PoliceQueryParam param) {
return Result.success(policeService.pageByAbnormal(param));
}
@PostMapping
public Result<Boolean> add(@RequestBody SupPolice police) {
SupPolice policeByEmpNo = policeService.getOne(new LambdaQueryWrapper<SupPolice>().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<SupPolice> updateWrapper = new LambdaUpdateWrapper<SupPolice>()
.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}")

63
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<Page<RpcRightPerson>> list(RpcRightPersonQueryParam queryParam) {
LambdaQueryWrapper<RpcRightPerson> queryWrapper = new LambdaQueryWrapper<RpcRightPerson>()
.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<RpcRightPerson>> list(@PathVariable String departId) {
return Result.success(rpcRightPersonService.list(new LambdaUpdateWrapper<RpcRightPerson>().eq(RpcRightPerson::getDepartId, departId)));
}
@PostMapping
public Result<Void> add(@RequestBody RpcRightPerson rpcRightPerson) {
rpcRightPersonService.save(rpcRightPerson);
return Result.success();
}
@PutMapping
public Result<Void> update(@RequestBody RpcRightPerson rpcRightPerson) {
rpcRightPersonService.save(rpcRightPerson);
return Result.success();
}
@DeleteMapping("{id}")
public Result<Void> del(@PathVariable Integer id) {
rpcRightPersonService.removeById(id);
return Result.success();
}
}

16
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<Mail> mailList = mailMapper.selectList(new LambdaUpdateWrapper<Mail>().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<Negative> negatives = negativeService.list(new LambdaQueryWrapper<Negative>()
.isNotNull(Negative::getFirstDistributeTime)
.ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()));
negatives.forEach(item -> {
negativeService.update(new LambdaUpdateWrapper<Negative>().eq(Negative::getId, item.getId())
.set(Negative::getHandleRemainingTime,
TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey())));
});
}
}

4
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<BaseAccount> {
@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<BaseAccount> selectByLogin(String account);
}

8
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<RpcApplyApprove> {
}

11
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<RpcApply> {
"GROUP BY sd.short_name " +
"HAVING `name` is NOT NULL ")
List<EchartsVo> getSubOneIncidentOrg(Date beginTime, Date endTime, Integer departId);
Page<RpcApplyVo> queryPage(@Param("page") Page<RpcApply> page, @Param(Constants.WRAPPER) QueryWrapper<RpcApply> queryWrapper);
@Select("select max(number_index) from rpc_apply where year = #{year}")
Integer selectMaxNuberIndex(Integer year);
}

16
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<RpcApplyWork> {
Page<RpcApplyVo> queryPage(@Param("page") Page<RpcApply> page, @Param(Constants.WRAPPER) QueryWrapper<RpcApply> queryWrapper);
}

8
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<RpcPerson> {
}

8
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<RpcRightPerson> {
}

3
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<Blame> blames = new ArrayList<>();

28
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<RpcApplyApprove> approves = new ArrayList<>();
}

20
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;
}

116
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<FileVo> documentFile;
private String status;
private String approver;
}

1
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;

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

@ -303,4 +303,7 @@ public class Negative {
// 经办人
private String handlePolices;
// 剩余办理时间
private Long handleRemainingTime;
}

49
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;
}

43
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;
}

12
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;
}

45
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;
}

85
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;
}

39
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;
}

2
src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java

@ -108,5 +108,7 @@ public class PoliceModel {
private String role;
// 刪除原因
private String delReason;
}

5
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;

27
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<Date> applyDate;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private List<Date> happenTime;
private String applicantEmpName;
private String departId;
}

20
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;
}

3
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;
}

2
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;
// 投诉人

66
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;
}

4
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;

48
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;
}

4
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<BaseAccountMapper, BaseAccount> {
@ -13,7 +15,7 @@ public class BaseAccountService extends ServiceImpl<BaseAccountMapper, BaseAccou
return getOne(new LambdaQueryWrapper<BaseAccount>().eq(BaseAccount::getAccount, account));
}
public BaseAccount getByLogin(String account) {
public List<BaseAccount> getByLogin(String account) {
return baseMapper.selectByLogin(account);
}

1
src/main/java/com/biutag/supervision/service/BaseUserService.java

@ -50,6 +50,7 @@ public class BaseUserService extends ServiceImpl<BaseUserMapper, BaseUser> {
}
queryWrapper.in(BaseUser::getUserId, userIds);
}
queryWrapper.orderByDesc(BaseUser::getUpdateTime);
Page<BaseUser> baseUserPage = page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
if (baseUserPage.getRecords().isEmpty()) {
return new Page<UserModel>().setRecords(new ArrayList<>()).setTotal(0);

5
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);

3
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<String> departIds = departService.getAllNodeIds(param.getInvolveDepartId());

7
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<String> departIds = departService.getAllNodeIds(param.getInvolveDepartId());

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

@ -305,9 +305,11 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
// 涉及单位
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());

31
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<NegativeTaskMapper, Negativ
public void exportExcel(List<NegativeQueryVo> data, String negativeTaskId) {
List<SupDictData> suspectProblem = dictDataService.listByDictType("suspectProblem");
List<ExportNegativeVo> list = new ArrayList<>();
List<ExportNegativeBlameVo> blameVoList = new ArrayList<>();
if (!data.isEmpty()) {
List<NegativeProblemRelation> negativeProblemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>().in(NegativeProblemRelation::getNegativeId, data.stream().map(NegativeQueryVo::getId).toList()));
List<NegativeBlame> blames = negativeBlameService.list(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, data.stream().map(NegativeQueryVo::getId).toList()));
@ -128,17 +133,39 @@ public class NegativeTaskService extends ServiceImpl<NegativeTaskMapper, Negativ
// 涉及人员
List<NegativeBlame> 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<NegativeTask>().eq(NegativeTask::getId, negativeTaskId)
.set(NegativeTask::getStatus, NegativeTaskStatusEnum.SUCCESS.getValue())

24
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<RpcApplyApproveMapper, RpcApplyApprove> {
public List<RpcApplyApprove> list(String rpcId) {
List<RpcApplyApprove> list = list(new LambdaQueryWrapper<RpcApplyApprove>().eq(RpcApplyApprove::getRpcId, rpcId).orderByDesc(RpcApplyApprove::getCreateTime));
List<RpcApplyApprove> 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;
}
}

28
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<RpcApplyMapper, RpcApply> {
public Page<RpcApplyVo> page(RpcApplyQueryParam queryParam, String type) {
QueryWrapper<RpcApply> 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;
}
}

80
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<RpcApplyWorkMapper, RpcApplyWork> {
private final RpcRightPersonService rpcRightPersonService;
public Page<RpcApplyVo> pageTodo(RpcApplyQueryParam queryParam) {
UserAuth user = UserContextHolder.getCurrentUser();
List<RpcRightPerson> rightPeoples = rpcRightPersonService.list(new LambdaUpdateWrapper<RpcRightPerson>().eq(RpcRightPerson::getIdCode, user.getUserName()));
if (rightPeoples.isEmpty()) {
return new Page<RpcApplyVo>().setTotal(0).setRecords(new ArrayList<>());
}
QueryWrapper<RpcApply> 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<RpcApplyVo> pageDone(RpcApplyQueryParam queryParam) {
UserAuth user = UserContextHolder.getCurrentUser();
QueryWrapper<RpcApply> 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);
}
}

11
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<RpcPersonMapper, RpcPerson> {
}

11
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<RpcRightPersonMapper, RpcRightPerson> {
}

45
src/main/java/com/biutag/supervision/service/SupPoliceService.java

@ -71,6 +71,51 @@ public class SupPoliceService extends ServiceImpl<SupPoliceMapper, SupPolice> {
return baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
}
public Page<PoliceModel> pageByAbnormal(PoliceQueryParam param) {
QueryWrapper<PoliceModel> 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<PoliceModel>().setTotal(0).setRecords(new ArrayList<>());
}
List<String> 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<String> 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<SupPolice>().eq(SupPolice::getIdCode, idCode));
}

276
src/main/java/com/biutag/supervision/util/HttpClientUtil.java

@ -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<String, String> param, Map<String, String> 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<String, String> entry : param.entrySet()) {
builder.addParameter(entry.getKey(), entry.getValue());
}
URI uri = builder.build();
httpGet = new HttpGet(uri);
httpGet.setConfig(requestConfig);
for (Map.Entry<String, String> 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<String, String> header) {
URIBuilder builder;
HttpDelete httpGet;
try {
builder = new URIBuilder(url);
URI uri = builder.build();
httpGet = new HttpDelete(uri);
for (Map.Entry<String, String> 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<String, String> header,String headKey) {
URIBuilder builder;
HttpGet httpGet;
try {
builder = new URIBuilder(url);
URI uri = builder.build();
httpGet = new HttpGet(uri);
for (Map.Entry<String, String> 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<String, String> header) {
return doGet(url, new HashMap<>(0), header);
}
public static String doPost(String url, Map<String, String> param, Map<String, String> headers) {
HttpPost httpPost = new HttpPost(url);
RequestConfig requestConfig = RequestConfig.custom()
.setCookieSpec(CookieSpecs.STANDARD)
.setConnectionRequestTimeout(120000)
.setSocketTimeout(120000)
.setConnectTimeout(120000).build();
httpPost.setConfig(requestConfig);
// 创建参数列表
List<NameValuePair> paramList = new ArrayList<>();
for (Map.Entry<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> map) {
HttpPost httpPost = new HttpPost(url);
for (Map.Entry<String, String> 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;
}
}

17
src/main/resources/mapper/RpcApplyMapper.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.supervision.mapper.RpcApplyMapper">
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.RpcApplyVo">
SELECT
a.*, p.bank_card, p.bank_branch
FROM
rpc_apply a
LEFT JOIN rpc_person p ON a.rpc_id = p.rpc_id
${ew.getCustomSqlSegment}
</select>
</mapper>

17
src/main/resources/mapper/RpcApplyWorkMapper.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.supervision.mapper.RpcApplyWorkMapper">
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.RpcApplyVo">
SELECT
a.*, p.bank_card, p.bank_branch
FROM
rpc_apply_work w left join rpc_apply a on w.rpc_id = a.rpc_id
LEFT JOIN rpc_person p ON a.rpc_id = p.rpc_id
${ew.getCustomSqlSegment}
</select>
</mapper>

1
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,

BIN
src/main/resources/static/templates/长沙市公安局数字督察一体化平台-操作手册V1.pdf

Binary file not shown.

14
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");
}
}

12
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<CountyStreetDept> 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);

2
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;

Loading…
Cancel
Save