Parcourir la source

第一次提交

wangxx il y a 4 mois
Parent
commit
6802e36438
100 fichiers modifiés avec 17927 ajouts et 0 suppressions
  1. 47 0
      airport-check/pom.xml
  2. 1091 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckCorrection.java
  3. 44 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCommonDto.java
  4. 41 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionAssistDto.java
  5. 51 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionDto.java
  6. 81 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionPortraitDto.java
  7. 77 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionPortraitSqlDto.java
  8. 40 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionQueryParamDto.java
  9. 84 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenInspectionExecuteDto.java
  10. 69 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenInspectionExecuteItemDto.java
  11. 55 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenInspectionExecuteUserDto.java
  12. 39 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenPlanOverviewDto.java
  13. 25 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenPlanQueryParamDto.java
  14. 36 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenProblemDto.java
  15. 35 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenProblemQueryParamDto.java
  16. 44 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenProblemTrendDto.java
  17. 485 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckProjectItem.java
  18. 1103 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckRecord.java
  19. 487 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckTask.java
  20. 179 0
      airport-check/src/main/java/com/sundot/airport/check/domain/CheckUser.java
  21. 99 0
      airport-check/src/main/java/com/sundot/airport/check/handler/CheckCorrectionApprovalHandler.java
  22. 79 0
      airport-check/src/main/java/com/sundot/airport/check/mapper/CheckCorrectionMapper.java
  23. 195 0
      airport-check/src/main/java/com/sundot/airport/check/mapper/CheckLargeScreenMapper.java
  24. 62 0
      airport-check/src/main/java/com/sundot/airport/check/mapper/CheckProjectItemMapper.java
  25. 62 0
      airport-check/src/main/java/com/sundot/airport/check/mapper/CheckRecordMapper.java
  26. 70 0
      airport-check/src/main/java/com/sundot/airport/check/mapper/CheckTaskMapper.java
  27. 62 0
      airport-check/src/main/java/com/sundot/airport/check/mapper/CheckUserMapper.java
  28. 78 0
      airport-check/src/main/java/com/sundot/airport/check/service/ICheckCorrectionService.java
  29. 154 0
      airport-check/src/main/java/com/sundot/airport/check/service/ICheckLargeScreenService.java
  30. 62 0
      airport-check/src/main/java/com/sundot/airport/check/service/ICheckProjectItemService.java
  31. 71 0
      airport-check/src/main/java/com/sundot/airport/check/service/ICheckRecordService.java
  32. 78 0
      airport-check/src/main/java/com/sundot/airport/check/service/ICheckTaskService.java
  33. 62 0
      airport-check/src/main/java/com/sundot/airport/check/service/ICheckUserService.java
  34. 361 0
      airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckCorrectionServiceImpl.java
  35. 1570 0
      airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckLargeScreenServiceImpl.java
  36. 30 0
      airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckProblemStatisticsServiceImpl.java
  37. 91 0
      airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckProjectItemServiceImpl.java
  38. 387 0
      airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckRecordServiceImpl.java
  39. 360 0
      airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckTaskServiceImpl.java
  40. 91 0
      airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckUserServiceImpl.java
  41. 530 0
      airport-check/src/main/resources/mapper/check/CheckCorrectionMapper.xml
  42. 553 0
      airport-check/src/main/resources/mapper/check/CheckLargeScreenMapper.xml
  43. 272 0
      airport-check/src/main/resources/mapper/check/CheckProjectItemMapper.xml
  44. 536 0
      airport-check/src/main/resources/mapper/check/CheckRecordMapper.xml
  45. 286 0
      airport-check/src/main/resources/mapper/check/CheckTaskMapper.xml
  46. 134 0
      airport-check/src/main/resources/mapper/check/CheckUserMapper.xml
  47. 147 0
      airport-common/pom.xml
  48. 19 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/Anonymous.java
  49. 33 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/DataScope.java
  50. 28 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/DataSource.java
  51. 197 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/Excel.java
  52. 18 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/Excels.java
  53. 51 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/Log.java
  54. 40 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/RateLimiter.java
  55. 31 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/RepeatSubmit.java
  56. 24 0
      airport-common/src/main/java/com/sundot/airport/common/annotation/Sensitive.java
  57. 54 0
      airport-common/src/main/java/com/sundot/airport/common/cache/StatisticsCacheConditionUtil.java
  58. 36 0
      airport-common/src/main/java/com/sundot/airport/common/cache/StatisticsCacheConfig.java
  59. 125 0
      airport-common/src/main/java/com/sundot/airport/common/cache/StatisticsKeyGenerator.java
  60. 109 0
      airport-common/src/main/java/com/sundot/airport/common/config/LevelConfig.java
  61. 122 0
      airport-common/src/main/java/com/sundot/airport/common/config/RuoYiConfig.java
  62. 67 0
      airport-common/src/main/java/com/sundot/airport/common/config/serializer/SensitiveJsonSerializer.java
  63. 49 0
      airport-common/src/main/java/com/sundot/airport/common/constant/CacheConstants.java
  64. 186 0
      airport-common/src/main/java/com/sundot/airport/common/constant/Constants.java
  65. 117 0
      airport-common/src/main/java/com/sundot/airport/common/constant/GenConstants.java
  66. 94 0
      airport-common/src/main/java/com/sundot/airport/common/constant/HttpStatus.java
  67. 50 0
      airport-common/src/main/java/com/sundot/airport/common/constant/ScheduleConstants.java
  68. 81 0
      airport-common/src/main/java/com/sundot/airport/common/constant/UserConstants.java
  69. 208 0
      airport-common/src/main/java/com/sundot/airport/common/core/controller/BaseController.java
  70. 216 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/AjaxResult.java
  71. 122 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/BaseEntity.java
  72. 98 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/BaseLargeScreenQueryParamDto.java
  73. 53 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/DataPermissionResult.java
  74. 62 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/DeptUserTreeSelect.java
  75. 115 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/R.java
  76. 81 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/SysLargeScreenDetailDto.java
  77. 31 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/SysLargeScreenWorkingPortraitDto.java
  78. 79 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/TreeEntity.java
  79. 63 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/TreeQuery.java
  80. 136 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/TreeSelect.java
  81. 231 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysDept.java
  82. 176 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysDictData.java
  83. 96 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysDictType.java
  84. 274 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysMenu.java
  85. 265 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysRole.java
  86. 919 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysUser.java
  87. 69 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/model/LoginBody.java
  88. 266 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/model/LoginUser.java
  89. 11 0
      airport-common/src/main/java/com/sundot/airport/common/core/domain/model/RegisterBody.java
  90. 101 0
      airport-common/src/main/java/com/sundot/airport/common/core/page/PageDomain.java
  91. 124 0
      airport-common/src/main/java/com/sundot/airport/common/core/page/TableDataInfo.java
  92. 56 0
      airport-common/src/main/java/com/sundot/airport/common/core/page/TableSupport.java
  93. 306 0
      airport-common/src/main/java/com/sundot/airport/common/core/redis/RedisCache.java
  94. 94 0
      airport-common/src/main/java/com/sundot/airport/common/core/redis/RedisSerialGenerator.java
  95. 86 0
      airport-common/src/main/java/com/sundot/airport/common/core/text/CharsetKit.java
  96. 1018 0
      airport-common/src/main/java/com/sundot/airport/common/core/text/Convert.java
  97. 92 0
      airport-common/src/main/java/com/sundot/airport/common/core/text/StrFormatter.java
  98. 179 0
      airport-common/src/main/java/com/sundot/airport/common/domain/BaseAttachment.java
  99. 174 0
      airport-common/src/main/java/com/sundot/airport/common/domain/BaseRead.java
  100. 0 0
      airport-common/src/main/java/com/sundot/airport/common/domain/portrait/ApprovalDurationStats.java

+ 47 - 0
airport-check/pom.xml

@@ -0,0 +1,47 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <parent>
6
+        <groupId>com.sundot.airport</groupId>
7
+        <artifactId>airport</artifactId>
8
+        <version>3.9.0</version>
9
+    </parent>
10
+    <modelVersion>4.0.0</modelVersion>
11
+
12
+    <artifactId>airport-check</artifactId>
13
+
14
+    <description>
15
+        check巡检管理模块
16
+    </description>
17
+
18
+    <dependencies>
19
+
20
+        <!-- 通用工具-->
21
+        <dependency>
22
+            <groupId>com.sundot.airport</groupId>
23
+            <artifactId>airport-common</artifactId>
24
+        </dependency>
25
+
26
+        <!-- 系统模块-->
27
+        <dependency>
28
+            <groupId>com.sundot.airport</groupId>
29
+            <artifactId>airport-system</artifactId>
30
+        </dependency>
31
+
32
+        <!-- lombok-->
33
+        <dependency>
34
+            <groupId>org.projectlombok</groupId>
35
+            <artifactId>lombok</artifactId>
36
+            <scope>provided</scope>
37
+        </dependency>
38
+
39
+        <!-- 考勤模块-->
40
+        <dependency>
41
+            <groupId>com.sundot.airport</groupId>
42
+            <artifactId>airport-attendance</artifactId>
43
+        </dependency>
44
+
45
+    </dependencies>
46
+
47
+</project>

Fichier diff supprimé car celui-ci est trop grand
+ 1091 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckCorrection.java


+ 44 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCommonDto.java

@@ -0,0 +1,44 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.io.Serializable;
6
+import java.math.BigDecimal;
7
+
8
+/**
9
+ * 巡检大屏:通用下行报文
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-09-07
13
+ */
14
+@Data
15
+public class CheckLargeScreenCommonDto implements Serializable {
16
+
17
+    private static final long serialVersionUID = 1L;
18
+
19
+    /**
20
+     * 主键ID
21
+     */
22
+    private Long id;
23
+
24
+    /**
25
+     * 编码
26
+     */
27
+    private String code;
28
+
29
+    /**
30
+     * 名称
31
+     */
32
+    private String name;
33
+
34
+    /**
35
+     * 总数
36
+     */
37
+    private BigDecimal total;
38
+
39
+    /**
40
+     * 比例
41
+     */
42
+    private BigDecimal scale;
43
+
44
+}

+ 41 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionAssistDto.java

@@ -0,0 +1,41 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.math.BigDecimal;
6
+
7
+/**
8
+ * 巡检大屏:问题整改
9
+ *
10
+ * @author ruoyi
11
+ * @date 2025-09-07
12
+ */
13
+@Data
14
+public class CheckLargeScreenCorrectionAssistDto {
15
+
16
+    /**
17
+     * 科室ID
18
+     */
19
+    private Long departmentId;
20
+
21
+    /**
22
+     * 科室名称
23
+     */
24
+    private String departmentName;
25
+
26
+    /**
27
+     * 班组ID
28
+     */
29
+    private Long teamId;
30
+
31
+    /**
32
+     * 班组名称
33
+     */
34
+    private String teamName;
35
+
36
+    /**
37
+     * 类型
38
+     */
39
+    private String type;
40
+
41
+}

+ 51 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionDto.java

@@ -0,0 +1,51 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.math.BigDecimal;
6
+
7
+/**
8
+ * 巡检大屏:问题整改
9
+ *
10
+ * @author ruoyi
11
+ * @date 2025-09-07
12
+ */
13
+@Data
14
+public class CheckLargeScreenCorrectionDto {
15
+
16
+    /**
17
+     * 部门ID
18
+     */
19
+    private Long deptId;
20
+
21
+    /**
22
+     * 部门名称
23
+     */
24
+    private String deptName;
25
+
26
+    /**
27
+     * 按期已完成数量
28
+     */
29
+    private BigDecimal onTimeCompletedCount;
30
+
31
+    /**
32
+     * 超期已完成数量
33
+     */
34
+    private BigDecimal overTimeCompletedCount;
35
+
36
+    /**
37
+     * 按期整改中数量
38
+     */
39
+    private BigDecimal onTimeUnfinishedCount;
40
+
41
+    /**
42
+     * 超期整改中数量
43
+     */
44
+    private BigDecimal overTimeUnfinishedCount;
45
+
46
+    /**
47
+     * 其他数量
48
+     */
49
+    private BigDecimal otherCount;
50
+
51
+}

+ 81 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionPortraitDto.java

@@ -0,0 +1,81 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.util.List;
6
+
7
+/**
8
+ * 巡检大屏:问题整改
9
+ *
10
+ * @author ruoyi
11
+ * @date 2025-09-07
12
+ */
13
+@Data
14
+public class CheckLargeScreenCorrectionPortraitDto {
15
+
16
+    /**
17
+     * 总问题数
18
+     */
19
+    private Integer sumCount;
20
+
21
+    /**
22
+     * 本站总排名
23
+     */
24
+    private Integer stationRanking;
25
+
26
+    /**
27
+     * 本站总人数
28
+     */
29
+    private Integer stationTotal;
30
+
31
+    /**
32
+     * 本科总排名
33
+     */
34
+    private Integer departmentRanking;
35
+
36
+    /**
37
+     * 本科总人数
38
+     */
39
+    private Integer departmentTotal;
40
+
41
+    /**
42
+     * 本班总排名
43
+     */
44
+    private Integer teamRanking;
45
+
46
+    /**
47
+     * 本班总人数
48
+     */
49
+    private Integer teamTotal;
50
+
51
+    /**
52
+     * 按期已完成数量
53
+     */
54
+    private Integer onTimeCompletedCount;
55
+
56
+    /**
57
+     * 超期已完成数量
58
+     */
59
+    private Integer overTimeCompletedCount;
60
+
61
+    /**
62
+     * 按期整改中数量
63
+     */
64
+    private Integer onTimeUnfinishedCount;
65
+
66
+    /**
67
+     * 超期整改中数量
68
+     */
69
+    private Integer overTimeUnfinishedCount;
70
+
71
+    /**
72
+     * 其他数量
73
+     */
74
+    private Integer otherCount;
75
+
76
+    /**
77
+     * 分类列表
78
+     */
79
+    List<CheckLargeScreenProblemDto> checkLargeScreenCommonDtoList;
80
+
81
+}

+ 77 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionPortraitSqlDto.java

@@ -0,0 +1,77 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.io.Serializable;
6
+
7
+/**
8
+ * 巡检大屏:问题整改
9
+ *
10
+ * @author ruoyi
11
+ * @date 2025-09-07
12
+ */
13
+@Data
14
+public class CheckLargeScreenCorrectionPortraitSqlDto implements Serializable {
15
+
16
+    private static final long serialVersionUID = 1L;
17
+    /**
18
+     * 整改单ID
19
+     */
20
+    private Long id;
21
+
22
+    /**
23
+     * 被检查科室ID
24
+     */
25
+    private Long checkedDepartmentId;
26
+
27
+    /**
28
+     * 被检查科室名称
29
+     */
30
+    private String checkedDepartmentName;
31
+
32
+    /**
33
+     * 被检查班组ID
34
+     */
35
+    private Long checkedTeamId;
36
+
37
+    /**
38
+     * 被检查班组名称
39
+     */
40
+    private String checkedTeamName;
41
+
42
+    /**
43
+     * 1级分类编码
44
+     */
45
+    private String categoryCodeOne;
46
+
47
+    /**
48
+     * 1级分类名称
49
+     */
50
+    private String categoryNameOne;
51
+
52
+    /**
53
+     * 2级分类编码
54
+     */
55
+    private String categoryCodeTwo;
56
+
57
+    /**
58
+     * 2级分类名称
59
+     */
60
+    private String categoryNameTwo;
61
+
62
+    /**
63
+     * 用户ID
64
+     */
65
+    private Long userId;
66
+
67
+    /**
68
+     * 用户名称
69
+     */
70
+    private String userName;
71
+
72
+    /**
73
+     * 整改单状态
74
+     */
75
+    private String correctionType;
76
+
77
+}

+ 40 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionQueryParamDto.java

@@ -0,0 +1,40 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import com.sundot.airport.common.core.domain.BaseLargeScreenQueryParamDto;
4
+import lombok.Data;
5
+
6
+/**
7
+ * 巡检大屏:问题整改查询参数
8
+ *
9
+ * @author ruoyi
10
+ * @date 2025-09-07
11
+ */
12
+@Data
13
+public class CheckLargeScreenCorrectionQueryParamDto extends BaseLargeScreenQueryParamDto {
14
+
15
+    /**
16
+     * 是否科内自查(0=否;1=是)
17
+     */
18
+    private Integer isSelfCheck;
19
+
20
+    /**
21
+     * 被检查科室ID
22
+     */
23
+    private Long checkedDepartmentId;
24
+
25
+    /**
26
+     * 被检查班组ID
27
+     */
28
+    private Long checkedTeamId;
29
+
30
+    /**
31
+     * 被检查人员ID
32
+     */
33
+    private Long checkedUserId;
34
+
35
+    /**
36
+     * 流程状态
37
+     */
38
+    private String processStatus;
39
+
40
+}

+ 84 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenInspectionExecuteDto.java

@@ -0,0 +1,84 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import com.fasterxml.jackson.annotation.JsonFormat;
4
+import lombok.Data;
5
+
6
+import java.io.Serializable;
7
+import java.math.BigDecimal;
8
+import java.util.Date;
9
+import java.util.List;
10
+
11
+/**
12
+ * 巡检大屏:巡检执行
13
+ *
14
+ * @author ruoyi
15
+ * @date 2025-09-07
16
+ */
17
+@Data
18
+public class CheckLargeScreenInspectionExecuteDto implements Serializable {
19
+
20
+    private static final long serialVersionUID = 1L;
21
+
22
+    /**
23
+     * 任务ID
24
+     */
25
+    private Long taskId;
26
+
27
+    /**
28
+     * 任务编码
29
+     */
30
+    private String taskCode;
31
+
32
+    /**
33
+     * 任务名称
34
+     */
35
+    private String taskName;
36
+
37
+    /**
38
+     * 检查级别
39
+     */
40
+    private String checkLevel;
41
+
42
+    /**
43
+     * 检查级别名称
44
+     */
45
+    private String checkLevelDesc;
46
+
47
+    /**
48
+     * 定期任务规则次数
49
+     */
50
+    private Long ruleTypeNum;
51
+
52
+    /**
53
+     * 检查开始时间
54
+     */
55
+    @JsonFormat(pattern = "yyyy-MM-dd")
56
+    private Date checkStartTime;
57
+
58
+    /**
59
+     * 检查结束时间
60
+     */
61
+    @JsonFormat(pattern = "yyyy-MM-dd")
62
+    private Date checkEndTime;
63
+
64
+    /**
65
+     * 已完成人数
66
+     */
67
+    private BigDecimal completedCount;
68
+
69
+    /**
70
+     * 进行中人数
71
+     */
72
+    private BigDecimal inProgressCount;
73
+
74
+    /**
75
+     * 未开始人数
76
+     */
77
+    private BigDecimal notStartedCount;
78
+
79
+    /**
80
+     * 巡检执行明细列表
81
+     */
82
+    private List<CheckLargeScreenInspectionExecuteItemDto> checkLargeScreenInspectionExecuteItemDtoList;
83
+
84
+}

+ 69 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenInspectionExecuteItemDto.java

@@ -0,0 +1,69 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.io.Serializable;
6
+import java.math.BigDecimal;
7
+
8
+/**
9
+ * 巡检大屏:巡检执行明细
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-09-07
13
+ */
14
+@Data
15
+public class CheckLargeScreenInspectionExecuteItemDto implements Serializable {
16
+
17
+    private static final long serialVersionUID = 1L;
18
+
19
+    /**
20
+     * 任务ID
21
+     */
22
+    private Long taskId;
23
+
24
+    /**
25
+     * 任务编码
26
+     */
27
+    private String taskCode;
28
+
29
+    /**
30
+     * 任务名称
31
+     */
32
+    private String taskName;
33
+
34
+    /**
35
+     * 定期任务规则次数
36
+     */
37
+    private Long ruleTypeNum;
38
+
39
+    /**
40
+     * 用户ID
41
+     */
42
+    private Long userId;
43
+
44
+    /**
45
+     * 用户名称
46
+     */
47
+    private String userName;
48
+
49
+    /**
50
+     * 今日完成比例
51
+     */
52
+    private BigDecimal completionPercentage;
53
+
54
+    /**
55
+     * 检查单数量
56
+     */
57
+    private BigDecimal checkOrderCount;
58
+
59
+    /**
60
+     * 整改单数量
61
+     */
62
+    private BigDecimal rectificationOrderCount;
63
+
64
+    /**
65
+     * 不合格项数量
66
+     */
67
+    private BigDecimal unqualifiedProjectCount;
68
+
69
+}

+ 55 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenInspectionExecuteUserDto.java

@@ -0,0 +1,55 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+
6
+import java.io.Serializable;
7
+
8
+
9
+/**
10
+ * 巡检大屏:巡检执行-用户信息
11
+ *
12
+ * @author ruoyi
13
+ * @date 2025-09-07
14
+ */
15
+@Data
16
+public class CheckLargeScreenInspectionExecuteUserDto implements Serializable {
17
+
18
+    private static final long serialVersionUID = 1L;
19
+
20
+    /**
21
+     * 用户ID
22
+     */
23
+    private Long userId;
24
+
25
+    /**
26
+     * 用户账号
27
+     */
28
+    private String userName;
29
+
30
+    /**
31
+     * 用户昵称
32
+     */
33
+    private String nickName;
34
+
35
+    /**
36
+     * 部门ID
37
+     */
38
+    private Long deptId;
39
+
40
+    /**
41
+     * 角色ID
42
+     */
43
+    private Long roleId;
44
+
45
+    /**
46
+     * 角色名称
47
+     */
48
+    private String roleName;
49
+
50
+    /**
51
+     * 角色权限字符串
52
+     */
53
+    private String roleKey;
54
+
55
+}

+ 39 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenPlanOverviewDto.java

@@ -0,0 +1,39 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.io.Serializable;
6
+import java.math.BigDecimal;
7
+
8
+/**
9
+ * 巡检大屏:巡检计划-计划安排总览
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-09-07
13
+ */
14
+@Data
15
+public class CheckLargeScreenPlanOverviewDto implements Serializable {
16
+
17
+    private static final long serialVersionUID = 1L;
18
+
19
+    /**
20
+     * 日期
21
+     */
22
+    private String date;
23
+
24
+    /**
25
+     * 类型
26
+     */
27
+    private String type;
28
+
29
+    /**
30
+     * 类型描述
31
+     */
32
+    private String typeDesc;
33
+
34
+    /**
35
+     * 总数
36
+     */
37
+    private BigDecimal total;
38
+
39
+}

+ 25 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenPlanQueryParamDto.java

@@ -0,0 +1,25 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import com.sundot.airport.common.core.domain.BaseLargeScreenQueryParamDto;
4
+import lombok.Data;
5
+
6
+/**
7
+ * 巡检大屏:巡检计划查询参数
8
+ *
9
+ * @author ruoyi
10
+ * @date 2025-09-07
11
+ */
12
+@Data
13
+public class CheckLargeScreenPlanQueryParamDto extends BaseLargeScreenQueryParamDto {
14
+
15
+    /**
16
+     * 是否科内自查(0=否;1=是)
17
+     */
18
+    private Integer isSelfCheck;
19
+
20
+    /**
21
+     * 创建人ID
22
+     */
23
+    private Long createId;
24
+
25
+}

+ 36 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenProblemDto.java

@@ -0,0 +1,36 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.util.List;
6
+
7
+/**
8
+ * 巡检大屏:问题发现-问题分布对比
9
+ *
10
+ * @author ruoyi
11
+ * @date 2025-09-07
12
+ */
13
+@Data
14
+public class CheckLargeScreenProblemDto extends CheckLargeScreenCommonDto {
15
+
16
+    /**
17
+     * 部门ID
18
+     */
19
+    private Long deptId;
20
+
21
+    /**
22
+     * 部门名称
23
+     */
24
+    private String deptName;
25
+
26
+    /**
27
+     * 问题对比
28
+     */
29
+    private List<CheckLargeScreenProblemDto> checkLargeScreenProblemDtoList;
30
+
31
+    /**
32
+     * 问题趋势
33
+     */
34
+    private List<CheckLargeScreenProblemTrendDto> checkLargeScreenProblemTrendDtoList;
35
+
36
+}

+ 35 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenProblemQueryParamDto.java

@@ -0,0 +1,35 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import com.sundot.airport.common.core.domain.BaseLargeScreenQueryParamDto;
4
+import lombok.Data;
5
+
6
+/**
7
+ * 巡检大屏:问题发现查询参数
8
+ *
9
+ * @author ruoyi
10
+ * @date 2025-09-07
11
+ */
12
+@Data
13
+public class CheckLargeScreenProblemQueryParamDto extends BaseLargeScreenQueryParamDto {
14
+
15
+    /**
16
+     * 是否科内自查(0=否;1=是)
17
+     */
18
+    private Integer isSelfCheck;
19
+
20
+    /**
21
+     * 被检查科室ID
22
+     */
23
+    private Long checkedDepartmentId;
24
+
25
+    /**
26
+     * 被检查班组ID
27
+     */
28
+    private Long checkedTeamId;
29
+
30
+    /**
31
+     * 检查项目一级分类编码
32
+     */
33
+    private String categoryCodeOne;
34
+
35
+}

+ 44 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenProblemTrendDto.java

@@ -0,0 +1,44 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.io.Serializable;
6
+import java.math.BigDecimal;
7
+
8
+/**
9
+ * 巡检大屏:通道面貌-问题趋势
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-09-07
13
+ */
14
+@Data
15
+public class CheckLargeScreenProblemTrendDto implements Serializable {
16
+
17
+    private static final long serialVersionUID = 1L;
18
+
19
+    /**
20
+     * 日期
21
+     */
22
+    private String date;
23
+
24
+    /**
25
+     * 主键
26
+     */
27
+    private Long id;
28
+
29
+    /**
30
+     * 编码
31
+     */
32
+    private String code;
33
+
34
+    /**
35
+     * 名称
36
+     */
37
+    private String name;
38
+
39
+    /**
40
+     * 总数
41
+     */
42
+    private BigDecimal total;
43
+
44
+}

+ 485 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckProjectItem.java

@@ -0,0 +1,485 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import java.util.Date;
4
+import java.util.List;
5
+
6
+import com.baomidou.mybatisplus.annotation.IdType;
7
+import com.baomidou.mybatisplus.annotation.TableField;
8
+import com.baomidou.mybatisplus.annotation.TableId;
9
+import com.baomidou.mybatisplus.annotation.TableName;
10
+import com.fasterxml.jackson.annotation.JsonFormat;
11
+import org.apache.commons.lang3.builder.ToStringBuilder;
12
+import org.apache.commons.lang3.builder.ToStringStyle;
13
+import com.sundot.airport.common.annotation.Excel;
14
+import com.sundot.airport.common.core.domain.BaseEntity;
15
+
16
+/**
17
+ * 检查单和检查记录和问题整改的检查项明细对象 check_project_item
18
+ *
19
+ * @author ruoyi
20
+ * @date 2025-07-11
21
+ */
22
+@TableName("check_project_item")
23
+public class CheckProjectItem extends BaseEntity {
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 租户号
28
+     */
29
+    private String tenantId;
30
+
31
+    /**
32
+     * 乐观锁
33
+     */
34
+    private Long revision;
35
+
36
+    /**
37
+     * 主键
38
+     */
39
+    @TableId(type = IdType.AUTO)
40
+    private Long id;
41
+
42
+    /**
43
+     * 检查单ID或者检查记录ID或者问题整改ID
44
+     */
45
+    @Excel(name = "检查单ID或者检查记录ID或者问题整改ID")
46
+    private Long sourceId;
47
+
48
+    /**
49
+     * 检查项目编码
50
+     */
51
+    @Excel(name = "检查项目编码")
52
+    private String projectCode;
53
+
54
+    /**
55
+     * 类型
56
+     */
57
+    @Excel(name = "类型")
58
+    private String type;
59
+
60
+    /**
61
+     * 检查项目名称
62
+     */
63
+    @Excel(name = "检查项目名称")
64
+    private String projectName;
65
+
66
+    /**
67
+     * 1级分类编码
68
+     */
69
+    @Excel(name = "1级分类编码")
70
+    private String categoryCodeOne;
71
+
72
+    /**
73
+     * 1级分类名称
74
+     */
75
+    @Excel(name = "1级分类名称")
76
+    private String categoryNameOne;
77
+
78
+    /**
79
+     * 2级分类编码
80
+     */
81
+    @Excel(name = "2级分类编码")
82
+    private String categoryCodeTwo;
83
+
84
+    /**
85
+     * 2级分类名称
86
+     */
87
+    @Excel(name = "2级分类名称")
88
+    private String categoryNameTwo;
89
+
90
+    /**
91
+     * 得分
92
+     */
93
+    @Excel(name = "得分")
94
+    private Long score;
95
+
96
+    /**
97
+     * 得分等级
98
+     */
99
+    @Excel(name = "得分等级")
100
+    private String scoreLevel;
101
+
102
+    /**
103
+     * 类型名称
104
+     */
105
+    @Excel(name = "类型名称")
106
+    private String typeDesc;
107
+
108
+    /**
109
+     * 得分等级名称
110
+     */
111
+    @Excel(name = "得分等级名称")
112
+    private String scoreLevelDesc;
113
+
114
+    /**
115
+     * 检查内容
116
+     */
117
+    @Excel(name = "检查内容")
118
+    private String inspectionContent;
119
+
120
+    /**
121
+     * 总分
122
+     */
123
+    @Excel(name = "总分")
124
+    private Long scoreTotal;
125
+
126
+    /**
127
+     * 评价类型
128
+     */
129
+    @Excel(name = "评价类型")
130
+    private String evaluationType;
131
+
132
+    /**
133
+     * 评价类型名称
134
+     */
135
+    @Excel(name = "评价类型名称")
136
+    private String evaluationTypeDesc;
137
+
138
+    /**
139
+     * 整改人
140
+     */
141
+    @Excel(name = "整改人")
142
+    private Long correctionUserId;
143
+
144
+    /**
145
+     * 整改人名称
146
+     */
147
+    @Excel(name = "整改人名称")
148
+    private String correctionUserName;
149
+
150
+    /**
151
+     * 整改期限
152
+     */
153
+    @JsonFormat(pattern = "yyyy-MM-dd")
154
+    @Excel(name = "整改期限", width = 30, dateFormat = "yyyy-MM-dd")
155
+    private Date rectificationDeadline;
156
+
157
+    /**
158
+     * 整改状态
159
+     */
160
+    @Excel(name = "整改状态")
161
+    private String correctionStatus;
162
+
163
+    /**
164
+     * 整改状态名称
165
+     */
166
+    @Excel(name = "整改状态名称")
167
+    private String correctionStatusDesc;
168
+
169
+    /**
170
+     * 问题描述
171
+     */
172
+    @Excel(name = "问题描述")
173
+    private String problemDescription;
174
+
175
+    /**
176
+     * 附件ID
177
+     */
178
+    @Excel(name = "附件ID")
179
+    private String attachmentId;
180
+
181
+    /**
182
+     * 附件URL
183
+     */
184
+    @Excel(name = "附件URL")
185
+    private String attachmentUrl;
186
+
187
+    /**
188
+     * 附件名称
189
+     */
190
+    @Excel(name = "附件名称")
191
+    private String attachmentName;
192
+
193
+    /**
194
+     * 奖励建议
195
+     */
196
+    @Excel(name = "奖励建议")
197
+    private String rewardSuggestion;
198
+
199
+    /**
200
+     * 涉及人员列表
201
+     */
202
+    @TableField(exist = false)
203
+    private List<CheckUser> checkUserList;
204
+
205
+    public void setTenantId(String tenantId) {
206
+        this.tenantId = tenantId;
207
+    }
208
+
209
+    public String getTenantId() {
210
+        return tenantId;
211
+    }
212
+
213
+    public void setRevision(Long revision) {
214
+        this.revision = revision;
215
+    }
216
+
217
+    public Long getRevision() {
218
+        return revision;
219
+    }
220
+
221
+    public void setId(Long id) {
222
+        this.id = id;
223
+    }
224
+
225
+    public Long getId() {
226
+        return id;
227
+    }
228
+
229
+    public void setSourceId(Long sourceId) {
230
+        this.sourceId = sourceId;
231
+    }
232
+
233
+    public Long getSourceId() {
234
+        return sourceId;
235
+    }
236
+
237
+    public void setProjectCode(String projectCode) {
238
+        this.projectCode = projectCode;
239
+    }
240
+
241
+    public String getProjectCode() {
242
+        return projectCode;
243
+    }
244
+
245
+    public void setType(String type) {
246
+        this.type = type;
247
+    }
248
+
249
+    public String getType() {
250
+        return type;
251
+    }
252
+
253
+    public void setProjectName(String projectName) {
254
+        this.projectName = projectName;
255
+    }
256
+
257
+    public String getProjectName() {
258
+        return projectName;
259
+    }
260
+
261
+    public void setCategoryCodeOne(String categoryCodeOne) {
262
+        this.categoryCodeOne = categoryCodeOne;
263
+    }
264
+
265
+    public String getCategoryCodeOne() {
266
+        return categoryCodeOne;
267
+    }
268
+
269
+    public void setCategoryNameOne(String categoryNameOne) {
270
+        this.categoryNameOne = categoryNameOne;
271
+    }
272
+
273
+    public String getCategoryNameOne() {
274
+        return categoryNameOne;
275
+    }
276
+
277
+    public void setCategoryCodeTwo(String categoryCodeTwo) {
278
+        this.categoryCodeTwo = categoryCodeTwo;
279
+    }
280
+
281
+    public String getCategoryCodeTwo() {
282
+        return categoryCodeTwo;
283
+    }
284
+
285
+    public void setCategoryNameTwo(String categoryNameTwo) {
286
+        this.categoryNameTwo = categoryNameTwo;
287
+    }
288
+
289
+    public String getCategoryNameTwo() {
290
+        return categoryNameTwo;
291
+    }
292
+
293
+    public void setScore(Long score) {
294
+        this.score = score;
295
+    }
296
+
297
+    public Long getScore() {
298
+        return score;
299
+    }
300
+
301
+    public void setScoreLevel(String scoreLevel) {
302
+        this.scoreLevel = scoreLevel;
303
+    }
304
+
305
+    public String getScoreLevel() {
306
+        return scoreLevel;
307
+    }
308
+
309
+    public void setTypeDesc(String typeDesc) {
310
+        this.typeDesc = typeDesc;
311
+    }
312
+
313
+    public String getTypeDesc() {
314
+        return typeDesc;
315
+    }
316
+
317
+    public void setScoreLevelDesc(String scoreLevelDesc) {
318
+        this.scoreLevelDesc = scoreLevelDesc;
319
+    }
320
+
321
+    public String getScoreLevelDesc() {
322
+        return scoreLevelDesc;
323
+    }
324
+
325
+    public void setInspectionContent(String inspectionContent) {
326
+        this.inspectionContent = inspectionContent;
327
+    }
328
+
329
+    public String getInspectionContent() {
330
+        return inspectionContent;
331
+    }
332
+
333
+    public void setScoreTotal(Long scoreTotal) {
334
+        this.scoreTotal = scoreTotal;
335
+    }
336
+
337
+    public Long getScoreTotal() {
338
+        return scoreTotal;
339
+    }
340
+
341
+    public void setEvaluationType(String evaluationType) {
342
+        this.evaluationType = evaluationType;
343
+    }
344
+
345
+    public String getEvaluationType() {
346
+        return evaluationType;
347
+    }
348
+
349
+    public void setEvaluationTypeDesc(String evaluationTypeDesc) {
350
+        this.evaluationTypeDesc = evaluationTypeDesc;
351
+    }
352
+
353
+    public String getEvaluationTypeDesc() {
354
+        return evaluationTypeDesc;
355
+    }
356
+
357
+    public void setCorrectionUserId(Long correctionUserId) {
358
+        this.correctionUserId = correctionUserId;
359
+    }
360
+
361
+    public Long getCorrectionUserId() {
362
+        return correctionUserId;
363
+    }
364
+
365
+    public void setCorrectionUserName(String correctionUserName) {
366
+        this.correctionUserName = correctionUserName;
367
+    }
368
+
369
+    public String getCorrectionUserName() {
370
+        return correctionUserName;
371
+    }
372
+
373
+    public void setRectificationDeadline(Date rectificationDeadline) {
374
+        this.rectificationDeadline = rectificationDeadline;
375
+    }
376
+
377
+    public Date getRectificationDeadline() {
378
+        return rectificationDeadline;
379
+    }
380
+
381
+    public void setCorrectionStatus(String correctionStatus) {
382
+        this.correctionStatus = correctionStatus;
383
+    }
384
+
385
+    public String getCorrectionStatus() {
386
+        return correctionStatus;
387
+    }
388
+
389
+    public void setCorrectionStatusDesc(String correctionStatusDesc) {
390
+        this.correctionStatusDesc = correctionStatusDesc;
391
+    }
392
+
393
+    public String getCorrectionStatusDesc() {
394
+        return correctionStatusDesc;
395
+    }
396
+
397
+    public void setProblemDescription(String problemDescription) {
398
+        this.problemDescription = problemDescription;
399
+    }
400
+
401
+    public String getProblemDescription() {
402
+        return problemDescription;
403
+    }
404
+
405
+    public void setAttachmentId(String attachmentId) {
406
+        this.attachmentId = attachmentId;
407
+    }
408
+
409
+    public String getAttachmentId() {
410
+        return attachmentId;
411
+    }
412
+
413
+    public void setAttachmentUrl(String attachmentUrl) {
414
+        this.attachmentUrl = attachmentUrl;
415
+    }
416
+
417
+    public String getAttachmentUrl() {
418
+        return attachmentUrl;
419
+    }
420
+
421
+    public void setAttachmentName(String attachmentName) {
422
+        this.attachmentName = attachmentName;
423
+    }
424
+
425
+    public String getAttachmentName() {
426
+        return attachmentName;
427
+    }
428
+
429
+    public void setRewardSuggestion(String rewardSuggestion) {
430
+        this.rewardSuggestion = rewardSuggestion;
431
+    }
432
+
433
+    public String getRewardSuggestion() {
434
+        return rewardSuggestion;
435
+    }
436
+
437
+    public List<CheckUser> getCheckUserList() {
438
+        return checkUserList;
439
+    }
440
+
441
+    public void setCheckUserList(List<CheckUser> checkUserList) {
442
+        this.checkUserList = checkUserList;
443
+    }
444
+
445
+    @Override
446
+    public String toString() {
447
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
448
+                .append("tenantId", getTenantId())
449
+                .append("revision", getRevision())
450
+                .append("createBy", getCreateBy())
451
+                .append("createTime", getCreateTime())
452
+                .append("updateBy", getUpdateBy())
453
+                .append("updateTime", getUpdateTime())
454
+                .append("id", getId())
455
+                .append("sourceId", getSourceId())
456
+                .append("projectCode", getProjectCode())
457
+                .append("type", getType())
458
+                .append("projectName", getProjectName())
459
+                .append("categoryCodeOne", getCategoryCodeOne())
460
+                .append("categoryNameOne", getCategoryNameOne())
461
+                .append("categoryCodeTwo", getCategoryCodeTwo())
462
+                .append("categoryNameTwo", getCategoryNameTwo())
463
+                .append("score", getScore())
464
+                .append("scoreLevel", getScoreLevel())
465
+                .append("typeDesc", getTypeDesc())
466
+                .append("scoreLevelDesc", getScoreLevelDesc())
467
+                .append("remark", getRemark())
468
+                .append("inspectionContent", getInspectionContent())
469
+                .append("scoreTotal", getScoreTotal())
470
+                .append("evaluationType", getEvaluationType())
471
+                .append("evaluationTypeDesc", getEvaluationTypeDesc())
472
+                .append("correctionUserId", getCorrectionUserId())
473
+                .append("correctionUserName", getCorrectionUserName())
474
+                .append("rectificationDeadline", getRectificationDeadline())
475
+                .append("correctionStatus", getCorrectionStatus())
476
+                .append("correctionStatusDesc", getCorrectionStatusDesc())
477
+                .append("problemDescription", getProblemDescription())
478
+                .append("attachmentId", getAttachmentId())
479
+                .append("attachmentUrl", getAttachmentUrl())
480
+                .append("attachmentName", getAttachmentName())
481
+                .append("rewardSuggestion", getRewardSuggestion())
482
+                .append("checkUserList", getCheckUserList())
483
+                .toString();
484
+    }
485
+}

Fichier diff supprimé car celui-ci est trop grand
+ 1103 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckRecord.java


+ 487 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckTask.java

@@ -0,0 +1,487 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import java.util.Date;
4
+import java.util.List;
5
+
6
+import com.baomidou.mybatisplus.annotation.IdType;
7
+import com.baomidou.mybatisplus.annotation.TableField;
8
+import com.baomidou.mybatisplus.annotation.TableId;
9
+import com.baomidou.mybatisplus.annotation.TableName;
10
+import com.fasterxml.jackson.annotation.JsonFormat;
11
+import com.sundot.airport.system.domain.vo.CheckProjectItemTreeVo;
12
+import org.apache.commons.lang3.builder.ToStringBuilder;
13
+import org.apache.commons.lang3.builder.ToStringStyle;
14
+import com.sundot.airport.common.annotation.Excel;
15
+import com.sundot.airport.common.core.domain.BaseEntity;
16
+
17
+/**
18
+ * 检查任务对象 check_task
19
+ *
20
+ * @author ruoyi
21
+ * @date 2025-09-07
22
+ */
23
+@TableName("check_task")
24
+public class CheckTask extends BaseEntity {
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    /**
28
+     * 租户号
29
+     */
30
+    private String tenantId;
31
+
32
+    /**
33
+     * 乐观锁
34
+     */
35
+    private Long revision;
36
+
37
+    /**
38
+     * 检查任务编码
39
+     */
40
+    @Excel(name = "检查任务编码")
41
+    private String taskCode;
42
+
43
+    /**
44
+     * 检查任务名称
45
+     */
46
+    @Excel(name = "检查任务名称")
47
+    private String taskName;
48
+
49
+    /**
50
+     * 检查开始时间
51
+     */
52
+    @JsonFormat(pattern = "yyyy-MM-dd")
53
+    @Excel(name = "检查开始时间", width = 30, dateFormat = "yyyy-MM-dd")
54
+    private Date checkStartTime;
55
+
56
+    /**
57
+     * 状态
58
+     */
59
+    @Excel(name = "状态")
60
+    private String status;
61
+
62
+    /**
63
+     * 检查级别
64
+     */
65
+    @Excel(name = "检查级别")
66
+    private String checkLevel;
67
+
68
+    /**
69
+     * 被检查级别
70
+     */
71
+    @Excel(name = "被检查级别")
72
+    private String checkedLevel;
73
+
74
+    /**
75
+     * 检查结果
76
+     */
77
+    @Excel(name = "检查结果")
78
+    private String checkResult;
79
+
80
+    /**
81
+     * 检查类别
82
+     */
83
+    @Excel(name = "检查类别")
84
+    private String checkCategory;
85
+
86
+    /**
87
+     * 主键
88
+     */
89
+    @TableId(type = IdType.AUTO)
90
+    private Long id;
91
+
92
+    /**
93
+     * 任务描述
94
+     */
95
+    @Excel(name = "任务描述")
96
+    private String description;
97
+
98
+    /**
99
+     * 检查结束时间
100
+     */
101
+    @JsonFormat(pattern = "yyyy-MM-dd")
102
+    @Excel(name = "检查结束时间", width = 30, dateFormat = "yyyy-MM-dd")
103
+    private Date checkEndTime;
104
+
105
+    /**
106
+     * 是否定期任务(0=否,1=是)
107
+     */
108
+    @Excel(name = "是否定期任务(0=否,1=是)")
109
+    private Long isRegularTasks;
110
+
111
+    /**
112
+     * 定期任务规则类型
113
+     */
114
+    @Excel(name = "定期任务规则类型")
115
+    private String ruleType;
116
+
117
+    /**
118
+     * 状态名称
119
+     */
120
+    @Excel(name = "状态名称")
121
+    private String statusDesc;
122
+
123
+    /**
124
+     * 检查级别名称
125
+     */
126
+    @Excel(name = "检查级别名称")
127
+    private String checkLevelDesc;
128
+
129
+    /**
130
+     * 被检查级别名称
131
+     */
132
+    @Excel(name = "被检查级别名称")
133
+    private String checkedLevelDesc;
134
+
135
+    /**
136
+     * 检查结果名称
137
+     */
138
+    @Excel(name = "检查结果名称")
139
+    private String checkResultDesc;
140
+
141
+    /**
142
+     * 检查类别名称
143
+     */
144
+    @Excel(name = "检查类别名称")
145
+    private String checkCategoryDesc;
146
+
147
+    /**
148
+     * 定期任务规则类型名称
149
+     */
150
+    @Excel(name = "定期任务规则类型名称")
151
+    private String ruleTypeDesc;
152
+
153
+    /**
154
+     * 是否科内自查(0=否;1=是)
155
+     */
156
+    @Excel(name = "是否科内自查(0=否;1=是)")
157
+    private Integer isSelfCheck;
158
+
159
+    /**
160
+     * 定期任务规则次数
161
+     */
162
+    @Excel(name = "定期任务规则次数")
163
+    private Long ruleTypeNum;
164
+
165
+    /**
166
+     * 创建人ID
167
+     */
168
+    @Excel(name = "创建人ID")
169
+    private Long createId;
170
+
171
+    /**
172
+     * 更新人ID
173
+     */
174
+    @Excel(name = "更新人ID")
175
+    private Long updateId;
176
+
177
+    /**
178
+     * 自查科室ID
179
+     */
180
+    @Excel(name = "自查科室ID")
181
+    private Long selfCheckDeptId;
182
+
183
+    /**
184
+     * 自查科室名称
185
+     */
186
+    @Excel(name = "自查科室名称")
187
+    private String selfCheckDeptName;
188
+
189
+    /**
190
+     * 是否已读
191
+     */
192
+    @TableField(exist = false)
193
+    private boolean isRead;
194
+
195
+    /**
196
+     * 检查项明细列表
197
+     */
198
+    @TableField(exist = false)
199
+    private List<CheckProjectItem> checkProjectItemList;
200
+
201
+    /**
202
+     * 检查项明细列表树形结构
203
+     */
204
+    @TableField(exist = false)
205
+    private List<CheckProjectItemTreeVo> checkProjectItemTreeVoList;
206
+
207
+    public void setTenantId(String tenantId) {
208
+        this.tenantId = tenantId;
209
+    }
210
+
211
+    public String getTenantId() {
212
+        return tenantId;
213
+    }
214
+
215
+    public void setRevision(Long revision) {
216
+        this.revision = revision;
217
+    }
218
+
219
+    public Long getRevision() {
220
+        return revision;
221
+    }
222
+
223
+    public void setTaskCode(String taskCode) {
224
+        this.taskCode = taskCode;
225
+    }
226
+
227
+    public String getTaskCode() {
228
+        return taskCode;
229
+    }
230
+
231
+    public void setTaskName(String taskName) {
232
+        this.taskName = taskName;
233
+    }
234
+
235
+    public String getTaskName() {
236
+        return taskName;
237
+    }
238
+
239
+    public void setCheckStartTime(Date checkStartTime) {
240
+        this.checkStartTime = checkStartTime;
241
+    }
242
+
243
+    public Date getCheckStartTime() {
244
+        return checkStartTime;
245
+    }
246
+
247
+    public void setStatus(String status) {
248
+        this.status = status;
249
+    }
250
+
251
+    public String getStatus() {
252
+        return status;
253
+    }
254
+
255
+    public void setCheckLevel(String checkLevel) {
256
+        this.checkLevel = checkLevel;
257
+    }
258
+
259
+    public String getCheckLevel() {
260
+        return checkLevel;
261
+    }
262
+
263
+    public void setCheckedLevel(String checkedLevel) {
264
+        this.checkedLevel = checkedLevel;
265
+    }
266
+
267
+    public String getCheckedLevel() {
268
+        return checkedLevel;
269
+    }
270
+
271
+    public void setCheckResult(String checkResult) {
272
+        this.checkResult = checkResult;
273
+    }
274
+
275
+    public String getCheckResult() {
276
+        return checkResult;
277
+    }
278
+
279
+    public void setCheckCategory(String checkCategory) {
280
+        this.checkCategory = checkCategory;
281
+    }
282
+
283
+    public String getCheckCategory() {
284
+        return checkCategory;
285
+    }
286
+
287
+    public void setId(Long id) {
288
+        this.id = id;
289
+    }
290
+
291
+    public Long getId() {
292
+        return id;
293
+    }
294
+
295
+    public void setDescription(String description) {
296
+        this.description = description;
297
+    }
298
+
299
+    public String getDescription() {
300
+        return description;
301
+    }
302
+
303
+    public void setCheckEndTime(Date checkEndTime) {
304
+        this.checkEndTime = checkEndTime;
305
+    }
306
+
307
+    public Date getCheckEndTime() {
308
+        return checkEndTime;
309
+    }
310
+
311
+    public void setIsRegularTasks(Long isRegularTasks) {
312
+        this.isRegularTasks = isRegularTasks;
313
+    }
314
+
315
+    public Long getIsRegularTasks() {
316
+        return isRegularTasks;
317
+    }
318
+
319
+    public void setRuleType(String ruleType) {
320
+        this.ruleType = ruleType;
321
+    }
322
+
323
+    public String getRuleType() {
324
+        return ruleType;
325
+    }
326
+
327
+    public void setStatusDesc(String statusDesc) {
328
+        this.statusDesc = statusDesc;
329
+    }
330
+
331
+    public String getStatusDesc() {
332
+        return statusDesc;
333
+    }
334
+
335
+    public void setCheckLevelDesc(String checkLevelDesc) {
336
+        this.checkLevelDesc = checkLevelDesc;
337
+    }
338
+
339
+    public String getCheckLevelDesc() {
340
+        return checkLevelDesc;
341
+    }
342
+
343
+    public void setCheckedLevelDesc(String checkedLevelDesc) {
344
+        this.checkedLevelDesc = checkedLevelDesc;
345
+    }
346
+
347
+    public String getCheckedLevelDesc() {
348
+        return checkedLevelDesc;
349
+    }
350
+
351
+    public void setCheckResultDesc(String checkResultDesc) {
352
+        this.checkResultDesc = checkResultDesc;
353
+    }
354
+
355
+    public String getCheckResultDesc() {
356
+        return checkResultDesc;
357
+    }
358
+
359
+    public void setCheckCategoryDesc(String checkCategoryDesc) {
360
+        this.checkCategoryDesc = checkCategoryDesc;
361
+    }
362
+
363
+    public String getCheckCategoryDesc() {
364
+        return checkCategoryDesc;
365
+    }
366
+
367
+    public void setRuleTypeDesc(String ruleTypeDesc) {
368
+        this.ruleTypeDesc = ruleTypeDesc;
369
+    }
370
+
371
+    public String getRuleTypeDesc() {
372
+        return ruleTypeDesc;
373
+    }
374
+
375
+    public void setIsSelfCheck(Integer isSelfCheck) {
376
+        this.isSelfCheck = isSelfCheck;
377
+    }
378
+
379
+    public Integer getIsSelfCheck() {
380
+        return isSelfCheck;
381
+    }
382
+
383
+    public void setRuleTypeNum(Long ruleTypeNum) {
384
+        this.ruleTypeNum = ruleTypeNum;
385
+    }
386
+
387
+    public Long getRuleTypeNum() {
388
+        return ruleTypeNum;
389
+    }
390
+
391
+    public void setCreateId(Long createId) {
392
+        this.createId = createId;
393
+    }
394
+
395
+    public Long getCreateId() {
396
+        return createId;
397
+    }
398
+
399
+    public void setUpdateId(Long updateId) {
400
+        this.updateId = updateId;
401
+    }
402
+
403
+    public Long getUpdateId() {
404
+        return updateId;
405
+    }
406
+
407
+    public void setSelfCheckDeptId(Long selfCheckDeptId) {
408
+        this.selfCheckDeptId = selfCheckDeptId;
409
+    }
410
+
411
+    public Long getSelfCheckDeptId() {
412
+        return selfCheckDeptId;
413
+    }
414
+
415
+    public void setSelfCheckDeptName(String selfCheckDeptName) {
416
+        this.selfCheckDeptName = selfCheckDeptName;
417
+    }
418
+
419
+    public String getSelfCheckDeptName() {
420
+        return selfCheckDeptName;
421
+    }
422
+
423
+    public boolean isRead() {
424
+        return isRead;
425
+    }
426
+
427
+    public void setRead(boolean read) {
428
+        isRead = read;
429
+    }
430
+
431
+    public List<CheckProjectItem> getCheckProjectItemList() {
432
+        return checkProjectItemList;
433
+    }
434
+
435
+    public void setCheckProjectItemList(List<CheckProjectItem> checkProjectItemList) {
436
+        this.checkProjectItemList = checkProjectItemList;
437
+    }
438
+
439
+    public List<CheckProjectItemTreeVo> getCheckProjectItemTreeVoList() {
440
+        return checkProjectItemTreeVoList;
441
+    }
442
+
443
+    public void setCheckProjectItemTreeVoList(List<CheckProjectItemTreeVo> checkProjectItemTreeVoList) {
444
+        this.checkProjectItemTreeVoList = checkProjectItemTreeVoList;
445
+    }
446
+
447
+    @Override
448
+    public String toString() {
449
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
450
+                .append("tenantId", getTenantId())
451
+                .append("revision", getRevision())
452
+                .append("createBy", getCreateBy())
453
+                .append("createTime", getCreateTime())
454
+                .append("updateBy", getUpdateBy())
455
+                .append("updateTime", getUpdateTime())
456
+                .append("taskCode", getTaskCode())
457
+                .append("taskName", getTaskName())
458
+                .append("checkStartTime", getCheckStartTime())
459
+                .append("status", getStatus())
460
+                .append("checkLevel", getCheckLevel())
461
+                .append("checkedLevel", getCheckedLevel())
462
+                .append("checkResult", getCheckResult())
463
+                .append("checkCategory", getCheckCategory())
464
+                .append("id", getId())
465
+                .append("description", getDescription())
466
+                .append("checkEndTime", getCheckEndTime())
467
+                .append("isRegularTasks", getIsRegularTasks())
468
+                .append("ruleType", getRuleType())
469
+                .append("statusDesc", getStatusDesc())
470
+                .append("checkLevelDesc", getCheckLevelDesc())
471
+                .append("checkedLevelDesc", getCheckedLevelDesc())
472
+                .append("checkResultDesc", getCheckResultDesc())
473
+                .append("checkCategoryDesc", getCheckCategoryDesc())
474
+                .append("ruleTypeDesc", getRuleTypeDesc())
475
+                .append("remark", getRemark())
476
+                .append("isSelfCheck", getIsSelfCheck())
477
+                .append("ruleTypeNum", getRuleTypeNum())
478
+                .append("createId", getCreateId())
479
+                .append("updateId", getUpdateId())
480
+                .append("selfCheckDeptId", getSelfCheckDeptId())
481
+                .append("selfCheckDeptName", getSelfCheckDeptName())
482
+                .append("isRead", isRead())
483
+                .append("checkProjectItemList", getCheckProjectItemList())
484
+                .append("checkProjectItemTreeVoList", getCheckProjectItemTreeVoList())
485
+                .toString();
486
+    }
487
+}

+ 179 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckUser.java

@@ -0,0 +1,179 @@
1
+package com.sundot.airport.check.domain;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import org.apache.commons.lang3.builder.ToStringBuilder;
7
+import org.apache.commons.lang3.builder.ToStringStyle;
8
+import com.sundot.airport.common.annotation.Excel;
9
+import com.sundot.airport.common.core.domain.BaseEntity;
10
+
11
+/**
12
+ * 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人对象 check_user
13
+ *
14
+ * @author ruoyi
15
+ * @date 2025-07-11
16
+ */
17
+@TableName("check_user")
18
+public class CheckUser extends BaseEntity {
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /**
22
+     * 租户号
23
+     */
24
+    private String tenantId;
25
+
26
+    /**
27
+     * 乐观锁
28
+     */
29
+    private Long revision;
30
+
31
+    /**
32
+     * 主键
33
+     */
34
+    @TableId(type = IdType.AUTO)
35
+    private Long id;
36
+
37
+    /**
38
+     * 来源ID
39
+     */
40
+    @Excel(name = "来源ID")
41
+    private Long sourceId;
42
+
43
+    /**
44
+     * 用户ID
45
+     */
46
+    @Excel(name = "用户ID")
47
+    private Long userId;
48
+
49
+    /**
50
+     * 用户名称
51
+     */
52
+    @Excel(name = "用户名称")
53
+    private String userName;
54
+
55
+    /**
56
+     * 来源类型
57
+     */
58
+    @Excel(name = "来源类型")
59
+    private String type;
60
+
61
+    /**
62
+     * 来源类型名称
63
+     */
64
+    @Excel(name = "来源类型名称")
65
+    private String typeDesc;
66
+
67
+    /**
68
+     * 部门ID
69
+     */
70
+    @Excel(name = "部门ID")
71
+    private Long deptId;
72
+
73
+    /**
74
+     * 部门名称
75
+     */
76
+    @Excel(name = "部门名称")
77
+    private String deptName;
78
+
79
+    public void setTenantId(String tenantId) {
80
+        this.tenantId = tenantId;
81
+    }
82
+
83
+    public String getTenantId() {
84
+        return tenantId;
85
+    }
86
+
87
+    public void setRevision(Long revision) {
88
+        this.revision = revision;
89
+    }
90
+
91
+    public Long getRevision() {
92
+        return revision;
93
+    }
94
+
95
+    public void setId(Long id) {
96
+        this.id = id;
97
+    }
98
+
99
+    public Long getId() {
100
+        return id;
101
+    }
102
+
103
+    public void setSourceId(Long sourceId) {
104
+        this.sourceId = sourceId;
105
+    }
106
+
107
+    public Long getSourceId() {
108
+        return sourceId;
109
+    }
110
+
111
+    public void setUserId(Long userId) {
112
+        this.userId = userId;
113
+    }
114
+
115
+    public Long getUserId() {
116
+        return userId;
117
+    }
118
+
119
+    public void setUserName(String userName) {
120
+        this.userName = userName;
121
+    }
122
+
123
+    public String getUserName() {
124
+        return userName;
125
+    }
126
+
127
+    public void setType(String type) {
128
+        this.type = type;
129
+    }
130
+
131
+    public String getType() {
132
+        return type;
133
+    }
134
+
135
+    public void setTypeDesc(String typeDesc) {
136
+        this.typeDesc = typeDesc;
137
+    }
138
+
139
+    public String getTypeDesc() {
140
+        return typeDesc;
141
+    }
142
+
143
+    public void setDeptId(Long deptId) {
144
+        this.deptId = deptId;
145
+    }
146
+
147
+    public Long getDeptId() {
148
+        return deptId;
149
+    }
150
+
151
+    public void setDeptName(String deptName) {
152
+        this.deptName = deptName;
153
+    }
154
+
155
+    public String getDeptName() {
156
+        return deptName;
157
+    }
158
+
159
+    @Override
160
+    public String toString() {
161
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
162
+                .append("tenantId", getTenantId())
163
+                .append("revision", getRevision())
164
+                .append("createBy", getCreateBy())
165
+                .append("createTime", getCreateTime())
166
+                .append("updateBy", getUpdateBy())
167
+                .append("updateTime", getUpdateTime())
168
+                .append("id", getId())
169
+                .append("sourceId", getSourceId())
170
+                .append("userId", getUserId())
171
+                .append("userName", getUserName())
172
+                .append("type", getType())
173
+                .append("typeDesc", getTypeDesc())
174
+                .append("remark", getRemark())
175
+                .append("deptId", getDeptId())
176
+                .append("deptName", getDeptName())
177
+                .toString();
178
+    }
179
+}

+ 99 - 0
airport-check/src/main/java/com/sundot/airport/check/handler/CheckCorrectionApprovalHandler.java

@@ -0,0 +1,99 @@
1
+package com.sundot.airport.check.handler;
2
+
3
+import cn.hutool.core.collection.CollUtil;
4
+import cn.hutool.core.util.ObjUtil;
5
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
6
+import com.sundot.airport.check.domain.CheckCorrection;
7
+import com.sundot.airport.check.domain.CheckUser;
8
+import com.sundot.airport.check.service.ICheckCorrectionService;
9
+import com.sundot.airport.common.enums.CheckCorrectionStatusEnum;
10
+import com.sundot.airport.common.utils.DateUtils;
11
+import com.sundot.airport.common.utils.SecurityUtils;
12
+import com.sundot.airport.system.domain.approval.ApprovalCc;
13
+import com.sundot.airport.system.domain.approval.ApprovalInstance;
14
+import com.sundot.airport.system.enums.ProcessStatusEnum;
15
+import com.sundot.airport.system.mapper.approval.ApprovalCcMapper;
16
+import com.sundot.airport.system.service.approval.BusinessApprovalHandler;
17
+import org.slf4j.Logger;
18
+import org.slf4j.LoggerFactory;
19
+import org.springframework.beans.factory.annotation.Autowired;
20
+import org.springframework.stereotype.Component;
21
+
22
+import java.util.List;
23
+import java.util.stream.Collectors;
24
+
25
+
26
+/**
27
+ * 问题整改审批处理
28
+ *
29
+ * @author sundot
30
+ */
31
+@Component
32
+public class CheckCorrectionApprovalHandler implements BusinessApprovalHandler {
33
+
34
+    private static final Logger log = LoggerFactory.getLogger(CheckCorrectionApprovalHandler.class);
35
+
36
+    @Autowired
37
+    private ICheckCorrectionService checkCorrectionService;
38
+
39
+    @Autowired
40
+    private ApprovalCcMapper ccMapper;
41
+
42
+    @Override
43
+    public boolean supports(String businessType) {
44
+        return "PERSONAL_CHECK".equals(businessType)
45
+                || "GROUP_CHECK".equals(businessType)
46
+                || "SECTION_CHECK".equals(businessType);
47
+    }
48
+
49
+    @Override
50
+    public void handleApproved(ApprovalInstance instance) {
51
+        log.info("问题整改审批 {}", instance);
52
+        if ("COMPLETED".equals(instance.getStatus())) {
53
+            LambdaUpdateWrapper<CheckCorrection> updateWrapper = new LambdaUpdateWrapper<>();
54
+            updateWrapper.eq(CheckCorrection::getId, instance.getBusinessId())
55
+                    .set(CheckCorrection::getProcessStatus, ProcessStatusEnum.ARCHIVED.getCode())
56
+                    .set(CheckCorrection::getProcessStatusDesc, ProcessStatusEnum.ARCHIVED.getInfo())
57
+                    .set(CheckCorrection::getStatus, CheckCorrectionStatusEnum.RECTIFIED.getCode())
58
+                    .set(CheckCorrection::getStatusDesc, CheckCorrectionStatusEnum.RECTIFIED.getDesc())
59
+                    .set(CheckCorrection::getCompletionTime, DateUtils.getNowDate());
60
+            checkCorrectionService.update(updateWrapper);
61
+            CheckCorrection checkCorrection = checkCorrectionService.selectCheckCorrectionById(instance.getBusinessId());
62
+            if (ObjUtil.isNull(checkCorrection)) {
63
+                return;
64
+            }
65
+            List<CheckUser> checkUserList = checkCorrection.getCheckProjectItemList().stream().filter(item -> CollUtil.isNotEmpty(item.getCheckUserList())).flatMap(item -> item.getCheckUserList().stream()).distinct().collect(Collectors.toList());
66
+            checkUserList.forEach(item -> {
67
+                ApprovalCc cc = new ApprovalCc();
68
+                cc.setInstanceId(instance.getId());
69
+                cc.setCcUserId(item.getUserId());
70
+                cc.setCcUserName(item.getUserName());
71
+                cc.setCcTime(DateUtils.getNowDate());
72
+                cc.setIsRead("0"); // 未读
73
+                cc.setCreateBy(SecurityUtils.getUsername());
74
+                cc.setCreateTime(DateUtils.getNowDate());
75
+                ccMapper.insertApprovalCc(cc);
76
+            });
77
+        } else {
78
+            LambdaUpdateWrapper<CheckCorrection> updateWrapper = new LambdaUpdateWrapper<>();
79
+            updateWrapper.eq(CheckCorrection::getId, instance.getBusinessId())
80
+                    .set(CheckCorrection::getProcessStatus, ProcessStatusEnum.AUDITING.getCode())
81
+                    .set(CheckCorrection::getProcessStatusDesc, ProcessStatusEnum.AUDITING.getInfo())
82
+                    .set(CheckCorrection::getStatus, CheckCorrectionStatusEnum.UNDER_RECTIFICATION.getCode())
83
+                    .set(CheckCorrection::getStatusDesc, CheckCorrectionStatusEnum.UNDER_RECTIFICATION.getDesc());
84
+            checkCorrectionService.update(updateWrapper);
85
+        }
86
+    }
87
+
88
+    @Override
89
+    public void handleRejected(ApprovalInstance instance) {
90
+        log.info("问题整改审批驳回 {}", instance);
91
+    }
92
+
93
+    @Override
94
+    public void handleCancelled(ApprovalInstance instance) {
95
+        log.info("问题整改审批取消{}", instance);
96
+        checkCorrectionService.lambdaUpdate().set(CheckCorrection::getProcessStatus, ProcessStatusEnum.TERMINATED.getCode()).eq(CheckCorrection::getId, instance.getBusinessId());
97
+    }
98
+
99
+}

+ 79 - 0
airport-check/src/main/java/com/sundot/airport/check/mapper/CheckCorrectionMapper.java

@@ -0,0 +1,79 @@
1
+package com.sundot.airport.check.mapper;
2
+
3
+import java.util.Date;
4
+import java.util.List;
5
+
6
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
7
+import com.sundot.airport.check.domain.CheckCorrection;
8
+import com.sundot.airport.common.dto.ModuleStatisticsDTO;
9
+import org.apache.ibatis.annotations.Param;
10
+
11
+/**
12
+ * 问题整改Mapper接口
13
+ *
14
+ * @author ruoyi
15
+ * @date 2025-09-08
16
+ */
17
+public interface CheckCorrectionMapper extends BaseMapper<CheckCorrection> {
18
+
19
+    /**
20
+     * 统计用户在指定时间范围内的巡检问题数(按二级分类)
21
+     *
22
+     * @param userId 用户ID
23
+     * @param startDate 开始日期
24
+     * @param endDate 结束日期
25
+     * @return 巡检问题统计列表
26
+     */
27
+    List<ModuleStatisticsDTO> countCheckProblemsByModule(
28
+            @Param("userId") Long userId,
29
+            @Param("startDate") Date startDate,
30
+            @Param("endDate") Date endDate
31
+    );
32
+    /**
33
+     * 查询问题整改
34
+     *
35
+     * @param id 问题整改主键
36
+     * @return 问题整改
37
+     */
38
+    public CheckCorrection selectCheckCorrectionById(Long id);
39
+
40
+    /**
41
+     * 查询问题整改列表
42
+     *
43
+     * @param checkCorrection 问题整改
44
+     * @return 问题整改集合
45
+     */
46
+    public List<CheckCorrection> selectCheckCorrectionList(CheckCorrection checkCorrection);
47
+
48
+    /**
49
+     * 新增问题整改
50
+     *
51
+     * @param checkCorrection 问题整改
52
+     * @return 结果
53
+     */
54
+    public int insertCheckCorrection(CheckCorrection checkCorrection);
55
+
56
+    /**
57
+     * 修改问题整改
58
+     *
59
+     * @param checkCorrection 问题整改
60
+     * @return 结果
61
+     */
62
+    public int updateCheckCorrection(CheckCorrection checkCorrection);
63
+
64
+    /**
65
+     * 删除问题整改
66
+     *
67
+     * @param id 问题整改主键
68
+     * @return 结果
69
+     */
70
+    public int deleteCheckCorrectionById(Long id);
71
+
72
+    /**
73
+     * 批量删除问题整改
74
+     *
75
+     * @param ids 需要删除的数据主键集合
76
+     * @return 结果
77
+     */
78
+    public int deleteCheckCorrectionByIds(Long[] ids);
79
+}

+ 195 - 0
airport-check/src/main/java/com/sundot/airport/check/mapper/CheckLargeScreenMapper.java

@@ -0,0 +1,195 @@
1
+package com.sundot.airport.check.mapper;
2
+
3
+import com.sundot.airport.check.domain.CheckLargeScreenCommonDto;
4
+import com.sundot.airport.check.domain.CheckLargeScreenCorrectionAssistDto;
5
+import com.sundot.airport.check.domain.CheckLargeScreenCorrectionDto;
6
+import com.sundot.airport.check.domain.CheckLargeScreenCorrectionPortraitSqlDto;
7
+import com.sundot.airport.check.domain.CheckLargeScreenCorrectionQueryParamDto;
8
+import com.sundot.airport.check.domain.CheckLargeScreenInspectionExecuteDto;
9
+import com.sundot.airport.check.domain.CheckLargeScreenInspectionExecuteItemDto;
10
+import com.sundot.airport.check.domain.CheckLargeScreenInspectionExecuteUserDto;
11
+import com.sundot.airport.check.domain.CheckLargeScreenPlanOverviewDto;
12
+import com.sundot.airport.check.domain.CheckLargeScreenPlanQueryParamDto;
13
+import com.sundot.airport.check.domain.CheckLargeScreenProblemDto;
14
+import com.sundot.airport.check.domain.CheckLargeScreenProblemQueryParamDto;
15
+import com.sundot.airport.check.domain.CheckLargeScreenProblemTrendDto;
16
+import com.sundot.airport.check.domain.CheckTask;
17
+
18
+import java.util.List;
19
+
20
+/**
21
+ * 巡检大屏Mapper接口
22
+ *
23
+ * @author ruoyi
24
+ * @date 2025-09-07
25
+ */
26
+public interface CheckLargeScreenMapper {
27
+
28
+    /**
29
+     * 巡检计划-计划安排总览
30
+     *
31
+     * @param dto 大屏查询参数
32
+     * @return 计划安排总览
33
+     */
34
+    public List<CheckLargeScreenPlanOverviewDto> planOverview(CheckLargeScreenPlanQueryParamDto dto);
35
+
36
+    /**
37
+     * 巡检计划-日常任务检查指标累积分布
38
+     *
39
+     * @param dto 大屏查询参数
40
+     * @return 日常任务检查指标累积分布
41
+     */
42
+    public List<CheckLargeScreenCommonDto> planDistribution(CheckLargeScreenPlanQueryParamDto dto);
43
+
44
+    /**
45
+     * 巡检计划-任务明细统计表
46
+     *
47
+     * @param dto 大屏查询参数
48
+     * @return 任务明细统计表
49
+     */
50
+    public List<CheckTask> planStatistics(CheckLargeScreenPlanQueryParamDto dto);
51
+
52
+    /**
53
+     * 问题发现-总体问题分布
54
+     *
55
+     * @param dto 大屏查询参数
56
+     * @return 总体问题分布
57
+     */
58
+    public List<CheckLargeScreenProblemDto> problemDistribution(CheckLargeScreenProblemQueryParamDto dto);
59
+
60
+    /**
61
+     * 问题发现-问题分布对比
62
+     *
63
+     * @param dto 大屏查询参数
64
+     * @return 问题分布对比
65
+     */
66
+    public List<CheckLargeScreenProblemDto> problemComparison(CheckLargeScreenProblemQueryParamDto dto);
67
+
68
+    /**
69
+     * 问题发现-通道面貌-问题对比
70
+     *
71
+     * @param dto 大屏查询参数
72
+     * @return 通道面貌-问题对比
73
+     */
74
+    public List<CheckLargeScreenProblemDto> problemComparisonTwo(CheckLargeScreenProblemQueryParamDto dto);
75
+
76
+    /**
77
+     * 问题发现-问题分布对比-班组
78
+     *
79
+     * @param dto 大屏查询参数
80
+     * @return 问题分布对比
81
+     */
82
+    public List<CheckLargeScreenProblemDto> problemComparisonBanZu(CheckLargeScreenProblemQueryParamDto dto);
83
+
84
+    /**
85
+     * 问题发现-通道面貌-问题对比-班组
86
+     *
87
+     * @param dto 大屏查询参数
88
+     * @return 通道面貌-问题对比
89
+     */
90
+    public List<CheckLargeScreenProblemDto> problemComparisonTwoBanZu(CheckLargeScreenProblemQueryParamDto dto);
91
+
92
+    /**
93
+     * 问题发现-通道面貌-问题趋势
94
+     *
95
+     * @param dto 大屏查询参数
96
+     * @return 通道面貌-问题趋势
97
+     */
98
+    public List<CheckLargeScreenProblemTrendDto> problemTrend(CheckLargeScreenProblemQueryParamDto dto);
99
+
100
+    /**
101
+     * 问题发现-通道面貌-问题趋势-班组
102
+     *
103
+     * @param dto 大屏查询参数
104
+     * @return 通道面貌-问题趋势
105
+     */
106
+    public List<CheckLargeScreenProblemTrendDto> problemTrendBanZu(CheckLargeScreenProblemQueryParamDto dto);
107
+
108
+    /**
109
+     * 问题整改
110
+     *
111
+     * @param dto 大屏查询参数
112
+     * @return 问题整改
113
+     */
114
+    public List<CheckLargeScreenCorrectionAssistDto> correction(CheckLargeScreenCorrectionQueryParamDto dto);
115
+
116
+    /**
117
+     * 问题整改-整改状态分布-科级对比
118
+     *
119
+     * @param dto 大屏查询参数
120
+     * @return 整改状态分布-科级对比
121
+     */
122
+    public List<CheckLargeScreenCorrectionDto> correctionDistribution(CheckLargeScreenCorrectionQueryParamDto dto);
123
+
124
+    /**
125
+     * 问题整改-整改状态分布-班组对比
126
+     *
127
+     * @param dto 大屏查询参数
128
+     * @return 整改状态分布-科级对比
129
+     */
130
+    public List<CheckLargeScreenCorrectionDto> correctionDistributionBanZu(CheckLargeScreenCorrectionQueryParamDto dto);
131
+
132
+    /**
133
+     * 巡检执行
134
+     *
135
+     * @return 巡检执行
136
+     */
137
+    public List<CheckLargeScreenInspectionExecuteDto> inspectionExecute();
138
+
139
+    /**
140
+     * 巡检执行明细列表
141
+     *
142
+     * @param list 大屏查询参数
143
+     * @return 巡检执行明细列表
144
+     */
145
+    public List<CheckLargeScreenInspectionExecuteItemDto> inspectionExecuteItem(List<String> list);
146
+
147
+    /**
148
+     * 巡检执行-用户信息
149
+     *
150
+     * @param list 大屏查询参数
151
+     * @return 用户信息
152
+     */
153
+    public List<CheckLargeScreenInspectionExecuteUserDto> inspectionExecuteUser(List<Long> list);
154
+
155
+    /**
156
+     * 问题发现科室汇总
157
+     *
158
+     * @param dto 大屏查询参数
159
+     * @return 问题发现科室汇总
160
+     */
161
+    public List<CheckLargeScreenProblemDto> getProblemDepartment(CheckLargeScreenProblemQueryParamDto dto);
162
+
163
+    /**
164
+     * 问题发现班组汇总
165
+     *
166
+     * @param dto 大屏查询参数
167
+     * @return 问题发现班组汇总
168
+     */
169
+    public List<CheckLargeScreenProblemDto> getProblemTeam(CheckLargeScreenProblemQueryParamDto dto);
170
+
171
+    /**
172
+     * 巡检画像
173
+     *
174
+     * @param dto 大屏查询参数
175
+     * @return 巡检画像
176
+     */
177
+    public List<CheckLargeScreenCorrectionPortraitSqlDto> portrait(CheckLargeScreenCorrectionQueryParamDto dto);
178
+
179
+    /**
180
+     * 工作画像-管理推动-检查单
181
+     *
182
+     * @param dto 大屏查询参数
183
+     * @return 工作画像-管理推动-检查单
184
+     */
185
+    public List<CheckLargeScreenPlanOverviewDto> managementPromotionRecord(CheckLargeScreenCorrectionQueryParamDto dto);
186
+
187
+    /**
188
+     * 工作画像-管理推动-整改单
189
+     *
190
+     * @param dto 大屏查询参数
191
+     * @return 工作画像-管理推动-整改单
192
+     */
193
+    public CheckLargeScreenCorrectionDto managementPromotionCorrection(CheckLargeScreenCorrectionQueryParamDto dto);
194
+
195
+}

+ 62 - 0
airport-check/src/main/java/com/sundot/airport/check/mapper/CheckProjectItemMapper.java

@@ -0,0 +1,62 @@
1
+package com.sundot.airport.check.mapper;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
+import com.sundot.airport.check.domain.CheckProjectItem;
7
+
8
+/**
9
+ * 检查单和检查记录和问题整改的检查项明细Mapper接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-07-11
13
+ */
14
+public interface CheckProjectItemMapper extends BaseMapper<CheckProjectItem> {
15
+    /**
16
+     * 查询检查单和检查记录和问题整改的检查项明细
17
+     *
18
+     * @param id 检查单和检查记录和问题整改的检查项明细主键
19
+     * @return 检查单和检查记录和问题整改的检查项明细
20
+     */
21
+    public CheckProjectItem selectCheckProjectItemById(Long id);
22
+
23
+    /**
24
+     * 查询检查单和检查记录和问题整改的检查项明细列表
25
+     *
26
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
27
+     * @return 检查单和检查记录和问题整改的检查项明细集合
28
+     */
29
+    public List<CheckProjectItem> selectCheckProjectItemList(CheckProjectItem checkProjectItem);
30
+
31
+    /**
32
+     * 新增检查单和检查记录和问题整改的检查项明细
33
+     *
34
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
35
+     * @return 结果
36
+     */
37
+    public int insertCheckProjectItem(CheckProjectItem checkProjectItem);
38
+
39
+    /**
40
+     * 修改检查单和检查记录和问题整改的检查项明细
41
+     *
42
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
43
+     * @return 结果
44
+     */
45
+    public int updateCheckProjectItem(CheckProjectItem checkProjectItem);
46
+
47
+    /**
48
+     * 删除检查单和检查记录和问题整改的检查项明细
49
+     *
50
+     * @param id 检查单和检查记录和问题整改的检查项明细主键
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckProjectItemById(Long id);
54
+
55
+    /**
56
+     * 批量删除检查单和检查记录和问题整改的检查项明细
57
+     *
58
+     * @param ids 需要删除的数据主键集合
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckProjectItemByIds(Long[] ids);
62
+}

+ 62 - 0
airport-check/src/main/java/com/sundot/airport/check/mapper/CheckRecordMapper.java

@@ -0,0 +1,62 @@
1
+package com.sundot.airport.check.mapper;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
+import com.sundot.airport.check.domain.CheckRecord;
7
+
8
+/**
9
+ * 检查记录Mapper接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-07-11
13
+ */
14
+public interface CheckRecordMapper extends BaseMapper<CheckRecord> {
15
+    /**
16
+     * 查询检查记录
17
+     *
18
+     * @param id 检查记录主键
19
+     * @return 检查记录
20
+     */
21
+    public CheckRecord selectCheckRecordById(Long id);
22
+
23
+    /**
24
+     * 查询检查记录列表
25
+     *
26
+     * @param checkRecord 检查记录
27
+     * @return 检查记录集合
28
+     */
29
+    public List<CheckRecord> selectCheckRecordList(CheckRecord checkRecord);
30
+
31
+    /**
32
+     * 新增检查记录
33
+     *
34
+     * @param checkRecord 检查记录
35
+     * @return 结果
36
+     */
37
+    public int insertCheckRecord(CheckRecord checkRecord);
38
+
39
+    /**
40
+     * 修改检查记录
41
+     *
42
+     * @param checkRecord 检查记录
43
+     * @return 结果
44
+     */
45
+    public int updateCheckRecord(CheckRecord checkRecord);
46
+
47
+    /**
48
+     * 删除检查记录
49
+     *
50
+     * @param id 检查记录主键
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckRecordById(Long id);
54
+
55
+    /**
56
+     * 批量删除检查记录
57
+     *
58
+     * @param ids 需要删除的数据主键集合
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckRecordByIds(Long[] ids);
62
+}

+ 70 - 0
airport-check/src/main/java/com/sundot/airport/check/mapper/CheckTaskMapper.java

@@ -0,0 +1,70 @@
1
+package com.sundot.airport.check.mapper;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
+import com.sundot.airport.check.domain.CheckTask;
7
+
8
+/**
9
+ * 检查任务Mapper接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-09-07
13
+ */
14
+public interface CheckTaskMapper extends BaseMapper<CheckTask> {
15
+    /**
16
+     * 查询检查任务
17
+     *
18
+     * @param id 检查任务主键
19
+     * @return 检查任务
20
+     */
21
+    public CheckTask selectCheckTaskById(Long id);
22
+
23
+    /**
24
+     * 查询检查任务列表
25
+     *
26
+     * @param checkTask 检查任务
27
+     * @return 检查任务集合
28
+     */
29
+    public List<CheckTask> selectCheckTaskList(CheckTask checkTask);
30
+
31
+    /**
32
+     * 新增检查任务
33
+     *
34
+     * @param checkTask 检查任务
35
+     * @return 结果
36
+     */
37
+    public int insertCheckTask(CheckTask checkTask);
38
+
39
+    /**
40
+     * 修改检查任务
41
+     *
42
+     * @param checkTask 检查任务
43
+     * @return 结果
44
+     */
45
+    public int updateCheckTask(CheckTask checkTask);
46
+
47
+    /**
48
+     * 删除检查任务
49
+     *
50
+     * @param id 检查任务主键
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckTaskById(Long id);
54
+
55
+    /**
56
+     * 批量删除检查任务
57
+     *
58
+     * @param ids 需要删除的数据主键集合
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckTaskByIds(Long[] ids);
62
+
63
+    /**
64
+     * 查询检查任务列表web端
65
+     *
66
+     * @param checkTask 检查任务
67
+     * @return 检查任务集合
68
+     */
69
+    public List<CheckTask> selectCheckTaskListWeb(CheckTask checkTask);
70
+}

+ 62 - 0
airport-check/src/main/java/com/sundot/airport/check/mapper/CheckUserMapper.java

@@ -0,0 +1,62 @@
1
+package com.sundot.airport.check.mapper;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
+import com.sundot.airport.check.domain.CheckUser;
7
+
8
+/**
9
+ * 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人Mapper接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-07-11
13
+ */
14
+public interface CheckUserMapper extends BaseMapper<CheckUser> {
15
+    /**
16
+     * 查询检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
17
+     *
18
+     * @param id 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人主键
19
+     * @return 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
20
+     */
21
+    public CheckUser selectCheckUserById(Long id);
22
+
23
+    /**
24
+     * 查询检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人列表
25
+     *
26
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
27
+     * @return 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人集合
28
+     */
29
+    public List<CheckUser> selectCheckUserList(CheckUser checkUser);
30
+
31
+    /**
32
+     * 新增检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
33
+     *
34
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
35
+     * @return 结果
36
+     */
37
+    public int insertCheckUser(CheckUser checkUser);
38
+
39
+    /**
40
+     * 修改检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
41
+     *
42
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
43
+     * @return 结果
44
+     */
45
+    public int updateCheckUser(CheckUser checkUser);
46
+
47
+    /**
48
+     * 删除检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
49
+     *
50
+     * @param id 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人主键
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckUserById(Long id);
54
+
55
+    /**
56
+     * 批量删除检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
57
+     *
58
+     * @param ids 需要删除的数据主键集合
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckUserByIds(Long[] ids);
62
+}

+ 78 - 0
airport-check/src/main/java/com/sundot/airport/check/service/ICheckCorrectionService.java

@@ -0,0 +1,78 @@
1
+package com.sundot.airport.check.service;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.extension.service.IService;
6
+import com.sundot.airport.check.domain.CheckCorrection;
7
+
8
+/**
9
+ * 问题整改Service接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-09-08
13
+ */
14
+public interface ICheckCorrectionService extends IService<CheckCorrection> {
15
+    /**
16
+     * 查询问题整改
17
+     *
18
+     * @param id 问题整改主键
19
+     * @return 问题整改
20
+     */
21
+    public CheckCorrection selectCheckCorrectionById(Long id);
22
+
23
+    /**
24
+     * 查询问题整改列表
25
+     *
26
+     * @param checkCorrection 问题整改
27
+     * @return 问题整改集合
28
+     */
29
+    public List<CheckCorrection> selectCheckCorrectionList(CheckCorrection checkCorrection);
30
+
31
+    /**
32
+     * 新增问题整改
33
+     *
34
+     * @param checkCorrection 问题整改
35
+     * @return 结果
36
+     */
37
+    public int insertCheckCorrection(CheckCorrection checkCorrection);
38
+
39
+    /**
40
+     * 修改问题整改
41
+     *
42
+     * @param checkCorrection 问题整改
43
+     * @return 结果
44
+     */
45
+    public int updateCheckCorrection(CheckCorrection checkCorrection);
46
+
47
+    /**
48
+     * 批量删除问题整改
49
+     *
50
+     * @param ids 需要删除的问题整改主键集合
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckCorrectionByIds(Long[] ids);
54
+
55
+    /**
56
+     * 删除问题整改信息
57
+     *
58
+     * @param id 问题整改主键
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckCorrectionById(Long id);
62
+
63
+    /**
64
+     * 审批任务(同意)
65
+     *
66
+     * @param checkCorrection 问题整改
67
+     * @return 结果
68
+     */
69
+    public int approveTask(CheckCorrection checkCorrection);
70
+
71
+    /**
72
+     * 审批任务(驳回)
73
+     *
74
+     * @param checkCorrection 问题整改
75
+     * @return 结果
76
+     */
77
+    public int rejectTask(CheckCorrection checkCorrection);
78
+}

+ 154 - 0
airport-check/src/main/java/com/sundot/airport/check/service/ICheckLargeScreenService.java

@@ -0,0 +1,154 @@
1
+package com.sundot.airport.check.service;
2
+
3
+import com.sundot.airport.check.domain.CheckLargeScreenCommonDto;
4
+import com.sundot.airport.check.domain.CheckLargeScreenCorrectionDto;
5
+import com.sundot.airport.check.domain.CheckLargeScreenCorrectionPortraitDto;
6
+import com.sundot.airport.check.domain.CheckLargeScreenCorrectionQueryParamDto;
7
+import com.sundot.airport.check.domain.CheckLargeScreenInspectionExecuteDto;
8
+import com.sundot.airport.check.domain.CheckLargeScreenPlanOverviewDto;
9
+import com.sundot.airport.check.domain.CheckLargeScreenPlanQueryParamDto;
10
+import com.sundot.airport.check.domain.CheckLargeScreenProblemDto;
11
+import com.sundot.airport.check.domain.CheckLargeScreenProblemQueryParamDto;
12
+import com.sundot.airport.check.domain.CheckLargeScreenProblemTrendDto;
13
+import com.sundot.airport.check.domain.CheckTask;
14
+import com.sundot.airport.common.core.domain.BaseLargeScreenQueryParamDto;
15
+import com.sundot.airport.common.core.domain.SysLargeScreenDetailDto;
16
+
17
+import java.math.BigDecimal;
18
+import java.util.List;
19
+
20
+/**
21
+ * 巡检大屏Service接口
22
+ *
23
+ * @author ruoyi
24
+ * @date 2025-09-07
25
+ */
26
+public interface ICheckLargeScreenService {
27
+    /**
28
+     * 巡检计划-计划安排总览
29
+     *
30
+     * @param dto 大屏查询参数
31
+     * @return 计划安排总览
32
+     */
33
+    public List<CheckLargeScreenPlanOverviewDto> planOverview(CheckLargeScreenPlanQueryParamDto dto);
34
+
35
+    /**
36
+     * 巡检计划-日常任务检查指标累积分布
37
+     *
38
+     * @param dto 大屏查询参数
39
+     * @return 日常任务检查指标累积分布
40
+     */
41
+    public List<CheckLargeScreenCommonDto> planDistribution(CheckLargeScreenPlanQueryParamDto dto);
42
+
43
+    /**
44
+     * 巡检计划-任务明细统计表
45
+     *
46
+     * @param dto 大屏查询参数
47
+     * @return 任务明细统计表
48
+     */
49
+    public List<CheckTask> planStatistics(CheckLargeScreenPlanQueryParamDto dto);
50
+
51
+    /**
52
+     * 问题发现-总体问题分布
53
+     *
54
+     * @param dto 大屏查询参数
55
+     * @return 总体问题分布
56
+     */
57
+    public List<CheckLargeScreenProblemDto> problemDistribution(CheckLargeScreenProblemQueryParamDto dto);
58
+
59
+    /**
60
+     * 问题发现-问题分布对比
61
+     *
62
+     * @param dto 大屏查询参数
63
+     * @return 问题分布对比
64
+     */
65
+    public List<CheckLargeScreenProblemDto> problemComparison(CheckLargeScreenProblemQueryParamDto dto);
66
+
67
+    /**
68
+     * 问题发现-通道面貌-问题对比
69
+     *
70
+     * @param dto 大屏查询参数
71
+     * @return 通道面貌-问题对比
72
+     */
73
+    public List<CheckLargeScreenProblemDto> problemComparisonTwo(CheckLargeScreenProblemQueryParamDto dto);
74
+
75
+    /**
76
+     * 问题发现-通道面貌-问题趋势
77
+     *
78
+     * @param dto 大屏查询参数
79
+     * @return 通道面貌-问题趋势
80
+     */
81
+    public List<CheckLargeScreenProblemTrendDto> problemTrend(CheckLargeScreenProblemQueryParamDto dto);
82
+
83
+    /**
84
+     * 问题整改-整改状态总计
85
+     *
86
+     * @param dto 大屏查询参数
87
+     * @return 整改状态总计
88
+     */
89
+    public CheckLargeScreenCorrectionDto correction(CheckLargeScreenCorrectionQueryParamDto dto);
90
+
91
+    /**
92
+     * 问题整改-整改状态分布-科级对比
93
+     *
94
+     * @param dto 大屏查询参数
95
+     * @return 整改状态总计
96
+     */
97
+    public List<CheckLargeScreenCorrectionDto> correctionDistribution(CheckLargeScreenCorrectionQueryParamDto dto);
98
+
99
+    /**
100
+     * 巡检执行
101
+     *
102
+     * @param dto 大屏查询参数
103
+     * @return 巡检执行
104
+     */
105
+    public List<CheckLargeScreenInspectionExecuteDto> inspectionExecute(BaseLargeScreenQueryParamDto dto);
106
+
107
+    /**
108
+     * 巡检画像
109
+     *
110
+     * @param dto 大屏查询参数
111
+     * @return 巡检画像
112
+     */
113
+    public CheckLargeScreenCorrectionPortraitDto portrait(CheckLargeScreenCorrectionQueryParamDto dto);
114
+
115
+    /**
116
+     * 能力画像-总体概览-巡检问题总次数
117
+     *
118
+     * @param dto 大屏查询参数
119
+     * @return 能力画像-总体概览-巡检问题总次数
120
+     */
121
+    public BigDecimal population(BaseLargeScreenQueryParamDto dto);
122
+
123
+    /**
124
+     * 能力画像-明细
125
+     *
126
+     * @param dto 大屏查询参数
127
+     * @return 能力画像-明细
128
+     */
129
+    public List<SysLargeScreenDetailDto> detail(BaseLargeScreenQueryParamDto dto);
130
+
131
+    /**
132
+     * 工作画像-管理推动-检查单
133
+     *
134
+     * @param dto 大屏查询参数
135
+     * @return 工作画像-管理推动-检查单
136
+     */
137
+    public List<CheckLargeScreenPlanOverviewDto> managementPromotionRecord(CheckLargeScreenCorrectionQueryParamDto dto);
138
+
139
+    /**
140
+     * 工作画像-管理推动-整改单
141
+     *
142
+     * @param dto 大屏查询参数
143
+     * @return 工作画像-管理推动-整改单
144
+     */
145
+    public CheckLargeScreenCorrectionDto managementPromotionCorrection(CheckLargeScreenCorrectionQueryParamDto dto);
146
+
147
+    /**
148
+     * 工作画像-工作产出-巡检问题统计图
149
+     *
150
+     * @param dto 大屏查询参数
151
+     * @return 工作画像-工作产出-巡检问题统计图
152
+     */
153
+    public List<CheckLargeScreenCommonDto> workOutputCheck(CheckLargeScreenCorrectionQueryParamDto dto);
154
+}

+ 62 - 0
airport-check/src/main/java/com/sundot/airport/check/service/ICheckProjectItemService.java

@@ -0,0 +1,62 @@
1
+package com.sundot.airport.check.service;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.extension.service.IService;
6
+import com.sundot.airport.check.domain.CheckProjectItem;
7
+
8
+/**
9
+ * 检查单和检查记录和问题整改的检查项明细Service接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-07-11
13
+ */
14
+public interface ICheckProjectItemService extends IService<CheckProjectItem> {
15
+    /**
16
+     * 查询检查单和检查记录和问题整改的检查项明细
17
+     *
18
+     * @param id 检查单和检查记录和问题整改的检查项明细主键
19
+     * @return 检查单和检查记录和问题整改的检查项明细
20
+     */
21
+    public CheckProjectItem selectCheckProjectItemById(Long id);
22
+
23
+    /**
24
+     * 查询检查单和检查记录和问题整改的检查项明细列表
25
+     *
26
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
27
+     * @return 检查单和检查记录和问题整改的检查项明细集合
28
+     */
29
+    public List<CheckProjectItem> selectCheckProjectItemList(CheckProjectItem checkProjectItem);
30
+
31
+    /**
32
+     * 新增检查单和检查记录和问题整改的检查项明细
33
+     *
34
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
35
+     * @return 结果
36
+     */
37
+    public int insertCheckProjectItem(CheckProjectItem checkProjectItem);
38
+
39
+    /**
40
+     * 修改检查单和检查记录和问题整改的检查项明细
41
+     *
42
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
43
+     * @return 结果
44
+     */
45
+    public int updateCheckProjectItem(CheckProjectItem checkProjectItem);
46
+
47
+    /**
48
+     * 批量删除检查单和检查记录和问题整改的检查项明细
49
+     *
50
+     * @param ids 需要删除的检查单和检查记录和问题整改的检查项明细主键集合
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckProjectItemByIds(Long[] ids);
54
+
55
+    /**
56
+     * 删除检查单和检查记录和问题整改的检查项明细信息
57
+     *
58
+     * @param id 检查单和检查记录和问题整改的检查项明细主键
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckProjectItemById(Long id);
62
+}

+ 71 - 0
airport-check/src/main/java/com/sundot/airport/check/service/ICheckRecordService.java

@@ -0,0 +1,71 @@
1
+package com.sundot.airport.check.service;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.extension.service.IService;
6
+import com.sundot.airport.check.domain.CheckRecord;
7
+
8
+/**
9
+ * 检查记录Service接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-07-11
13
+ */
14
+public interface ICheckRecordService extends IService<CheckRecord> {
15
+    /**
16
+     * 查询检查记录
17
+     *
18
+     * @param id 检查记录主键
19
+     * @return 检查记录
20
+     */
21
+    public CheckRecord selectCheckRecordById(Long id);
22
+
23
+    /**
24
+     * 查询检查记录列表
25
+     *
26
+     * @param checkRecord 检查记录
27
+     * @return 检查记录集合
28
+     */
29
+    public List<CheckRecord> selectCheckRecordList(CheckRecord checkRecord);
30
+
31
+    /**
32
+     * 新增检查记录
33
+     *
34
+     * @param checkRecord 检查记录
35
+     * @return 结果
36
+     */
37
+    public int insertCheckRecord(CheckRecord checkRecord);
38
+
39
+    /**
40
+     * 修改检查记录
41
+     *
42
+     * @param checkRecord 检查记录
43
+     * @return 结果
44
+     */
45
+    public int updateCheckRecord(CheckRecord checkRecord);
46
+
47
+    /**
48
+     * 批量删除检查记录
49
+     *
50
+     * @param ids 需要删除的检查记录主键集合
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckRecordByIds(Long[] ids);
54
+
55
+    /**
56
+     * 删除检查记录信息
57
+     *
58
+     * @param id 检查记录主键
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckRecordById(Long id);
62
+
63
+    /**
64
+     * 新增或更新检查记录
65
+     *
66
+     * @param checkRecord 检查记录
67
+     * @param isLaunch    是否发起流程
68
+     * @return 结果
69
+     */
70
+    public int insertOrUpdateCheckRecord(CheckRecord checkRecord, boolean isLaunch);
71
+}

+ 78 - 0
airport-check/src/main/java/com/sundot/airport/check/service/ICheckTaskService.java

@@ -0,0 +1,78 @@
1
+package com.sundot.airport.check.service;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.extension.service.IService;
6
+import com.sundot.airport.check.domain.CheckTask;
7
+
8
+/**
9
+ * 检查任务Service接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-09-07
13
+ */
14
+public interface ICheckTaskService extends IService<CheckTask> {
15
+    /**
16
+     * 查询检查任务
17
+     *
18
+     * @param id 检查任务主键
19
+     * @return 检查任务
20
+     */
21
+    public CheckTask selectCheckTaskById(Long id);
22
+
23
+    /**
24
+     * 查询检查任务列表
25
+     *
26
+     * @param checkTask 检查任务
27
+     * @return 检查任务集合
28
+     */
29
+    public List<CheckTask> selectCheckTaskList(CheckTask checkTask);
30
+
31
+    /**
32
+     * 新增检查任务
33
+     *
34
+     * @param checkTask 检查任务
35
+     * @return 结果
36
+     */
37
+    public int insertCheckTask(CheckTask checkTask);
38
+
39
+    /**
40
+     * 修改检查任务
41
+     *
42
+     * @param checkTask 检查任务
43
+     * @return 结果
44
+     */
45
+    public int updateCheckTask(CheckTask checkTask);
46
+
47
+    /**
48
+     * 批量删除检查任务
49
+     *
50
+     * @param ids 需要删除的检查任务主键集合
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckTaskByIds(Long[] ids);
54
+
55
+    /**
56
+     * 删除检查任务信息
57
+     *
58
+     * @param id 检查任务主键
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckTaskById(Long id);
62
+
63
+    /**
64
+     * 查询检查任务未读数量
65
+     *
66
+     * @param checkTask 检查任务筛选条件
67
+     * @return 检查任务未读数量
68
+     */
69
+    public int unReadNum(CheckTask checkTask);
70
+
71
+    /**
72
+     * 查询检查任务列表web端
73
+     *
74
+     * @param checkTask 检查任务
75
+     * @return 检查任务集合
76
+     */
77
+    public List<CheckTask> selectCheckTaskListWeb(CheckTask checkTask);
78
+}

+ 62 - 0
airport-check/src/main/java/com/sundot/airport/check/service/ICheckUserService.java

@@ -0,0 +1,62 @@
1
+package com.sundot.airport.check.service;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.extension.service.IService;
6
+import com.sundot.airport.check.domain.CheckUser;
7
+
8
+/**
9
+ * 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人Service接口
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-07-11
13
+ */
14
+public interface ICheckUserService extends IService<CheckUser> {
15
+    /**
16
+     * 查询检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
17
+     *
18
+     * @param id 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人主键
19
+     * @return 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
20
+     */
21
+    public CheckUser selectCheckUserById(Long id);
22
+
23
+    /**
24
+     * 查询检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人列表
25
+     *
26
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
27
+     * @return 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人集合
28
+     */
29
+    public List<CheckUser> selectCheckUserList(CheckUser checkUser);
30
+
31
+    /**
32
+     * 新增检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
33
+     *
34
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
35
+     * @return 结果
36
+     */
37
+    public int insertCheckUser(CheckUser checkUser);
38
+
39
+    /**
40
+     * 修改检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
41
+     *
42
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
43
+     * @return 结果
44
+     */
45
+    public int updateCheckUser(CheckUser checkUser);
46
+
47
+    /**
48
+     * 批量删除检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
49
+     *
50
+     * @param ids 需要删除的检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人主键集合
51
+     * @return 结果
52
+     */
53
+    public int deleteCheckUserByIds(Long[] ids);
54
+
55
+    /**
56
+     * 删除检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人信息
57
+     *
58
+     * @param id 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人主键
59
+     * @return 结果
60
+     */
61
+    public int deleteCheckUserById(Long id);
62
+}

+ 361 - 0
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckCorrectionServiceImpl.java

@@ -0,0 +1,361 @@
1
+package com.sundot.airport.check.service.impl;
2
+
3
+import java.util.HashMap;
4
+import java.util.List;
5
+import java.util.Map;
6
+import java.util.Objects;
7
+import java.util.stream.Collectors;
8
+
9
+import cn.hutool.core.bean.BeanUtil;
10
+import cn.hutool.core.collection.CollUtil;
11
+import cn.hutool.core.util.ObjUtil;
12
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
13
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
14
+import com.sundot.airport.check.domain.CheckProjectItem;
15
+import com.sundot.airport.check.domain.CheckUser;
16
+import com.sundot.airport.check.service.ICheckProjectItemService;
17
+import com.sundot.airport.check.service.ICheckUserService;
18
+import com.sundot.airport.common.constant.Constants;
19
+import com.sundot.airport.common.core.redis.RedisSerialGenerator;
20
+import com.sundot.airport.common.domain.BaseAttachment;
21
+import com.sundot.airport.common.enums.BaseAttachmentSourceTypeEnum;
22
+import com.sundot.airport.common.enums.CheckCorrectionStatusEnum;
23
+import com.sundot.airport.common.enums.CheckLevelEnum;
24
+import com.sundot.airport.common.enums.CheckProjectItemTypeEnum;
25
+import com.sundot.airport.common.enums.CheckUserTypeEnum;
26
+import com.sundot.airport.common.exception.ServiceException;
27
+import com.sundot.airport.common.service.IBaseAttachmentService;
28
+import com.sundot.airport.common.utils.DateUtils;
29
+import com.sundot.airport.common.utils.SecurityUtils;
30
+import com.sundot.airport.common.utils.StringUtils;
31
+import com.sundot.airport.system.domain.approval.ApprovalInstance;
32
+import com.sundot.airport.system.service.approval.IApprovalEngineService;
33
+import com.sundot.airport.system.service.approval.ICheckApprovalService;
34
+import lombok.SneakyThrows;
35
+import lombok.extern.slf4j.Slf4j;
36
+import org.springframework.beans.factory.annotation.Autowired;
37
+import org.springframework.stereotype.Service;
38
+import com.sundot.airport.check.mapper.CheckCorrectionMapper;
39
+import com.sundot.airport.check.domain.CheckCorrection;
40
+import com.sundot.airport.check.service.ICheckCorrectionService;
41
+import org.springframework.transaction.annotation.Transactional;
42
+
43
+/**
44
+ * 问题整改Service业务层处理
45
+ *
46
+ * @author ruoyi
47
+ * @date 2025-09-08
48
+ */
49
+@Slf4j
50
+@Service
51
+public class CheckCorrectionServiceImpl extends ServiceImpl<CheckCorrectionMapper, CheckCorrection> implements ICheckCorrectionService {
52
+    @Autowired
53
+    private CheckCorrectionMapper checkCorrectionMapper;
54
+    @Autowired
55
+    private ICheckProjectItemService checkProjectItemService;
56
+    @Autowired
57
+    private ICheckUserService checkUserService;
58
+    @Autowired
59
+    private RedisSerialGenerator redisSerialGenerator;
60
+    @Autowired
61
+    private IBaseAttachmentService baseAttachmentService;
62
+    @Autowired
63
+    private ICheckApprovalService checkApprovalService;
64
+    @Autowired
65
+    private IApprovalEngineService approvalEngineService;
66
+
67
+    /**
68
+     * 查询问题整改
69
+     *
70
+     * @param id 问题整改主键
71
+     * @return 问题整改
72
+     */
73
+    @Override
74
+    public CheckCorrection selectCheckCorrectionById(Long id) {
75
+        CheckCorrection result = checkCorrectionMapper.selectCheckCorrectionById(id);
76
+        if (ObjUtil.isNull(result)) {
77
+            throw new ServiceException("根据id[" + id + "]未查询到问题整改单");
78
+        }
79
+        //检查项明细列表
80
+        CheckProjectItem checkProjectItem = new CheckProjectItem();
81
+        checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_CORRECTION.getCode());
82
+        checkProjectItem.setSourceId(result.getId());
83
+        List<CheckProjectItem> checkProjectItemList = checkProjectItemService.selectCheckProjectItemList(checkProjectItem);
84
+        LambdaQueryWrapper<CheckUser> wrapper = new LambdaQueryWrapper<>();
85
+        wrapper.eq(CheckUser::getType, CheckUserTypeEnum.PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS.getCode())
86
+                .in(CheckUser::getSourceId, checkProjectItemList.stream().map(CheckProjectItem::getId).toArray());
87
+        List<CheckUser> checkUserListTemp = checkUserService.getBaseMapper().selectList(wrapper);
88
+        Map<Long, List<CheckUser>> checkUserListMap = checkUserListTemp.stream().collect(Collectors.groupingBy(CheckUser::getSourceId));
89
+        checkProjectItemList.forEach(item -> {
90
+            item.setCheckUserList(checkUserListMap.get(item.getId()));
91
+        });
92
+        result.setCheckProjectItemList(checkProjectItemList);
93
+        //附件列表
94
+        BaseAttachment baseAttachment = new BaseAttachment();
95
+        baseAttachment.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION.getCode());
96
+        baseAttachment.setSourceId(result.getId());
97
+        List<BaseAttachment> baseAttachmentList = baseAttachmentService.selectBaseAttachmentList(baseAttachment);
98
+        result.setBaseAttachmentList(baseAttachmentList);
99
+        //检查单附件列表
100
+        BaseAttachment checkRecordBaseAttachment = new BaseAttachment();
101
+        checkRecordBaseAttachment.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION_RECORD.getCode());
102
+        checkRecordBaseAttachment.setSourceId(result.getId());
103
+        List<BaseAttachment> checkRecordBaseAttachmentList = baseAttachmentService.selectBaseAttachmentList(checkRecordBaseAttachment);
104
+        result.setCheckRecordBaseAttachmentList(checkRecordBaseAttachmentList);
105
+        return result;
106
+    }
107
+
108
+    /**
109
+     * 查询问题整改列表
110
+     *
111
+     * @param checkCorrection 问题整改
112
+     * @return 问题整改
113
+     */
114
+    @Override
115
+    public List<CheckCorrection> selectCheckCorrectionList(CheckCorrection checkCorrection) {
116
+        return checkCorrectionMapper.selectCheckCorrectionList(checkCorrection);
117
+    }
118
+
119
+    /**
120
+     * 新增问题整改
121
+     *
122
+     * @param checkCorrection 问题整改
123
+     * @return 结果
124
+     */
125
+    @Transactional(rollbackFor = Exception.class)
126
+    @Override
127
+    public int insertCheckCorrection(CheckCorrection checkCorrection) {
128
+        //整改单
129
+        checkCorrection.setCreateTime(DateUtils.getNowDate());
130
+        checkCorrection.setCorrectionCode(redisSerialGenerator.generate(Constants.CHECK_CORRECTION_PREFIX));
131
+        checkCorrection.setStatus(CheckCorrectionStatusEnum.UNDER_RECTIFICATION.getCode());
132
+        checkCorrection.setStatusDesc(CheckCorrectionStatusEnum.UNDER_RECTIFICATION.getDesc());
133
+        int result = checkCorrectionMapper.insertCheckCorrection(checkCorrection);
134
+        //检查项明细列表
135
+        if (CollUtil.isNotEmpty(checkCorrection.getCheckProjectItemList())) {
136
+            checkCorrection.getCheckProjectItemList().forEach(checkProjectItem -> {
137
+                checkProjectItem.setCreateBy(checkCorrection.getCreateBy());
138
+                checkProjectItem.setCreateTime(DateUtils.getNowDate());
139
+                checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_CORRECTION.getCode());
140
+                checkProjectItem.setTypeDesc(CheckProjectItemTypeEnum.CHECK_CORRECTION.getInfo());
141
+                checkProjectItem.setSourceId(checkCorrection.getId());
142
+                checkProjectItemService.insertCheckProjectItem(checkProjectItem);
143
+                if (CollUtil.isNotEmpty(checkProjectItem.getCheckUserList())) {
144
+                    checkProjectItem.getCheckUserList().forEach(checkUser -> {
145
+                        checkUser.setCreateBy(checkProjectItem.getCreateBy());
146
+                        checkUser.setCreateTime(DateUtils.getNowDate());
147
+                        checkUser.setType(CheckUserTypeEnum.PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS.getCode());
148
+                        checkUser.setTypeDesc(CheckUserTypeEnum.PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS.getInfo());
149
+                        checkUser.setSourceId(checkProjectItem.getId());
150
+                    });
151
+                    checkUserService.saveBatch(checkProjectItem.getCheckUserList());
152
+                }
153
+            });
154
+        }
155
+        //附件列表
156
+        if (CollUtil.isNotEmpty(checkCorrection.getBaseAttachmentList())) {
157
+            checkCorrection.getBaseAttachmentList().forEach(baseAttachment -> {
158
+                baseAttachment.setCreateBy(checkCorrection.getCreateBy());
159
+                baseAttachment.setCreateTime(DateUtils.getNowDate());
160
+                baseAttachment.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION.getCode());
161
+                baseAttachment.setSourceTypeName(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION.getInfo());
162
+                baseAttachment.setSourceId(checkCorrection.getId());
163
+            });
164
+            baseAttachmentService.saveBatch(checkCorrection.getBaseAttachmentList());
165
+        }
166
+        //检查单附件列表
167
+        if (CollUtil.isNotEmpty(checkCorrection.getCheckRecordBaseAttachmentList())) {
168
+            checkCorrection.getCheckRecordBaseAttachmentList().forEach(baseAttachment -> {
169
+                baseAttachment.setCreateBy(checkCorrection.getCreateBy());
170
+                baseAttachment.setCreateTime(DateUtils.getNowDate());
171
+                baseAttachment.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION_RECORD.getCode());
172
+                baseAttachment.setSourceTypeName(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION_RECORD.getInfo());
173
+                baseAttachment.setSourceId(checkCorrection.getId());
174
+            });
175
+            baseAttachmentService.saveBatch(checkCorrection.getCheckRecordBaseAttachmentList());
176
+        }
177
+        //开始审批流
178
+        startApproval(checkCorrection);
179
+        return result;
180
+    }
181
+
182
+    /**
183
+     * 修改问题整改
184
+     *
185
+     * @param checkCorrection 问题整改
186
+     * @return 结果
187
+     */
188
+    @Transactional(rollbackFor = Exception.class)
189
+    @Override
190
+    public int updateCheckCorrection(CheckCorrection checkCorrection) {
191
+        checkCorrection.setUpdateTime(DateUtils.getNowDate());
192
+        int result = checkCorrectionMapper.updateCheckCorrection(checkCorrection);
193
+        //检查项明细列表
194
+        if (CollUtil.isNotEmpty(checkCorrection.getCheckProjectItemList())) {
195
+            checkCorrection.getCheckProjectItemList().forEach(checkProjectItem -> {
196
+                checkProjectItem.setUpdateTime(DateUtils.getNowDate());
197
+                checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_CORRECTION.getCode());
198
+                checkProjectItem.setTypeDesc(CheckProjectItemTypeEnum.CHECK_CORRECTION.getInfo());
199
+                checkProjectItem.setSourceId(checkCorrection.getId());
200
+                checkProjectItemService.saveOrUpdate(checkProjectItem);
201
+                if (CollUtil.isNotEmpty(checkProjectItem.getCheckUserList())) {
202
+                    //问题人表先删除后新增
203
+                    LambdaQueryWrapper<CheckUser> wrapper = new LambdaQueryWrapper<>();
204
+                    wrapper.eq(CheckUser::getType, CheckUserTypeEnum.PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS.getCode())
205
+                            .eq(CheckUser::getSourceId, checkProjectItem.getId());
206
+                    List<CheckUser> checkUserListOld = checkUserService.getBaseMapper().selectList(wrapper);
207
+                    if (CollUtil.isNotEmpty(checkUserListOld)) {
208
+                        checkUserService.removeBatchByIds(checkUserListOld);
209
+                    }
210
+                    checkProjectItem.getCheckUserList().forEach(checkUser -> {
211
+                        checkUser.setId(null);
212
+                        checkUser.setCreateBy(checkProjectItem.getCreateBy());
213
+                        checkUser.setCreateTime(DateUtils.getNowDate());
214
+                        checkUser.setType(CheckUserTypeEnum.PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS.getCode());
215
+                        checkUser.setTypeDesc(CheckUserTypeEnum.PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS.getInfo());
216
+                        checkUser.setSourceId(checkProjectItem.getId());
217
+                    });
218
+                    checkUserService.saveBatch(checkProjectItem.getCheckUserList());
219
+                }
220
+            });
221
+        }
222
+        //附件列表先删除后新增
223
+        if (CollUtil.isNotEmpty(checkCorrection.getBaseAttachmentList())) {
224
+            BaseAttachment baseAttachmentQuery = new BaseAttachment();
225
+            baseAttachmentQuery.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION.getCode());
226
+            baseAttachmentQuery.setSourceId(checkCorrection.getId());
227
+            List<BaseAttachment> baseAttachmentListOld = baseAttachmentService.selectBaseAttachmentList(baseAttachmentQuery);
228
+            if (CollUtil.isNotEmpty(baseAttachmentListOld)) {
229
+                baseAttachmentService.removeBatchByIds(baseAttachmentListOld);
230
+            }
231
+            checkCorrection.getBaseAttachmentList().forEach(baseAttachment -> {
232
+                baseAttachment.setCreateBy(checkCorrection.getCreateBy());
233
+                baseAttachment.setCreateTime(DateUtils.getNowDate());
234
+                baseAttachment.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION.getCode());
235
+                baseAttachment.setSourceTypeName(BaseAttachmentSourceTypeEnum.CHECK_CORRECTION.getInfo());
236
+                baseAttachment.setSourceId(checkCorrection.getId());
237
+            });
238
+            baseAttachmentService.saveBatch(checkCorrection.getBaseAttachmentList());
239
+        }
240
+        return result;
241
+    }
242
+
243
+    /**
244
+     * 批量删除问题整改
245
+     *
246
+     * @param ids 需要删除的问题整改主键
247
+     * @return 结果
248
+     */
249
+    @Override
250
+    public int deleteCheckCorrectionByIds(Long[] ids) {
251
+        return checkCorrectionMapper.deleteCheckCorrectionByIds(ids);
252
+    }
253
+
254
+    /**
255
+     * 删除问题整改信息
256
+     *
257
+     * @param id 问题整改主键
258
+     * @return 结果
259
+     */
260
+    @Override
261
+    public int deleteCheckCorrectionById(Long id) {
262
+        return checkCorrectionMapper.deleteCheckCorrectionById(id);
263
+    }
264
+
265
+    /**
266
+     * 审批任务(同意)
267
+     *
268
+     * @param checkCorrection 问题整改
269
+     * @return 结果
270
+     */
271
+    @SneakyThrows
272
+    @Transactional(rollbackFor = Exception.class)
273
+    @Override
274
+    public int approveTask(CheckCorrection checkCorrection) {
275
+        CheckCorrection checkCorrectionOld = selectCheckCorrectionById(checkCorrection.getId());
276
+        boolean resubmit = StringUtils.equals(CheckLevelEnum.PERSONNEL_LEVEL.getCode(), checkCorrection.getCheckedLevel()) && !Objects.equals(checkCorrectionOld.getResponsibleUserId(), checkCorrection.getResponsibleUserId());
277
+        int result = updateCheckCorrection(checkCorrection);
278
+        if (resubmit) {
279
+            approvalEngineService.cancelProcess(checkCorrection.getInstanceId(), SecurityUtils.getUserId(), SecurityUtils.getUsername(), checkCorrection.getComment());
280
+            startApproval(checkCorrection);
281
+        } else {
282
+            Map<String, Object> formData = BeanUtil.beanToMap(checkCorrection);
283
+            if (StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), checkCorrection.getCheckedLevel()) && ObjUtil.isNotNull(checkCorrection.getIsSelectTeam())) {
284
+                if (checkCorrection.getIsSelectTeam() == 1) {
285
+                    formData.put("routeToGroupLeader", true);
286
+                    formData.put("groupLeaderId", checkCorrection.getSelectTeamLeaderId());
287
+                } else {
288
+                    formData.put("routeToGroupLeader", false);
289
+                }
290
+            }
291
+            log.info("整改单审批任务(同意):formData:【{}】", formData);
292
+            checkApprovalService.approveTask(checkCorrection.getTaskId(), checkCorrection.getComment(), formData, SecurityUtils.getLoginUser().getUserId(), SecurityUtils.getLoginUser().getUsername());
293
+        }
294
+        return result;
295
+    }
296
+
297
+    /**
298
+     * 审批任务(驳回)
299
+     *
300
+     * @param checkCorrection 问题整改
301
+     * @return 结果
302
+     */
303
+    @SneakyThrows
304
+    @Transactional(rollbackFor = Exception.class)
305
+    @Override
306
+    public int rejectTask(CheckCorrection checkCorrection) {
307
+        checkApprovalService.rejectTask(checkCorrection.getTaskId(), checkCorrection.getComment(), SecurityUtils.getLoginUser().getUserId(), SecurityUtils.getLoginUser().getUsername());
308
+        return 0;
309
+    }
310
+
311
+    /**
312
+     * 开始审批
313
+     *
314
+     * @param checkCorrection
315
+     */
316
+    @SneakyThrows
317
+    private void startApproval(CheckCorrection checkCorrection) {
318
+        if (StringUtils.equals(CheckLevelEnum.PERSONNEL_LEVEL.getCode(), checkCorrection.getCheckedLevel())) {
319
+            Map<String, Object> requestData = new HashMap<>();
320
+            requestData.put("businessId", checkCorrection.getId());//业务ID
321
+            requestData.put("checkType", "SAFETY_CHECK");//检查类型
322
+            requestData.put("severity", "");//严重程度
323
+            requestData.put("location", checkCorrection.getChannelName());//位置
324
+            requestData.put("sectionLeaderId", checkCorrection.getResponsibleUserId());//科长ID
325
+            requestData.put("problemUserId", checkCorrection.getCheckedPersonnelId());//被检查人员ID
326
+            requestData.put("formData", BeanUtil.beanToMap(checkCorrection));
327
+            ApprovalInstance approvalInstance = checkApprovalService.submitPersonalCheck(requestData, SecurityUtils.getLoginUser().getUserId(), SecurityUtils.getLoginUser().getUsername(), CheckLevelEnum.PERSONNEL_LEVEL.getDesc());
328
+            checkCorrection.setInstanceId(approvalInstance.getId());
329
+            checkCorrectionMapper.updateCheckCorrection(checkCorrection);
330
+            log.info("人员级:{}", approvalInstance);
331
+        } else if (StringUtils.equals(CheckLevelEnum.TEAM_LEVEL.getCode(), checkCorrection.getCheckedLevel())) {
332
+            Map<String, Object> requestData = new HashMap<>();
333
+            requestData.put("businessId", checkCorrection.getId());//业务ID
334
+            requestData.put("checkType", "OPERATION_ISSUE");//检查类型
335
+            requestData.put("severity", "");//严重程度
336
+            requestData.put("location", checkCorrection.getChannelName());//位置
337
+            requestData.put("groupLeaderId", checkCorrection.getResponsibleUserId());//目标用户ID列表
338
+            requestData.put("targetDeptId", checkCorrection.getCheckedDeptId());//目标部门ID
339
+            requestData.put("formData", BeanUtil.beanToMap(checkCorrection));
340
+            ApprovalInstance approvalInstance = checkApprovalService.submitGroupCheck(requestData, SecurityUtils.getLoginUser().getUserId(), SecurityUtils.getLoginUser().getUsername(), CheckLevelEnum.TEAM_LEVEL.getDesc());
341
+            checkCorrection.setInstanceId(approvalInstance.getId());
342
+            checkCorrectionMapper.updateCheckCorrection(checkCorrection);
343
+            log.info("班组级:{}", approvalInstance);
344
+        } else if (StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), checkCorrection.getCheckedLevel())) {
345
+            Map<String, Object> requestData = new HashMap<>();
346
+            requestData.put("businessId", checkCorrection.getId());//业务ID
347
+            requestData.put("checkType", "SECURITY_BREACH");//检查类型
348
+            requestData.put("severity", "");//严重程度
349
+            requestData.put("location", checkCorrection.getChannelName());//位置
350
+            requestData.put("sectionLeaderId", checkCorrection.getResponsibleUserId());//责任人
351
+            requestData.put("targetDeptId", checkCorrection.getCheckedDeptId());//目标部门ID
352
+            requestData.put("formData", BeanUtil.beanToMap(checkCorrection));
353
+            ApprovalInstance approvalInstance = checkApprovalService.submitSectionCheck(requestData, SecurityUtils.getLoginUser().getUserId(), SecurityUtils.getLoginUser().getUsername(), CheckLevelEnum.DEPARTMENT_LEVEL.getDesc());
354
+            checkCorrection.setInstanceId(approvalInstance.getId());
355
+            checkCorrectionMapper.updateCheckCorrection(checkCorrection);
356
+            log.info("科级:{}", approvalInstance);
357
+        } else {
358
+            throw new ServiceException("被检查级别数据异常");
359
+        }
360
+    }
361
+}

Fichier diff supprimé car celui-ci est trop grand
+ 1570 - 0
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckLargeScreenServiceImpl.java


+ 30 - 0
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckProblemStatisticsServiceImpl.java

@@ -0,0 +1,30 @@
1
+package com.sundot.airport.check.service.impl;
2
+
3
+import com.sundot.airport.check.mapper.CheckCorrectionMapper;
4
+import com.sundot.airport.common.dto.ModuleStatisticsDTO;
5
+import com.sundot.airport.common.service.ICheckProblemStatisticsService;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.stereotype.Service;
8
+
9
+import java.util.Date;
10
+import java.util.List;
11
+
12
+/**
13
+ * <b>功能名:</b>CheckProblemStatisticsServiceImpl<br>
14
+ * <b>说明:</b> 巡检问题统计Service实现(用于智能出题) <br>
15
+ * <b>著作权:</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
16
+ * <b>修改履历:
17
+ *
18
+ * @author Simon Lin
19
+ */
20
+@Service
21
+public class CheckProblemStatisticsServiceImpl implements ICheckProblemStatisticsService {
22
+
23
+    @Autowired
24
+    private CheckCorrectionMapper checkCorrectionMapper;
25
+
26
+    @Override
27
+    public List<ModuleStatisticsDTO> countCheckProblemsByModule(Long userId, Date startDate, Date endDate) {
28
+        return checkCorrectionMapper.countCheckProblemsByModule(userId, startDate, endDate);
29
+    }
30
+}

+ 91 - 0
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckProjectItemServiceImpl.java

@@ -0,0 +1,91 @@
1
+package com.sundot.airport.check.service.impl;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6
+import com.sundot.airport.common.utils.DateUtils;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+import com.sundot.airport.check.mapper.CheckProjectItemMapper;
10
+import com.sundot.airport.check.domain.CheckProjectItem;
11
+import com.sundot.airport.check.service.ICheckProjectItemService;
12
+
13
+/**
14
+ * 检查单和检查记录和问题整改的检查项明细Service业务层处理
15
+ *
16
+ * @author ruoyi
17
+ * @date 2025-07-11
18
+ */
19
+@Service
20
+public class CheckProjectItemServiceImpl extends ServiceImpl<CheckProjectItemMapper, CheckProjectItem> implements ICheckProjectItemService {
21
+    @Autowired
22
+    private CheckProjectItemMapper checkProjectItemMapper;
23
+
24
+    /**
25
+     * 查询检查单和检查记录和问题整改的检查项明细
26
+     *
27
+     * @param id 检查单和检查记录和问题整改的检查项明细主键
28
+     * @return 检查单和检查记录和问题整改的检查项明细
29
+     */
30
+    @Override
31
+    public CheckProjectItem selectCheckProjectItemById(Long id) {
32
+        return checkProjectItemMapper.selectCheckProjectItemById(id);
33
+    }
34
+
35
+    /**
36
+     * 查询检查单和检查记录和问题整改的检查项明细列表
37
+     *
38
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
39
+     * @return 检查单和检查记录和问题整改的检查项明细
40
+     */
41
+    @Override
42
+    public List<CheckProjectItem> selectCheckProjectItemList(CheckProjectItem checkProjectItem) {
43
+        return checkProjectItemMapper.selectCheckProjectItemList(checkProjectItem);
44
+    }
45
+
46
+    /**
47
+     * 新增检查单和检查记录和问题整改的检查项明细
48
+     *
49
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCheckProjectItem(CheckProjectItem checkProjectItem) {
54
+        checkProjectItem.setCreateTime(DateUtils.getNowDate());
55
+        return checkProjectItemMapper.insertCheckProjectItem(checkProjectItem);
56
+    }
57
+
58
+    /**
59
+     * 修改检查单和检查记录和问题整改的检查项明细
60
+     *
61
+     * @param checkProjectItem 检查单和检查记录和问题整改的检查项明细
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCheckProjectItem(CheckProjectItem checkProjectItem) {
66
+        checkProjectItem.setUpdateTime(DateUtils.getNowDate());
67
+        return checkProjectItemMapper.updateCheckProjectItem(checkProjectItem);
68
+    }
69
+
70
+    /**
71
+     * 批量删除检查单和检查记录和问题整改的检查项明细
72
+     *
73
+     * @param ids 需要删除的检查单和检查记录和问题整改的检查项明细主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCheckProjectItemByIds(Long[] ids) {
78
+        return checkProjectItemMapper.deleteCheckProjectItemByIds(ids);
79
+    }
80
+
81
+    /**
82
+     * 删除检查单和检查记录和问题整改的检查项明细信息
83
+     *
84
+     * @param id 检查单和检查记录和问题整改的检查项明细主键
85
+     * @return 结果
86
+     */
87
+    @Override
88
+    public int deleteCheckProjectItemById(Long id) {
89
+        return checkProjectItemMapper.deleteCheckProjectItemById(id);
90
+    }
91
+}

+ 387 - 0
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckRecordServiceImpl.java

@@ -0,0 +1,387 @@
1
+package com.sundot.airport.check.service.impl;
2
+
3
+import java.util.ArrayList;
4
+import java.util.List;
5
+import java.util.Map;
6
+import java.util.Objects;
7
+import java.util.stream.Collectors;
8
+
9
+import cn.hutool.core.collection.CollUtil;
10
+import cn.hutool.core.collection.CollectionUtil;
11
+import cn.hutool.core.util.ObjUtil;
12
+import cn.hutool.core.util.StrUtil;
13
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
14
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
15
+import com.sundot.airport.check.domain.CheckCorrection;
16
+import com.sundot.airport.check.domain.CheckProjectItem;
17
+import com.sundot.airport.check.domain.CheckUser;
18
+import com.sundot.airport.check.service.ICheckCorrectionService;
19
+import com.sundot.airport.check.service.ICheckProjectItemService;
20
+import com.sundot.airport.check.service.ICheckUserService;
21
+import com.sundot.airport.common.constant.Constants;
22
+import com.sundot.airport.common.core.domain.entity.SysDept;
23
+import com.sundot.airport.common.core.domain.entity.SysUser;
24
+import com.sundot.airport.common.core.redis.RedisSerialGenerator;
25
+import com.sundot.airport.common.domain.BaseAttachment;
26
+import com.sundot.airport.common.enums.BaseAttachmentSourceTypeEnum;
27
+import com.sundot.airport.common.enums.CheckLevelEnum;
28
+import com.sundot.airport.common.enums.CheckProjectItemTypeEnum;
29
+import com.sundot.airport.common.enums.CheckRecordStatusEnum;
30
+import com.sundot.airport.common.enums.CheckScoreLevelEnum;
31
+import com.sundot.airport.common.enums.CheckUserTypeEnum;
32
+import com.sundot.airport.common.enums.DeptType;
33
+import com.sundot.airport.common.exception.ServiceException;
34
+import com.sundot.airport.common.service.IBaseAttachmentService;
35
+import com.sundot.airport.common.utils.DateUtils;
36
+import com.sundot.airport.common.utils.SecurityUtils;
37
+import com.sundot.airport.common.utils.StringUtils;
38
+import com.sundot.airport.common.utils.bean.BeanUtils;
39
+import com.sundot.airport.system.service.ISysDeptService;
40
+import com.sundot.airport.system.service.ISysUserService;
41
+import org.springframework.beans.factory.annotation.Autowired;
42
+import org.springframework.stereotype.Service;
43
+import com.sundot.airport.check.mapper.CheckRecordMapper;
44
+import com.sundot.airport.check.domain.CheckRecord;
45
+import com.sundot.airport.check.service.ICheckRecordService;
46
+import org.springframework.transaction.annotation.Transactional;
47
+
48
+/**
49
+ * 检查记录Service业务层处理
50
+ *
51
+ * @author ruoyi
52
+ * @date 2025-07-11
53
+ */
54
+@Service
55
+public class CheckRecordServiceImpl extends ServiceImpl<CheckRecordMapper, CheckRecord> implements ICheckRecordService {
56
+    @Autowired
57
+    private ICheckProjectItemService checkProjectItemService;
58
+    @Autowired
59
+    private ICheckUserService checkUserService;
60
+    @Autowired
61
+    private IBaseAttachmentService baseAttachmentService;
62
+    @Autowired
63
+    private CheckRecordMapper checkRecordMapper;
64
+    @Autowired
65
+    private ICheckCorrectionService checkCorrectionService;
66
+    @Autowired
67
+    private RedisSerialGenerator redisSerialGenerator;
68
+    @Autowired
69
+    private ISysUserService sysUserService;
70
+    @Autowired
71
+    private ISysDeptService deptService;
72
+
73
+    /**
74
+     * 查询检查记录
75
+     *
76
+     * @param id 检查记录主键
77
+     * @return 检查记录
78
+     */
79
+    @Override
80
+    public CheckRecord selectCheckRecordById(Long id) {
81
+        //检查记录
82
+        CheckRecord result = checkRecordMapper.selectCheckRecordById(id);
83
+        //检查项明细列表
84
+        CheckProjectItem checkProjectItem = new CheckProjectItem();
85
+        checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_RECORDS.getCode());
86
+        checkProjectItem.setSourceId(result.getId());
87
+        List<CheckProjectItem> checkProjectItemList = checkProjectItemService.selectCheckProjectItemList(checkProjectItem);
88
+        LambdaQueryWrapper<CheckUser> wrapper = new LambdaQueryWrapper<>();
89
+        wrapper.eq(CheckUser::getType, CheckUserTypeEnum.INSPECT_RECORDS_INSPECTION_ITEM_DETAILS.getCode())
90
+                .in(CheckUser::getSourceId, checkProjectItemList.stream().map(CheckProjectItem::getId).collect(Collectors.toList()));
91
+        List<CheckUser> checkUserListTemp = checkUserService.getBaseMapper().selectList(wrapper);
92
+        Map<Long, List<CheckUser>> checkUserListMap = checkUserListTemp.stream().collect(Collectors.groupingBy(CheckUser::getSourceId));
93
+        checkProjectItemList.forEach(item -> {
94
+            item.setCheckUserList(checkUserListMap.get(item.getId()));
95
+        });
96
+        result.setCheckProjectItemList(checkProjectItemList);
97
+        //附件列表
98
+        BaseAttachment baseAttachment = new BaseAttachment();
99
+        baseAttachment.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_RECORD.getCode());
100
+        baseAttachment.setSourceId(result.getId());
101
+        List<BaseAttachment> baseAttachmentList = baseAttachmentService.selectBaseAttachmentList(baseAttachment);
102
+        result.setBaseAttachmentList(baseAttachmentList);
103
+        return result;
104
+    }
105
+
106
+    /**
107
+     * 查询检查记录列表
108
+     *
109
+     * @param checkRecord 检查记录
110
+     * @return 检查记录
111
+     */
112
+    @Override
113
+    public List<CheckRecord> selectCheckRecordList(CheckRecord checkRecord) {
114
+        return checkRecordMapper.selectCheckRecordList(checkRecord);
115
+    }
116
+
117
+    /**
118
+     * 新增检查记录
119
+     *
120
+     * @param checkRecord 检查记录
121
+     * @return 结果
122
+     */
123
+    @Transactional(rollbackFor = Exception.class)
124
+    @Override
125
+    public int insertCheckRecord(CheckRecord checkRecord) {
126
+        //检查记录
127
+        checkRecord.setCreateTime(DateUtils.getNowDate());
128
+        checkRecord.setDocumentCode(redisSerialGenerator.generate(Constants.CHECK_DOCUMENT_PREFIX));
129
+        doCheckedDept(checkRecord);
130
+        int result = checkRecordMapper.insertCheckRecord(checkRecord);
131
+        //检查项明细列表
132
+        checkRecord.getCheckProjectItemList().forEach(checkProjectItem -> {
133
+            checkProjectItem.setCreateBy(checkRecord.getCreateBy());
134
+            checkProjectItem.setCreateTime(DateUtils.getNowDate());
135
+            checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_RECORDS.getCode());
136
+            checkProjectItem.setTypeDesc(CheckProjectItemTypeEnum.CHECK_RECORDS.getInfo());
137
+            checkProjectItem.setSourceId(checkRecord.getId());
138
+            checkProjectItemService.insertCheckProjectItem(checkProjectItem);
139
+            if (CollUtil.isNotEmpty(checkProjectItem.getCheckUserList())) {
140
+                checkProjectItem.getCheckUserList().forEach(checkUser -> {
141
+                    checkUser.setCreateBy(checkProjectItem.getCreateBy());
142
+                    checkUser.setCreateTime(DateUtils.getNowDate());
143
+                    checkUser.setType(CheckUserTypeEnum.INSPECT_RECORDS_INSPECTION_ITEM_DETAILS.getCode());
144
+                    checkUser.setTypeDesc(CheckUserTypeEnum.INSPECT_RECORDS_INSPECTION_ITEM_DETAILS.getInfo());
145
+                    checkUser.setSourceId(checkProjectItem.getId());
146
+                });
147
+                checkUserService.saveBatch(checkProjectItem.getCheckUserList());
148
+            }
149
+        });
150
+        //附件列表
151
+        if (CollUtil.isNotEmpty(checkRecord.getBaseAttachmentList())) {
152
+            checkRecord.getBaseAttachmentList().forEach(baseAttachment -> {
153
+                baseAttachment.setCreateBy(checkRecord.getCreateBy());
154
+                baseAttachment.setCreateTime(DateUtils.getNowDate());
155
+                baseAttachment.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_RECORD.getCode());
156
+                baseAttachment.setSourceTypeName(BaseAttachmentSourceTypeEnum.CHECK_RECORD.getInfo());
157
+                baseAttachment.setSourceId(checkRecord.getId());
158
+            });
159
+            baseAttachmentService.saveBatch(checkRecord.getBaseAttachmentList());
160
+        }
161
+        return result;
162
+    }
163
+
164
+    /**
165
+     * 创建问题整改表单
166
+     *
167
+     * @param checkRecordId 检查记录表ID
168
+     * @return
169
+     */
170
+    private void doCheckCorrection(Long checkRecordId) {
171
+        CheckRecord checkRecord = selectCheckRecordById(checkRecordId);
172
+        if (CollUtil.isEmpty(checkRecord.getCheckProjectItemList())) {
173
+            return;
174
+        }
175
+        List<CheckProjectItem> checkProjectItemListTemp = checkRecord.getCheckProjectItemList().stream().filter(item -> !StringUtils.equals(CheckScoreLevelEnum.QUALIFIED.getCode(), item.getScoreLevel())).collect(Collectors.toList());
176
+        if (CollUtil.isEmpty(checkProjectItemListTemp)) {
177
+            return;
178
+        }
179
+        CheckCorrection checkCorrection = new CheckCorrection();
180
+        BeanUtils.copyProperties(checkRecord, checkCorrection);
181
+        checkCorrection.setCheckRecordId(checkRecord.getId());
182
+        checkCorrection.setId(null);
183
+        checkCorrection.setCreateBy(SecurityUtils.getLoginUser().getUsername());
184
+        List<CheckProjectItem> checkProjectItemList = new ArrayList<>();
185
+        for (CheckProjectItem item : checkProjectItemListTemp) {
186
+            CheckProjectItem checkProjectItem = new CheckProjectItem();
187
+            BeanUtils.copyProperties(item, checkProjectItem);
188
+            checkProjectItem.setId(null);
189
+            checkProjectItem.setCreateBy(SecurityUtils.getLoginUser().getUsername());
190
+            List<CheckUser> checkUserListTemp = checkProjectItem.getCheckUserList();
191
+            if (CollUtil.isNotEmpty(checkUserListTemp)) {
192
+                List<CheckUser> checkUserList = new ArrayList<>();
193
+                for (CheckUser checkUserItem : checkUserListTemp) {
194
+                    CheckUser checkUser = new CheckUser();
195
+                    BeanUtils.copyProperties(checkUserItem, checkUser);
196
+                    checkUser.setId(null);
197
+                    checkUser.setCreateBy(SecurityUtils.getLoginUser().getUsername());
198
+                    checkUserList.add(checkUser);
199
+                }
200
+                checkProjectItem.setCheckUserList(checkUserList);
201
+            }
202
+            checkProjectItemList.add(checkProjectItem);
203
+        }
204
+        checkCorrection.setCheckProjectItemList(checkProjectItemList);
205
+        List<BaseAttachment> checkRecordBaseAttachmentList = new ArrayList<>();
206
+        List<BaseAttachment> baseAttachmentListTemp = checkRecord.getBaseAttachmentList();
207
+        if (CollUtil.isNotEmpty(baseAttachmentListTemp)) {
208
+            for (BaseAttachment item : baseAttachmentListTemp) {
209
+                BaseAttachment baseAttachment = new BaseAttachment();
210
+                BeanUtils.copyProperties(item, baseAttachment);
211
+                baseAttachment.setId(null);
212
+                baseAttachment.setCreateBy(SecurityUtils.getLoginUser().getUsername());
213
+                checkRecordBaseAttachmentList.add(baseAttachment);
214
+            }
215
+        }
216
+        checkCorrection.setCheckRecordBaseAttachmentList(checkRecordBaseAttachmentList);
217
+        checkCorrection.setBaseAttachmentList(null);
218
+        checkCorrectionService.insertCheckCorrection(checkCorrection);
219
+    }
220
+
221
+    /**
222
+     * 修改检查记录
223
+     *
224
+     * @param checkRecord 检查记录
225
+     * @return 结果
226
+     */
227
+    @Transactional(rollbackFor = Exception.class)
228
+    @Override
229
+    public int updateCheckRecord(CheckRecord checkRecord) {
230
+        checkRecord.setUpdateTime(DateUtils.getNowDate());
231
+        doCheckedDept(checkRecord);
232
+        int result = checkRecordMapper.updateCheckRecord(checkRecord);
233
+        //先删除
234
+        CheckProjectItem checkProjectItemQuery = new CheckProjectItem();
235
+        checkProjectItemQuery.setType(CheckProjectItemTypeEnum.CHECK_RECORDS.getCode());
236
+        checkProjectItemQuery.setSourceId(checkRecord.getId());
237
+        List<CheckProjectItem> checkProjectItemListTemp = checkProjectItemService.selectCheckProjectItemList(checkProjectItemQuery);
238
+        checkProjectItemService.removeBatchByIds(checkProjectItemListTemp);
239
+        LambdaQueryWrapper<CheckUser> wrapper = new LambdaQueryWrapper<>();
240
+        wrapper.eq(CheckUser::getType, CheckUserTypeEnum.INSPECT_RECORDS_INSPECTION_ITEM_DETAILS.getCode())
241
+                .in(CheckUser::getSourceId, checkProjectItemListTemp.stream().map(CheckProjectItem::getId).toArray());
242
+        List<CheckUser> checkUserListTemp = checkUserService.getBaseMapper().selectList(wrapper);
243
+        checkUserService.removeBatchByIds(checkUserListTemp);
244
+        //附件列表
245
+        BaseAttachment baseAttachmentQuery = new BaseAttachment();
246
+        baseAttachmentQuery.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_RECORD.getCode());
247
+        baseAttachmentQuery.setSourceId(checkRecord.getId());
248
+        List<BaseAttachment> baseAttachmentListTemp = baseAttachmentService.selectBaseAttachmentList(baseAttachmentQuery);
249
+        baseAttachmentService.removeBatchByIds(baseAttachmentListTemp);
250
+
251
+        //后新增
252
+        checkRecord.getCheckProjectItemList().forEach(checkProjectItem -> {
253
+            checkProjectItem.setId(null);
254
+            checkProjectItem.setCreateBy(checkRecord.getCreateBy());
255
+            checkProjectItem.setCreateTime(DateUtils.getNowDate());
256
+            checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_RECORDS.getCode());
257
+            checkProjectItem.setTypeDesc(CheckProjectItemTypeEnum.CHECK_RECORDS.getInfo());
258
+            checkProjectItem.setSourceId(checkRecord.getId());
259
+            checkProjectItemService.insertCheckProjectItem(checkProjectItem);
260
+            if (CollUtil.isNotEmpty(checkProjectItem.getCheckUserList())) {
261
+                checkProjectItem.getCheckUserList().forEach(checkUser -> {
262
+                    checkUser.setId(null);
263
+                    checkUser.setCreateBy(checkProjectItem.getCreateBy());
264
+                    checkUser.setCreateTime(DateUtils.getNowDate());
265
+                    checkUser.setType(CheckUserTypeEnum.INSPECT_RECORDS_INSPECTION_ITEM_DETAILS.getCode());
266
+                    checkUser.setTypeDesc(CheckUserTypeEnum.INSPECT_RECORDS_INSPECTION_ITEM_DETAILS.getInfo());
267
+                    checkUser.setSourceId(checkProjectItem.getId());
268
+                });
269
+                checkUserService.saveBatch(checkProjectItem.getCheckUserList());
270
+            }
271
+        });
272
+        //附件列表
273
+        if (CollUtil.isNotEmpty(checkRecord.getBaseAttachmentList())) {
274
+            checkRecord.getBaseAttachmentList().forEach(baseAttachment -> {
275
+                baseAttachment.setId(null);
276
+                baseAttachment.setCreateBy(checkRecord.getCreateBy());
277
+                baseAttachment.setCreateTime(DateUtils.getNowDate());
278
+                baseAttachment.setSourceType(BaseAttachmentSourceTypeEnum.CHECK_RECORD.getCode());
279
+                baseAttachment.setSourceTypeName(BaseAttachmentSourceTypeEnum.CHECK_RECORD.getInfo());
280
+                baseAttachment.setSourceId(checkRecord.getId());
281
+            });
282
+            baseAttachmentService.saveBatch(checkRecord.getBaseAttachmentList());
283
+        }
284
+        return result;
285
+    }
286
+
287
+    /**
288
+     * 批量删除检查记录
289
+     *
290
+     * @param ids 需要删除的检查记录主键
291
+     * @return 结果
292
+     */
293
+    @Override
294
+    public int deleteCheckRecordByIds(Long[] ids) {
295
+        return checkRecordMapper.deleteCheckRecordByIds(ids);
296
+    }
297
+
298
+    /**
299
+     * 删除检查记录信息
300
+     *
301
+     * @param id 检查记录主键
302
+     * @return 结果
303
+     */
304
+    @Override
305
+    public int deleteCheckRecordById(Long id) {
306
+        return checkRecordMapper.deleteCheckRecordById(id);
307
+    }
308
+
309
+    /**
310
+     * 新增或更新检查记录
311
+     *
312
+     * @param checkRecord 检查记录
313
+     * @return 结果
314
+     */
315
+    @Transactional(rollbackFor = Exception.class)
316
+    @Override
317
+    public int insertOrUpdateCheckRecord(CheckRecord checkRecord, boolean isLaunch) {
318
+        int result;
319
+        if (ObjUtil.isEmpty(checkRecord.getId())) {
320
+            if (CollUtil.isNotEmpty(checkRecord.getCheckProjectItemList())) {
321
+                checkRecord.getCheckProjectItemList().forEach(checkProjectItem -> {
322
+                    checkProjectItem.setId(null);
323
+                    if (CollUtil.isNotEmpty(checkProjectItem.getCheckUserList())) {
324
+                        checkProjectItem.getCheckUserList().forEach(checkUser -> {
325
+                            checkUser.setId(null);
326
+                        });
327
+                    }
328
+                });
329
+            }
330
+            if (CollUtil.isNotEmpty(checkRecord.getBaseAttachmentList())) {
331
+                checkRecord.getBaseAttachmentList().forEach(baseAttachment -> {
332
+                    baseAttachment.setId(null);
333
+                });
334
+            }
335
+            result = insertCheckRecord(checkRecord);
336
+        } else {
337
+            CheckRecord record = checkRecordMapper.selectById(checkRecord.getId());
338
+            if (ObjUtil.isNull(record)) {
339
+                throw new ServiceException("根据id[" + checkRecord.getId() + "]未查询到检查单");
340
+            }
341
+            result = updateCheckRecord(checkRecord);
342
+        }
343
+        //创建问题整改表单
344
+        if (isLaunch && StringUtils.equals(CheckRecordStatusEnum.FORMAL.getCode(), checkRecord.getCheckRecordStatus())) {
345
+            doCheckCorrection(checkRecord.getId());
346
+        }
347
+        return result;
348
+    }
349
+
350
+    /**
351
+     * 处理被检查部门信息
352
+     *
353
+     * @param checkRecord 检查单
354
+     */
355
+    private void doCheckedDept(CheckRecord checkRecord) {
356
+        if (StringUtils.equals(CheckLevelEnum.PERSONNEL_LEVEL.getCode(), checkRecord.getCheckedLevel())) {
357
+            Long userId = checkRecord.getCheckedPersonnelId();
358
+            if (Objects.isNull(userId)) {
359
+                throw new ServiceException("请选择被检查人员");
360
+            }
361
+            SysUser sysUser = sysUserService.selectUserById(userId);
362
+            if (Objects.isNull(sysUser.getDeptId())) {
363
+                throw new ServiceException("被检查人员[" + userId + "]所属部门为空");
364
+            }
365
+            List<SysDept> deptList = deptService.selectAllDept(sysUser.getDeptId());
366
+            if (CollectionUtil.isEmpty(deptList)) {
367
+                throw new ServiceException("被检查人员[" + userId + "]所属部门上下级为空");
368
+            }
369
+            SysDept teams = deptList.stream().filter(x -> StrUtil.equals(DeptType.TEAMS.getCode(), x.getDeptType())).findFirst().orElse(null);
370
+            SysDept department = deptList.stream().filter(x -> StrUtil.equals(DeptType.DEPARTMENT.getCode(), x.getDeptType())).findFirst().orElse(null);
371
+            SysDept station = deptList.stream().filter(x -> StrUtil.equals(DeptType.STATION.getCode(), x.getDeptType())).findFirst().orElse(null);
372
+
373
+            if (Objects.isNull(teams)) {
374
+                throw new ServiceException("被检查人员[" + userId + "]所属班组信息为空");
375
+            }
376
+            if (Objects.isNull(department)) {
377
+                throw new ServiceException("被检查人员[" + userId + "]所属科室信息为空");
378
+            }
379
+
380
+            checkRecord.setCheckedDepartmentId(department.getDeptId());
381
+            checkRecord.setCheckedDepartmentName(department.getDeptName());
382
+            checkRecord.setCheckedTeamId(teams.getDeptId());
383
+            checkRecord.setCheckedTeamName(teams.getDeptName());
384
+        }
385
+    }
386
+
387
+}

+ 360 - 0
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckTaskServiceImpl.java

@@ -0,0 +1,360 @@
1
+package com.sundot.airport.check.service.impl;
2
+
3
+import java.util.ArrayList;
4
+import java.util.Calendar;
5
+import java.util.Collections;
6
+import java.util.Date;
7
+import java.util.List;
8
+import java.util.Map;
9
+import java.util.stream.Collectors;
10
+
11
+import cn.hutool.core.bean.BeanUtil;
12
+import cn.hutool.core.collection.CollUtil;
13
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
14
+import com.sundot.airport.check.domain.CheckProjectItem;
15
+import com.sundot.airport.check.service.ICheckProjectItemService;
16
+import com.sundot.airport.common.constant.Constants;
17
+import com.sundot.airport.common.core.redis.RedisSerialGenerator;
18
+import com.sundot.airport.common.domain.BaseRead;
19
+import com.sundot.airport.common.enums.BaseReadTypeEnum;
20
+import com.sundot.airport.common.enums.CheckProjectItemTypeEnum;
21
+import com.sundot.airport.common.enums.CheckTaskStatusEnum;
22
+import com.sundot.airport.common.service.IBaseReadService;
23
+import com.sundot.airport.common.utils.DateUtils;
24
+import com.sundot.airport.common.utils.SecurityUtils;
25
+import com.sundot.airport.system.domain.vo.CheckProjectItemTreeVo;
26
+import com.sundot.airport.system.domain.vo.CheckProjectItemVo;
27
+import org.springframework.beans.factory.annotation.Autowired;
28
+import org.springframework.stereotype.Service;
29
+import com.sundot.airport.check.mapper.CheckTaskMapper;
30
+import com.sundot.airport.check.domain.CheckTask;
31
+import com.sundot.airport.check.service.ICheckTaskService;
32
+
33
+/**
34
+ * 检查任务Service业务层处理
35
+ *
36
+ * @author ruoyi
37
+ * @date 2025-09-07
38
+ */
39
+@Service
40
+public class CheckTaskServiceImpl extends ServiceImpl<CheckTaskMapper, CheckTask> implements ICheckTaskService {
41
+    @Autowired
42
+    private CheckTaskMapper checkTaskMapper;
43
+
44
+    @Autowired
45
+    private ICheckProjectItemService checkProjectItemService;
46
+
47
+    @Autowired
48
+    private RedisSerialGenerator redisSerialGenerator;
49
+
50
+    @Autowired
51
+    private IBaseReadService baseReadService;
52
+
53
+    /**
54
+     * 查询检查任务
55
+     *
56
+     * @param id 检查任务主键
57
+     * @return 检查任务
58
+     */
59
+    @Override
60
+    public CheckTask selectCheckTaskById(Long id) {
61
+        CheckTask result = checkTaskMapper.selectCheckTaskById(id);
62
+        Date currentDate = DateUtils.getNowDate();
63
+        if (currentDate.before(result.getCheckStartTime())) {
64
+            result.setStatus(CheckTaskStatusEnum.PENDING_EXECUTION.getCode());
65
+            result.setStatusDesc(CheckTaskStatusEnum.PENDING_EXECUTION.getDesc());
66
+        } else if (currentDate.after(result.getCheckEndTime())) {
67
+            result.setStatus(CheckTaskStatusEnum.COMPLETED.getCode());
68
+            result.setStatusDesc(CheckTaskStatusEnum.COMPLETED.getDesc());
69
+        } else {
70
+            result.setStatus(CheckTaskStatusEnum.IN_PROGRESS.getCode());
71
+            result.setStatusDesc(CheckTaskStatusEnum.IN_PROGRESS.getDesc());
72
+        }
73
+        //检查项明细列表
74
+        CheckProjectItem checkProjectItem = new CheckProjectItem();
75
+        checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_TASK.getCode());
76
+        checkProjectItem.setSourceId(result.getId());
77
+        List<CheckProjectItem> checkProjectItemList = checkProjectItemService.selectCheckProjectItemList(checkProjectItem);
78
+        result.setCheckProjectItemList(checkProjectItemList);
79
+        //检查项明细列表树形结构
80
+        List<CheckProjectItemVo> checkProjectItemVoList = checkProjectItemList.stream().map(item -> {
81
+            CheckProjectItemVo checkProjectItemVo = new CheckProjectItemVo();
82
+            BeanUtil.copyProperties(item, checkProjectItemVo);
83
+            return checkProjectItemVo;
84
+        }).collect(Collectors.toList());
85
+        result.setCheckProjectItemTreeVoList(convertToTree(checkProjectItemVoList));
86
+        //已读处理
87
+        doBaseRead(result);
88
+        return result;
89
+    }
90
+
91
+    /**
92
+     * 已读处理
93
+     *
94
+     * @param result
95
+     */
96
+    private void doBaseRead(CheckTask result) {
97
+        BaseRead baseRead = new BaseRead();
98
+        baseRead.setUserId(SecurityUtils.getLoginUser().getUserId());
99
+        baseRead.setUserName(SecurityUtils.getLoginUser().getUsername());
100
+        baseRead.setFormId(result.getId());
101
+        baseRead.setFormCode(result.getTaskCode());
102
+        baseRead.setFormName(result.getTaskName());
103
+        baseRead.setType(BaseReadTypeEnum.CHECK_TASK.getCode());
104
+        baseRead.setTypeDesc(BaseReadTypeEnum.CHECK_TASK.getDesc());
105
+        baseReadService.insertOrUpdateBaseRead(baseRead);
106
+    }
107
+
108
+    /**
109
+     * 查询检查任务列表
110
+     *
111
+     * @param checkTask 检查任务
112
+     * @return 检查任务
113
+     */
114
+    @Override
115
+    public List<CheckTask> selectCheckTaskList(CheckTask checkTask) {
116
+        List<CheckTask> result = checkTaskMapper.selectCheckTaskList(checkTask);
117
+        if (CollUtil.isNotEmpty(result)) {
118
+            Date currentDate = getDateWithoutTime(DateUtils.getNowDate());
119
+            result.forEach(item -> {
120
+                if (currentDate.before(item.getCheckStartTime())) {
121
+                    item.setStatus(CheckTaskStatusEnum.PENDING_EXECUTION.getCode());
122
+                    item.setStatusDesc(CheckTaskStatusEnum.PENDING_EXECUTION.getDesc());
123
+                } else if (currentDate.after(item.getCheckEndTime())) {
124
+                    item.setStatus(CheckTaskStatusEnum.COMPLETED.getCode());
125
+                    item.setStatusDesc(CheckTaskStatusEnum.COMPLETED.getDesc());
126
+                } else {
127
+                    item.setStatus(CheckTaskStatusEnum.IN_PROGRESS.getCode());
128
+                    item.setStatusDesc(CheckTaskStatusEnum.IN_PROGRESS.getDesc());
129
+                }
130
+            });
131
+            //是否已读处理
132
+            checkIsRead(result);
133
+        }
134
+        return result;
135
+    }
136
+
137
+    /**
138
+     * 是否已读处理
139
+     *
140
+     * @param result 检查任务列表
141
+     */
142
+    private void checkIsRead(List<CheckTask> result) {
143
+        List<Long> checkTaskIdlist = result.stream().map(CheckTask::getId).collect(Collectors.toList());
144
+        BaseRead baseRead = new BaseRead();
145
+        baseRead.setUserId(SecurityUtils.getLoginUser().getUserId());
146
+        baseRead.setType(BaseReadTypeEnum.CHECK_TASK.getCode());
147
+        List<BaseRead> baseReadList = baseReadService.selectBaseReadListByCondition(baseRead, checkTaskIdlist);
148
+        if (CollUtil.isEmpty(baseReadList)) {
149
+            result.forEach(item -> item.setRead(false));
150
+            return;
151
+        }
152
+        List<Long> formIdList = baseReadList.stream().map(BaseRead::getFormId).collect(Collectors.toList());
153
+        result.forEach(item -> {
154
+            item.setRead(formIdList.contains(item.getId()));
155
+        });
156
+    }
157
+
158
+    /**
159
+     * 新增检查任务
160
+     *
161
+     * @param checkTask 检查任务
162
+     * @return 结果
163
+     */
164
+    @Override
165
+    public int insertCheckTask(CheckTask checkTask) {
166
+        checkTask.setCreateTime(DateUtils.getNowDate());
167
+        checkTask.setTaskCode(redisSerialGenerator.generate(Constants.CHECK_TASK_PREFIX));
168
+        int result = checkTaskMapper.insertCheckTask(checkTask);
169
+        //检查项明细列表
170
+        checkTask.getCheckProjectItemList().forEach(checkProjectItem -> {
171
+            checkProjectItem.setCreateBy(checkTask.getCreateBy());
172
+            checkProjectItem.setCreateTime(DateUtils.getNowDate());
173
+            checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_TASK.getCode());
174
+            checkProjectItem.setTypeDesc(CheckProjectItemTypeEnum.CHECK_TASK.getInfo());
175
+            checkProjectItem.setSourceId(checkTask.getId());
176
+            checkProjectItemService.insertCheckProjectItem(checkProjectItem);
177
+        });
178
+        return result;
179
+    }
180
+
181
+    /**
182
+     * 修改检查任务
183
+     *
184
+     * @param checkTask 检查任务
185
+     * @return 结果
186
+     */
187
+    @Override
188
+    public int updateCheckTask(CheckTask checkTask) {
189
+        checkTask.setUpdateTime(DateUtils.getNowDate());
190
+        int result = checkTaskMapper.updateCheckTask(checkTask);
191
+        //检查项明细列表先删除后增加
192
+        CheckProjectItem checkProjectItemQuery = new CheckProjectItem();
193
+        checkProjectItemQuery.setType(CheckProjectItemTypeEnum.CHECK_TASK.getCode());
194
+        checkProjectItemQuery.setSourceId(checkTask.getId());
195
+        List<CheckProjectItem> checkProjectItemListOld = checkProjectItemService.selectCheckProjectItemList(checkProjectItemQuery);
196
+        checkProjectItemService.removeBatchByIds(checkProjectItemListOld);
197
+        checkTask.getCheckProjectItemList().forEach(checkProjectItem -> {
198
+            checkProjectItem.setId(null);
199
+            checkProjectItem.setCreateBy(checkTask.getCreateBy());
200
+            checkProjectItem.setCreateTime(DateUtils.getNowDate());
201
+            checkProjectItem.setType(CheckProjectItemTypeEnum.CHECK_TASK.getCode());
202
+            checkProjectItem.setTypeDesc(CheckProjectItemTypeEnum.CHECK_TASK.getInfo());
203
+            checkProjectItem.setSourceId(checkTask.getId());
204
+            checkProjectItemService.insertCheckProjectItem(checkProjectItem);
205
+        });
206
+        return result;
207
+    }
208
+
209
+    /**
210
+     * 批量删除检查任务
211
+     *
212
+     * @param ids 需要删除的检查任务主键
213
+     * @return 结果
214
+     */
215
+    @Override
216
+    public int deleteCheckTaskByIds(Long[] ids) {
217
+        return checkTaskMapper.deleteCheckTaskByIds(ids);
218
+    }
219
+
220
+    /**
221
+     * 删除检查任务信息
222
+     *
223
+     * @param id 检查任务主键
224
+     * @return 结果
225
+     */
226
+    @Override
227
+    public int deleteCheckTaskById(Long id) {
228
+        return checkTaskMapper.deleteCheckTaskById(id);
229
+    }
230
+
231
+    /**
232
+     * 查询检查任务未读数量
233
+     *
234
+     * @param checkTask 检查任务筛选条件
235
+     * @return 检查任务未读数量
236
+     */
237
+    @Override
238
+    public int unReadNum(CheckTask checkTask) {
239
+        List<CheckTask> checkTaskList = checkTaskMapper.selectCheckTaskList(checkTask);
240
+        if (CollUtil.isEmpty(checkTaskList)) {
241
+            return 0;
242
+        }
243
+        //是否已读处理
244
+        checkIsRead(checkTaskList);
245
+        return (int) checkTaskList.stream().filter(item -> !item.isRead()).count();
246
+    }
247
+
248
+    /**
249
+     * 查询检查任务列表web端
250
+     *
251
+     * @param checkTask 检查任务
252
+     * @return 检查任务
253
+     */
254
+    @Override
255
+    public List<CheckTask> selectCheckTaskListWeb(CheckTask checkTask) {
256
+        List<CheckTask> result = checkTaskMapper.selectCheckTaskListWeb(checkTask);
257
+        if (CollUtil.isNotEmpty(result)) {
258
+            Date currentDate = getDateWithoutTime(DateUtils.getNowDate());
259
+            result.forEach(item -> {
260
+                if (currentDate.before(item.getCheckStartTime())) {
261
+                    item.setStatus(CheckTaskStatusEnum.PENDING_EXECUTION.getCode());
262
+                    item.setStatusDesc(CheckTaskStatusEnum.PENDING_EXECUTION.getDesc());
263
+                } else if (currentDate.after(item.getCheckEndTime())) {
264
+                    item.setStatus(CheckTaskStatusEnum.COMPLETED.getCode());
265
+                    item.setStatusDesc(CheckTaskStatusEnum.COMPLETED.getDesc());
266
+                } else {
267
+                    item.setStatus(CheckTaskStatusEnum.IN_PROGRESS.getCode());
268
+                    item.setStatusDesc(CheckTaskStatusEnum.IN_PROGRESS.getDesc());
269
+                }
270
+            });
271
+            //是否已读处理
272
+            checkIsRead(result);
273
+        }
274
+        return result;
275
+    }
276
+
277
+    /**
278
+     * 转换为树形结构
279
+     */
280
+    public List<CheckProjectItemTreeVo> convertToTree(List<CheckProjectItemVo> itemList) {
281
+        if (CollUtil.isEmpty(itemList)) {
282
+            return Collections.emptyList();
283
+        }
284
+        List<CheckProjectItemTreeVo> result = new ArrayList<>();
285
+
286
+        // 第一层分组:按一级分类
287
+        Map<String, List<CheckProjectItemVo>> levelOneMap = itemList.stream()
288
+                .collect(Collectors.groupingBy(CheckProjectItemVo::getCategoryCodeOne));
289
+
290
+
291
+        // 处理一级分类
292
+        for (Map.Entry<String, List<CheckProjectItemVo>> levelOneEntry : levelOneMap.entrySet()) {
293
+            String levelOneCode = levelOneEntry.getKey();
294
+            List<CheckProjectItemVo> levelOneItems = levelOneEntry.getValue();
295
+
296
+            // 获取一级分类名称(取第一个元素的名称)
297
+            String levelOneName = levelOneItems.get(0).getCategoryNameOne();
298
+
299
+            // 创建一级节点
300
+            CheckProjectItemTreeVo levelOneNode = new CheckProjectItemTreeVo();
301
+            levelOneNode.setCode(levelOneCode);
302
+            levelOneNode.setName(levelOneName);
303
+
304
+            // 第二层分组:按二级分类
305
+            Map<String, List<CheckProjectItemVo>> levelTwoMap = levelOneItems.stream()
306
+                    .collect(Collectors.groupingBy(CheckProjectItemVo::getCategoryCodeTwo));
307
+
308
+            List<CheckProjectItemTreeVo> levelTwoNodes = new ArrayList<>();
309
+
310
+            // 处理二级分类
311
+            for (Map.Entry<String, List<CheckProjectItemVo>> levelTwoEntry : levelTwoMap.entrySet()) {
312
+                String levelTwoCode = levelTwoEntry.getKey();
313
+                List<CheckProjectItemVo> levelTwoItems = levelTwoEntry.getValue();
314
+
315
+                // 获取二级分类名称(取第一个元素的名称)
316
+                String levelTwoName = levelTwoItems.get(0).getCategoryNameTwo();
317
+
318
+                // 创建二级节点
319
+                CheckProjectItemTreeVo levelTwoNode = new CheckProjectItemTreeVo();
320
+                levelTwoNode.setCode(levelTwoCode);
321
+                levelTwoNode.setName(levelTwoName);
322
+
323
+                // 处理检查项目
324
+                List<CheckProjectItemTreeVo> projectNodes = levelTwoItems.stream()
325
+                        .map(item -> {
326
+                            CheckProjectItemTreeVo projectNode = new CheckProjectItemTreeVo();
327
+                            projectNode.setCode(item.getProjectCode());
328
+                            projectNode.setName(item.getProjectName());
329
+                            projectNode.setList(null); // 项目没有子节点
330
+                            return projectNode;
331
+                        })
332
+                        .collect(Collectors.toList());
333
+
334
+                levelTwoNode.setList(projectNodes);
335
+                levelTwoNodes.add(levelTwoNode);
336
+            }
337
+
338
+            levelOneNode.setList(levelTwoNodes);
339
+            result.add(levelOneNode);
340
+        }
341
+        return result;
342
+    }
343
+
344
+    /**
345
+     * 获取日期的零时零分零秒
346
+     *
347
+     * @param date 日期
348
+     * @return 零时零分零秒
349
+     */
350
+    private Date getDateWithoutTime(Date date) {
351
+        Calendar cal = Calendar.getInstance();
352
+        cal.setTime(date);
353
+        cal.set(Calendar.HOUR_OF_DAY, 0);
354
+        cal.set(Calendar.MINUTE, 0);
355
+        cal.set(Calendar.SECOND, 0);
356
+        cal.set(Calendar.MILLISECOND, 0);
357
+        return cal.getTime();
358
+    }
359
+
360
+}

+ 91 - 0
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckUserServiceImpl.java

@@ -0,0 +1,91 @@
1
+package com.sundot.airport.check.service.impl;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6
+import com.sundot.airport.common.utils.DateUtils;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+import com.sundot.airport.check.mapper.CheckUserMapper;
10
+import com.sundot.airport.check.domain.CheckUser;
11
+import com.sundot.airport.check.service.ICheckUserService;
12
+
13
+/**
14
+ * 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人Service业务层处理
15
+ *
16
+ * @author ruoyi
17
+ * @date 2025-07-11
18
+ */
19
+@Service
20
+public class CheckUserServiceImpl extends ServiceImpl<CheckUserMapper, CheckUser> implements ICheckUserService {
21
+    @Autowired
22
+    private CheckUserMapper checkUserMapper;
23
+
24
+    /**
25
+     * 查询检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
26
+     *
27
+     * @param id 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人主键
28
+     * @return 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
29
+     */
30
+    @Override
31
+    public CheckUser selectCheckUserById(Long id) {
32
+        return checkUserMapper.selectCheckUserById(id);
33
+    }
34
+
35
+    /**
36
+     * 查询检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人列表
37
+     *
38
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
39
+     * @return 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
40
+     */
41
+    @Override
42
+    public List<CheckUser> selectCheckUserList(CheckUser checkUser) {
43
+        return checkUserMapper.selectCheckUserList(checkUser);
44
+    }
45
+
46
+    /**
47
+     * 新增检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
48
+     *
49
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCheckUser(CheckUser checkUser) {
54
+        checkUser.setCreateTime(DateUtils.getNowDate());
55
+        return checkUserMapper.insertCheckUser(checkUser);
56
+    }
57
+
58
+    /**
59
+     * 修改检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
60
+     *
61
+     * @param checkUser 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCheckUser(CheckUser checkUser) {
66
+        checkUser.setUpdateTime(DateUtils.getNowDate());
67
+        return checkUserMapper.updateCheckUser(checkUser);
68
+    }
69
+
70
+    /**
71
+     * 批量删除检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人
72
+     *
73
+     * @param ids 需要删除的检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCheckUserByIds(Long[] ids) {
78
+        return checkUserMapper.deleteCheckUserByIds(ids);
79
+    }
80
+
81
+    /**
82
+     * 删除检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人信息
83
+     *
84
+     * @param id 检查单检查人员和检查记录责任人和检查记录及问题整改检查项责任人主键
85
+     * @return 结果
86
+     */
87
+    @Override
88
+    public int deleteCheckUserById(Long id) {
89
+        return checkUserMapper.deleteCheckUserById(id);
90
+    }
91
+}

+ 530 - 0
airport-check/src/main/resources/mapper/check/CheckCorrectionMapper.xml

@@ -0,0 +1,530 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.sundot.airport.check.mapper.CheckCorrectionMapper">
6
+
7
+    <resultMap type="CheckCorrection" id="CheckCorrectionResult">
8
+        <result property="tenantId" column="tenant_id"/>
9
+        <result property="revision" column="revision"/>
10
+        <result property="createBy" column="create_by"/>
11
+        <result property="createTime" column="create_time"/>
12
+        <result property="updateBy" column="update_by"/>
13
+        <result property="updateTime" column="update_time"/>
14
+        <result property="correctionCode" column="correction_code"/>
15
+        <result property="checkRecordId" column="check_record_id"/>
16
+        <result property="rectificationDetails" column="rectification_details"/>
17
+        <result property="responsibleUserId" column="responsible_user_id"/>
18
+        <result property="correctionDuration" column="correction_duration"/>
19
+        <result property="correctionResult" column="correction_result"/>
20
+        <result property="correctionTime" column="correction_time"/>
21
+        <result property="verifierUserId" column="verifier_user_id"/>
22
+        <result property="verificationResult" column="verification_result"/>
23
+        <result property="verificationTime" column="verification_time"/>
24
+        <result property="status" column="status"/>
25
+        <result property="id" column="id"/>
26
+        <result property="responsibleUserName" column="responsible_user_name"/>
27
+        <result property="verifierUserName" column="verifier_user_name"/>
28
+        <result property="checkedLevel" column="checked_level"/>
29
+        <result property="evidenceUrl" column="evidence_url"/>
30
+        <result property="remark" column="remark"/>
31
+        <result property="statusDesc" column="status_desc"/>
32
+        <result property="checkedLevelDesc" column="checked_level_desc"/>
33
+        <result property="verificationResultDesc" column="verification_result_desc"/>
34
+        <result property="evidenceId" column="evidence_id"/>
35
+        <result property="comprehensiveEvaluation" column="comprehensive_evaluation"/>
36
+        <result property="rectificationSuggestions" column="rectification_suggestions"/>
37
+        <result property="checkerId" column="checker_id"/>
38
+        <result property="checkerName" column="checker_name"/>
39
+        <result property="checkTime" column="check_time"/>
40
+        <result property="terminlCode" column="terminl_code"/>
41
+        <result property="terminlName" column="terminl_name"/>
42
+        <result property="regionalCode" column="regional_code"/>
43
+        <result property="regionalName" column="regional_name"/>
44
+        <result property="channelCode" column="channel_code"/>
45
+        <result property="channelName" column="channel_name"/>
46
+        <result property="checkedDepartmentId" column="checked_department_id"/>
47
+        <result property="checkedDepartmentName" column="checked_department_name"/>
48
+        <result property="checkedTeamId" column="checked_team_id"/>
49
+        <result property="checkedTeamName" column="checked_team_name"/>
50
+        <result property="checkedDepartmentLeaderId" column="checked_department_leader_id"/>
51
+        <result property="checkedDepartmentLeaderName" column="checked_department_leader_name"/>
52
+        <result property="checkedTeamLeaderId" column="checked_team_leader_id"/>
53
+        <result property="checkedTeamLeaderName" column="checked_team_leader_name"/>
54
+        <result property="checkedPersonnelId" column="checked_personnel_id"/>
55
+        <result property="checkedPersonnelName" column="checked_personnel_name"/>
56
+        <result property="rectificationDeadline" column="rectification_deadline"/>
57
+        <result property="taskCode" column="task_code"/>
58
+        <result property="taskName" column="task_name"/>
59
+        <result property="documentCode" column="document_code"/>
60
+        <result property="documentName" column="document_name"/>
61
+        <result property="correctionName" column="correction_name"/>
62
+        <result property="checkedDeptId" column="checked_dept_id"/>
63
+        <result property="checkedDeptName" column="checked_dept_name"/>
64
+        <result property="processStatus" column="process_status"/>
65
+        <result property="processStatusDesc" column="process_status_desc"/>
66
+        <result property="checkLevel" column="check_level"/>
67
+        <result property="checkLevelDesc" column="check_level_desc"/>
68
+        <result property="selectTeamId" column="select_team_id"/>
69
+        <result property="selectTeamName" column="select_team_name"/>
70
+        <result property="selectTeamLeaderId" column="select_team_leader_id"/>
71
+        <result property="selectTeamLeaderName" column="select_team_leader_name"/>
72
+        <result property="isSelectTeam" column="is_select_team"/>
73
+        <result property="isSelfCheck" column="is_self_check"/>
74
+        <result property="completionTime" column="completion_time"/>
75
+        <result property="instanceId" column="instance_id"/>
76
+    </resultMap>
77
+
78
+    <sql id="selectCheckCorrectionVo">
79
+        select tenant_id,
80
+               revision,
81
+               create_by,
82
+               create_time,
83
+               update_by,
84
+               update_time,
85
+               correction_code,
86
+               check_record_id,
87
+               rectification_details,
88
+               responsible_user_id,
89
+               correction_duration,
90
+               correction_result,
91
+               correction_time,
92
+               verifier_user_id,
93
+               verification_result,
94
+               verification_time,
95
+               status,
96
+               id,
97
+               responsible_user_name,
98
+               verifier_user_name,
99
+               checked_level,
100
+               evidence_url,
101
+               remark,
102
+               status_desc,
103
+               checked_level_desc,
104
+               verification_result_desc,
105
+               evidence_id,
106
+               comprehensive_evaluation,
107
+               rectification_suggestions,
108
+               checker_id,
109
+               checker_name,
110
+               check_time,
111
+               terminl_code,
112
+               terminl_name,
113
+               regional_code,
114
+               regional_name,
115
+               channel_code,
116
+               channel_name,
117
+               checked_department_id,
118
+               checked_department_name,
119
+               checked_team_id,
120
+               checked_team_name,
121
+               checked_department_leader_id,
122
+               checked_department_leader_name,
123
+               checked_team_leader_id,
124
+               checked_team_leader_name,
125
+               checked_personnel_id,
126
+               checked_personnel_name,
127
+               rectification_deadline,
128
+               task_code,
129
+               task_name,
130
+               document_code,
131
+               document_name,
132
+               correction_name,
133
+               checked_dept_id,
134
+               checked_dept_name,
135
+               process_status,
136
+               process_status_desc,
137
+               check_level,
138
+               check_level_desc,
139
+               select_team_id,
140
+               select_team_name,
141
+               select_team_leader_id,
142
+               select_team_leader_name,
143
+               is_select_team,
144
+               is_self_check,
145
+               completion_time,
146
+               instance_id
147
+        from check_correction
148
+    </sql>
149
+
150
+    <select id="selectCheckCorrectionList" parameterType="CheckCorrection" resultMap="CheckCorrectionResult">
151
+        <include refid="selectCheckCorrectionVo"/>
152
+        <where>
153
+            <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
154
+            <if test="revision != null ">and revision = #{revision}</if>
155
+            <if test="correctionCode != null  and correctionCode != ''">and correction_code = #{correctionCode}</if>
156
+            <if test="checkRecordId != null ">and check_record_id = #{checkRecordId}</if>
157
+            <if test="rectificationDetails != null  and rectificationDetails != ''">and rectification_details =
158
+                #{rectificationDetails}
159
+            </if>
160
+            <if test="responsibleUserId != null ">and responsible_user_id = #{responsibleUserId}</if>
161
+            <if test="correctionDuration != null ">and correction_duration = #{correctionDuration}</if>
162
+            <if test="correctionResult != null  and correctionResult != ''">and correction_result =
163
+                #{correctionResult}
164
+            </if>
165
+            <if test="correctionTime != null ">and correction_time = #{correctionTime}</if>
166
+            <if test="verifierUserId != null ">and verifier_user_id = #{verifierUserId}</if>
167
+            <if test="verificationResult != null  and verificationResult != ''">and verification_result =
168
+                #{verificationResult}
169
+            </if>
170
+            <if test="verificationTime != null ">and verification_time = #{verificationTime}</if>
171
+            <if test="status != null  and status != ''">and status = #{status}</if>
172
+            <if test="responsibleUserName != null  and responsibleUserName != ''">and responsible_user_name like
173
+                concat('%', #{responsibleUserName}, '%')
174
+            </if>
175
+            <if test="verifierUserName != null  and verifierUserName != ''">and verifier_user_name like concat('%',
176
+                #{verifierUserName}, '%')
177
+            </if>
178
+            <if test="checkedLevel != null  and checkedLevel != ''">and checked_level = #{checkedLevel}</if>
179
+            <if test="evidenceUrl != null  and evidenceUrl != ''">and evidence_url = #{evidenceUrl}</if>
180
+            <if test="statusDesc != null  and statusDesc != ''">and status_desc = #{statusDesc}</if>
181
+            <if test="checkedLevelDesc != null  and checkedLevelDesc != ''">and checked_level_desc =
182
+                #{checkedLevelDesc}
183
+            </if>
184
+            <if test="verificationResultDesc != null  and verificationResultDesc != ''">and verification_result_desc =
185
+                #{verificationResultDesc}
186
+            </if>
187
+            <if test="evidenceId != null  and evidenceId != ''">and evidence_id = #{evidenceId}</if>
188
+            <if test="comprehensiveEvaluation != null  and comprehensiveEvaluation != ''">and comprehensive_evaluation =
189
+                #{comprehensiveEvaluation}
190
+            </if>
191
+            <if test="rectificationSuggestions != null  and rectificationSuggestions != ''">and
192
+                rectification_suggestions = #{rectificationSuggestions}
193
+            </if>
194
+            <if test="checkerId != null ">and checker_id = #{checkerId}</if>
195
+            <if test="checkerName != null  and checkerName != ''">and checker_name like concat('%', #{checkerName},
196
+                '%')
197
+            </if>
198
+            <if test="checkTime != null ">
199
+                and check_time <![CDATA[>=]]> #{checkTime}
200
+                and check_time <![CDATA[<]]> date_add(#{checkTime}, interval 1 day)
201
+            </if>
202
+            <if test="terminlCode != null  and terminlCode != ''">and terminl_code = #{terminlCode}</if>
203
+            <if test="terminlName != null  and terminlName != ''">and terminl_name like concat('%', #{terminlName},
204
+                '%')
205
+            </if>
206
+            <if test="regionalCode != null  and regionalCode != ''">and regional_code = #{regionalCode}</if>
207
+            <if test="regionalName != null  and regionalName != ''">and regional_name like concat('%', #{regionalName},
208
+                '%')
209
+            </if>
210
+            <if test="channelCode != null  and channelCode != ''">and channel_code = #{channelCode}</if>
211
+            <if test="channelName != null  and channelName != ''">and channel_name like concat('%', #{channelName},
212
+                '%')
213
+            </if>
214
+            <if test="checkedDepartmentId != null ">and checked_department_id = #{checkedDepartmentId}</if>
215
+            <if test="checkedDepartmentName != null  and checkedDepartmentName != ''">and checked_department_name like
216
+                concat('%', #{checkedDepartmentName}, '%')
217
+            </if>
218
+            <if test="checkedTeamId != null ">and checked_team_id = #{checkedTeamId}</if>
219
+            <if test="checkedTeamName != null  and checkedTeamName != ''">and checked_team_name like concat('%',
220
+                #{checkedTeamName}, '%')
221
+            </if>
222
+            <if test="checkedDepartmentLeaderId != null ">and checked_department_leader_id =
223
+                #{checkedDepartmentLeaderId}
224
+            </if>
225
+            <if test="checkedDepartmentLeaderName != null  and checkedDepartmentLeaderName != ''">and
226
+                checked_department_leader_name like concat('%', #{checkedDepartmentLeaderName}, '%')
227
+            </if>
228
+            <if test="checkedTeamLeaderId != null ">and checked_team_leader_id = #{checkedTeamLeaderId}</if>
229
+            <if test="checkedTeamLeaderName != null  and checkedTeamLeaderName != ''">and checked_team_leader_name like
230
+                concat('%', #{checkedTeamLeaderName}, '%')
231
+            </if>
232
+            <if test="checkedPersonnelId != null ">and checked_personnel_id = #{checkedPersonnelId}</if>
233
+            <if test="checkedPersonnelName != null  and checkedPersonnelName != ''">and checked_personnel_name like
234
+                concat('%', #{checkedPersonnelName}, '%')
235
+            </if>
236
+            <if test="rectificationDeadline != null ">and rectification_deadline = #{rectificationDeadline}</if>
237
+            <if test="taskCode != null  and taskCode != ''">and task_code = #{taskCode}</if>
238
+            <if test="taskName != null  and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
239
+            <if test="documentCode != null  and documentCode != ''">and document_code = #{documentCode}</if>
240
+            <if test="documentName != null  and documentName != ''">and document_name like concat('%', #{documentName},
241
+                '%')
242
+            </if>
243
+            <if test="correctionName != null  and correctionName != ''">and correction_name like concat('%',
244
+                #{correctionName}, '%')
245
+            </if>
246
+            <if test="checkedDeptId != null ">and checked_dept_id = #{checkedDeptId}</if>
247
+            <if test="checkedDeptName != null  and checkedDeptName != ''">and checked_dept_name like concat('%',
248
+                #{checkedDeptName}, '%')
249
+            </if>
250
+            <if test="processStatus != null  and processStatus != ''">and process_status = #{processStatus}</if>
251
+            <if test="processStatusDesc != null  and processStatusDesc != ''">and process_status_desc =
252
+                #{processStatusDesc}
253
+            </if>
254
+            <if test="checkLevel != null  and checkLevel != ''">and check_level = #{checkLevel}</if>
255
+            <if test="checkLevelDesc != null  and checkLevelDesc != ''">and check_level_desc = #{checkLevelDesc}</if>
256
+            <if test="selectTeamId != null ">and select_team_id = #{selectTeamId}</if>
257
+            <if test="selectTeamName != null  and selectTeamName != ''">and select_team_name like concat('%',
258
+                #{selectTeamName}, '%')
259
+            </if>
260
+            <if test="selectTeamLeaderId != null ">and select_team_leader_id = #{selectTeamLeaderId}</if>
261
+            <if test="selectTeamLeaderName != null  and selectTeamLeaderName != ''">and select_team_leader_name like
262
+                concat('%', #{selectTeamLeaderName}, '%')
263
+            </if>
264
+            <if test="isSelectTeam != null ">and is_select_team = #{isSelectTeam}</if>
265
+            <if test="isSelfCheck != null ">and is_self_check = #{isSelfCheck}</if>
266
+            <if test="completionTime != null ">and completion_time = #{completionTime}</if>
267
+            <if test="instanceId != null ">and instance_id = #{instanceId}</if>
268
+            <if test="startDate != null and endDate != null">
269
+                and (check_time >= #{startDate}
270
+                and check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
271
+            </if>
272
+        </where>
273
+        order by create_time desc
274
+    </select>
275
+
276
+    <select id="selectCheckCorrectionById" parameterType="Long" resultMap="CheckCorrectionResult">
277
+        <include refid="selectCheckCorrectionVo"/>
278
+        where id = #{id}
279
+    </select>
280
+
281
+    <insert id="insertCheckCorrection" parameterType="CheckCorrection" useGeneratedKeys="true" keyProperty="id">
282
+        insert into check_correction
283
+        <trim prefix="(" suffix=")" suffixOverrides=",">
284
+            <if test="tenantId != null">tenant_id,</if>
285
+            <if test="revision != null">revision,</if>
286
+            <if test="createBy != null">create_by,</if>
287
+            <if test="createTime != null">create_time,</if>
288
+            <if test="updateBy != null">update_by,</if>
289
+            <if test="updateTime != null">update_time,</if>
290
+            <if test="correctionCode != null and correctionCode != ''">correction_code,</if>
291
+            <if test="checkRecordId != null">check_record_id,</if>
292
+            <if test="rectificationDetails != null">rectification_details,</if>
293
+            <if test="responsibleUserId != null">responsible_user_id,</if>
294
+            <if test="correctionDuration != null">correction_duration,</if>
295
+            <if test="correctionResult != null">correction_result,</if>
296
+            <if test="correctionTime != null">correction_time,</if>
297
+            <if test="verifierUserId != null">verifier_user_id,</if>
298
+            <if test="verificationResult != null">verification_result,</if>
299
+            <if test="verificationTime != null">verification_time,</if>
300
+            <if test="status != null">status,</if>
301
+            <if test="responsibleUserName != null and responsibleUserName != ''">responsible_user_name,</if>
302
+            <if test="verifierUserName != null and verifierUserName != ''">verifier_user_name,</if>
303
+            <if test="checkedLevel != null and checkedLevel != ''">checked_level,</if>
304
+            <if test="evidenceUrl != null">evidence_url,</if>
305
+            <if test="remark != null">remark,</if>
306
+            <if test="statusDesc != null and statusDesc != ''">status_desc,</if>
307
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">checked_level_desc,</if>
308
+            <if test="verificationResultDesc != null">verification_result_desc,</if>
309
+            <if test="evidenceId != null">evidence_id,</if>
310
+            <if test="comprehensiveEvaluation != null">comprehensive_evaluation,</if>
311
+            <if test="rectificationSuggestions != null">rectification_suggestions,</if>
312
+            <if test="checkerId != null">checker_id,</if>
313
+            <if test="checkerName != null">checker_name,</if>
314
+            <if test="checkTime != null">check_time,</if>
315
+            <if test="terminlCode != null">terminl_code,</if>
316
+            <if test="terminlName != null">terminl_name,</if>
317
+            <if test="regionalCode != null">regional_code,</if>
318
+            <if test="regionalName != null">regional_name,</if>
319
+            <if test="channelCode != null">channel_code,</if>
320
+            <if test="channelName != null">channel_name,</if>
321
+            <if test="checkedDepartmentId != null">checked_department_id,</if>
322
+            <if test="checkedDepartmentName != null">checked_department_name,</if>
323
+            <if test="checkedTeamId != null">checked_team_id,</if>
324
+            <if test="checkedTeamName != null">checked_team_name,</if>
325
+            <if test="checkedDepartmentLeaderId != null">checked_department_leader_id,</if>
326
+            <if test="checkedDepartmentLeaderName != null">checked_department_leader_name,</if>
327
+            <if test="checkedTeamLeaderId != null">checked_team_leader_id,</if>
328
+            <if test="checkedTeamLeaderName != null">checked_team_leader_name,</if>
329
+            <if test="checkedPersonnelId != null">checked_personnel_id,</if>
330
+            <if test="checkedPersonnelName != null">checked_personnel_name,</if>
331
+            <if test="rectificationDeadline != null">rectification_deadline,</if>
332
+            <if test="taskCode != null">task_code,</if>
333
+            <if test="taskName != null">task_name,</if>
334
+            <if test="documentCode != null">document_code,</if>
335
+            <if test="documentName != null">document_name,</if>
336
+            <if test="correctionName != null">correction_name,</if>
337
+            <if test="checkedDeptId != null">checked_dept_id,</if>
338
+            <if test="checkedDeptName != null">checked_dept_name,</if>
339
+            <if test="processStatus != null">process_status,</if>
340
+            <if test="processStatusDesc != null">process_status_desc,</if>
341
+            <if test="checkLevel != null">check_level,</if>
342
+            <if test="checkLevelDesc != null">check_level_desc,</if>
343
+            <if test="selectTeamId != null">select_team_id,</if>
344
+            <if test="selectTeamName != null">select_team_name,</if>
345
+            <if test="selectTeamLeaderId != null">select_team_leader_id,</if>
346
+            <if test="selectTeamLeaderName != null">select_team_leader_name,</if>
347
+            <if test="isSelectTeam != null">is_select_team,</if>
348
+            <if test="isSelfCheck != null">is_self_check,</if>
349
+            <if test="completionTime != null">completion_time,</if>
350
+            <if test="instanceId != null">instance_id,</if>
351
+        </trim>
352
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
353
+            <if test="tenantId != null">#{tenantId},</if>
354
+            <if test="revision != null">#{revision},</if>
355
+            <if test="createBy != null">#{createBy},</if>
356
+            <if test="createTime != null">#{createTime},</if>
357
+            <if test="updateBy != null">#{updateBy},</if>
358
+            <if test="updateTime != null">#{updateTime},</if>
359
+            <if test="correctionCode != null and correctionCode != ''">#{correctionCode},</if>
360
+            <if test="checkRecordId != null">#{checkRecordId},</if>
361
+            <if test="rectificationDetails != null">#{rectificationDetails},</if>
362
+            <if test="responsibleUserId != null">#{responsibleUserId},</if>
363
+            <if test="correctionDuration != null">#{correctionDuration},</if>
364
+            <if test="correctionResult != null">#{correctionResult},</if>
365
+            <if test="correctionTime != null">#{correctionTime},</if>
366
+            <if test="verifierUserId != null">#{verifierUserId},</if>
367
+            <if test="verificationResult != null">#{verificationResult},</if>
368
+            <if test="verificationTime != null">#{verificationTime},</if>
369
+            <if test="status != null">#{status},</if>
370
+            <if test="responsibleUserName != null and responsibleUserName != ''">#{responsibleUserName},</if>
371
+            <if test="verifierUserName != null and verifierUserName != ''">#{verifierUserName},</if>
372
+            <if test="checkedLevel != null and checkedLevel != ''">#{checkedLevel},</if>
373
+            <if test="evidenceUrl != null">#{evidenceUrl},</if>
374
+            <if test="remark != null">#{remark},</if>
375
+            <if test="statusDesc != null and statusDesc != ''">#{statusDesc},</if>
376
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">#{checkedLevelDesc},</if>
377
+            <if test="verificationResultDesc != null">#{verificationResultDesc},</if>
378
+            <if test="evidenceId != null">#{evidenceId},</if>
379
+            <if test="comprehensiveEvaluation != null">#{comprehensiveEvaluation},</if>
380
+            <if test="rectificationSuggestions != null">#{rectificationSuggestions},</if>
381
+            <if test="checkerId != null">#{checkerId},</if>
382
+            <if test="checkerName != null">#{checkerName},</if>
383
+            <if test="checkTime != null">#{checkTime},</if>
384
+            <if test="terminlCode != null">#{terminlCode},</if>
385
+            <if test="terminlName != null">#{terminlName},</if>
386
+            <if test="regionalCode != null">#{regionalCode},</if>
387
+            <if test="regionalName != null">#{regionalName},</if>
388
+            <if test="channelCode != null">#{channelCode},</if>
389
+            <if test="channelName != null">#{channelName},</if>
390
+            <if test="checkedDepartmentId != null">#{checkedDepartmentId},</if>
391
+            <if test="checkedDepartmentName != null">#{checkedDepartmentName},</if>
392
+            <if test="checkedTeamId != null">#{checkedTeamId},</if>
393
+            <if test="checkedTeamName != null">#{checkedTeamName},</if>
394
+            <if test="checkedDepartmentLeaderId != null">#{checkedDepartmentLeaderId},</if>
395
+            <if test="checkedDepartmentLeaderName != null">#{checkedDepartmentLeaderName},</if>
396
+            <if test="checkedTeamLeaderId != null">#{checkedTeamLeaderId},</if>
397
+            <if test="checkedTeamLeaderName != null">#{checkedTeamLeaderName},</if>
398
+            <if test="checkedPersonnelId != null">#{checkedPersonnelId},</if>
399
+            <if test="checkedPersonnelName != null">#{checkedPersonnelName},</if>
400
+            <if test="rectificationDeadline != null">#{rectificationDeadline},</if>
401
+            <if test="taskCode != null">#{taskCode},</if>
402
+            <if test="taskName != null">#{taskName},</if>
403
+            <if test="documentCode != null">#{documentCode},</if>
404
+            <if test="documentName != null">#{documentName},</if>
405
+            <if test="correctionName != null">#{correctionName},</if>
406
+            <if test="checkedDeptId != null">#{checkedDeptId},</if>
407
+            <if test="checkedDeptName != null">#{checkedDeptName},</if>
408
+            <if test="processStatus != null">#{processStatus},</if>
409
+            <if test="processStatusDesc != null">#{processStatusDesc},</if>
410
+            <if test="checkLevel != null">#{checkLevel},</if>
411
+            <if test="checkLevelDesc != null">#{checkLevelDesc},</if>
412
+            <if test="selectTeamId != null">#{selectTeamId},</if>
413
+            <if test="selectTeamName != null">#{selectTeamName},</if>
414
+            <if test="selectTeamLeaderId != null">#{selectTeamLeaderId},</if>
415
+            <if test="selectTeamLeaderName != null">#{selectTeamLeaderName},</if>
416
+            <if test="isSelectTeam != null">#{isSelectTeam},</if>
417
+            <if test="isSelfCheck != null">#{isSelfCheck},</if>
418
+            <if test="completionTime != null">#{completionTime},</if>
419
+            <if test="instanceId != null">#{instanceId},</if>
420
+        </trim>
421
+    </insert>
422
+
423
+    <update id="updateCheckCorrection" parameterType="CheckCorrection">
424
+        update check_correction
425
+        <trim prefix="SET" suffixOverrides=",">
426
+            <if test="tenantId != null">tenant_id = #{tenantId},</if>
427
+            <if test="revision != null">revision = #{revision},</if>
428
+            <if test="createBy != null">create_by = #{createBy},</if>
429
+            <if test="createTime != null">create_time = #{createTime},</if>
430
+            <if test="updateBy != null">update_by = #{updateBy},</if>
431
+            <if test="updateTime != null">update_time = #{updateTime},</if>
432
+            <if test="correctionCode != null and correctionCode != ''">correction_code = #{correctionCode},</if>
433
+            <if test="checkRecordId != null">check_record_id = #{checkRecordId},</if>
434
+            <if test="rectificationDetails != null">rectification_details = #{rectificationDetails},</if>
435
+            <if test="responsibleUserId != null">responsible_user_id = #{responsibleUserId},</if>
436
+            <if test="correctionDuration != null">correction_duration = #{correctionDuration},</if>
437
+            <if test="correctionResult != null">correction_result = #{correctionResult},</if>
438
+            <if test="correctionTime != null">correction_time = #{correctionTime},</if>
439
+            <if test="verifierUserId != null">verifier_user_id = #{verifierUserId},</if>
440
+            <if test="verificationResult != null">verification_result = #{verificationResult},</if>
441
+            <if test="verificationTime != null">verification_time = #{verificationTime},</if>
442
+            <if test="status != null">status = #{status},</if>
443
+            <if test="responsibleUserName != null and responsibleUserName != ''">responsible_user_name =
444
+                #{responsibleUserName},
445
+            </if>
446
+            <if test="verifierUserName != null and verifierUserName != ''">verifier_user_name = #{verifierUserName},
447
+            </if>
448
+            <if test="checkedLevel != null and checkedLevel != ''">checked_level = #{checkedLevel},</if>
449
+            <if test="evidenceUrl != null">evidence_url = #{evidenceUrl},</if>
450
+            <if test="remark != null">remark = #{remark},</if>
451
+            <if test="statusDesc != null and statusDesc != ''">status_desc = #{statusDesc},</if>
452
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">checked_level_desc = #{checkedLevelDesc},
453
+            </if>
454
+            <if test="verificationResultDesc != null">verification_result_desc = #{verificationResultDesc},</if>
455
+            <if test="evidenceId != null">evidence_id = #{evidenceId},</if>
456
+            <if test="comprehensiveEvaluation != null">comprehensive_evaluation = #{comprehensiveEvaluation},</if>
457
+            <if test="rectificationSuggestions != null">rectification_suggestions = #{rectificationSuggestions},</if>
458
+            <if test="checkerId != null">checker_id = #{checkerId},</if>
459
+            <if test="checkerName != null">checker_name = #{checkerName},</if>
460
+            <if test="checkTime != null">check_time = #{checkTime},</if>
461
+            <if test="terminlCode != null">terminl_code = #{terminlCode},</if>
462
+            <if test="terminlName != null">terminl_name = #{terminlName},</if>
463
+            <if test="regionalCode != null">regional_code = #{regionalCode},</if>
464
+            <if test="regionalName != null">regional_name = #{regionalName},</if>
465
+            <if test="channelCode != null">channel_code = #{channelCode},</if>
466
+            <if test="channelName != null">channel_name = #{channelName},</if>
467
+            <if test="checkedDepartmentId != null">checked_department_id = #{checkedDepartmentId},</if>
468
+            <if test="checkedDepartmentName != null">checked_department_name = #{checkedDepartmentName},</if>
469
+            <if test="checkedTeamId != null">checked_team_id = #{checkedTeamId},</if>
470
+            <if test="checkedTeamName != null">checked_team_name = #{checkedTeamName},</if>
471
+            <if test="checkedDepartmentLeaderId != null">checked_department_leader_id = #{checkedDepartmentLeaderId},
472
+            </if>
473
+            <if test="checkedDepartmentLeaderName != null">checked_department_leader_name =
474
+                #{checkedDepartmentLeaderName},
475
+            </if>
476
+            <if test="checkedTeamLeaderId != null">checked_team_leader_id = #{checkedTeamLeaderId},</if>
477
+            <if test="checkedTeamLeaderName != null">checked_team_leader_name = #{checkedTeamLeaderName},</if>
478
+            <if test="checkedPersonnelId != null">checked_personnel_id = #{checkedPersonnelId},</if>
479
+            <if test="checkedPersonnelName != null">checked_personnel_name = #{checkedPersonnelName},</if>
480
+            <if test="rectificationDeadline != null">rectification_deadline = #{rectificationDeadline},</if>
481
+            <if test="taskCode != null">task_code = #{taskCode},</if>
482
+            <if test="taskName != null">task_name = #{taskName},</if>
483
+            <if test="documentCode != null">document_code = #{documentCode},</if>
484
+            <if test="documentName != null">document_name = #{documentName},</if>
485
+            <if test="correctionName != null">correction_name = #{correctionName},</if>
486
+            <if test="checkedDeptId != null">checked_dept_id = #{checkedDeptId},</if>
487
+            <if test="checkedDeptName != null">checked_dept_name = #{checkedDeptName},</if>
488
+            <if test="processStatus != null">process_status = #{processStatus},</if>
489
+            <if test="processStatusDesc != null">process_status_desc = #{processStatusDesc},</if>
490
+            <if test="checkLevel != null">check_level = #{checkLevel},</if>
491
+            <if test="checkLevelDesc != null">check_level_desc = #{checkLevelDesc},</if>
492
+            <if test="selectTeamId != null">select_team_id = #{selectTeamId},</if>
493
+            <if test="selectTeamName != null">select_team_name = #{selectTeamName},</if>
494
+            <if test="selectTeamLeaderId != null">select_team_leader_id = #{selectTeamLeaderId},</if>
495
+            <if test="selectTeamLeaderName != null">select_team_leader_name = #{selectTeamLeaderName},</if>
496
+            <if test="isSelectTeam != null">is_select_team = #{isSelectTeam},</if>
497
+            <if test="isSelfCheck != null">is_self_check = #{isSelfCheck},</if>
498
+            <if test="completionTime != null">completion_time = #{completionTime},</if>
499
+            <if test="instanceId != null">instance_id = #{instanceId},</if>
500
+        </trim>
501
+        where id = #{id}
502
+    </update>
503
+
504
+    <delete id="deleteCheckCorrectionById" parameterType="Long">
505
+        delete
506
+        from check_correction
507
+        where id = #{id}
508
+    </delete>
509
+
510
+    <delete id="deleteCheckCorrectionByIds" parameterType="String">
511
+        delete from check_correction where id in
512
+        <foreach item="id" collection="array" open="(" separator="," close=")">
513
+            #{id}
514
+        </foreach>
515
+    </delete>
516
+
517
+    <!-- 统计用户在指定时间范围内的巡检问题数(按二级分类) -->
518
+    <select id="countCheckProblemsByModule" resultType="com.sundot.airport.common.dto.ModuleStatisticsDTO">
519
+        SELECT
520
+            cpi.category_name_two AS moduleName,
521
+            COUNT(1) AS problemCount
522
+        FROM check_correction cc
523
+        INNER JOIN check_project_item cpi ON (cpi.source_id = cc.id AND cpi.type = 'CHECK_CORRECTION')
524
+        INNER JOIN check_user cu ON (cu.source_id = cpi.id AND cu.type = 'PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS')
525
+        WHERE cu.user_id = #{userId}
526
+          AND cc.check_time &gt;= #{startDate}
527
+          AND cc.check_time &lt; #{endDate}
528
+        GROUP BY cpi.category_name_two
529
+    </select>
530
+</mapper>

+ 553 - 0
airport-check/src/main/resources/mapper/check/CheckLargeScreenMapper.xml

@@ -0,0 +1,553 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.sundot.airport.check.mapper.CheckLargeScreenMapper">
6
+
7
+    <select id="planOverview" resultType="com.sundot.airport.check.domain.CheckLargeScreenPlanOverviewDto">
8
+        select date_format(ct.check_start_time, '%Y-%m-%d') date,
9
+        ct.check_category type,
10
+        ct.check_category_desc typeDesc,
11
+        count(ct.id) total
12
+        from check_task ct
13
+        where 1 = 1
14
+        <if test="isSelfCheck != null">
15
+            and ct.is_self_check=#{isSelfCheck}
16
+        </if>
17
+        <if test="createId != null">
18
+            and ct.create_id=#{createId}
19
+        </if>
20
+        <if test="startDate != null and endDate != null">
21
+            and (ct.check_start_time >= #{startDate}
22
+            and ct.check_start_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
23
+        </if>
24
+        group by date_format(ct.check_start_time, '%Y-%m-%d'), ct.check_category, ct.check_category_desc
25
+    </select>
26
+
27
+    <select id="planDistribution" resultType="com.sundot.airport.check.domain.CheckLargeScreenCommonDto">
28
+        select cpi.category_code_one code, category_name_one name, count(cpi.id) total
29
+        from check_task ct
30
+        inner join check_project_item cpi on (cpi.source_id = ct.id and cpi.type = 'CHECK_TASK')
31
+        where 1 = 1
32
+        <if test="isSelfCheck != null">
33
+            and ct.is_self_check=#{isSelfCheck}
34
+        </if>
35
+        <if test="createId != null">
36
+            and ct.create_id=#{createId}
37
+        </if>
38
+        <if test="startDate != null and endDate != null">
39
+            and (ct.check_start_time >= #{startDate}
40
+            and ct.check_start_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
41
+        </if>
42
+        group by cpi.category_code_one, cpi.category_name_one
43
+        order by total desc
44
+    </select>
45
+
46
+    <select id="planStatistics" resultType="com.sundot.airport.check.domain.CheckTask">
47
+        select ct.*
48
+        from check_task ct
49
+        where 1 = 1
50
+        <if test="isSelfCheck != null">
51
+            and ct.is_self_check=#{isSelfCheck}
52
+        </if>
53
+        <if test="createId != null">
54
+            and ct.create_id=#{createId}
55
+        </if>
56
+        <if test="startDate != null and endDate != null">
57
+            and (ct.check_start_time >= #{startDate}
58
+            and ct.check_start_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
59
+        </if>
60
+        order by ct.check_start_time desc
61
+    </select>
62
+
63
+    <select id="problemDistribution" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
64
+        select cpi.category_code_one code, cpi.category_name_one name, count(cpi.id) total
65
+        from check_correction cc
66
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
67
+        where 1 = 1
68
+        <if test="isSelfCheck != null">
69
+            and cc.is_self_check=#{isSelfCheck}
70
+        </if>
71
+        <if test="checkedDepartmentId != null">
72
+            and cc.checked_department_id=#{checkedDepartmentId}
73
+        </if>
74
+        <if test="checkedTeamId != null">
75
+            and cc.checked_team_id=#{checkedTeamId}
76
+        </if>
77
+        <if test="startDate != null and endDate != null">
78
+            and (cc.check_time >= #{startDate}
79
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
80
+        </if>
81
+        group by cpi.category_code_one, cpi.category_name_one
82
+        order by total desc
83
+    </select>
84
+
85
+    <select id="problemComparison" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
86
+        select cc.checked_department_id deptId,
87
+        cc.checked_department_name deptName,
88
+        cpi.category_code_one code,
89
+        cpi.category_name_one name,
90
+        count(cpi.id) total
91
+        from check_correction cc
92
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
93
+        where 1 = 1
94
+        <if test="isSelfCheck != null">
95
+            and cc.is_self_check=#{isSelfCheck}
96
+        </if>
97
+        <if test="checkedDepartmentId != null">
98
+            and cc.checked_department_id=#{checkedDepartmentId}
99
+        </if>
100
+        <if test="startDate != null and endDate != null">
101
+            and (cc.check_time >= #{startDate}
102
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
103
+        </if>
104
+        group by cc.checked_department_id, cc.checked_department_name, cpi.category_code_one, cpi.category_name_one
105
+        order by total desc
106
+    </select>
107
+
108
+    <select id="problemComparisonTwo" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
109
+        select cc.checked_department_id deptId,
110
+        cc.checked_department_name deptName,
111
+        cpi.category_code_two code,
112
+        cpi.category_name_two name,
113
+        count(cpi.id) total
114
+        from check_correction cc
115
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
116
+        where 1 = 1
117
+        <if test="isSelfCheck != null">
118
+            and cc.is_self_check=#{isSelfCheck}
119
+        </if>
120
+        <if test="checkedDepartmentId != null">
121
+            and cc.checked_department_id=#{checkedDepartmentId}
122
+        </if>
123
+        <if test="categoryCodeOne != null and categoryCodeOne != ''">
124
+            and cpi.category_code_one=#{categoryCodeOne}
125
+        </if>
126
+        <if test="startDate != null and endDate != null">
127
+            and (cc.check_time >= #{startDate}
128
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
129
+        </if>
130
+        group by cc.checked_department_id, cc.checked_department_name, cpi.category_code_two, cpi.category_name_two
131
+        order by total desc
132
+    </select>
133
+
134
+    <select id="problemComparisonBanZu" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
135
+        select cc.checked_team_id deptId,
136
+        cc.checked_team_name deptName,
137
+        cpi.category_code_one code,
138
+        cpi.category_name_one name,
139
+        count(cpi.id) total
140
+        from check_correction cc
141
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
142
+        where 1 = 1
143
+        <if test="isSelfCheck != null">
144
+            and cc.is_self_check=#{isSelfCheck}
145
+        </if>
146
+        <if test="checkedTeamId != null">
147
+            and cc.checked_team_id=#{checkedTeamId}
148
+        </if>
149
+        <if test="startDate != null and endDate != null">
150
+            and (cc.check_time >= #{startDate}
151
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
152
+        </if>
153
+        group by cc.checked_team_id, cc.checked_team_name, cpi.category_code_one, cpi.category_name_one
154
+        order by total desc
155
+    </select>
156
+
157
+    <select id="problemComparisonTwoBanZu" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
158
+        select cc.checked_team_id deptId,
159
+        cc.checked_team_name deptName,
160
+        cpi.category_code_two code,
161
+        cpi.category_name_two name,
162
+        count(cpi.id) total
163
+        from check_correction cc
164
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
165
+        where 1 = 1
166
+        <if test="isSelfCheck != null">
167
+            and cc.is_self_check=#{isSelfCheck}
168
+        </if>
169
+        <if test="checkedTeamId != null">
170
+            and cc.checked_team_id=#{checkedTeamId}
171
+        </if>
172
+        <if test="categoryCodeOne != null and categoryCodeOne != ''">
173
+            and cpi.category_code_one=#{categoryCodeOne}
174
+        </if>
175
+        <if test="startDate != null and endDate != null">
176
+            and (cc.check_time >= #{startDate}
177
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
178
+        </if>
179
+        group by cc.checked_team_id, cc.checked_team_name, cpi.category_code_two, cpi.category_name_two
180
+        order by total desc
181
+    </select>
182
+
183
+    <select id="problemTrend" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemTrendDto">
184
+        select date_format(cc.check_time, '%Y-%m-%d') date,
185
+        cc.checked_department_id id,
186
+        cc.checked_department_name name,
187
+        count(cpi.id) total
188
+        from check_correction cc
189
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
190
+        where 1 = 1
191
+        <if test="isSelfCheck != null">
192
+            and cc.is_self_check=#{isSelfCheck}
193
+        </if>
194
+        <if test="checkedDepartmentId != null">
195
+            and cc.checked_department_id=#{checkedDepartmentId}
196
+        </if>
197
+        <if test="categoryCodeOne != null and categoryCodeOne != ''">
198
+            and cpi.category_code_one=#{categoryCodeOne}
199
+        </if>
200
+        <if test="startDate != null and endDate != null">
201
+            and (cc.check_time >= #{startDate}
202
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
203
+        </if>
204
+        group by date_format(cc.check_time, '%Y-%m-%d'), cc.checked_department_id, cc.checked_department_name
205
+        order by total desc
206
+    </select>
207
+
208
+    <select id="problemTrendBanZu" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemTrendDto">
209
+        select date_format(cc.check_time, '%Y-%m-%d') date,
210
+        cc.checked_team_id id,
211
+        cc.checked_team_name name,
212
+        count(cpi.id) total
213
+        from check_correction cc
214
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
215
+        where 1 = 1
216
+        <if test="isSelfCheck != null">
217
+            and cc.is_self_check=#{isSelfCheck}
218
+        </if>
219
+        <if test="checkedTeamId != null">
220
+            and cc.checked_team_id=#{checkedTeamId}
221
+        </if>
222
+        <if test="categoryCodeOne != null and categoryCodeOne != ''">
223
+            and cpi.category_code_one=#{categoryCodeOne}
224
+        </if>
225
+        <if test="startDate != null and endDate != null">
226
+            and (cc.check_time >= #{startDate}
227
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
228
+        </if>
229
+        group by date_format(cc.check_time, '%Y-%m-%d'), cc.checked_team_id, cc.checked_team_name
230
+        order by total desc
231
+    </select>
232
+
233
+    <select id="correction" resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionAssistDto">
234
+        select cc.checked_department_id departmentId,
235
+        cc.checked_department_name departmentName,
236
+        cc.checked_team_id teamId,
237
+        cc.checked_team_name teamName,
238
+        case
239
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline >= cc.completion_time
240
+        then 'ON_TIME_COMPLETED'
241
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline <![CDATA[ < ]]> cc.completion_time
242
+        then 'OVER_TIME_COMPLETED'
243
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() <![CDATA[ <= ]]> cc.rectification_deadline
244
+        then 'ON_TIME_UNFINISHED'
245
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() > cc.rectification_deadline
246
+        then 'OVER_TIME_UNFINISHED'
247
+        else 'OTHER' end type
248
+        from check_correction cc
249
+        where 1 = 1
250
+        <if test="isSelfCheck != null">
251
+            and cc.is_self_check=#{isSelfCheck}
252
+        </if>
253
+        <if test="startDate != null and endDate != null">
254
+            and (cc.check_time >= #{startDate}
255
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
256
+        </if>
257
+        <if test="checkedDepartmentId != null">
258
+            and cc.checked_department_id=#{checkedDepartmentId}
259
+        </if>
260
+        <if test="checkedTeamId != null">
261
+            and cc.checked_team_id=#{checkedTeamId}
262
+        </if>
263
+    </select>
264
+
265
+    <select id="correctionDistribution" resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionDto">
266
+        select temp.deptId deptId,
267
+        temp.deptName deptName,
268
+        ifnull(sum(case when temp.type = 'ON_TIME_COMPLETED' then 1 else 0 end), 0) onTimeCompletedCount,
269
+        ifnull(sum(case when temp.type = 'OVER_TIME_COMPLETED' then 1 else 0 end), 0) overTimeCompletedCount,
270
+        ifnull(sum(case when temp.type = 'ON_TIME_UNFINISHED' then 1 else 0 end), 0) onTimeUnfinishedCount,
271
+        ifnull(sum(case when temp.type = 'OVER_TIME_UNFINISHED' then 1 else 0 end), 0) overTimeUnfinishedCount,
272
+        ifnull(sum(case when temp.type = 'OTHER' then 1 else 0 end), 0) otherCount
273
+        from (select cc.checked_department_id deptId,
274
+        cc.checked_department_name deptName,
275
+        case
276
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline >= cc.completion_time
277
+        then 'ON_TIME_COMPLETED'
278
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline <![CDATA[ < ]]> cc.completion_time
279
+        then 'OVER_TIME_COMPLETED'
280
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() <![CDATA[ <= ]]> cc.rectification_deadline
281
+        then 'ON_TIME_UNFINISHED'
282
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() > cc.rectification_deadline
283
+        then 'OVER_TIME_UNFINISHED'
284
+        else 'OTHER' end type
285
+        from check_correction cc
286
+        where 1 = 1
287
+        <if test="isSelfCheck != null">
288
+            and cc.is_self_check=#{isSelfCheck}
289
+        </if>
290
+        <if test="checkedDepartmentId != null">
291
+            and cc.checked_department_id=#{checkedDepartmentId}
292
+        </if>
293
+        <if test="checkedTeamId != null">
294
+            and cc.checked_team_id=#{checkedTeamId}
295
+        </if>
296
+        <if test="startDate != null and endDate != null">
297
+            and (cc.check_time >= #{startDate}
298
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
299
+        </if>) temp
300
+        group by temp.deptId, temp.deptName
301
+    </select>
302
+
303
+    <select id="correctionDistributionBanZu" resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionDto">
304
+        select temp.deptId deptId,
305
+        temp.deptName deptName,
306
+        ifnull(sum(case when temp.type = 'ON_TIME_COMPLETED' then 1 else 0 end), 0) onTimeCompletedCount,
307
+        ifnull(sum(case when temp.type = 'OVER_TIME_COMPLETED' then 1 else 0 end), 0) overTimeCompletedCount,
308
+        ifnull(sum(case when temp.type = 'ON_TIME_UNFINISHED' then 1 else 0 end), 0) onTimeUnfinishedCount,
309
+        ifnull(sum(case when temp.type = 'OVER_TIME_UNFINISHED' then 1 else 0 end), 0) overTimeUnfinishedCount,
310
+        ifnull(sum(case when temp.type = 'OTHER' then 1 else 0 end), 0) otherCount
311
+        from (select cc.checked_team_id deptId,
312
+        cc.checked_team_name deptName,
313
+        case
314
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline >= cc.completion_time
315
+        then 'ON_TIME_COMPLETED'
316
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline <![CDATA[ < ]]> cc.completion_time
317
+        then 'OVER_TIME_COMPLETED'
318
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() <![CDATA[ <= ]]> cc.rectification_deadline
319
+        then 'ON_TIME_UNFINISHED'
320
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() > cc.rectification_deadline
321
+        then 'OVER_TIME_UNFINISHED'
322
+        else 'OTHER' end type
323
+        from check_correction cc
324
+        where 1 = 1
325
+        <if test="isSelfCheck != null">
326
+            and cc.is_self_check=#{isSelfCheck}
327
+        </if>
328
+        <if test="checkedDepartmentId != null">
329
+            and cc.checked_department_id=#{checkedDepartmentId}
330
+        </if>
331
+        <if test="checkedTeamId != null">
332
+            and cc.checked_team_id=#{checkedTeamId}
333
+        </if>
334
+        <if test="startDate != null and endDate != null">
335
+            and (cc.check_time >= #{startDate}
336
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
337
+        </if>) temp
338
+        group by temp.deptId, temp.deptName
339
+    </select>
340
+
341
+    <select id="inspectionExecute" resultType="com.sundot.airport.check.domain.CheckLargeScreenInspectionExecuteDto">
342
+        select ct.id               taskId,
343
+               ct.task_code        taskCode,
344
+               ct.task_name        taskName,
345
+               ct.check_level      checkLevel,
346
+               ct.check_level_desc checkLevelDesc,
347
+               ct.rule_type_num    ruleTypeNum,
348
+               ct.check_start_time checkStartTime,
349
+               ct.check_end_time   checkEndTime
350
+        from check_task ct
351
+        where 1 = 1
352
+          and current_date() between ct.check_start_time and ct.check_end_time
353
+    </select>
354
+
355
+    <select id="inspectionExecuteItem"
356
+            resultType="com.sundot.airport.check.domain.CheckLargeScreenInspectionExecuteItemDto">
357
+        select cr.task_code taskCode,
358
+        cr.checker_id userId,
359
+        cr.checker_name userName,
360
+        count(distinct cr.id) checkOrderCount,
361
+        count(distinct cc.id) rectificationOrderCount,
362
+        count(distinct cpi.id) unqualifiedProjectCount
363
+        from check_record cr
364
+        left join check_correction cc on cc.check_record_id = cr.id
365
+        left join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
366
+        where 1 = 1
367
+        and cr.task_code in
368
+        <foreach item="item" collection="list" open="(" separator="," close=")">
369
+            #{item}
370
+        </foreach>
371
+        and (cr.check_time
372
+        between concat(curdate(), ' 09:00:00') and concat(date_add(curdate(), interval 1 day), ' 09:00:00'))
373
+        group by cr.task_code, cr.checker_id, cr.checker_name
374
+    </select>
375
+
376
+    <select id="inspectionExecuteUser"
377
+            resultType="com.sundot.airport.check.domain.CheckLargeScreenInspectionExecuteUserDto">
378
+        select su.user_id,
379
+        su.user_name,
380
+        su.nick_name,
381
+        su.dept_id,
382
+        sr.role_id,
383
+        sr.role_name,
384
+        sr.role_key
385
+        from sys_user su
386
+        inner join sys_user_role sur on su.user_id = sur.user_id
387
+        inner join sys_role sr on sr.role_id = sur.role_id
388
+        where 1 = 1
389
+        and su.del_flag = '0'
390
+        and sr.del_flag = '0'
391
+        and su.user_id in
392
+        <foreach item="item" collection="list" open="(" separator="," close=")">
393
+            #{item}
394
+        </foreach>
395
+    </select>
396
+
397
+    <select id="getProblemDepartment" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
398
+        select distinct cc.checked_department_id deptId,
399
+        cc.checked_department_name deptName
400
+        from check_correction cc
401
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
402
+        where 1 = 1
403
+        <if test="isSelfCheck != null">
404
+            and cc.is_self_check=#{isSelfCheck}
405
+        </if>
406
+        <if test="checkedDepartmentId != null">
407
+            and cc.checked_department_id=#{checkedDepartmentId}
408
+        </if>
409
+        <if test="checkedTeamId != null">
410
+            and cc.checked_team_id=#{checkedTeamId}
411
+        </if>
412
+        <if test="startDate != null and endDate != null">
413
+            and (cc.check_time >= #{startDate}
414
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
415
+        </if>
416
+    </select>
417
+
418
+    <select id="getProblemTeam" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
419
+        select distinct cc.checked_team_id deptId,
420
+        cc.checked_team_name deptName
421
+        from check_correction cc
422
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
423
+        where 1 = 1
424
+        <if test="isSelfCheck != null">
425
+            and cc.is_self_check=#{isSelfCheck}
426
+        </if>
427
+        <if test="checkedDepartmentId != null">
428
+            and cc.checked_department_id=#{checkedDepartmentId}
429
+        </if>
430
+        <if test="checkedTeamId != null">
431
+            and cc.checked_team_id=#{checkedTeamId}
432
+        </if>
433
+        <if test="startDate != null and endDate != null">
434
+            and (cc.check_time >= #{startDate}
435
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
436
+        </if>
437
+    </select>
438
+
439
+    <select id="portrait" resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionPortraitSqlDto">
440
+        select cc.id id,
441
+        cc.checked_department_id checkedDepartmentId,
442
+        cc.checked_department_name checkedDepartmentName,
443
+        cc.checked_team_id checkedTeamId,
444
+        cc.checked_team_name checkedTeamName,
445
+        cpi.category_code_one categoryCodeOne,
446
+        cpi.category_name_one categoryNameOne,
447
+        cpi.category_code_two categoryCodeTwo,
448
+        cpi.category_name_two categoryNameTwo,
449
+        cu.user_id userId,
450
+        cu.user_name userName,
451
+        case
452
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline >= cc.completion_time
453
+        then 'ON_TIME_COMPLETED'
454
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline <![CDATA[ < ]]> cc.completion_time
455
+        then 'OVER_TIME_COMPLETED'
456
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() <![CDATA[ <= ]]> cc.rectification_deadline
457
+        then 'ON_TIME_UNFINISHED'
458
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() > cc.rectification_deadline
459
+        then 'OVER_TIME_UNFINISHED'
460
+        else 'OTHER' end correctionType
461
+        from check_correction cc
462
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
463
+        inner join check_user cu
464
+        on (cu.source_id = cpi.id and cu.type = 'PROBLEM_RECTIFICATION_INSPECTION_ITEM_DETAILS')
465
+        where 1 = 1
466
+        <if test="isSelfCheck != null">
467
+            and cc.is_self_check=#{isSelfCheck}
468
+        </if>
469
+        <if test="processStatus != null">
470
+            and cc.process_status=#{processStatus}
471
+        </if>
472
+        <if test="checkedDepartmentId != null">
473
+            and cc.checked_department_id=#{checkedDepartmentId}
474
+        </if>
475
+        <if test="checkedTeamId != null">
476
+            and cc.checked_team_id=#{checkedTeamId}
477
+        </if>
478
+        <if test="checkedUserId != null">
479
+            and cu.user_id=#{checkedUserId}
480
+        </if>
481
+        <if test="specifiedDate != null and specifiedDate != null">
482
+            and DATE(cc.check_time) = DATE(#{specifiedDate})
483
+        </if>
484
+        <if test="startDate != null and endDate != null">
485
+            and (cc.check_time >= #{startDate}
486
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
487
+        </if>
488
+    </select>
489
+
490
+    <select id="managementPromotionRecord" resultType="com.sundot.airport.check.domain.CheckLargeScreenPlanOverviewDto">
491
+        select date_format(case
492
+        when hour(cr.check_time) >= 9 then date(cr.check_time)
493
+        else date_sub(date(cr.check_time), interval 1 day)
494
+        end, '%Y-%m-%d') date,
495
+        ct.check_category type,
496
+        ct.check_category_desc typeDesc,
497
+        count(cr.id) total
498
+        from check_task ct
499
+        inner join check_record cr on cr.task_code = ct.task_code
500
+        where 1 = 1
501
+        <if test="isSelfCheck != null">
502
+            and ct.is_self_check=#{isSelfCheck}
503
+        </if>
504
+        <if test="deptId != null">
505
+            and cr.checked_department_id=#{deptId}
506
+        </if>
507
+        <if test="startDate != null and endDate != null">
508
+            and (cr.check_time >= #{startDate}
509
+            and cr.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
510
+        </if>
511
+        group by date_format(case
512
+        when hour(cr.check_time) >= 9 then date(cr.check_time)
513
+        else date_sub(date(cr.check_time), interval 1 day)
514
+        end, '%Y-%m-%d'), ct.check_category, ct.check_category_desc
515
+        order by date desc
516
+    </select>
517
+
518
+    <select id="managementPromotionCorrection"
519
+            resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionDto">
520
+        select ifnull(sum(case when temp.type = 'ON_TIME_COMPLETED' then 1 else 0 end), 0) onTimeCompletedCount,
521
+        ifnull(sum(case when temp.type = 'OVER_TIME_COMPLETED' then 1 else 0 end), 0) overTimeCompletedCount,
522
+        ifnull(sum(case when temp.type = 'ON_TIME_UNFINISHED' then 1 else 0 end), 0) onTimeUnfinishedCount,
523
+        ifnull(sum(case when temp.type = 'OVER_TIME_UNFINISHED' then 1 else 0 end), 0) overTimeUnfinishedCount,
524
+        ifnull(sum(case when temp.type = 'OTHER' then 1 else 0 end), 0) otherCount
525
+        from (select
526
+        case
527
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline >= cc.completion_time
528
+        then 'ON_TIME_COMPLETED'
529
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline <![CDATA[ < ]]> cc.completion_time
530
+        then 'OVER_TIME_COMPLETED'
531
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() <![CDATA[ <= ]]> cc.rectification_deadline
532
+        then 'ON_TIME_UNFINISHED'
533
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() > cc.rectification_deadline
534
+        then 'OVER_TIME_UNFINISHED'
535
+        else 'OTHER' end type
536
+        from check_correction cc
537
+        where 1 = 1
538
+        <if test="isSelfCheck != null">
539
+            and cc.is_self_check=#{isSelfCheck}
540
+        </if>
541
+        <if test="processStatus != null">
542
+            and cc.process_status=#{processStatus}
543
+        </if>
544
+        <if test="deptId != null">
545
+            and cc.checked_department_id=#{deptId}
546
+        </if>
547
+        <if test="startDate != null and endDate != null">
548
+            and (cc.check_time >= #{startDate}
549
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
550
+        </if>) temp
551
+    </select>
552
+
553
+</mapper>

+ 272 - 0
airport-check/src/main/resources/mapper/check/CheckProjectItemMapper.xml

@@ -0,0 +1,272 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.sundot.airport.check.mapper.CheckProjectItemMapper">
6
+
7
+    <resultMap type="CheckProjectItem" id="CheckProjectItemResult">
8
+        <result property="tenantId" column="tenant_id"/>
9
+        <result property="revision" column="revision"/>
10
+        <result property="createBy" column="create_by"/>
11
+        <result property="createTime" column="create_time"/>
12
+        <result property="updateBy" column="update_by"/>
13
+        <result property="updateTime" column="update_time"/>
14
+        <result property="id" column="id"/>
15
+        <result property="sourceId" column="source_id"/>
16
+        <result property="projectCode" column="project_code"/>
17
+        <result property="type" column="type"/>
18
+        <result property="projectName" column="project_name"/>
19
+        <result property="categoryCodeOne" column="category_code_one"/>
20
+        <result property="categoryNameOne" column="category_name_one"/>
21
+        <result property="categoryCodeTwo" column="category_code_two"/>
22
+        <result property="categoryNameTwo" column="category_name_two"/>
23
+        <result property="score" column="score"/>
24
+        <result property="scoreLevel" column="score_level"/>
25
+        <result property="typeDesc" column="type_desc"/>
26
+        <result property="scoreLevelDesc" column="score_level_desc"/>
27
+        <result property="remark" column="remark"/>
28
+        <result property="inspectionContent" column="inspection_content"/>
29
+        <result property="scoreTotal" column="score_total"/>
30
+        <result property="evaluationType" column="evaluation_type"/>
31
+        <result property="evaluationTypeDesc" column="evaluation_type_desc"/>
32
+        <result property="correctionUserId" column="correction_user_id"/>
33
+        <result property="correctionUserName" column="correction_user_name"/>
34
+        <result property="rectificationDeadline" column="rectification_deadline"/>
35
+        <result property="correctionStatus" column="correction_status"/>
36
+        <result property="correctionStatusDesc" column="correction_status_desc"/>
37
+        <result property="problemDescription" column="problem_description"/>
38
+        <result property="attachmentId" column="attachment_id"/>
39
+        <result property="attachmentUrl" column="attachment_url"/>
40
+        <result property="attachmentName" column="attachment_name"/>
41
+        <result property="rewardSuggestion" column="reward_suggestion"/>
42
+    </resultMap>
43
+
44
+    <sql id="selectCheckProjectItemVo">
45
+        select tenant_id,
46
+               revision,
47
+               create_by,
48
+               create_time,
49
+               update_by,
50
+               update_time,
51
+               id,
52
+               source_id,
53
+               project_code,
54
+               type,
55
+               project_name,
56
+               category_code_one,
57
+               category_name_one,
58
+               category_code_two,
59
+               category_name_two,
60
+               score,
61
+               score_level,
62
+               type_desc,
63
+               score_level_desc,
64
+               remark,
65
+               inspection_content,
66
+               score_total,
67
+               evaluation_type,
68
+               evaluation_type_desc,
69
+               correction_user_id,
70
+               correction_user_name,
71
+               rectification_deadline,
72
+               correction_status,
73
+               correction_status_desc,
74
+               problem_description,
75
+               attachment_id,
76
+               attachment_url,
77
+               attachment_name,
78
+               reward_suggestion
79
+        from check_project_item
80
+    </sql>
81
+
82
+    <select id="selectCheckProjectItemList" parameterType="CheckProjectItem" resultMap="CheckProjectItemResult">
83
+        <include refid="selectCheckProjectItemVo"/>
84
+        <where>
85
+            <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
86
+            <if test="revision != null ">and revision = #{revision}</if>
87
+            <if test="sourceId != null ">and source_id = #{sourceId}</if>
88
+            <if test="projectCode != null  and projectCode != ''">and project_code = #{projectCode}</if>
89
+            <if test="type != null  and type != ''">and type = #{type}</if>
90
+            <if test="projectName != null  and projectName != ''">and project_name like concat('%', #{projectName},
91
+                '%')
92
+            </if>
93
+            <if test="categoryCodeOne != null  and categoryCodeOne != ''">and category_code_one = #{categoryCodeOne}
94
+            </if>
95
+            <if test="categoryNameOne != null  and categoryNameOne != ''">and category_name_one = #{categoryNameOne}
96
+            </if>
97
+            <if test="categoryCodeTwo != null  and categoryCodeTwo != ''">and category_code_two = #{categoryCodeTwo}
98
+            </if>
99
+            <if test="categoryNameTwo != null  and categoryNameTwo != ''">and category_name_two = #{categoryNameTwo}
100
+            </if>
101
+            <if test="score != null ">and score = #{score}</if>
102
+            <if test="scoreLevel != null  and scoreLevel != ''">and score_level = #{scoreLevel}</if>
103
+            <if test="typeDesc != null  and typeDesc != ''">and type_desc = #{typeDesc}</if>
104
+            <if test="scoreLevelDesc != null  and scoreLevelDesc != ''">and score_level_desc = #{scoreLevelDesc}</if>
105
+            <if test="inspectionContent != null  and inspectionContent != ''">and inspection_content =
106
+                #{inspectionContent}
107
+            </if>
108
+            <if test="scoreTotal != null ">and score_total = #{scoreTotal}</if>
109
+            <if test="evaluationType != null  and evaluationType != ''">and evaluation_type = #{evaluationType}</if>
110
+            <if test="evaluationTypeDesc != null  and evaluationTypeDesc != ''">and evaluation_type_desc =
111
+                #{evaluationTypeDesc}
112
+            </if>
113
+            <if test="correctionUserId != null ">and correction_user_id = #{correctionUserId}</if>
114
+            <if test="correctionUserName != null  and correctionUserName != ''">and correction_user_name like
115
+                concat('%', #{correctionUserName}, '%')
116
+            </if>
117
+            <if test="rectificationDeadline != null ">and rectification_deadline = #{rectificationDeadline}</if>
118
+            <if test="correctionStatus != null  and correctionStatus != ''">and correction_status =
119
+                #{correctionStatus}
120
+            </if>
121
+            <if test="correctionStatusDesc != null  and correctionStatusDesc != ''">and correction_status_desc =
122
+                #{correctionStatusDesc}
123
+            </if>
124
+            <if test="problemDescription != null  and problemDescription != ''">and problem_description =
125
+                #{problemDescription}
126
+            </if>
127
+            <if test="attachmentId != null  and attachmentId != ''">and attachment_id = #{attachmentId}</if>
128
+            <if test="attachmentUrl != null  and attachmentUrl != ''">and attachment_url = #{attachmentUrl}</if>
129
+            <if test="attachmentName != null  and attachmentName != ''">and attachment_name like concat('%',
130
+                #{attachmentName}, '%')
131
+            </if>
132
+            <if test="rewardSuggestion != null  and rewardSuggestion != ''">and reward_suggestion =
133
+                #{rewardSuggestion}
134
+            </if>
135
+        </where>
136
+        order by create_time desc
137
+    </select>
138
+
139
+    <select id="selectCheckProjectItemById" parameterType="Long" resultMap="CheckProjectItemResult">
140
+        <include refid="selectCheckProjectItemVo"/>
141
+        where id = #{id}
142
+    </select>
143
+
144
+    <insert id="insertCheckProjectItem" parameterType="CheckProjectItem" useGeneratedKeys="true" keyProperty="id">
145
+        insert into check_project_item
146
+        <trim prefix="(" suffix=")" suffixOverrides=",">
147
+            <if test="tenantId != null">tenant_id,</if>
148
+            <if test="revision != null">revision,</if>
149
+            <if test="createBy != null">create_by,</if>
150
+            <if test="createTime != null">create_time,</if>
151
+            <if test="updateBy != null">update_by,</if>
152
+            <if test="updateTime != null">update_time,</if>
153
+            <if test="sourceId != null">source_id,</if>
154
+            <if test="projectCode != null and projectCode != ''">project_code,</if>
155
+            <if test="type != null and type != ''">type,</if>
156
+            <if test="projectName != null and projectName != ''">project_name,</if>
157
+            <if test="categoryCodeOne != null and categoryCodeOne != ''">category_code_one,</if>
158
+            <if test="categoryNameOne != null and categoryNameOne != ''">category_name_one,</if>
159
+            <if test="categoryCodeTwo != null and categoryCodeTwo != ''">category_code_two,</if>
160
+            <if test="categoryNameTwo != null and categoryNameTwo != ''">category_name_two,</if>
161
+            <if test="score != null">score,</if>
162
+            <if test="scoreLevel != null">score_level,</if>
163
+            <if test="typeDesc != null and typeDesc != ''">type_desc,</if>
164
+            <if test="scoreLevelDesc != null">score_level_desc,</if>
165
+            <if test="remark != null">remark,</if>
166
+            <if test="inspectionContent != null">inspection_content,</if>
167
+            <if test="scoreTotal != null">score_total,</if>
168
+            <if test="evaluationType != null and evaluationType != ''">evaluation_type,</if>
169
+            <if test="evaluationTypeDesc != null and evaluationTypeDesc != ''">evaluation_type_desc,</if>
170
+            <if test="correctionUserId != null">correction_user_id,</if>
171
+            <if test="correctionUserName != null">correction_user_name,</if>
172
+            <if test="rectificationDeadline != null">rectification_deadline,</if>
173
+            <if test="correctionStatus != null">correction_status,</if>
174
+            <if test="correctionStatusDesc != null">correction_status_desc,</if>
175
+            <if test="problemDescription != null">problem_description,</if>
176
+            <if test="attachmentId != null">attachment_id,</if>
177
+            <if test="attachmentUrl != null">attachment_url,</if>
178
+            <if test="attachmentName != null">attachment_name,</if>
179
+            <if test="rewardSuggestion != null">reward_suggestion,</if>
180
+        </trim>
181
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
182
+            <if test="tenantId != null">#{tenantId},</if>
183
+            <if test="revision != null">#{revision},</if>
184
+            <if test="createBy != null">#{createBy},</if>
185
+            <if test="createTime != null">#{createTime},</if>
186
+            <if test="updateBy != null">#{updateBy},</if>
187
+            <if test="updateTime != null">#{updateTime},</if>
188
+            <if test="sourceId != null">#{sourceId},</if>
189
+            <if test="projectCode != null and projectCode != ''">#{projectCode},</if>
190
+            <if test="type != null and type != ''">#{type},</if>
191
+            <if test="projectName != null and projectName != ''">#{projectName},</if>
192
+            <if test="categoryCodeOne != null and categoryCodeOne != ''">#{categoryCodeOne},</if>
193
+            <if test="categoryNameOne != null and categoryNameOne != ''">#{categoryNameOne},</if>
194
+            <if test="categoryCodeTwo != null and categoryCodeTwo != ''">#{categoryCodeTwo},</if>
195
+            <if test="categoryNameTwo != null and categoryNameTwo != ''">#{categoryNameTwo},</if>
196
+            <if test="score != null">#{score},</if>
197
+            <if test="scoreLevel != null">#{scoreLevel},</if>
198
+            <if test="typeDesc != null and typeDesc != ''">#{typeDesc},</if>
199
+            <if test="scoreLevelDesc != null">#{scoreLevelDesc},</if>
200
+            <if test="remark != null">#{remark},</if>
201
+            <if test="inspectionContent != null">#{inspectionContent},</if>
202
+            <if test="scoreTotal != null">#{scoreTotal},</if>
203
+            <if test="evaluationType != null and evaluationType != ''">#{evaluationType},</if>
204
+            <if test="evaluationTypeDesc != null and evaluationTypeDesc != ''">#{evaluationTypeDesc},</if>
205
+            <if test="correctionUserId != null">#{correctionUserId},</if>
206
+            <if test="correctionUserName != null">#{correctionUserName},</if>
207
+            <if test="rectificationDeadline != null">#{rectificationDeadline},</if>
208
+            <if test="correctionStatus != null">#{correctionStatus},</if>
209
+            <if test="correctionStatusDesc != null">#{correctionStatusDesc},</if>
210
+            <if test="problemDescription != null">#{problemDescription},</if>
211
+            <if test="attachmentId != null">#{attachmentId},</if>
212
+            <if test="attachmentUrl != null">#{attachmentUrl},</if>
213
+            <if test="attachmentName != null">#{attachmentName},</if>
214
+            <if test="rewardSuggestion != null">#{rewardSuggestion},</if>
215
+        </trim>
216
+    </insert>
217
+
218
+    <update id="updateCheckProjectItem" parameterType="CheckProjectItem">
219
+        update check_project_item
220
+        <trim prefix="SET" suffixOverrides=",">
221
+            <if test="tenantId != null">tenant_id = #{tenantId},</if>
222
+            <if test="revision != null">revision = #{revision},</if>
223
+            <if test="createBy != null">create_by = #{createBy},</if>
224
+            <if test="createTime != null">create_time = #{createTime},</if>
225
+            <if test="updateBy != null">update_by = #{updateBy},</if>
226
+            <if test="updateTime != null">update_time = #{updateTime},</if>
227
+            <if test="sourceId != null">source_id = #{sourceId},</if>
228
+            <if test="projectCode != null and projectCode != ''">project_code = #{projectCode},</if>
229
+            <if test="type != null and type != ''">type = #{type},</if>
230
+            <if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
231
+            <if test="categoryCodeOne != null and categoryCodeOne != ''">category_code_one = #{categoryCodeOne},</if>
232
+            <if test="categoryNameOne != null and categoryNameOne != ''">category_name_one = #{categoryNameOne},</if>
233
+            <if test="categoryCodeTwo != null and categoryCodeTwo != ''">category_code_two = #{categoryCodeTwo},</if>
234
+            <if test="categoryNameTwo != null and categoryNameTwo != ''">category_name_two = #{categoryNameTwo},</if>
235
+            <if test="score != null">score = #{score},</if>
236
+            <if test="scoreLevel != null">score_level = #{scoreLevel},</if>
237
+            <if test="typeDesc != null and typeDesc != ''">type_desc = #{typeDesc},</if>
238
+            <if test="scoreLevelDesc != null">score_level_desc = #{scoreLevelDesc},</if>
239
+            <if test="remark != null">remark = #{remark},</if>
240
+            <if test="inspectionContent != null">inspection_content = #{inspectionContent},</if>
241
+            <if test="scoreTotal != null">score_total = #{scoreTotal},</if>
242
+            <if test="evaluationType != null and evaluationType != ''">evaluation_type = #{evaluationType},</if>
243
+            <if test="evaluationTypeDesc != null and evaluationTypeDesc != ''">evaluation_type_desc =
244
+                #{evaluationTypeDesc},
245
+            </if>
246
+            <if test="correctionUserId != null">correction_user_id = #{correctionUserId},</if>
247
+            <if test="correctionUserName != null">correction_user_name = #{correctionUserName},</if>
248
+            <if test="rectificationDeadline != null">rectification_deadline = #{rectificationDeadline},</if>
249
+            <if test="correctionStatus != null">correction_status = #{correctionStatus},</if>
250
+            <if test="correctionStatusDesc != null">correction_status_desc = #{correctionStatusDesc},</if>
251
+            <if test="problemDescription != null">problem_description = #{problemDescription},</if>
252
+            <if test="attachmentId != null">attachment_id = #{attachmentId},</if>
253
+            <if test="attachmentUrl != null">attachment_url = #{attachmentUrl},</if>
254
+            <if test="attachmentName != null">attachment_name = #{attachmentName},</if>
255
+            <if test="rewardSuggestion != null">reward_suggestion = #{rewardSuggestion},</if>
256
+        </trim>
257
+        where id = #{id}
258
+    </update>
259
+
260
+    <delete id="deleteCheckProjectItemById" parameterType="Long">
261
+        delete
262
+        from check_project_item
263
+        where id = #{id}
264
+    </delete>
265
+
266
+    <delete id="deleteCheckProjectItemByIds" parameterType="String">
267
+        delete from check_project_item where id in
268
+        <foreach item="id" collection="array" open="(" separator="," close=")">
269
+            #{id}
270
+        </foreach>
271
+    </delete>
272
+</mapper>

+ 536 - 0
airport-check/src/main/resources/mapper/check/CheckRecordMapper.xml

@@ -0,0 +1,536 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.sundot.airport.check.mapper.CheckRecordMapper">
6
+
7
+    <resultMap type="CheckRecord" id="CheckRecordResult">
8
+        <result property="tenantId" column="tenant_id"/>
9
+        <result property="revision" column="revision"/>
10
+        <result property="createBy" column="create_by"/>
11
+        <result property="createTime" column="create_time"/>
12
+        <result property="updateBy" column="update_by"/>
13
+        <result property="updateTime" column="update_time"/>
14
+        <result property="checkResult" column="check_result"/>
15
+        <result property="problemDescription" column="problem_description"/>
16
+        <result property="attachmentUrl" column="attachment_url"/>
17
+        <result property="remark" column="remark"/>
18
+        <result property="checkedLevel" column="checked_level"/>
19
+        <result property="checkTime" column="check_time"/>
20
+        <result property="id" column="id"/>
21
+        <result property="documentCode" column="document_code"/>
22
+        <result property="documentName" column="document_name"/>
23
+        <result property="rectificationSuggestions" column="rectification_suggestions"/>
24
+        <result property="scoreTotal" column="score_total"/>
25
+        <result property="comprehensiveEvaluation" column="comprehensive_evaluation"/>
26
+        <result property="rectificationDeadline" column="rectification_deadline"/>
27
+        <result property="checkerId" column="checker_id"/>
28
+        <result property="checkerName" column="checker_name"/>
29
+        <result property="type" column="type"/>
30
+        <result property="severity" column="severity"/>
31
+        <result property="isNeedCorrection" column="is_need_correction"/>
32
+        <result property="correctionStatus" column="correction_status"/>
33
+        <result property="checkResultDesc" column="check_result_desc"/>
34
+        <result property="checkedLevelDesc" column="checked_level_desc"/>
35
+        <result property="typeDesc" column="type_desc"/>
36
+        <result property="severityDesc" column="severity_desc"/>
37
+        <result property="correctionStatusDesc" column="correction_status_desc"/>
38
+        <result property="attachmentId" column="attachment_id"/>
39
+        <result property="score" column="score"/>
40
+        <result property="attachmentName" column="attachment_name"/>
41
+        <result property="checkedDepartmentId" column="checked_department_id"/>
42
+        <result property="checkedDepartmentName" column="checked_department_name"/>
43
+        <result property="checkedTeamId" column="checked_team_id"/>
44
+        <result property="checkedTeamName" column="checked_team_name"/>
45
+        <result property="checkedDepartmentLeaderId" column="checked_department_leader_id"/>
46
+        <result property="checkedDepartmentLeaderName" column="checked_department_leader_name"/>
47
+        <result property="checkedTeamLeaderId" column="checked_team_leader_id"/>
48
+        <result property="checkedTeamLeaderName" column="checked_team_leader_name"/>
49
+        <result property="checkedPersonnelId" column="checked_personnel_id"/>
50
+        <result property="checkedPersonnelName" column="checked_personnel_name"/>
51
+        <result property="terminlCode" column="terminl_code"/>
52
+        <result property="terminlName" column="terminl_name"/>
53
+        <result property="regionalCode" column="regional_code"/>
54
+        <result property="regionalName" column="regional_name"/>
55
+        <result property="channelCode" column="channel_code"/>
56
+        <result property="channelName" column="channel_name"/>
57
+        <result property="taskCode" column="task_code"/>
58
+        <result property="taskName" column="task_name"/>
59
+        <result property="responsibleUserId" column="responsible_user_id"/>
60
+        <result property="responsibleUserName" column="responsible_user_name"/>
61
+        <result property="checkedDeptId" column="checked_dept_id"/>
62
+        <result property="checkedDeptName" column="checked_dept_name"/>
63
+        <result property="checkRecordStatus" column="check_record_status"/>
64
+        <result property="checkRecordStatusDesc" column="check_record_status_desc"/>
65
+        <result property="checkLevel" column="check_level"/>
66
+        <result property="checkLevelDesc" column="check_level_desc"/>
67
+        <result property="ruleType" column="rule_type"/>
68
+        <result property="ruleTypeDesc" column="rule_type_desc"/>
69
+        <result property="ruleTypeNum" column="rule_type_num"/>
70
+        <result property="selectTeamId" column="select_team_id"/>
71
+        <result property="selectTeamName" column="select_team_name"/>
72
+        <result property="selectTeamLeaderId" column="select_team_leader_id"/>
73
+        <result property="selectTeamLeaderName" column="select_team_leader_name"/>
74
+        <result property="isSelectTeam" column="is_select_team"/>
75
+        <result property="checkStartTime" column="check_start_time"/>
76
+        <result property="checkEndTime" column="check_end_time"/>
77
+        <result property="description" column="description"/>
78
+        <result property="isSelfCheck" column="is_self_check"/>
79
+    </resultMap>
80
+
81
+    <sql id="selectCheckRecordVo">
82
+        select tenant_id,
83
+               revision,
84
+               create_by,
85
+               create_time,
86
+               update_by,
87
+               update_time,
88
+               check_result,
89
+               problem_description,
90
+               attachment_url,
91
+               remark,
92
+               checked_level,
93
+               check_time,
94
+               id,
95
+               document_code,
96
+               document_name,
97
+               rectification_suggestions,
98
+               score_total,
99
+               comprehensive_evaluation,
100
+               rectification_deadline,
101
+               checker_id,
102
+               checker_name,
103
+               type,
104
+               severity,
105
+               is_need_correction,
106
+               correction_status,
107
+               check_result_desc,
108
+               checked_level_desc,
109
+               type_desc,
110
+               severity_desc,
111
+               correction_status_desc,
112
+               attachment_id,
113
+               score,
114
+               attachment_name,
115
+               checked_department_id,
116
+               checked_department_name,
117
+               checked_team_id,
118
+               checked_team_name,
119
+               checked_department_leader_id,
120
+               checked_department_leader_name,
121
+               checked_team_leader_id,
122
+               checked_team_leader_name,
123
+               checked_personnel_id,
124
+               checked_personnel_name,
125
+               terminl_code,
126
+               terminl_name,
127
+               regional_code,
128
+               regional_name,
129
+               channel_code,
130
+               channel_name,
131
+               task_code,
132
+               task_name,
133
+               responsible_user_id,
134
+               responsible_user_name,
135
+               checked_dept_id,
136
+               checked_dept_name,
137
+               check_record_status,
138
+               check_record_status_desc,
139
+               check_level,
140
+               check_level_desc,
141
+               rule_type,
142
+               rule_type_desc,
143
+               rule_type_num,
144
+               select_team_id,
145
+               select_team_name,
146
+               select_team_leader_id,
147
+               select_team_leader_name,
148
+               is_select_team,
149
+               check_start_time,
150
+               check_end_time,
151
+               description,
152
+               is_self_check
153
+        from check_record
154
+    </sql>
155
+
156
+    <select id="selectCheckRecordList" parameterType="CheckRecord" resultMap="CheckRecordResult">
157
+        <include refid="selectCheckRecordVo"/>
158
+        <where>
159
+            <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
160
+            <if test="revision != null ">and revision = #{revision}</if>
161
+            <if test="checkResult != null  and checkResult != ''">and check_result = #{checkResult}</if>
162
+            <if test="problemDescription != null  and problemDescription != ''">and problem_description =
163
+                #{problemDescription}
164
+            </if>
165
+            <if test="attachmentUrl != null  and attachmentUrl != ''">and attachment_url = #{attachmentUrl}</if>
166
+            <if test="checkedLevel != null  and checkedLevel != ''">and checked_level = #{checkedLevel}</if>
167
+            <if test="checkTime != null ">
168
+                and check_time <![CDATA[>=]]> #{checkTime}
169
+                and check_time <![CDATA[<]]> date_add(#{checkTime}, interval 1 day)
170
+            </if>
171
+            <if test="documentCode != null  and documentCode != ''">and document_code = #{documentCode}</if>
172
+            <if test="documentName != null  and documentName != ''">and document_name like concat('%', #{documentName},
173
+                '%')
174
+            </if>
175
+            <if test="rectificationSuggestions != null  and rectificationSuggestions != ''">and
176
+                rectification_suggestions = #{rectificationSuggestions}
177
+            </if>
178
+            <if test="scoreTotal != null ">and score_total = #{scoreTotal}</if>
179
+            <if test="comprehensiveEvaluation != null  and comprehensiveEvaluation != ''">and comprehensive_evaluation =
180
+                #{comprehensiveEvaluation}
181
+            </if>
182
+            <if test="rectificationDeadline != null ">and rectification_deadline = #{rectificationDeadline}</if>
183
+            <if test="checkerId != null ">and checker_id = #{checkerId}</if>
184
+            <if test="checkerName != null  and checkerName != ''">and checker_name like concat('%', #{checkerName},
185
+                '%')
186
+            </if>
187
+            <if test="type != null  and type != ''">and type = #{type}</if>
188
+            <if test="severity != null  and severity != ''">and severity = #{severity}</if>
189
+            <if test="isNeedCorrection != null ">and is_need_correction = #{isNeedCorrection}</if>
190
+            <if test="correctionStatus != null  and correctionStatus != ''">and correction_status =
191
+                #{correctionStatus}
192
+            </if>
193
+            <if test="checkResultDesc != null  and checkResultDesc != ''">and check_result_desc = #{checkResultDesc}
194
+            </if>
195
+            <if test="checkedLevelDesc != null  and checkedLevelDesc != ''">and checked_level_desc =
196
+                #{checkedLevelDesc}
197
+            </if>
198
+            <if test="typeDesc != null  and typeDesc != ''">and type_desc = #{typeDesc}</if>
199
+            <if test="severityDesc != null  and severityDesc != ''">and severity_desc = #{severityDesc}</if>
200
+            <if test="correctionStatusDesc != null  and correctionStatusDesc != ''">and correction_status_desc =
201
+                #{correctionStatusDesc}
202
+            </if>
203
+            <if test="attachmentId != null  and attachmentId != ''">and attachment_id = #{attachmentId}</if>
204
+            <if test="score != null ">and score = #{score}</if>
205
+            <if test="attachmentName != null  and attachmentName != ''">and attachment_name like concat('%',
206
+                #{attachmentName}, '%')
207
+            </if>
208
+            <if test="checkedDepartmentId != null ">and checked_department_id = #{checkedDepartmentId}</if>
209
+            <if test="checkedDepartmentName != null  and checkedDepartmentName != ''">and checked_department_name like
210
+                concat('%', #{checkedDepartmentName}, '%')
211
+            </if>
212
+            <if test="checkedTeamId != null ">and checked_team_id = #{checkedTeamId}</if>
213
+            <if test="checkedTeamName != null  and checkedTeamName != ''">and checked_team_name like concat('%',
214
+                #{checkedTeamName}, '%')
215
+            </if>
216
+            <if test="checkedDepartmentLeaderId != null ">and checked_department_leader_id =
217
+                #{checkedDepartmentLeaderId}
218
+            </if>
219
+            <if test="checkedDepartmentLeaderName != null  and checkedDepartmentLeaderName != ''">and
220
+                checked_department_leader_name like concat('%', #{checkedDepartmentLeaderName}, '%')
221
+            </if>
222
+            <if test="checkedTeamLeaderId != null ">and checked_team_leader_id = #{checkedTeamLeaderId}</if>
223
+            <if test="checkedTeamLeaderName != null  and checkedTeamLeaderName != ''">and checked_team_leader_name like
224
+                concat('%', #{checkedTeamLeaderName}, '%')
225
+            </if>
226
+            <if test="checkedPersonnelId != null ">and checked_personnel_id = #{checkedPersonnelId}</if>
227
+            <if test="checkedPersonnelName != null  and checkedPersonnelName != ''">and checked_personnel_name like
228
+                concat('%', #{checkedPersonnelName}, '%')
229
+            </if>
230
+            <if test="terminlCode != null  and terminlCode != ''">and terminl_code = #{terminlCode}</if>
231
+            <if test="terminlName != null  and terminlName != ''">and terminl_name like concat('%', #{terminlName},
232
+                '%')
233
+            </if>
234
+            <if test="regionalCode != null  and regionalCode != ''">and regional_code = #{regionalCode}</if>
235
+            <if test="regionalName != null  and regionalName != ''">and regional_name like concat('%', #{regionalName},
236
+                '%')
237
+            </if>
238
+            <if test="channelCode != null  and channelCode != ''">and channel_code = #{channelCode}</if>
239
+            <if test="channelName != null  and channelName != ''">and channel_name like concat('%', #{channelName},
240
+                '%')
241
+            </if>
242
+            <if test="taskCode != null  and taskCode != ''">and task_code = #{taskCode}</if>
243
+            <if test="taskName != null  and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
244
+            <if test="responsibleUserId != null ">and responsible_user_id = #{responsibleUserId}</if>
245
+            <if test="responsibleUserName != null  and responsibleUserName != ''">and responsible_user_name like
246
+                concat('%', #{responsibleUserName}, '%')
247
+            </if>
248
+            <if test="checkedDeptId != null ">and checked_dept_id = #{checkedDeptId}</if>
249
+            <if test="checkedDeptName != null  and checkedDeptName != ''">and checked_dept_name like concat('%',
250
+                #{checkedDeptName}, '%')
251
+            </if>
252
+            <if test="checkRecordStatus != null  and checkRecordStatus != ''">and check_record_status =
253
+                #{checkRecordStatus}
254
+            </if>
255
+            <if test="checkRecordStatusDesc != null  and checkRecordStatusDesc != ''">and check_record_status_desc =
256
+                #{checkRecordStatusDesc}
257
+            </if>
258
+            <if test="checkLevel != null  and checkLevel != ''">and check_level = #{checkLevel}</if>
259
+            <if test="checkLevelDesc != null  and checkLevelDesc != ''">and check_level_desc = #{checkLevelDesc}</if>
260
+            <if test="ruleType != null  and ruleType != ''">and rule_type = #{ruleType}</if>
261
+            <if test="ruleTypeDesc != null  and ruleTypeDesc != ''">and rule_type_desc = #{ruleTypeDesc}</if>
262
+            <if test="ruleTypeNum != null ">and rule_type_num = #{ruleTypeNum}</if>
263
+            <if test="selectTeamId != null ">and select_team_id = #{selectTeamId}</if>
264
+            <if test="selectTeamName != null  and selectTeamName != ''">and select_team_name like concat('%',
265
+                #{selectTeamName}, '%')
266
+            </if>
267
+            <if test="selectTeamLeaderId != null ">and select_team_leader_id = #{selectTeamLeaderId}</if>
268
+            <if test="selectTeamLeaderName != null  and selectTeamLeaderName != ''">and select_team_leader_name like
269
+                concat('%', #{selectTeamLeaderName}, '%')
270
+            </if>
271
+            <if test="isSelectTeam != null ">and is_select_team = #{isSelectTeam}</if>
272
+            <if test="checkStartTime != null ">and check_start_time = #{checkStartTime}</if>
273
+            <if test="checkEndTime != null ">and check_end_time = #{checkEndTime}</if>
274
+            <if test="description != null  and description != ''">and description = #{description}</if>
275
+            <if test="isSelfCheck != null ">and is_self_check = #{isSelfCheck}</if>
276
+            <if test="startDate != null and endDate != null">
277
+                and (check_time >= #{startDate}
278
+                and check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
279
+            </if>
280
+            <if test="queryCheckerIdList != null and !queryCheckerIdList.isEmpty()">
281
+                and checker_id in
282
+                <foreach collection="queryCheckerIdList" item="item" separator="," open="(" close=")">
283
+                    #{item}
284
+                </foreach>
285
+            </if>
286
+        </where>
287
+        order by create_time desc
288
+    </select>
289
+
290
+    <select id="selectCheckRecordById" parameterType="Long" resultMap="CheckRecordResult">
291
+        <include refid="selectCheckRecordVo"/>
292
+        where id = #{id}
293
+    </select>
294
+
295
+    <insert id="insertCheckRecord" parameterType="CheckRecord" useGeneratedKeys="true" keyProperty="id">
296
+        insert into check_record
297
+        <trim prefix="(" suffix=")" suffixOverrides=",">
298
+            <if test="tenantId != null">tenant_id,</if>
299
+            <if test="revision != null">revision,</if>
300
+            <if test="createBy != null">create_by,</if>
301
+            <if test="createTime != null">create_time,</if>
302
+            <if test="updateBy != null">update_by,</if>
303
+            <if test="updateTime != null">update_time,</if>
304
+            <if test="checkResult != null">check_result,</if>
305
+            <if test="problemDescription != null">problem_description,</if>
306
+            <if test="attachmentUrl != null">attachment_url,</if>
307
+            <if test="remark != null">remark,</if>
308
+            <if test="checkedLevel != null and checkedLevel != ''">checked_level,</if>
309
+            <if test="checkTime != null">check_time,</if>
310
+            <if test="documentCode != null">document_code,</if>
311
+            <if test="documentName != null">document_name,</if>
312
+            <if test="rectificationSuggestions != null">rectification_suggestions,</if>
313
+            <if test="scoreTotal != null">score_total,</if>
314
+            <if test="comprehensiveEvaluation != null">comprehensive_evaluation,</if>
315
+            <if test="rectificationDeadline != null">rectification_deadline,</if>
316
+            <if test="checkerId != null">checker_id,</if>
317
+            <if test="checkerName != null and checkerName != ''">checker_name,</if>
318
+            <if test="type != null and type != ''">type,</if>
319
+            <if test="severity != null and severity != ''">severity,</if>
320
+            <if test="isNeedCorrection != null">is_need_correction,</if>
321
+            <if test="correctionStatus != null">correction_status,</if>
322
+            <if test="checkResultDesc != null">check_result_desc,</if>
323
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">checked_level_desc,</if>
324
+            <if test="typeDesc != null and typeDesc != ''">type_desc,</if>
325
+            <if test="severityDesc != null and severityDesc != ''">severity_desc,</if>
326
+            <if test="correctionStatusDesc != null">correction_status_desc,</if>
327
+            <if test="attachmentId != null">attachment_id,</if>
328
+            <if test="score != null">score,</if>
329
+            <if test="attachmentName != null">attachment_name,</if>
330
+            <if test="checkedDepartmentId != null">checked_department_id,</if>
331
+            <if test="checkedDepartmentName != null">checked_department_name,</if>
332
+            <if test="checkedTeamId != null">checked_team_id,</if>
333
+            <if test="checkedTeamName != null">checked_team_name,</if>
334
+            <if test="checkedDepartmentLeaderId != null">checked_department_leader_id,</if>
335
+            <if test="checkedDepartmentLeaderName != null">checked_department_leader_name,</if>
336
+            <if test="checkedTeamLeaderId != null">checked_team_leader_id,</if>
337
+            <if test="checkedTeamLeaderName != null">checked_team_leader_name,</if>
338
+            <if test="checkedPersonnelId != null">checked_personnel_id,</if>
339
+            <if test="checkedPersonnelName != null">checked_personnel_name,</if>
340
+            <if test="terminlCode != null">terminl_code,</if>
341
+            <if test="terminlName != null">terminl_name,</if>
342
+            <if test="regionalCode != null">regional_code,</if>
343
+            <if test="regionalName != null">regional_name,</if>
344
+            <if test="channelCode != null">channel_code,</if>
345
+            <if test="channelName != null">channel_name,</if>
346
+            <if test="taskCode != null">task_code,</if>
347
+            <if test="taskName != null">task_name,</if>
348
+            <if test="responsibleUserId != null">responsible_user_id,</if>
349
+            <if test="responsibleUserName != null">responsible_user_name,</if>
350
+            <if test="checkedDeptId != null">checked_dept_id,</if>
351
+            <if test="checkedDeptName != null">checked_dept_name,</if>
352
+            <if test="checkRecordStatus != null">check_record_status,</if>
353
+            <if test="checkRecordStatusDesc != null">check_record_status_desc,</if>
354
+            <if test="checkLevel != null">check_level,</if>
355
+            <if test="checkLevelDesc != null">check_level_desc,</if>
356
+            <if test="ruleType != null">rule_type,</if>
357
+            <if test="ruleTypeDesc != null">rule_type_desc,</if>
358
+            <if test="ruleTypeNum != null">rule_type_num,</if>
359
+            <if test="selectTeamId != null">select_team_id,</if>
360
+            <if test="selectTeamName != null">select_team_name,</if>
361
+            <if test="selectTeamLeaderId != null">select_team_leader_id,</if>
362
+            <if test="selectTeamLeaderName != null">select_team_leader_name,</if>
363
+            <if test="isSelectTeam != null">is_select_team,</if>
364
+            <if test="checkStartTime != null">check_start_time,</if>
365
+            <if test="checkEndTime != null">check_end_time,</if>
366
+            <if test="description != null">description,</if>
367
+            <if test="isSelfCheck != null">is_self_check,</if>
368
+        </trim>
369
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
370
+            <if test="tenantId != null">#{tenantId},</if>
371
+            <if test="revision != null">#{revision},</if>
372
+            <if test="createBy != null">#{createBy},</if>
373
+            <if test="createTime != null">#{createTime},</if>
374
+            <if test="updateBy != null">#{updateBy},</if>
375
+            <if test="updateTime != null">#{updateTime},</if>
376
+            <if test="checkResult != null">#{checkResult},</if>
377
+            <if test="problemDescription != null">#{problemDescription},</if>
378
+            <if test="attachmentUrl != null">#{attachmentUrl},</if>
379
+            <if test="remark != null">#{remark},</if>
380
+            <if test="checkedLevel != null and checkedLevel != ''">#{checkedLevel},</if>
381
+            <if test="checkTime != null">#{checkTime},</if>
382
+            <if test="documentCode != null">#{documentCode},</if>
383
+            <if test="documentName != null">#{documentName},</if>
384
+            <if test="rectificationSuggestions != null">#{rectificationSuggestions},</if>
385
+            <if test="scoreTotal != null">#{scoreTotal},</if>
386
+            <if test="comprehensiveEvaluation != null">#{comprehensiveEvaluation},</if>
387
+            <if test="rectificationDeadline != null">#{rectificationDeadline},</if>
388
+            <if test="checkerId != null">#{checkerId},</if>
389
+            <if test="checkerName != null and checkerName != ''">#{checkerName},</if>
390
+            <if test="type != null and type != ''">#{type},</if>
391
+            <if test="severity != null and severity != ''">#{severity},</if>
392
+            <if test="isNeedCorrection != null">#{isNeedCorrection},</if>
393
+            <if test="correctionStatus != null">#{correctionStatus},</if>
394
+            <if test="checkResultDesc != null">#{checkResultDesc},</if>
395
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">#{checkedLevelDesc},</if>
396
+            <if test="typeDesc != null and typeDesc != ''">#{typeDesc},</if>
397
+            <if test="severityDesc != null and severityDesc != ''">#{severityDesc},</if>
398
+            <if test="correctionStatusDesc != null">#{correctionStatusDesc},</if>
399
+            <if test="attachmentId != null">#{attachmentId},</if>
400
+            <if test="score != null">#{score},</if>
401
+            <if test="attachmentName != null">#{attachmentName},</if>
402
+            <if test="checkedDepartmentId != null">#{checkedDepartmentId},</if>
403
+            <if test="checkedDepartmentName != null">#{checkedDepartmentName},</if>
404
+            <if test="checkedTeamId != null">#{checkedTeamId},</if>
405
+            <if test="checkedTeamName != null">#{checkedTeamName},</if>
406
+            <if test="checkedDepartmentLeaderId != null">#{checkedDepartmentLeaderId},</if>
407
+            <if test="checkedDepartmentLeaderName != null">#{checkedDepartmentLeaderName},</if>
408
+            <if test="checkedTeamLeaderId != null">#{checkedTeamLeaderId},</if>
409
+            <if test="checkedTeamLeaderName != null">#{checkedTeamLeaderName},</if>
410
+            <if test="checkedPersonnelId != null">#{checkedPersonnelId},</if>
411
+            <if test="checkedPersonnelName != null">#{checkedPersonnelName},</if>
412
+            <if test="terminlCode != null">#{terminlCode},</if>
413
+            <if test="terminlName != null">#{terminlName},</if>
414
+            <if test="regionalCode != null">#{regionalCode},</if>
415
+            <if test="regionalName != null">#{regionalName},</if>
416
+            <if test="channelCode != null">#{channelCode},</if>
417
+            <if test="channelName != null">#{channelName},</if>
418
+            <if test="taskCode != null">#{taskCode},</if>
419
+            <if test="taskName != null">#{taskName},</if>
420
+            <if test="responsibleUserId != null">#{responsibleUserId},</if>
421
+            <if test="responsibleUserName != null">#{responsibleUserName},</if>
422
+            <if test="checkedDeptId != null">#{checkedDeptId},</if>
423
+            <if test="checkedDeptName != null">#{checkedDeptName},</if>
424
+            <if test="checkRecordStatus != null">#{checkRecordStatus},</if>
425
+            <if test="checkRecordStatusDesc != null">#{checkRecordStatusDesc},</if>
426
+            <if test="checkLevel != null">#{checkLevel},</if>
427
+            <if test="checkLevelDesc != null">#{checkLevelDesc},</if>
428
+            <if test="ruleType != null">#{ruleType},</if>
429
+            <if test="ruleTypeDesc != null">#{ruleTypeDesc},</if>
430
+            <if test="ruleTypeNum != null">#{ruleTypeNum},</if>
431
+            <if test="selectTeamId != null">#{selectTeamId},</if>
432
+            <if test="selectTeamName != null">#{selectTeamName},</if>
433
+            <if test="selectTeamLeaderId != null">#{selectTeamLeaderId},</if>
434
+            <if test="selectTeamLeaderName != null">#{selectTeamLeaderName},</if>
435
+            <if test="isSelectTeam != null">#{isSelectTeam},</if>
436
+            <if test="checkStartTime != null">#{checkStartTime},</if>
437
+            <if test="checkEndTime != null">#{checkEndTime},</if>
438
+            <if test="description != null">#{description},</if>
439
+            <if test="isSelfCheck != null">#{isSelfCheck},</if>
440
+        </trim>
441
+    </insert>
442
+
443
+    <update id="updateCheckRecord" parameterType="CheckRecord">
444
+        update check_record
445
+        <trim prefix="SET" suffixOverrides=",">
446
+            <if test="tenantId != null">tenant_id = #{tenantId},</if>
447
+            <if test="revision != null">revision = #{revision},</if>
448
+            <if test="createBy != null">create_by = #{createBy},</if>
449
+            <if test="createTime != null">create_time = #{createTime},</if>
450
+            <if test="updateBy != null">update_by = #{updateBy},</if>
451
+            <if test="updateTime != null">update_time = #{updateTime},</if>
452
+            <if test="checkResult != null">check_result = #{checkResult},</if>
453
+            <if test="problemDescription != null">problem_description = #{problemDescription},</if>
454
+            <if test="attachmentUrl != null">attachment_url = #{attachmentUrl},</if>
455
+            <if test="remark != null">remark = #{remark},</if>
456
+            <if test="checkedLevel != null and checkedLevel != ''">checked_level = #{checkedLevel},</if>
457
+            <if test="checkTime != null">check_time = #{checkTime},</if>
458
+            <if test="documentCode != null">document_code = #{documentCode},</if>
459
+            <if test="documentName != null">document_name = #{documentName},</if>
460
+            <if test="rectificationSuggestions != null">rectification_suggestions = #{rectificationSuggestions},</if>
461
+            <if test="scoreTotal != null">score_total = #{scoreTotal},</if>
462
+            <if test="comprehensiveEvaluation != null">comprehensive_evaluation = #{comprehensiveEvaluation},</if>
463
+            <if test="rectificationDeadline != null">rectification_deadline = #{rectificationDeadline},</if>
464
+            <if test="checkerId != null">checker_id = #{checkerId},</if>
465
+            <if test="checkerName != null and checkerName != ''">checker_name = #{checkerName},</if>
466
+            <if test="type != null and type != ''">type = #{type},</if>
467
+            <if test="severity != null and severity != ''">severity = #{severity},</if>
468
+            <if test="isNeedCorrection != null">is_need_correction = #{isNeedCorrection},</if>
469
+            <if test="correctionStatus != null">correction_status = #{correctionStatus},</if>
470
+            <if test="checkResultDesc != null">check_result_desc = #{checkResultDesc},</if>
471
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">checked_level_desc = #{checkedLevelDesc},
472
+            </if>
473
+            <if test="typeDesc != null and typeDesc != ''">type_desc = #{typeDesc},</if>
474
+            <if test="severityDesc != null and severityDesc != ''">severity_desc = #{severityDesc},</if>
475
+            <if test="correctionStatusDesc != null">correction_status_desc = #{correctionStatusDesc},</if>
476
+            <if test="attachmentId != null">attachment_id = #{attachmentId},</if>
477
+            <if test="score != null">score = #{score},</if>
478
+            <if test="attachmentName != null">attachment_name = #{attachmentName},</if>
479
+            <if test="checkedDepartmentId != null">checked_department_id = #{checkedDepartmentId},</if>
480
+            <if test="checkedDepartmentName != null">checked_department_name = #{checkedDepartmentName},</if>
481
+            <if test="checkedTeamId != null">checked_team_id = #{checkedTeamId},</if>
482
+            <if test="checkedTeamName != null">checked_team_name = #{checkedTeamName},</if>
483
+            <if test="checkedDepartmentLeaderId != null">checked_department_leader_id = #{checkedDepartmentLeaderId},
484
+            </if>
485
+            <if test="checkedDepartmentLeaderName != null">checked_department_leader_name =
486
+                #{checkedDepartmentLeaderName},
487
+            </if>
488
+            <if test="checkedTeamLeaderId != null">checked_team_leader_id = #{checkedTeamLeaderId},</if>
489
+            <if test="checkedTeamLeaderName != null">checked_team_leader_name = #{checkedTeamLeaderName},</if>
490
+            <if test="checkedPersonnelId != null">checked_personnel_id = #{checkedPersonnelId},</if>
491
+            <if test="checkedPersonnelName != null">checked_personnel_name = #{checkedPersonnelName},</if>
492
+            <if test="terminlCode != null">terminl_code = #{terminlCode},</if>
493
+            <if test="terminlName != null">terminl_name = #{terminlName},</if>
494
+            <if test="regionalCode != null">regional_code = #{regionalCode},</if>
495
+            <if test="regionalName != null">regional_name = #{regionalName},</if>
496
+            <if test="channelCode != null">channel_code = #{channelCode},</if>
497
+            <if test="channelName != null">channel_name = #{channelName},</if>
498
+            <if test="taskCode != null">task_code = #{taskCode},</if>
499
+            <if test="taskName != null">task_name = #{taskName},</if>
500
+            <if test="responsibleUserId != null">responsible_user_id = #{responsibleUserId},</if>
501
+            <if test="responsibleUserName != null">responsible_user_name = #{responsibleUserName},</if>
502
+            <if test="checkedDeptId != null">checked_dept_id = #{checkedDeptId},</if>
503
+            <if test="checkedDeptName != null">checked_dept_name = #{checkedDeptName},</if>
504
+            <if test="checkRecordStatus != null">check_record_status = #{checkRecordStatus},</if>
505
+            <if test="checkRecordStatusDesc != null">check_record_status_desc = #{checkRecordStatusDesc},</if>
506
+            <if test="checkLevel != null">check_level = #{checkLevel},</if>
507
+            <if test="checkLevelDesc != null">check_level_desc = #{checkLevelDesc},</if>
508
+            <if test="ruleType != null">rule_type = #{ruleType},</if>
509
+            <if test="ruleTypeDesc != null">rule_type_desc = #{ruleTypeDesc},</if>
510
+            <if test="ruleTypeNum != null">rule_type_num = #{ruleTypeNum},</if>
511
+            <if test="selectTeamId != null">select_team_id = #{selectTeamId},</if>
512
+            <if test="selectTeamName != null">select_team_name = #{selectTeamName},</if>
513
+            <if test="selectTeamLeaderId != null">select_team_leader_id = #{selectTeamLeaderId},</if>
514
+            <if test="selectTeamLeaderName != null">select_team_leader_name = #{selectTeamLeaderName},</if>
515
+            <if test="isSelectTeam != null">is_select_team = #{isSelectTeam},</if>
516
+            <if test="checkStartTime != null">check_start_time = #{checkStartTime},</if>
517
+            <if test="checkEndTime != null">check_end_time = #{checkEndTime},</if>
518
+            <if test="description != null">description = #{description},</if>
519
+            <if test="isSelfCheck != null">is_self_check = #{isSelfCheck},</if>
520
+        </trim>
521
+        where id = #{id}
522
+    </update>
523
+
524
+    <delete id="deleteCheckRecordById" parameterType="Long">
525
+        delete
526
+        from check_record
527
+        where id = #{id}
528
+    </delete>
529
+
530
+    <delete id="deleteCheckRecordByIds" parameterType="String">
531
+        delete from check_record where id in
532
+        <foreach item="id" collection="array" open="(" separator="," close=")">
533
+            #{id}
534
+        </foreach>
535
+    </delete>
536
+</mapper>

+ 286 - 0
airport-check/src/main/resources/mapper/check/CheckTaskMapper.xml

@@ -0,0 +1,286 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.sundot.airport.check.mapper.CheckTaskMapper">
6
+
7
+    <resultMap type="CheckTask" id="CheckTaskResult">
8
+        <result property="tenantId" column="tenant_id"/>
9
+        <result property="revision" column="revision"/>
10
+        <result property="createBy" column="create_by"/>
11
+        <result property="createTime" column="create_time"/>
12
+        <result property="updateBy" column="update_by"/>
13
+        <result property="updateTime" column="update_time"/>
14
+        <result property="taskCode" column="task_code"/>
15
+        <result property="taskName" column="task_name"/>
16
+        <result property="checkStartTime" column="check_start_time"/>
17
+        <result property="status" column="status"/>
18
+        <result property="checkLevel" column="check_level"/>
19
+        <result property="checkedLevel" column="checked_level"/>
20
+        <result property="checkResult" column="check_result"/>
21
+        <result property="checkCategory" column="check_category"/>
22
+        <result property="id" column="id"/>
23
+        <result property="description" column="description"/>
24
+        <result property="checkEndTime" column="check_end_time"/>
25
+        <result property="isRegularTasks" column="is_regular_tasks"/>
26
+        <result property="ruleType" column="rule_type"/>
27
+        <result property="statusDesc" column="status_desc"/>
28
+        <result property="checkLevelDesc" column="check_level_desc"/>
29
+        <result property="checkedLevelDesc" column="checked_level_desc"/>
30
+        <result property="checkResultDesc" column="check_result_desc"/>
31
+        <result property="checkCategoryDesc" column="check_category_desc"/>
32
+        <result property="ruleTypeDesc" column="rule_type_desc"/>
33
+        <result property="remark" column="remark"/>
34
+        <result property="isSelfCheck" column="is_self_check"/>
35
+        <result property="ruleTypeNum" column="rule_type_num"/>
36
+        <result property="createId" column="create_id"/>
37
+        <result property="updateId" column="update_id"/>
38
+        <result property="selfCheckDeptId" column="self_check_dept_id"/>
39
+        <result property="selfCheckDeptName" column="self_check_dept_name"/>
40
+    </resultMap>
41
+
42
+    <sql id="selectCheckTaskVo">
43
+        select tenant_id,
44
+               revision,
45
+               create_by,
46
+               create_time,
47
+               update_by,
48
+               update_time,
49
+               task_code,
50
+               task_name,
51
+               check_start_time,
52
+               status,
53
+               check_level,
54
+               checked_level,
55
+               check_result,
56
+               check_category,
57
+               id,
58
+               description,
59
+               check_end_time,
60
+               is_regular_tasks,
61
+               rule_type,
62
+               status_desc,
63
+               check_level_desc,
64
+               checked_level_desc,
65
+               check_result_desc,
66
+               check_category_desc,
67
+               rule_type_desc,
68
+               remark,
69
+               is_self_check,
70
+               rule_type_num,
71
+               create_id,
72
+               update_id,
73
+               self_check_dept_id,
74
+               self_check_dept_name
75
+        from check_task
76
+    </sql>
77
+
78
+    <select id="selectCheckTaskList" parameterType="CheckTask" resultMap="CheckTaskResult">
79
+        <include refid="selectCheckTaskVo"/>
80
+        <where>
81
+            <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
82
+            <if test="revision != null ">and revision = #{revision}</if>
83
+            <if test="taskCode != null  and taskCode != ''">and task_code = #{taskCode}</if>
84
+            <if test="taskName != null  and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
85
+            <if test="checkStartTime != null ">and check_start_time = #{checkStartTime}</if>
86
+            <choose>
87
+                <when test="status == 'PENDING_EXECUTION'">
88
+                    and current_date() <![CDATA[<]]> check_start_time
89
+                </when>
90
+                <when test="status == 'COMPLETED'">
91
+                    and current_date() <![CDATA[>]]> check_end_time
92
+                </when>
93
+                <when test="status == 'IN_PROGRESS'">
94
+                    and current_date() <![CDATA[>=]]> check_start_time
95
+                    and current_date() <![CDATA[<=]]> check_end_time
96
+                </when>
97
+                <otherwise>
98
+
99
+                </otherwise>
100
+            </choose>
101
+            <if test="checkLevel != null  and checkLevel != ''">and check_level = #{checkLevel}</if>
102
+            <if test="checkedLevel != null  and checkedLevel != ''">and checked_level = #{checkedLevel}</if>
103
+            <if test="checkResult != null  and checkResult != ''">and check_result = #{checkResult}</if>
104
+            <if test="checkCategory != null  and checkCategory != ''">and check_category = #{checkCategory}</if>
105
+            <if test="description != null  and description != ''">and description = #{description}</if>
106
+            <if test="checkEndTime != null ">and check_end_time = #{checkEndTime}</if>
107
+            <if test="isRegularTasks != null ">and is_regular_tasks = #{isRegularTasks}</if>
108
+            <if test="ruleType != null  and ruleType != ''">and rule_type = #{ruleType}</if>
109
+            <if test="statusDesc != null  and statusDesc != ''">and status_desc = #{statusDesc}</if>
110
+            <if test="checkLevelDesc != null  and checkLevelDesc != ''">and check_level_desc = #{checkLevelDesc}</if>
111
+            <if test="checkedLevelDesc != null  and checkedLevelDesc != ''">and checked_level_desc =
112
+                #{checkedLevelDesc}
113
+            </if>
114
+            <if test="checkResultDesc != null  and checkResultDesc != ''">and check_result_desc = #{checkResultDesc}
115
+            </if>
116
+            <if test="checkCategoryDesc != null  and checkCategoryDesc != ''">and check_category_desc =
117
+                #{checkCategoryDesc}
118
+            </if>
119
+            <if test="ruleTypeDesc != null  and ruleTypeDesc != ''">and rule_type_desc = #{ruleTypeDesc}</if>
120
+            <if test="isSelfCheck != null ">and is_self_check = #{isSelfCheck}</if>
121
+            <if test="ruleTypeNum != null ">and rule_type_num = #{ruleTypeNum}</if>
122
+            <if test="createId != null ">and create_id = #{createId}</if>
123
+            <if test="updateId != null ">and update_id = #{updateId}</if>
124
+            <if test="selfCheckDeptId != null ">and (is_self_check = 0 or self_check_dept_id = #{selfCheckDeptId})</if>
125
+            <if test="selfCheckDeptName != null  and selfCheckDeptName != ''">and self_check_dept_name like concat('%',
126
+                #{selfCheckDeptName}, '%')
127
+            </if>
128
+        </where>
129
+        order by create_time desc
130
+    </select>
131
+
132
+    <select id="selectCheckTaskById" parameterType="Long" resultMap="CheckTaskResult">
133
+        <include refid="selectCheckTaskVo"/>
134
+        where id = #{id}
135
+    </select>
136
+
137
+    <insert id="insertCheckTask" parameterType="CheckTask" useGeneratedKeys="true" keyProperty="id">
138
+        insert into check_task
139
+        <trim prefix="(" suffix=")" suffixOverrides=",">
140
+            <if test="tenantId != null">tenant_id,</if>
141
+            <if test="revision != null">revision,</if>
142
+            <if test="createBy != null">create_by,</if>
143
+            <if test="createTime != null">create_time,</if>
144
+            <if test="updateBy != null">update_by,</if>
145
+            <if test="updateTime != null">update_time,</if>
146
+            <if test="taskCode != null and taskCode != ''">task_code,</if>
147
+            <if test="taskName != null and taskName != ''">task_name,</if>
148
+            <if test="checkStartTime != null">check_start_time,</if>
149
+            <if test="status != null and status != ''">status,</if>
150
+            <if test="checkLevel != null and checkLevel != ''">check_level,</if>
151
+            <if test="checkedLevel != null and checkedLevel != ''">checked_level,</if>
152
+            <if test="checkResult != null">check_result,</if>
153
+            <if test="checkCategory != null">check_category,</if>
154
+            <if test="description != null">description,</if>
155
+            <if test="checkEndTime != null">check_end_time,</if>
156
+            <if test="isRegularTasks != null">is_regular_tasks,</if>
157
+            <if test="ruleType != null">rule_type,</if>
158
+            <if test="statusDesc != null and statusDesc != ''">status_desc,</if>
159
+            <if test="checkLevelDesc != null and checkLevelDesc != ''">check_level_desc,</if>
160
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">checked_level_desc,</if>
161
+            <if test="checkResultDesc != null">check_result_desc,</if>
162
+            <if test="checkCategoryDesc != null">check_category_desc,</if>
163
+            <if test="ruleTypeDesc != null">rule_type_desc,</if>
164
+            <if test="remark != null">remark,</if>
165
+            <if test="isSelfCheck != null">is_self_check,</if>
166
+            <if test="ruleTypeNum != null">rule_type_num,</if>
167
+            <if test="createId != null">create_id,</if>
168
+            <if test="updateId != null">update_id,</if>
169
+            <if test="selfCheckDeptId != null">self_check_dept_id,</if>
170
+            <if test="selfCheckDeptName != null">self_check_dept_name,</if>
171
+        </trim>
172
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
173
+            <if test="tenantId != null">#{tenantId},</if>
174
+            <if test="revision != null">#{revision},</if>
175
+            <if test="createBy != null">#{createBy},</if>
176
+            <if test="createTime != null">#{createTime},</if>
177
+            <if test="updateBy != null">#{updateBy},</if>
178
+            <if test="updateTime != null">#{updateTime},</if>
179
+            <if test="taskCode != null and taskCode != ''">#{taskCode},</if>
180
+            <if test="taskName != null and taskName != ''">#{taskName},</if>
181
+            <if test="checkStartTime != null">#{checkStartTime},</if>
182
+            <if test="status != null and status != ''">#{status},</if>
183
+            <if test="checkLevel != null and checkLevel != ''">#{checkLevel},</if>
184
+            <if test="checkedLevel != null and checkedLevel != ''">#{checkedLevel},</if>
185
+            <if test="checkResult != null">#{checkResult},</if>
186
+            <if test="checkCategory != null">#{checkCategory},</if>
187
+            <if test="description != null">#{description},</if>
188
+            <if test="checkEndTime != null">#{checkEndTime},</if>
189
+            <if test="isRegularTasks != null">#{isRegularTasks},</if>
190
+            <if test="ruleType != null">#{ruleType},</if>
191
+            <if test="statusDesc != null and statusDesc != ''">#{statusDesc},</if>
192
+            <if test="checkLevelDesc != null and checkLevelDesc != ''">#{checkLevelDesc},</if>
193
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">#{checkedLevelDesc},</if>
194
+            <if test="checkResultDesc != null">#{checkResultDesc},</if>
195
+            <if test="checkCategoryDesc != null">#{checkCategoryDesc},</if>
196
+            <if test="ruleTypeDesc != null">#{ruleTypeDesc},</if>
197
+            <if test="remark != null">#{remark},</if>
198
+            <if test="isSelfCheck != null">#{isSelfCheck},</if>
199
+            <if test="ruleTypeNum != null">#{ruleTypeNum},</if>
200
+            <if test="createId != null">#{createId},</if>
201
+            <if test="updateId != null">#{updateId},</if>
202
+            <if test="selfCheckDeptId != null">#{selfCheckDeptId},</if>
203
+            <if test="selfCheckDeptName != null">#{selfCheckDeptName},</if>
204
+        </trim>
205
+    </insert>
206
+
207
+    <update id="updateCheckTask" parameterType="CheckTask">
208
+        update check_task
209
+        <trim prefix="SET" suffixOverrides=",">
210
+            <if test="tenantId != null">tenant_id = #{tenantId},</if>
211
+            <if test="revision != null">revision = #{revision},</if>
212
+            <if test="createBy != null">create_by = #{createBy},</if>
213
+            <if test="createTime != null">create_time = #{createTime},</if>
214
+            <if test="updateBy != null">update_by = #{updateBy},</if>
215
+            <if test="updateTime != null">update_time = #{updateTime},</if>
216
+            <if test="taskCode != null and taskCode != ''">task_code = #{taskCode},</if>
217
+            <if test="taskName != null and taskName != ''">task_name = #{taskName},</if>
218
+            <if test="checkStartTime != null">check_start_time = #{checkStartTime},</if>
219
+            <if test="status != null and status != ''">status = #{status},</if>
220
+            <if test="checkLevel != null and checkLevel != ''">check_level = #{checkLevel},</if>
221
+            <if test="checkedLevel != null and checkedLevel != ''">checked_level = #{checkedLevel},</if>
222
+            <if test="checkResult != null">check_result = #{checkResult},</if>
223
+            <if test="checkCategory != null">check_category = #{checkCategory},</if>
224
+            <if test="description != null">description = #{description},</if>
225
+            <if test="checkEndTime != null">check_end_time = #{checkEndTime},</if>
226
+            <if test="isRegularTasks != null">is_regular_tasks = #{isRegularTasks},</if>
227
+            <if test="ruleType != null">rule_type = #{ruleType},</if>
228
+            <if test="statusDesc != null and statusDesc != ''">status_desc = #{statusDesc},</if>
229
+            <if test="checkLevelDesc != null and checkLevelDesc != ''">check_level_desc = #{checkLevelDesc},</if>
230
+            <if test="checkedLevelDesc != null and checkedLevelDesc != ''">checked_level_desc = #{checkedLevelDesc},
231
+            </if>
232
+            <if test="checkResultDesc != null">check_result_desc = #{checkResultDesc},</if>
233
+            <if test="checkCategoryDesc != null">check_category_desc = #{checkCategoryDesc},</if>
234
+            <if test="ruleTypeDesc != null">rule_type_desc = #{ruleTypeDesc},</if>
235
+            <if test="remark != null">remark = #{remark},</if>
236
+            <if test="isSelfCheck != null">is_self_check = #{isSelfCheck},</if>
237
+            <if test="ruleTypeNum != null">rule_type_num = #{ruleTypeNum},</if>
238
+            <if test="createId != null">create_id = #{createId},</if>
239
+            <if test="updateId != null">update_id = #{updateId},</if>
240
+            <if test="selfCheckDeptId != null">self_check_dept_id = #{selfCheckDeptId},</if>
241
+            <if test="selfCheckDeptName != null">self_check_dept_name = #{selfCheckDeptName},</if>
242
+        </trim>
243
+        where id = #{id}
244
+    </update>
245
+
246
+    <delete id="deleteCheckTaskById" parameterType="Long">
247
+        delete
248
+        from check_task
249
+        where id = #{id}
250
+    </delete>
251
+
252
+    <delete id="deleteCheckTaskByIds" parameterType="String">
253
+        delete from check_task where id in
254
+        <foreach item="id" collection="array" open="(" separator="," close=")">
255
+            #{id}
256
+        </foreach>
257
+    </delete>
258
+
259
+    <select id="selectCheckTaskListWeb" parameterType="CheckTask" resultMap="CheckTaskResult">
260
+        <include refid="selectCheckTaskVo"/>
261
+        <where>
262
+            <if test="taskCode != null  and taskCode != ''">and task_code = #{taskCode}</if>
263
+            <if test="taskName != null  and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
264
+            <choose>
265
+                <when test="status == 'PENDING_EXECUTION'">
266
+                    and current_date() <![CDATA[<]]> check_start_time
267
+                </when>
268
+                <when test="status == 'COMPLETED'">
269
+                    and current_date() <![CDATA[>]]> check_end_time
270
+                </when>
271
+                <when test="status == 'IN_PROGRESS'">
272
+                    and current_date() <![CDATA[>=]]> check_start_time
273
+                    and current_date() <![CDATA[<=]]> check_end_time
274
+                </when>
275
+                <otherwise>
276
+
277
+                </otherwise>
278
+            </choose>
279
+            <if test="checkedLevel != null  and checkedLevel != ''">and checked_level = #{checkedLevel}</if>
280
+            and ((is_self_check = 0 and check_level in ('DEPARTMENT_LEVEL', 'TEAM_LEVEL'))
281
+            or (is_self_check = 1 and self_check_dept_id = #{selfCheckDeptId}))
282
+        </where>
283
+        order by create_time desc
284
+    </select>
285
+
286
+</mapper>

+ 134 - 0
airport-check/src/main/resources/mapper/check/CheckUserMapper.xml

@@ -0,0 +1,134 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.sundot.airport.check.mapper.CheckUserMapper">
6
+
7
+    <resultMap type="CheckUser" id="CheckUserResult">
8
+        <result property="tenantId" column="tenant_id"/>
9
+        <result property="revision" column="revision"/>
10
+        <result property="createBy" column="create_by"/>
11
+        <result property="createTime" column="create_time"/>
12
+        <result property="updateBy" column="update_by"/>
13
+        <result property="updateTime" column="update_time"/>
14
+        <result property="id" column="id"/>
15
+        <result property="sourceId" column="source_id"/>
16
+        <result property="userId" column="user_id"/>
17
+        <result property="userName" column="user_name"/>
18
+        <result property="type" column="type"/>
19
+        <result property="typeDesc" column="type_desc"/>
20
+        <result property="remark" column="remark"/>
21
+        <result property="deptId" column="dept_id"/>
22
+        <result property="deptName" column="dept_name"/>
23
+    </resultMap>
24
+
25
+    <sql id="selectCheckUserVo">
26
+        select tenant_id,
27
+               revision,
28
+               create_by,
29
+               create_time,
30
+               update_by,
31
+               update_time,
32
+               id,
33
+               source_id,
34
+               user_id,
35
+               user_name,
36
+               type,
37
+               type_desc,
38
+               remark,
39
+               dept_id,
40
+               dept_name
41
+        from check_user
42
+    </sql>
43
+
44
+    <select id="selectCheckUserList" parameterType="CheckUser" resultMap="CheckUserResult">
45
+        <include refid="selectCheckUserVo"/>
46
+        <where>
47
+            <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
48
+            <if test="revision != null ">and revision = #{revision}</if>
49
+            <if test="sourceId != null ">and source_id = #{sourceId}</if>
50
+            <if test="userId != null ">and user_id = #{userId}</if>
51
+            <if test="userName != null  and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
52
+            <if test="type != null  and type != ''">and type = #{type}</if>
53
+            <if test="typeDesc != null  and typeDesc != ''">and type_desc = #{typeDesc}</if>
54
+            <if test="deptId != null ">and dept_id = #{deptId}</if>
55
+            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
56
+        </where>
57
+        order by create_time desc
58
+    </select>
59
+
60
+    <select id="selectCheckUserById" parameterType="Long" resultMap="CheckUserResult">
61
+        <include refid="selectCheckUserVo"/>
62
+        where id = #{id}
63
+    </select>
64
+
65
+    <insert id="insertCheckUser" parameterType="CheckUser" useGeneratedKeys="true" keyProperty="id">
66
+        insert into check_user
67
+        <trim prefix="(" suffix=")" suffixOverrides=",">
68
+            <if test="tenantId != null">tenant_id,</if>
69
+            <if test="revision != null">revision,</if>
70
+            <if test="createBy != null">create_by,</if>
71
+            <if test="createTime != null">create_time,</if>
72
+            <if test="updateBy != null">update_by,</if>
73
+            <if test="updateTime != null">update_time,</if>
74
+            <if test="sourceId != null">source_id,</if>
75
+            <if test="userId != null">user_id,</if>
76
+            <if test="userName != null and userName != ''">user_name,</if>
77
+            <if test="type != null and type != ''">type,</if>
78
+            <if test="typeDesc != null and typeDesc != ''">type_desc,</if>
79
+            <if test="remark != null">remark,</if>
80
+            <if test="deptId != null">dept_id,</if>
81
+            <if test="deptName != null and deptName != ''">dept_name,</if>
82
+        </trim>
83
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
84
+            <if test="tenantId != null">#{tenantId},</if>
85
+            <if test="revision != null">#{revision},</if>
86
+            <if test="createBy != null">#{createBy},</if>
87
+            <if test="createTime != null">#{createTime},</if>
88
+            <if test="updateBy != null">#{updateBy},</if>
89
+            <if test="updateTime != null">#{updateTime},</if>
90
+            <if test="sourceId != null">#{sourceId},</if>
91
+            <if test="userId != null">#{userId},</if>
92
+            <if test="userName != null and userName != ''">#{userName},</if>
93
+            <if test="type != null and type != ''">#{type},</if>
94
+            <if test="typeDesc != null and typeDesc != ''">#{typeDesc},</if>
95
+            <if test="remark != null">#{remark},</if>
96
+            <if test="deptId != null">#{deptId},</if>
97
+            <if test="deptName != null and deptName != ''">#{deptName},</if>
98
+        </trim>
99
+    </insert>
100
+
101
+    <update id="updateCheckUser" parameterType="CheckUser">
102
+        update check_user
103
+        <trim prefix="SET" suffixOverrides=",">
104
+            <if test="tenantId != null">tenant_id = #{tenantId},</if>
105
+            <if test="revision != null">revision = #{revision},</if>
106
+            <if test="createBy != null">create_by = #{createBy},</if>
107
+            <if test="createTime != null">create_time = #{createTime},</if>
108
+            <if test="updateBy != null">update_by = #{updateBy},</if>
109
+            <if test="updateTime != null">update_time = #{updateTime},</if>
110
+            <if test="sourceId != null">source_id = #{sourceId},</if>
111
+            <if test="userId != null">user_id = #{userId},</if>
112
+            <if test="userName != null and userName != ''">user_name = #{userName},</if>
113
+            <if test="type != null and type != ''">type = #{type},</if>
114
+            <if test="typeDesc != null and typeDesc != ''">type_desc = #{typeDesc},</if>
115
+            <if test="remark != null">remark = #{remark},</if>
116
+            <if test="deptId != null">dept_id = #{deptId},</if>
117
+            <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
118
+        </trim>
119
+        where id = #{id}
120
+    </update>
121
+
122
+    <delete id="deleteCheckUserById" parameterType="Long">
123
+        delete
124
+        from check_user
125
+        where id = #{id}
126
+    </delete>
127
+
128
+    <delete id="deleteCheckUserByIds" parameterType="String">
129
+        delete from check_user where id in
130
+        <foreach item="id" collection="array" open="(" separator="," close=")">
131
+            #{id}
132
+        </foreach>
133
+    </delete>
134
+</mapper>

+ 147 - 0
airport-common/pom.xml

@@ -0,0 +1,147 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <parent>
6
+        <artifactId>airport</artifactId>
7
+        <groupId>com.sundot.airport</groupId>
8
+        <version>3.9.0</version>
9
+    </parent>
10
+    <modelVersion>4.0.0</modelVersion>
11
+
12
+    <artifactId>airport-common</artifactId>
13
+
14
+    <description>
15
+        common通用工具
16
+    </description>
17
+
18
+    <dependencies>
19
+
20
+        <!-- Spring框架基本的核心工具 -->
21
+        <dependency>
22
+            <groupId>org.springframework</groupId>
23
+            <artifactId>spring-context-support</artifactId>
24
+        </dependency>
25
+
26
+        <!-- SpringWeb模块 -->
27
+        <dependency>
28
+            <groupId>org.springframework</groupId>
29
+            <artifactId>spring-web</artifactId>
30
+        </dependency>
31
+
32
+        <!-- spring security 安全认证 -->
33
+        <dependency>
34
+            <groupId>org.springframework.boot</groupId>
35
+            <artifactId>spring-boot-starter-security</artifactId>
36
+        </dependency>
37
+
38
+        <!-- pagehelper 分页插件 -->
39
+        <dependency>
40
+            <groupId>com.github.pagehelper</groupId>
41
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
42
+        </dependency>
43
+
44
+        <!-- 自定义验证注解 -->
45
+        <dependency>
46
+            <groupId>org.springframework.boot</groupId>
47
+            <artifactId>spring-boot-starter-validation</artifactId>
48
+        </dependency>
49
+
50
+        <!--常用工具类 -->
51
+        <dependency>
52
+            <groupId>org.apache.commons</groupId>
53
+            <artifactId>commons-lang3</artifactId>
54
+        </dependency>
55
+  
56
+        <!-- JSON工具类 -->
57
+        <dependency>
58
+            <groupId>com.fasterxml.jackson.core</groupId>
59
+            <artifactId>jackson-databind</artifactId>
60
+        </dependency>
61
+        
62
+        <!-- 阿里JSON解析器 -->
63
+        <dependency>
64
+            <groupId>com.alibaba.fastjson2</groupId>
65
+            <artifactId>fastjson2</artifactId>
66
+        </dependency>
67
+
68
+        <!-- io常用工具类 -->
69
+        <dependency>
70
+            <groupId>commons-io</groupId>
71
+            <artifactId>commons-io</artifactId>
72
+        </dependency>
73
+
74
+        <!-- excel工具 -->
75
+        <dependency>
76
+            <groupId>org.apache.poi</groupId>
77
+            <artifactId>poi-ooxml</artifactId>
78
+        </dependency>
79
+
80
+        <!-- yml解析器 -->
81
+        <dependency>
82
+            <groupId>org.yaml</groupId>
83
+            <artifactId>snakeyaml</artifactId>
84
+        </dependency>
85
+
86
+        <!-- Token生成与解析-->
87
+        <dependency>
88
+            <groupId>io.jsonwebtoken</groupId>
89
+            <artifactId>jjwt</artifactId>
90
+        </dependency>
91
+
92
+        <!-- Jaxb -->
93
+        <dependency>
94
+            <groupId>javax.xml.bind</groupId>
95
+            <artifactId>jaxb-api</artifactId>
96
+        </dependency>
97
+
98
+        <!-- redis 缓存操作 -->
99
+        <dependency>
100
+            <groupId>org.springframework.boot</groupId>
101
+            <artifactId>spring-boot-starter-data-redis</artifactId>
102
+        </dependency>
103
+
104
+        <!-- pool 对象池 -->
105
+        <dependency>
106
+            <groupId>org.apache.commons</groupId>
107
+            <artifactId>commons-pool2</artifactId>
108
+        </dependency>
109
+
110
+        <!-- 解析客户端操作系统、浏览器等 -->
111
+        <dependency>
112
+            <groupId>eu.bitwalker</groupId>
113
+            <artifactId>UserAgentUtils</artifactId>
114
+        </dependency>
115
+
116
+        <!-- servlet包 -->
117
+        <dependency>
118
+            <groupId>javax.servlet</groupId>
119
+            <artifactId>javax.servlet-api</artifactId>
120
+        </dependency>
121
+
122
+        <dependency>
123
+            <groupId>com.baomidou</groupId>
124
+            <artifactId>mybatis-plus-boot-starter</artifactId>
125
+            <version>3.5.1</version>
126
+        </dependency>
127
+
128
+        <dependency>
129
+            <groupId>org.projectlombok</groupId>
130
+            <artifactId>lombok</artifactId>
131
+            <scope>provided</scope>
132
+        </dependency>
133
+        <dependency>
134
+            <groupId>cn.hutool</groupId>
135
+            <artifactId>hutool-all</artifactId>
136
+            <version>5.8.31</version>
137
+        </dependency>
138
+
139
+        <dependency>
140
+            <groupId>io.swagger</groupId>
141
+            <artifactId>swagger-annotations</artifactId>
142
+            <version>1.6.2</version>
143
+        </dependency>
144
+
145
+    </dependencies>
146
+
147
+</project>

+ 19 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/Anonymous.java

@@ -0,0 +1,19 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.Documented;
4
+import java.lang.annotation.ElementType;
5
+import java.lang.annotation.Retention;
6
+import java.lang.annotation.RetentionPolicy;
7
+import java.lang.annotation.Target;
8
+
9
+/**
10
+ * 匿名访问不鉴权注解
11
+ * 
12
+ * @author ruoyi
13
+ */
14
+@Target({ ElementType.METHOD, ElementType.TYPE })
15
+@Retention(RetentionPolicy.RUNTIME)
16
+@Documented
17
+public @interface Anonymous
18
+{
19
+}

+ 33 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/DataScope.java

@@ -0,0 +1,33 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.Documented;
4
+import java.lang.annotation.ElementType;
5
+import java.lang.annotation.Retention;
6
+import java.lang.annotation.RetentionPolicy;
7
+import java.lang.annotation.Target;
8
+
9
+/**
10
+ * 数据权限过滤注解
11
+ * 
12
+ * @author ruoyi
13
+ */
14
+@Target(ElementType.METHOD)
15
+@Retention(RetentionPolicy.RUNTIME)
16
+@Documented
17
+public @interface DataScope
18
+{
19
+    /**
20
+     * 部门表的别名
21
+     */
22
+    public String deptAlias() default "";
23
+
24
+    /**
25
+     * 用户表的别名
26
+     */
27
+    public String userAlias() default "";
28
+
29
+    /**
30
+     * 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@ss获取,多个权限用逗号分隔开来
31
+     */
32
+    public String permission() default "";
33
+}

+ 28 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/DataSource.java

@@ -0,0 +1,28 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.Documented;
4
+import java.lang.annotation.ElementType;
5
+import java.lang.annotation.Inherited;
6
+import java.lang.annotation.Retention;
7
+import java.lang.annotation.RetentionPolicy;
8
+import java.lang.annotation.Target;
9
+import com.sundot.airport.common.enums.DataSourceType;
10
+
11
+/**
12
+ * 自定义多数据源切换注解
13
+ *
14
+ * 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
15
+ *
16
+ * @author ruoyi
17
+ */
18
+@Target({ ElementType.METHOD, ElementType.TYPE })
19
+@Retention(RetentionPolicy.RUNTIME)
20
+@Documented
21
+@Inherited
22
+public @interface DataSource
23
+{
24
+    /**
25
+     * 切换数据源名称
26
+     */
27
+    public DataSourceType value() default DataSourceType.MASTER;
28
+}

+ 197 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/Excel.java

@@ -0,0 +1,197 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.ElementType;
4
+import java.lang.annotation.Retention;
5
+import java.lang.annotation.RetentionPolicy;
6
+import java.lang.annotation.Target;
7
+import java.math.BigDecimal;
8
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
9
+import org.apache.poi.ss.usermodel.IndexedColors;
10
+import com.sundot.airport.common.utils.poi.ExcelHandlerAdapter;
11
+
12
+/**
13
+ * 自定义导出Excel数据注解
14
+ * 
15
+ * @author ruoyi
16
+ */
17
+@Retention(RetentionPolicy.RUNTIME)
18
+@Target(ElementType.FIELD)
19
+public @interface Excel
20
+{
21
+    /**
22
+     * 导出时在excel中排序
23
+     */
24
+    public int sort() default Integer.MAX_VALUE;
25
+
26
+    /**
27
+     * 导出到Excel中的名字.
28
+     */
29
+    public String name() default "";
30
+
31
+    /**
32
+     * 日期格式, 如: yyyy-MM-dd
33
+     */
34
+    public String dateFormat() default "";
35
+
36
+    /**
37
+     * 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
38
+     */
39
+    public String dictType() default "";
40
+
41
+    /**
42
+     * 读取内容转表达式 (如: 0=男,1=女,2=未知)
43
+     */
44
+    public String readConverterExp() default "";
45
+
46
+    /**
47
+     * 分隔符,读取字符串组内容
48
+     */
49
+    public String separator() default ",";
50
+
51
+    /**
52
+     * BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
53
+     */
54
+    public int scale() default -1;
55
+
56
+    /**
57
+     * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
58
+     */
59
+    public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
60
+
61
+    /**
62
+     * 导出时在excel中每个列的高度
63
+     */
64
+    public double height() default 14;
65
+
66
+    /**
67
+     * 导出时在excel中每个列的宽度
68
+     */
69
+    public double width() default 16;
70
+
71
+    /**
72
+     * 文字后缀,如% 90 变成90%
73
+     */
74
+    public String suffix() default "";
75
+
76
+    /**
77
+     * 当值为空时,字段的默认值
78
+     */
79
+    public String defaultValue() default "";
80
+
81
+    /**
82
+     * 提示信息
83
+     */
84
+    public String prompt() default "";
85
+
86
+    /**
87
+     * 是否允许内容换行 
88
+     */
89
+    public boolean wrapText() default false;
90
+
91
+    /**
92
+     * 设置只能选择不能输入的列内容.
93
+     */
94
+    public String[] combo() default {};
95
+
96
+    /**
97
+     * 是否从字典读数据到combo,默认不读取,如读取需要设置dictType注解.
98
+     */
99
+    public boolean comboReadDict() default false;
100
+
101
+    /**
102
+     * 是否需要纵向合并单元格,应对需求:含有list集合单元格)
103
+     */
104
+    public boolean needMerge() default false;
105
+
106
+    /**
107
+     * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
108
+     */
109
+    public boolean isExport() default true;
110
+
111
+    /**
112
+     * 另一个类中的属性名称,支持多级获取,以小数点隔开
113
+     */
114
+    public String targetAttr() default "";
115
+
116
+    /**
117
+     * 是否自动统计数据,在最后追加一行统计数据总和
118
+     */
119
+    public boolean isStatistics() default false;
120
+
121
+    /**
122
+     * 导出类型(0数字 1字符串 2图片)
123
+     */
124
+    public ColumnType cellType() default ColumnType.STRING;
125
+
126
+    /**
127
+     * 导出列头背景颜色
128
+     */
129
+    public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
130
+
131
+    /**
132
+     * 导出列头字体颜色
133
+     */
134
+    public IndexedColors headerColor() default IndexedColors.WHITE;
135
+
136
+    /**
137
+     * 导出单元格背景颜色
138
+     */
139
+    public IndexedColors backgroundColor() default IndexedColors.WHITE;
140
+
141
+    /**
142
+     * 导出单元格字体颜色
143
+     */
144
+    public IndexedColors color() default IndexedColors.BLACK;
145
+
146
+    /**
147
+     * 导出字段对齐方式
148
+     */
149
+    public HorizontalAlignment align() default HorizontalAlignment.CENTER;
150
+
151
+    /**
152
+     * 自定义数据处理器
153
+     */
154
+    public Class<?> handler() default ExcelHandlerAdapter.class;
155
+
156
+    /**
157
+     * 自定义数据处理器参数
158
+     */
159
+    public String[] args() default {};
160
+
161
+    /**
162
+     * 字段类型(0:导出导入;1:仅导出;2:仅导入)
163
+     */
164
+    Type type() default Type.ALL;
165
+
166
+    public enum Type
167
+    {
168
+        ALL(0), EXPORT(1), IMPORT(2);
169
+        private final int value;
170
+
171
+        Type(int value)
172
+        {
173
+            this.value = value;
174
+        }
175
+
176
+        public int value()
177
+        {
178
+            return this.value;
179
+        }
180
+    }
181
+
182
+    public enum ColumnType
183
+    {
184
+        NUMERIC(0), STRING(1), IMAGE(2), TEXT(3);
185
+        private final int value;
186
+
187
+        ColumnType(int value)
188
+        {
189
+            this.value = value;
190
+        }
191
+
192
+        public int value()
193
+        {
194
+            return this.value;
195
+        }
196
+    }
197
+}

+ 18 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/Excels.java

@@ -0,0 +1,18 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.ElementType;
4
+import java.lang.annotation.Retention;
5
+import java.lang.annotation.RetentionPolicy;
6
+import java.lang.annotation.Target;
7
+
8
+/**
9
+ * Excel注解集
10
+ * 
11
+ * @author ruoyi
12
+ */
13
+@Target(ElementType.FIELD)
14
+@Retention(RetentionPolicy.RUNTIME)
15
+public @interface Excels
16
+{
17
+    public Excel[] value();
18
+}

+ 51 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/Log.java

@@ -0,0 +1,51 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.Documented;
4
+import java.lang.annotation.ElementType;
5
+import java.lang.annotation.Retention;
6
+import java.lang.annotation.RetentionPolicy;
7
+import java.lang.annotation.Target;
8
+import com.sundot.airport.common.enums.BusinessType;
9
+import com.sundot.airport.common.enums.OperatorType;
10
+
11
+/**
12
+ * 自定义操作日志记录注解
13
+ * 
14
+ * @author ruoyi
15
+ *
16
+ */
17
+@Target({ ElementType.PARAMETER, ElementType.METHOD })
18
+@Retention(RetentionPolicy.RUNTIME)
19
+@Documented
20
+public @interface Log
21
+{
22
+    /**
23
+     * 模块
24
+     */
25
+    public String title() default "";
26
+
27
+    /**
28
+     * 功能
29
+     */
30
+    public BusinessType businessType() default BusinessType.OTHER;
31
+
32
+    /**
33
+     * 操作人类别
34
+     */
35
+    public OperatorType operatorType() default OperatorType.MANAGE;
36
+
37
+    /**
38
+     * 是否保存请求的参数
39
+     */
40
+    public boolean isSaveRequestData() default true;
41
+
42
+    /**
43
+     * 是否保存响应的参数
44
+     */
45
+    public boolean isSaveResponseData() default true;
46
+
47
+    /**
48
+     * 排除指定的请求参数
49
+     */
50
+    public String[] excludeParamNames() default {};
51
+}

+ 40 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/RateLimiter.java

@@ -0,0 +1,40 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.Documented;
4
+import java.lang.annotation.ElementType;
5
+import java.lang.annotation.Retention;
6
+import java.lang.annotation.RetentionPolicy;
7
+import java.lang.annotation.Target;
8
+import com.sundot.airport.common.constant.CacheConstants;
9
+import com.sundot.airport.common.enums.LimitType;
10
+
11
+/**
12
+ * 限流注解
13
+ * 
14
+ * @author ruoyi
15
+ */
16
+@Target(ElementType.METHOD)
17
+@Retention(RetentionPolicy.RUNTIME)
18
+@Documented
19
+public @interface RateLimiter
20
+{
21
+    /**
22
+     * 限流key
23
+     */
24
+    public String key() default CacheConstants.RATE_LIMIT_KEY;
25
+
26
+    /**
27
+     * 限流时间,单位秒
28
+     */
29
+    public int time() default 60;
30
+
31
+    /**
32
+     * 限流次数
33
+     */
34
+    public int count() default 100;
35
+
36
+    /**
37
+     * 限流类型
38
+     */
39
+    public LimitType limitType() default LimitType.DEFAULT;
40
+}

+ 31 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/RepeatSubmit.java

@@ -0,0 +1,31 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.Documented;
4
+import java.lang.annotation.ElementType;
5
+import java.lang.annotation.Inherited;
6
+import java.lang.annotation.Retention;
7
+import java.lang.annotation.RetentionPolicy;
8
+import java.lang.annotation.Target;
9
+
10
+/**
11
+ * 自定义注解防止表单重复提交
12
+ * 
13
+ * @author ruoyi
14
+ *
15
+ */
16
+@Inherited
17
+@Target(ElementType.METHOD)
18
+@Retention(RetentionPolicy.RUNTIME)
19
+@Documented
20
+public @interface RepeatSubmit
21
+{
22
+    /**
23
+     * 间隔时间(ms),小于此时间视为重复提交
24
+     */
25
+    public int interval() default 5000;
26
+
27
+    /**
28
+     * 提示消息
29
+     */
30
+    public String message() default "不允许重复提交,请稍候再试";
31
+}

+ 24 - 0
airport-common/src/main/java/com/sundot/airport/common/annotation/Sensitive.java

@@ -0,0 +1,24 @@
1
+package com.sundot.airport.common.annotation;
2
+
3
+import java.lang.annotation.ElementType;
4
+import java.lang.annotation.Retention;
5
+import java.lang.annotation.RetentionPolicy;
6
+import java.lang.annotation.Target;
7
+import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
8
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9
+import com.sundot.airport.common.config.serializer.SensitiveJsonSerializer;
10
+import com.sundot.airport.common.enums.DesensitizedType;
11
+
12
+/**
13
+ * 数据脱敏注解
14
+ *
15
+ * @author ruoyi
16
+ */
17
+@Retention(RetentionPolicy.RUNTIME)
18
+@Target(ElementType.FIELD)
19
+@JacksonAnnotationsInside
20
+@JsonSerialize(using = SensitiveJsonSerializer.class)
21
+public @interface Sensitive
22
+{
23
+    DesensitizedType desensitizedType();
24
+}

+ 54 - 0
airport-common/src/main/java/com/sundot/airport/common/cache/StatisticsCacheConditionUtil.java

@@ -0,0 +1,54 @@
1
+package com.sundot.airport.common.cache;
2
+
3
+import com.sundot.airport.common.core.domain.AjaxResult;
4
+import com.sundot.airport.common.core.page.TableDataInfo;
5
+import org.springframework.stereotype.Component;
6
+
7
+import java.util.Collection;
8
+import java.util.Map;
9
+
10
+/**
11
+ * 统计缓存缓存条件判断工具类
12
+ */
13
+@Component
14
+public class StatisticsCacheConditionUtil {
15
+
16
+    /**
17
+     * 判断R对象是否成功
18
+     */
19
+    public static boolean isSuccess(Object result) {
20
+        if (!(result instanceof AjaxResult)) {
21
+            return false;
22
+        }
23
+        AjaxResult r = (AjaxResult) result;
24
+        return r.get(AjaxResult.CODE_TAG) != null &&
25
+                r.get(AjaxResult.CODE_TAG).equals(200) &&
26
+                r.get(AjaxResult.DATA_TAG) != null;
27
+    }
28
+
29
+    /**
30
+     * 判断TableDataInfo是否成功
31
+     */
32
+    public static boolean isTableSuccess(Object result) {
33
+        if (!(result instanceof TableDataInfo)) {
34
+            return false;
35
+        }
36
+        TableDataInfo tableData = (TableDataInfo) result;
37
+        return tableData.getTotal() >= 0 && tableData.getRows() != null;
38
+    }
39
+
40
+    /**
41
+     * 判断数据是否为空
42
+     */
43
+    public static boolean isEmptyData(Object result) {
44
+        if (result instanceof AjaxResult) {
45
+            AjaxResult r = (AjaxResult) result;
46
+            Object data = r.get(AjaxResult.DATA_TAG);
47
+            return data == null ||
48
+                    (data instanceof Collection && ((Collection<?>) data).isEmpty()) ||
49
+                    (data instanceof Map && ((Map<?, ?>) data).isEmpty());
50
+        }
51
+        return false;
52
+    }
53
+
54
+}

+ 36 - 0
airport-common/src/main/java/com/sundot/airport/common/cache/StatisticsCacheConfig.java

@@ -0,0 +1,36 @@
1
+package com.sundot.airport.common.cache;
2
+
3
+import org.springframework.cache.annotation.EnableCaching;
4
+import org.springframework.context.annotation.Bean;
5
+import org.springframework.context.annotation.Configuration;
6
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
7
+import org.springframework.data.redis.cache.RedisCacheManager;
8
+import org.springframework.data.redis.connection.RedisConnectionFactory;
9
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
10
+import org.springframework.data.redis.serializer.RedisSerializationContext;
11
+import org.springframework.data.redis.serializer.StringRedisSerializer;
12
+
13
+import java.time.Duration;
14
+
15
+/**
16
+ * 统计缓存Redis缓存配置
17
+ */
18
+@Configuration
19
+@EnableCaching
20
+public class StatisticsCacheConfig {
21
+
22
+    @Bean
23
+    public RedisCacheManager cacheManager(RedisConnectionFactory factory) {
24
+        RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig()
25
+                .entryTtl(Duration.ofHours(6)) // 默认6小时
26
+                .disableCachingNullValues() // 不缓存null值
27
+                .computePrefixWith(cacheName -> "airport:cache:" + cacheName + ":")
28
+                .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))
29
+                .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericJackson2JsonRedisSerializer()));
30
+
31
+        return RedisCacheManager.builder(factory)
32
+                .cacheDefaults(config)
33
+                .build();
34
+    }
35
+
36
+}

+ 125 - 0
airport-common/src/main/java/com/sundot/airport/common/cache/StatisticsKeyGenerator.java

@@ -0,0 +1,125 @@
1
+package com.sundot.airport.common.cache;
2
+
3
+import com.fasterxml.jackson.databind.ObjectMapper;
4
+import com.sundot.airport.common.utils.SecurityUtils;
5
+import org.springframework.cache.interceptor.KeyGenerator;
6
+import org.springframework.stereotype.Component;
7
+
8
+import java.lang.reflect.Method;
9
+import java.util.Collection;
10
+import java.util.Date;
11
+import java.util.StringJoiner;
12
+
13
+/**
14
+ * 统计缓存自定义缓存Key生成器
15
+ */
16
+@Component("statisticsKeyGenerator")
17
+public class StatisticsKeyGenerator implements KeyGenerator {
18
+
19
+    @Override
20
+    public Object generate(Object target, Method method, Object... params) {
21
+        StringBuilder key = new StringBuilder();
22
+
23
+        // 1. 类名和方法名
24
+        key.append(target.getClass().getSimpleName())
25
+                .append(".")
26
+                .append(method.getName());
27
+
28
+        // 2. 用户ID(确保用户隔离)
29
+        key.append("_user").append(getCurrentUserId());
30
+
31
+        // 3. 精确的参数处理
32
+        if (params != null && params.length > 0) {
33
+            key.append("_args");
34
+            for (Object param : params) {
35
+                key.append("_").append(generateParamHash(param));
36
+            }
37
+        }
38
+
39
+        return key.toString();
40
+    }
41
+
42
+    /**
43
+     * 生成精确的参数哈希
44
+     */
45
+    private String generateParamHash(Object param) {
46
+        if (param == null) {
47
+            return "null";
48
+        }
49
+
50
+        try {
51
+            // 对于基本类型,直接使用值
52
+            if (param instanceof String || param instanceof Number || param instanceof Boolean) {
53
+                return param.getClass().getSimpleName() + ":" + param.toString();
54
+            }
55
+
56
+            // 对于日期类型,使用时间戳
57
+            if (param instanceof Date) {
58
+                return "Date:" + ((Date) param).getTime();
59
+            }
60
+
61
+            // 对于集合类型,生成详细哈希
62
+            if (param instanceof Collection) {
63
+                return generateCollectionHash((Collection<?>) param);
64
+            }
65
+
66
+            if (param instanceof Object[]) {
67
+                return generateArrayHash((Object[]) param);
68
+            }
69
+
70
+            // 对于对象,使用JSON序列化+哈希
71
+            return generateObjectHash(param);
72
+
73
+        } catch (Exception e) {
74
+            // 出错时使用备用方案
75
+            return "err:" + System.identityHashCode(param);
76
+        }
77
+    }
78
+
79
+    private String generateCollectionHash(Collection<?> collection) {
80
+        if (collection == null || collection.isEmpty()) {
81
+            return "emptyCollection";
82
+        }
83
+
84
+        StringJoiner sj = new StringJoiner(",");
85
+        for (Object item : collection) {
86
+            sj.add(generateParamHash(item));
87
+        }
88
+        return "Collection[" + sj.toString() + "]";
89
+    }
90
+
91
+    private String generateArrayHash(Object[] array) {
92
+        if (array == null || array.length == 0) {
93
+            return "emptyArray";
94
+        }
95
+
96
+        StringJoiner sj = new StringJoiner(",");
97
+        for (Object item : array) {
98
+            sj.add(generateParamHash(item));
99
+        }
100
+        return "Array[" + sj.toString() + "]";
101
+    }
102
+
103
+    private String generateObjectHash(Object obj) {
104
+        try {
105
+            // 尝试使用JSON序列化
106
+            ObjectMapper mapper = new ObjectMapper();
107
+            String json = mapper.writeValueAsString(obj);
108
+            int hash = json.hashCode();
109
+            return "Object:" + hash + ":" + json.length();
110
+        } catch (Exception e) {
111
+            // 备用方案:使用toString和哈希
112
+            return "Object:" + obj.toString().hashCode() + ":" + obj.getClass().getSimpleName();
113
+        }
114
+    }
115
+
116
+    private String getCurrentUserId() {
117
+        try {
118
+            Long userId = SecurityUtils.getUserId();
119
+            return userId != null ? userId.toString() : "anonymous";
120
+        } catch (Exception e) {
121
+            return "unknown";
122
+        }
123
+    }
124
+
125
+}

+ 109 - 0
airport-common/src/main/java/com/sundot/airport/common/config/LevelConfig.java

@@ -0,0 +1,109 @@
1
+package com.sundot.airport.common.config;
2
+
3
+import org.springframework.boot.context.properties.ConfigurationProperties;
4
+import org.springframework.context.annotation.Configuration;
5
+
6
+import java.util.Map;
7
+
8
+@Configuration
9
+@ConfigurationProperties(prefix = "level")
10
+public class LevelConfig {
11
+    /**
12
+     * 位置表
13
+     */
14
+    private int positionLevel;
15
+    /**
16
+     * 位置表层级-位置类型
17
+     */
18
+    private Map<Integer, String> positionLevelMap;
19
+    /**
20
+     * 检查部位表
21
+     */
22
+    private int checkPointLevel;
23
+    /**
24
+     * 检查项分类表
25
+     */
26
+    private int checkCategoryLevel;
27
+    /**
28
+     * 查获物品分类表
29
+     */
30
+    private int seizeCategoryLevel;
31
+    /**
32
+     * 部门表
33
+     */
34
+    private int sysDeptLevel;
35
+    /**
36
+     * 部门表层级-部门类型
37
+     */
38
+    private Map<Integer, String> sysDeptLevelMap;
39
+
40
+    /**
41
+     * 岗位信息表
42
+     */
43
+    private int sysPostLevel;
44
+
45
+    public int getPositionLevel() {
46
+        return positionLevel;
47
+    }
48
+
49
+    public void setPositionLevel(int positionLevel) {
50
+        this.positionLevel = positionLevel;
51
+    }
52
+
53
+    public Map<Integer, String> getPositionLevelMap() {
54
+        return positionLevelMap;
55
+    }
56
+
57
+    public void setPositionLevelMap(Map<Integer, String> positionLevelMap) {
58
+        this.positionLevelMap = positionLevelMap;
59
+    }
60
+
61
+    public int getCheckPointLevel() {
62
+        return checkPointLevel;
63
+    }
64
+
65
+    public void setCheckPointLevel(int checkPointLevel) {
66
+        this.checkPointLevel = checkPointLevel;
67
+    }
68
+
69
+    public int getCheckCategoryLevel() {
70
+        return checkCategoryLevel;
71
+    }
72
+
73
+    public void setCheckCategoryLevel(int checkCategoryLevel) {
74
+        this.checkCategoryLevel = checkCategoryLevel;
75
+    }
76
+
77
+    public int getSeizeCategoryLevel() {
78
+        return seizeCategoryLevel;
79
+    }
80
+
81
+    public void setSeizeCategoryLevel(int seizeCategoryLevel) {
82
+        this.seizeCategoryLevel = seizeCategoryLevel;
83
+    }
84
+
85
+    public int getSysDeptLevel() {
86
+        return sysDeptLevel;
87
+    }
88
+
89
+    public void setSysDeptLevel(int sysDeptLevel) {
90
+        this.sysDeptLevel = sysDeptLevel;
91
+    }
92
+
93
+    public Map<Integer, String> getSysDeptLevelMap() {
94
+        return sysDeptLevelMap;
95
+    }
96
+
97
+    public void setSysDeptLevelMap(Map<Integer, String> sysDeptLevelMap) {
98
+        this.sysDeptLevelMap = sysDeptLevelMap;
99
+    }
100
+
101
+    public int getSysPostLevel() {
102
+        return sysPostLevel;
103
+    }
104
+
105
+    public void setSysPostLevel(int sysPostLevel) {
106
+        this.sysPostLevel = sysPostLevel;
107
+    }
108
+
109
+}

+ 122 - 0
airport-common/src/main/java/com/sundot/airport/common/config/RuoYiConfig.java

@@ -0,0 +1,122 @@
1
+package com.sundot.airport.common.config;
2
+
3
+import org.springframework.boot.context.properties.ConfigurationProperties;
4
+import org.springframework.stereotype.Component;
5
+
6
+/**
7
+ * 读取项目相关配置
8
+ * 
9
+ * @author ruoyi
10
+ */
11
+@Component
12
+@ConfigurationProperties(prefix = "ruoyi")
13
+public class RuoYiConfig
14
+{
15
+    /** 项目名称 */
16
+    private String name;
17
+
18
+    /** 版本 */
19
+    private String version;
20
+
21
+    /** 版权年份 */
22
+    private String copyrightYear;
23
+
24
+    /** 上传路径 */
25
+    private static String profile;
26
+
27
+    /** 获取地址开关 */
28
+    private static boolean addressEnabled;
29
+
30
+    /** 验证码类型 */
31
+    private static String captchaType;
32
+
33
+    public String getName()
34
+    {
35
+        return name;
36
+    }
37
+
38
+    public void setName(String name)
39
+    {
40
+        this.name = name;
41
+    }
42
+
43
+    public String getVersion()
44
+    {
45
+        return version;
46
+    }
47
+
48
+    public void setVersion(String version)
49
+    {
50
+        this.version = version;
51
+    }
52
+
53
+    public String getCopyrightYear()
54
+    {
55
+        return copyrightYear;
56
+    }
57
+
58
+    public void setCopyrightYear(String copyrightYear)
59
+    {
60
+        this.copyrightYear = copyrightYear;
61
+    }
62
+
63
+    public static String getProfile()
64
+    {
65
+        return profile;
66
+    }
67
+
68
+    public void setProfile(String profile)
69
+    {
70
+        RuoYiConfig.profile = profile;
71
+    }
72
+
73
+    public static boolean isAddressEnabled()
74
+    {
75
+        return addressEnabled;
76
+    }
77
+
78
+    public void setAddressEnabled(boolean addressEnabled)
79
+    {
80
+        RuoYiConfig.addressEnabled = addressEnabled;
81
+    }
82
+
83
+    public static String getCaptchaType() {
84
+        return captchaType;
85
+    }
86
+
87
+    public void setCaptchaType(String captchaType) {
88
+        RuoYiConfig.captchaType = captchaType;
89
+    }
90
+
91
+    /**
92
+     * 获取导入上传路径
93
+     */
94
+    public static String getImportPath()
95
+    {
96
+        return getProfile() + "/import";
97
+    }
98
+
99
+    /**
100
+     * 获取头像上传路径
101
+     */
102
+    public static String getAvatarPath()
103
+    {
104
+        return getProfile() + "/avatar";
105
+    }
106
+
107
+    /**
108
+     * 获取下载路径
109
+     */
110
+    public static String getDownloadPath()
111
+    {
112
+        return getProfile() + "/download/";
113
+    }
114
+
115
+    /**
116
+     * 获取上传路径
117
+     */
118
+    public static String getUploadPath()
119
+    {
120
+        return getProfile() + "/upload";
121
+    }
122
+}

+ 67 - 0
airport-common/src/main/java/com/sundot/airport/common/config/serializer/SensitiveJsonSerializer.java

@@ -0,0 +1,67 @@
1
+package com.sundot.airport.common.config.serializer;
2
+
3
+import java.io.IOException;
4
+import java.util.Objects;
5
+import com.fasterxml.jackson.core.JsonGenerator;
6
+import com.fasterxml.jackson.databind.BeanProperty;
7
+import com.fasterxml.jackson.databind.JsonMappingException;
8
+import com.fasterxml.jackson.databind.JsonSerializer;
9
+import com.fasterxml.jackson.databind.SerializerProvider;
10
+import com.fasterxml.jackson.databind.ser.ContextualSerializer;
11
+import com.sundot.airport.common.annotation.Sensitive;
12
+import com.sundot.airport.common.core.domain.model.LoginUser;
13
+import com.sundot.airport.common.enums.DesensitizedType;
14
+import com.sundot.airport.common.utils.SecurityUtils;
15
+
16
+/**
17
+ * 数据脱敏序列化过滤
18
+ *
19
+ * @author ruoyi
20
+ */
21
+public class SensitiveJsonSerializer extends JsonSerializer<String> implements ContextualSerializer
22
+{
23
+    private DesensitizedType desensitizedType;
24
+
25
+    @Override
26
+    public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException
27
+    {
28
+        if (desensitization())
29
+        {
30
+            gen.writeString(desensitizedType.desensitizer().apply(value));
31
+        }
32
+        else
33
+        {
34
+            gen.writeString(value);
35
+        }
36
+    }
37
+
38
+    @Override
39
+    public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property)
40
+            throws JsonMappingException
41
+    {
42
+        Sensitive annotation = property.getAnnotation(Sensitive.class);
43
+        if (Objects.nonNull(annotation) && Objects.equals(String.class, property.getType().getRawClass()))
44
+        {
45
+            this.desensitizedType = annotation.desensitizedType();
46
+            return this;
47
+        }
48
+        return prov.findValueSerializer(property.getType(), property);
49
+    }
50
+
51
+    /**
52
+     * 是否需要脱敏处理
53
+     */
54
+    private boolean desensitization()
55
+    {
56
+        try
57
+        {
58
+            LoginUser securityUser = SecurityUtils.getLoginUser();
59
+            // 管理员不脱敏
60
+            return !securityUser.getUser().isAdmin();
61
+        }
62
+        catch (Exception e)
63
+        {
64
+            return true;
65
+        }
66
+    }
67
+}

+ 49 - 0
airport-common/src/main/java/com/sundot/airport/common/constant/CacheConstants.java

@@ -0,0 +1,49 @@
1
+package com.sundot.airport.common.constant;
2
+
3
+/**
4
+ * 缓存的key 常量
5
+ * 
6
+ * @author ruoyi
7
+ */
8
+public class CacheConstants
9
+{
10
+    /**
11
+     * 登录用户 redis key
12
+     */
13
+    public static final String LOGIN_TOKEN_KEY = "login_tokens:";
14
+
15
+    /**
16
+     * 验证码 redis key
17
+     */
18
+    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
19
+
20
+    /**
21
+     * 参数管理 cache key
22
+     */
23
+    public static final String SYS_CONFIG_KEY = "sys_config:";
24
+
25
+    /**
26
+     * 字典管理 cache key
27
+     */
28
+    public static final String SYS_DICT_KEY = "sys_dict:";
29
+
30
+    /**
31
+     * 防重提交 redis key
32
+     */
33
+    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
34
+
35
+    /**
36
+     * 限流 redis key
37
+     */
38
+    public static final String RATE_LIMIT_KEY = "rate_limit:";
39
+
40
+    /**
41
+     * 登录账户密码错误次数 redis key
42
+     */
43
+    public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
44
+
45
+    /**
46
+     * 用户信息缓存
47
+     */
48
+    public static final String USER_INFO_KEY = "user_info:";
49
+}

+ 186 - 0
airport-common/src/main/java/com/sundot/airport/common/constant/Constants.java

@@ -0,0 +1,186 @@
1
+package com.sundot.airport.common.constant;
2
+
3
+import java.util.Locale;
4
+import io.jsonwebtoken.Claims;
5
+
6
+/**
7
+ * 通用常量信息
8
+ * 
9
+ * @author ruoyi
10
+ */
11
+public class Constants
12
+{
13
+    /**
14
+     * UTF-8 字符集
15
+     */
16
+    public static final String UTF8 = "UTF-8";
17
+
18
+    /**
19
+     * GBK 字符集
20
+     */
21
+    public static final String GBK = "GBK";
22
+
23
+    /**
24
+     * 系统语言
25
+     */
26
+    public static final Locale DEFAULT_LOCALE = Locale.SIMPLIFIED_CHINESE;
27
+
28
+    /**
29
+     * www主域
30
+     */
31
+    public static final String WWW = "www.";
32
+
33
+    /**
34
+     * http请求
35
+     */
36
+    public static final String HTTP = "http://";
37
+
38
+    /**
39
+     * https请求
40
+     */
41
+    public static final String HTTPS = "https://";
42
+
43
+    /**
44
+     * 通用成功标识
45
+     */
46
+    public static final String SUCCESS = "0";
47
+
48
+    /**
49
+     * 通用失败标识
50
+     */
51
+    public static final String FAIL = "1";
52
+
53
+    /**
54
+     * 登录成功
55
+     */
56
+    public static final String LOGIN_SUCCESS = "Success";
57
+
58
+    /**
59
+     * 注销
60
+     */
61
+    public static final String LOGOUT = "Logout";
62
+
63
+    /**
64
+     * 注册
65
+     */
66
+    public static final String REGISTER = "Register";
67
+
68
+    /**
69
+     * 登录失败
70
+     */
71
+    public static final String LOGIN_FAIL = "Error";
72
+
73
+    /**
74
+     * 所有权限标识
75
+     */
76
+    public static final String ALL_PERMISSION = "*:*:*";
77
+
78
+    /**
79
+     * 管理员角色权限标识
80
+     */
81
+    public static final String SUPER_ADMIN = "admin";
82
+
83
+    /**
84
+     * 角色权限分隔符
85
+     */
86
+    public static final String ROLE_DELIMETER = ",";
87
+
88
+    /**
89
+     * 权限标识分隔符
90
+     */
91
+    public static final String PERMISSION_DELIMETER = ",";
92
+
93
+    /**
94
+     * 验证码有效期(分钟)
95
+     */
96
+    public static final Integer CAPTCHA_EXPIRATION = 2;
97
+
98
+    /**
99
+     * 令牌
100
+     */
101
+    public static final String TOKEN = "token";
102
+
103
+    /**
104
+     * 令牌前缀
105
+     */
106
+    public static final String TOKEN_PREFIX = "Bearer ";
107
+
108
+    /**
109
+     * 令牌前缀
110
+     */
111
+    public static final String LOGIN_USER_KEY = "login_user_key";
112
+
113
+    /**
114
+     * 用户ID
115
+     */
116
+    public static final String JWT_USERID = "userid";
117
+
118
+    /**
119
+     * 用户名称
120
+     */
121
+    public static final String JWT_USERNAME = Claims.SUBJECT;
122
+
123
+    /**
124
+     * 用户头像
125
+     */
126
+    public static final String JWT_AVATAR = "avatar";
127
+
128
+    /**
129
+     * 创建时间
130
+     */
131
+    public static final String JWT_CREATED = "created";
132
+
133
+    /**
134
+     * 用户权限
135
+     */
136
+    public static final String JWT_AUTHORITIES = "authorities";
137
+
138
+    /**
139
+     * 资源映射路径 前缀
140
+     */
141
+    public static final String RESOURCE_PREFIX = "/profile";
142
+
143
+    /**
144
+     * RMI 远程方法调用
145
+     */
146
+    public static final String LOOKUP_RMI = "rmi:";
147
+
148
+    /**
149
+     * LDAP 远程方法调用
150
+     */
151
+    public static final String LOOKUP_LDAP = "ldap:";
152
+
153
+    /**
154
+     * LDAPS 远程方法调用
155
+     */
156
+    public static final String LOOKUP_LDAPS = "ldaps:";
157
+
158
+    /**
159
+     * 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
160
+     */
161
+    public static final String[] JSON_WHITELIST_STR = { "org.springframework", "com.sundot.airport" };
162
+
163
+    /**
164
+     * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
165
+     */
166
+    public static final String[] JOB_WHITELIST_STR = { "com.sundot.airport.quartz.task" };
167
+
168
+    /**
169
+     * 定时任务违规的字符
170
+     */
171
+    public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
172
+            "org.springframework", "org.apache", "com.sundot.airport.common.utils.file", "com.sundot.airport.common.config", "com.sundot.airport.generator" };
173
+
174
+    /**
175
+     * 检查任务单前缀
176
+     */
177
+    public static final String CHECK_TASK_PREFIX = "RW";
178
+    /**
179
+     * 检查单前缀
180
+     */
181
+    public static final String CHECK_DOCUMENT_PREFIX = "JC";
182
+    /**
183
+     * 整改单前缀
184
+     */
185
+    public static final String CHECK_CORRECTION_PREFIX = "ZG";
186
+}

+ 117 - 0
airport-common/src/main/java/com/sundot/airport/common/constant/GenConstants.java

@@ -0,0 +1,117 @@
1
+package com.sundot.airport.common.constant;
2
+
3
+/**
4
+ * 代码生成通用常量
5
+ * 
6
+ * @author ruoyi
7
+ */
8
+public class GenConstants
9
+{
10
+    /** 单表(增删改查) */
11
+    public static final String TPL_CRUD = "crud";
12
+
13
+    /** 树表(增删改查) */
14
+    public static final String TPL_TREE = "tree";
15
+
16
+    /** 主子表(增删改查) */
17
+    public static final String TPL_SUB = "sub";
18
+
19
+    /** 树编码字段 */
20
+    public static final String TREE_CODE = "treeCode";
21
+
22
+    /** 树父编码字段 */
23
+    public static final String TREE_PARENT_CODE = "treeParentCode";
24
+
25
+    /** 树名称字段 */
26
+    public static final String TREE_NAME = "treeName";
27
+
28
+    /** 上级菜单ID字段 */
29
+    public static final String PARENT_MENU_ID = "parentMenuId";
30
+
31
+    /** 上级菜单名称字段 */
32
+    public static final String PARENT_MENU_NAME = "parentMenuName";
33
+
34
+    /** 数据库字符串类型 */
35
+    public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
36
+
37
+    /** 数据库文本类型 */
38
+    public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };
39
+
40
+    /** 数据库时间类型 */
41
+    public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };
42
+
43
+    /** 数据库数字类型 */
44
+    public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
45
+            "bit", "bigint", "float", "double", "decimal" };
46
+
47
+    /** 页面不需要编辑字段 */
48
+    public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };
49
+
50
+    /** 页面不需要显示的列表字段 */
51
+    public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "del_flag", "update_by",
52
+            "update_time" };
53
+
54
+    /** 页面不需要查询字段 */
55
+    public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by",
56
+            "update_time", "remark" };
57
+
58
+    /** Entity基类字段 */
59
+    public static final String[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" };
60
+
61
+    /** Tree基类字段 */
62
+    public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" };
63
+
64
+    /** 文本框 */
65
+    public static final String HTML_INPUT = "input";
66
+
67
+    /** 文本域 */
68
+    public static final String HTML_TEXTAREA = "textarea";
69
+
70
+    /** 下拉框 */
71
+    public static final String HTML_SELECT = "select";
72
+
73
+    /** 单选框 */
74
+    public static final String HTML_RADIO = "radio";
75
+
76
+    /** 复选框 */
77
+    public static final String HTML_CHECKBOX = "checkbox";
78
+
79
+    /** 日期控件 */
80
+    public static final String HTML_DATETIME = "datetime";
81
+
82
+    /** 图片上传控件 */
83
+    public static final String HTML_IMAGE_UPLOAD = "imageUpload";
84
+
85
+    /** 文件上传控件 */
86
+    public static final String HTML_FILE_UPLOAD = "fileUpload";
87
+
88
+    /** 富文本控件 */
89
+    public static final String HTML_EDITOR = "editor";
90
+
91
+    /** 字符串类型 */
92
+    public static final String TYPE_STRING = "String";
93
+
94
+    /** 整型 */
95
+    public static final String TYPE_INTEGER = "Integer";
96
+
97
+    /** 长整型 */
98
+    public static final String TYPE_LONG = "Long";
99
+
100
+    /** 浮点型 */
101
+    public static final String TYPE_DOUBLE = "Double";
102
+
103
+    /** 高精度计算类型 */
104
+    public static final String TYPE_BIGDECIMAL = "BigDecimal";
105
+
106
+    /** 时间类型 */
107
+    public static final String TYPE_DATE = "Date";
108
+
109
+    /** 模糊查询 */
110
+    public static final String QUERY_LIKE = "LIKE";
111
+
112
+    /** 相等查询 */
113
+    public static final String QUERY_EQ = "EQ";
114
+
115
+    /** 需要 */
116
+    public static final String REQUIRE = "1";
117
+}

+ 94 - 0
airport-common/src/main/java/com/sundot/airport/common/constant/HttpStatus.java

@@ -0,0 +1,94 @@
1
+package com.sundot.airport.common.constant;
2
+
3
+/**
4
+ * 返回状态码
5
+ * 
6
+ * @author ruoyi
7
+ */
8
+public class HttpStatus
9
+{
10
+    /**
11
+     * 操作成功
12
+     */
13
+    public static final int SUCCESS = 200;
14
+
15
+    /**
16
+     * 对象创建成功
17
+     */
18
+    public static final int CREATED = 201;
19
+
20
+    /**
21
+     * 请求已经被接受
22
+     */
23
+    public static final int ACCEPTED = 202;
24
+
25
+    /**
26
+     * 操作已经执行成功,但是没有返回数据
27
+     */
28
+    public static final int NO_CONTENT = 204;
29
+
30
+    /**
31
+     * 资源已被移除
32
+     */
33
+    public static final int MOVED_PERM = 301;
34
+
35
+    /**
36
+     * 重定向
37
+     */
38
+    public static final int SEE_OTHER = 303;
39
+
40
+    /**
41
+     * 资源没有被修改
42
+     */
43
+    public static final int NOT_MODIFIED = 304;
44
+
45
+    /**
46
+     * 参数列表错误(缺少,格式不匹配)
47
+     */
48
+    public static final int BAD_REQUEST = 400;
49
+
50
+    /**
51
+     * 未授权
52
+     */
53
+    public static final int UNAUTHORIZED = 401;
54
+
55
+    /**
56
+     * 访问受限,授权过期
57
+     */
58
+    public static final int FORBIDDEN = 403;
59
+
60
+    /**
61
+     * 资源,服务未找到
62
+     */
63
+    public static final int NOT_FOUND = 404;
64
+
65
+    /**
66
+     * 不允许的http方法
67
+     */
68
+    public static final int BAD_METHOD = 405;
69
+
70
+    /**
71
+     * 资源冲突,或者资源被锁
72
+     */
73
+    public static final int CONFLICT = 409;
74
+
75
+    /**
76
+     * 不支持的数据,媒体类型
77
+     */
78
+    public static final int UNSUPPORTED_TYPE = 415;
79
+
80
+    /**
81
+     * 系统内部错误
82
+     */
83
+    public static final int ERROR = 500;
84
+
85
+    /**
86
+     * 接口未实现
87
+     */
88
+    public static final int NOT_IMPLEMENTED = 501;
89
+
90
+    /**
91
+     * 系统警告消息
92
+     */
93
+    public static final int WARN = 601;
94
+}

+ 50 - 0
airport-common/src/main/java/com/sundot/airport/common/constant/ScheduleConstants.java

@@ -0,0 +1,50 @@
1
+package com.sundot.airport.common.constant;
2
+
3
+/**
4
+ * 任务调度通用常量
5
+ * 
6
+ * @author ruoyi
7
+ */
8
+public class ScheduleConstants
9
+{
10
+    public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
11
+
12
+    /** 执行目标key */
13
+    public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
14
+
15
+    /** 默认 */
16
+    public static final String MISFIRE_DEFAULT = "0";
17
+
18
+    /** 立即触发执行 */
19
+    public static final String MISFIRE_IGNORE_MISFIRES = "1";
20
+
21
+    /** 触发一次执行 */
22
+    public static final String MISFIRE_FIRE_AND_PROCEED = "2";
23
+
24
+    /** 不触发立即执行 */
25
+    public static final String MISFIRE_DO_NOTHING = "3";
26
+
27
+    public enum Status
28
+    {
29
+        /**
30
+         * 正常
31
+         */
32
+        NORMAL("0"),
33
+        /**
34
+         * 暂停
35
+         */
36
+        PAUSE("1");
37
+
38
+        private String value;
39
+
40
+        private Status(String value)
41
+        {
42
+            this.value = value;
43
+        }
44
+
45
+        public String getValue()
46
+        {
47
+            return value;
48
+        }
49
+    }
50
+}

+ 81 - 0
airport-common/src/main/java/com/sundot/airport/common/constant/UserConstants.java

@@ -0,0 +1,81 @@
1
+package com.sundot.airport.common.constant;
2
+
3
+/**
4
+ * 用户常量信息
5
+ * 
6
+ * @author ruoyi
7
+ */
8
+public class UserConstants
9
+{
10
+    /**
11
+     * 平台内系统用户的唯一标志
12
+     */
13
+    public static final String SYS_USER = "SYS_USER";
14
+
15
+    /** 正常状态 */
16
+    public static final String NORMAL = "0";
17
+
18
+    /** 异常状态 */
19
+    public static final String EXCEPTION = "1";
20
+
21
+    /** 用户封禁状态 */
22
+    public static final String USER_DISABLE = "1";
23
+
24
+    /** 角色正常状态 */
25
+    public static final String ROLE_NORMAL = "0";
26
+
27
+    /** 角色封禁状态 */
28
+    public static final String ROLE_DISABLE = "1";
29
+
30
+    /** 部门正常状态 */
31
+    public static final String DEPT_NORMAL = "0";
32
+
33
+    /** 部门停用状态 */
34
+    public static final String DEPT_DISABLE = "1";
35
+
36
+    /** 字典正常状态 */
37
+    public static final String DICT_NORMAL = "0";
38
+
39
+    /** 是否为系统默认(是) */
40
+    public static final String YES = "Y";
41
+
42
+    /** 是否菜单外链(是) */
43
+    public static final String YES_FRAME = "0";
44
+
45
+    /** 是否菜单外链(否) */
46
+    public static final String NO_FRAME = "1";
47
+
48
+    /** 菜单类型(目录) */
49
+    public static final String TYPE_DIR = "M";
50
+
51
+    /** 菜单类型(菜单) */
52
+    public static final String TYPE_MENU = "C";
53
+
54
+    /** 菜单类型(按钮) */
55
+    public static final String TYPE_BUTTON = "F";
56
+
57
+    /** Layout组件标识 */
58
+    public final static String LAYOUT = "Layout";
59
+    
60
+    /** ParentView组件标识 */
61
+    public final static String PARENT_VIEW = "ParentView";
62
+
63
+    /** InnerLink组件标识 */
64
+    public final static String INNER_LINK = "InnerLink";
65
+
66
+    /** 校验是否唯一的返回标识 */
67
+    public final static boolean UNIQUE = true;
68
+    public final static boolean NOT_UNIQUE = false;
69
+
70
+    /**
71
+     * 用户名长度限制
72
+     */
73
+    public static final int USERNAME_MIN_LENGTH = 2;
74
+    public static final int USERNAME_MAX_LENGTH = 20;
75
+
76
+    /**
77
+     * 密码长度限制
78
+     */
79
+    public static final int PASSWORD_MIN_LENGTH = 5;
80
+    public static final int PASSWORD_MAX_LENGTH = 20;
81
+}

+ 208 - 0
airport-common/src/main/java/com/sundot/airport/common/core/controller/BaseController.java

@@ -0,0 +1,208 @@
1
+package com.sundot.airport.common.core.controller;
2
+
3
+import java.beans.PropertyEditorSupport;
4
+import java.util.Date;
5
+import java.util.List;
6
+import org.slf4j.Logger;
7
+import org.slf4j.LoggerFactory;
8
+import org.springframework.web.bind.WebDataBinder;
9
+import org.springframework.web.bind.annotation.InitBinder;
10
+import com.github.pagehelper.PageHelper;
11
+import com.github.pagehelper.PageInfo;
12
+import com.sundot.airport.common.constant.HttpStatus;
13
+import com.sundot.airport.common.core.domain.AjaxResult;
14
+import com.sundot.airport.common.core.domain.model.LoginUser;
15
+import com.sundot.airport.common.core.page.PageDomain;
16
+import com.sundot.airport.common.core.page.TableDataInfo;
17
+import com.sundot.airport.common.core.page.TableSupport;
18
+import com.sundot.airport.common.utils.DateUtils;
19
+import com.sundot.airport.common.utils.PageUtils;
20
+import com.sundot.airport.common.utils.SecurityUtils;
21
+import com.sundot.airport.common.utils.StringUtils;
22
+import com.sundot.airport.common.utils.sql.SqlUtil;
23
+
24
+/**
25
+ * web层通用数据处理
26
+ * 
27
+ * @author ruoyi
28
+ */
29
+public class BaseController
30
+{
31
+    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
32
+
33
+    /**
34
+     * 将前台传递过来的日期格式的字符串,自动转化为Date类型
35
+     */
36
+    @InitBinder
37
+    public void initBinder(WebDataBinder binder)
38
+    {
39
+        // Date 类型转换
40
+        binder.registerCustomEditor(Date.class, new PropertyEditorSupport()
41
+        {
42
+            @Override
43
+            public void setAsText(String text)
44
+            {
45
+                setValue(DateUtils.parseDate(text));
46
+            }
47
+        });
48
+    }
49
+
50
+    /**
51
+     * 设置请求分页数据
52
+     */
53
+    protected void startPage()
54
+    {
55
+        PageUtils.startPage();
56
+    }
57
+
58
+    /**
59
+     * 设置请求排序数据
60
+     */
61
+    protected void startOrderBy()
62
+    {
63
+        PageDomain pageDomain = TableSupport.buildPageRequest();
64
+        if (StringUtils.isNotEmpty(pageDomain.getOrderBy()))
65
+        {
66
+            String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
67
+            PageHelper.orderBy(orderBy);
68
+        }
69
+    }
70
+
71
+    /**
72
+     * 清理分页的线程变量
73
+     */
74
+    protected void clearPage()
75
+    {
76
+        PageUtils.clearPage();
77
+    }
78
+
79
+    /**
80
+     * 响应请求分页数据
81
+     */
82
+    @SuppressWarnings({ "rawtypes", "unchecked" })
83
+    protected TableDataInfo getDataTable(List<?> list)
84
+    {
85
+        TableDataInfo rspData = new TableDataInfo();
86
+        rspData.setCode(HttpStatus.SUCCESS);
87
+        rspData.setMsg("查询成功");
88
+        rspData.setRows(list);
89
+        
90
+        PageInfo pageInfo = new PageInfo(list);
91
+        rspData.setTotal(pageInfo.getTotal());
92
+        rspData.setPageNum(pageInfo.getPageNum());
93
+        rspData.setPages(pageInfo.getPages());
94
+        rspData.setPageSize(pageInfo.getPageSize());
95
+        
96
+        return rspData;
97
+    }
98
+
99
+    /**
100
+     * 返回成功
101
+     */
102
+    public AjaxResult success()
103
+    {
104
+        return AjaxResult.success();
105
+    }
106
+
107
+    /**
108
+     * 返回失败消息
109
+     */
110
+    public AjaxResult error()
111
+    {
112
+        return AjaxResult.error();
113
+    }
114
+
115
+    /**
116
+     * 返回成功消息
117
+     */
118
+    public AjaxResult success(String message)
119
+    {
120
+        return AjaxResult.success(message);
121
+    }
122
+    
123
+    /**
124
+     * 返回成功消息
125
+     */
126
+    public AjaxResult success(Object data)
127
+    {
128
+        return AjaxResult.success(data);
129
+    }
130
+
131
+    /**
132
+     * 返回失败消息
133
+     */
134
+    public AjaxResult error(String message)
135
+    {
136
+        return AjaxResult.error(message);
137
+    }
138
+
139
+    /**
140
+     * 返回警告消息
141
+     */
142
+    public AjaxResult warn(String message)
143
+    {
144
+        return AjaxResult.warn(message);
145
+    }
146
+
147
+    /**
148
+     * 响应返回结果
149
+     * 
150
+     * @param rows 影响行数
151
+     * @return 操作结果
152
+     */
153
+    protected AjaxResult toAjax(int rows)
154
+    {
155
+        return rows > 0 ? AjaxResult.success() : AjaxResult.error();
156
+    }
157
+
158
+    /**
159
+     * 响应返回结果
160
+     * 
161
+     * @param result 结果
162
+     * @return 操作结果
163
+     */
164
+    protected AjaxResult toAjax(boolean result)
165
+    {
166
+        return result ? success() : error();
167
+    }
168
+
169
+    /**
170
+     * 页面跳转
171
+     */
172
+    public String redirect(String url)
173
+    {
174
+        return StringUtils.format("redirect:{}", url);
175
+    }
176
+
177
+    /**
178
+     * 获取用户缓存信息
179
+     */
180
+    public LoginUser getLoginUser()
181
+    {
182
+        return SecurityUtils.getLoginUser();
183
+    }
184
+
185
+    /**
186
+     * 获取登录用户id
187
+     */
188
+    public Long getUserId()
189
+    {
190
+        return getLoginUser().getUserId();
191
+    }
192
+
193
+    /**
194
+     * 获取登录部门id
195
+     */
196
+    public Long getDeptId()
197
+    {
198
+        return getLoginUser().getDeptId();
199
+    }
200
+
201
+    /**
202
+     * 获取登录用户名
203
+     */
204
+    public String getUsername()
205
+    {
206
+        return getLoginUser().getUsername();
207
+    }
208
+}

+ 216 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/AjaxResult.java

@@ -0,0 +1,216 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import java.util.HashMap;
4
+import java.util.Objects;
5
+import com.sundot.airport.common.constant.HttpStatus;
6
+import com.sundot.airport.common.utils.StringUtils;
7
+
8
+/**
9
+ * 操作消息提醒
10
+ * 
11
+ * @author ruoyi
12
+ */
13
+public class AjaxResult extends HashMap<String, Object>
14
+{
15
+    private static final long serialVersionUID = 1L;
16
+
17
+    /** 状态码 */
18
+    public static final String CODE_TAG = "code";
19
+
20
+    /** 返回内容 */
21
+    public static final String MSG_TAG = "msg";
22
+
23
+    /** 数据对象 */
24
+    public static final String DATA_TAG = "data";
25
+
26
+    /**
27
+     * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
28
+     */
29
+    public AjaxResult()
30
+    {
31
+    }
32
+
33
+    /**
34
+     * 初始化一个新创建的 AjaxResult 对象
35
+     * 
36
+     * @param code 状态码
37
+     * @param msg 返回内容
38
+     */
39
+    public AjaxResult(int code, String msg)
40
+    {
41
+        super.put(CODE_TAG, code);
42
+        super.put(MSG_TAG, msg);
43
+    }
44
+
45
+    /**
46
+     * 初始化一个新创建的 AjaxResult 对象
47
+     * 
48
+     * @param code 状态码
49
+     * @param msg 返回内容
50
+     * @param data 数据对象
51
+     */
52
+    public AjaxResult(int code, String msg, Object data)
53
+    {
54
+        super.put(CODE_TAG, code);
55
+        super.put(MSG_TAG, msg);
56
+        if (StringUtils.isNotNull(data))
57
+        {
58
+            super.put(DATA_TAG, data);
59
+        }
60
+    }
61
+
62
+    /**
63
+     * 返回成功消息
64
+     * 
65
+     * @return 成功消息
66
+     */
67
+    public static AjaxResult success()
68
+    {
69
+        return AjaxResult.success("操作成功");
70
+    }
71
+
72
+    /**
73
+     * 返回成功数据
74
+     * 
75
+     * @return 成功消息
76
+     */
77
+    public static AjaxResult success(Object data)
78
+    {
79
+        return AjaxResult.success("操作成功", data);
80
+    }
81
+
82
+    /**
83
+     * 返回成功消息
84
+     * 
85
+     * @param msg 返回内容
86
+     * @return 成功消息
87
+     */
88
+    public static AjaxResult success(String msg)
89
+    {
90
+        return AjaxResult.success(msg, null);
91
+    }
92
+
93
+    /**
94
+     * 返回成功消息
95
+     * 
96
+     * @param msg 返回内容
97
+     * @param data 数据对象
98
+     * @return 成功消息
99
+     */
100
+    public static AjaxResult success(String msg, Object data)
101
+    {
102
+        return new AjaxResult(HttpStatus.SUCCESS, msg, data);
103
+    }
104
+
105
+    /**
106
+     * 返回警告消息
107
+     *
108
+     * @param msg 返回内容
109
+     * @return 警告消息
110
+     */
111
+    public static AjaxResult warn(String msg)
112
+    {
113
+        return AjaxResult.warn(msg, null);
114
+    }
115
+
116
+    /**
117
+     * 返回警告消息
118
+     *
119
+     * @param msg 返回内容
120
+     * @param data 数据对象
121
+     * @return 警告消息
122
+     */
123
+    public static AjaxResult warn(String msg, Object data)
124
+    {
125
+        return new AjaxResult(HttpStatus.WARN, msg, data);
126
+    }
127
+
128
+    /**
129
+     * 返回错误消息
130
+     * 
131
+     * @return 错误消息
132
+     */
133
+    public static AjaxResult error()
134
+    {
135
+        return AjaxResult.error("操作失败");
136
+    }
137
+
138
+    /**
139
+     * 返回错误消息
140
+     * 
141
+     * @param msg 返回内容
142
+     * @return 错误消息
143
+     */
144
+    public static AjaxResult error(String msg)
145
+    {
146
+        return AjaxResult.error(msg, null);
147
+    }
148
+
149
+    /**
150
+     * 返回错误消息
151
+     * 
152
+     * @param msg 返回内容
153
+     * @param data 数据对象
154
+     * @return 错误消息
155
+     */
156
+    public static AjaxResult error(String msg, Object data)
157
+    {
158
+        return new AjaxResult(HttpStatus.ERROR, msg, data);
159
+    }
160
+
161
+    /**
162
+     * 返回错误消息
163
+     * 
164
+     * @param code 状态码
165
+     * @param msg 返回内容
166
+     * @return 错误消息
167
+     */
168
+    public static AjaxResult error(int code, String msg)
169
+    {
170
+        return new AjaxResult(code, msg, null);
171
+    }
172
+
173
+    /**
174
+     * 是否为成功消息
175
+     *
176
+     * @return 结果
177
+     */
178
+    public boolean isSuccess()
179
+    {
180
+        return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG));
181
+    }
182
+
183
+    /**
184
+     * 是否为警告消息
185
+     *
186
+     * @return 结果
187
+     */
188
+    public boolean isWarn()
189
+    {
190
+        return Objects.equals(HttpStatus.WARN, this.get(CODE_TAG));
191
+    }
192
+
193
+    /**
194
+     * 是否为错误消息
195
+     *
196
+     * @return 结果
197
+     */
198
+    public boolean isError()
199
+    {
200
+        return Objects.equals(HttpStatus.ERROR, this.get(CODE_TAG));
201
+    }
202
+
203
+    /**
204
+     * 方便链式调用
205
+     *
206
+     * @param key 键
207
+     * @param value 值
208
+     * @return 数据对象
209
+     */
210
+    @Override
211
+    public AjaxResult put(String key, Object value)
212
+    {
213
+        super.put(key, value);
214
+        return this;
215
+    }
216
+}

+ 122 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/BaseEntity.java

@@ -0,0 +1,122 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import java.io.Serializable;
4
+import java.util.Date;
5
+import java.util.HashMap;
6
+import java.util.Map;
7
+
8
+import com.baomidou.mybatisplus.annotation.TableField;
9
+import com.fasterxml.jackson.annotation.JsonFormat;
10
+import com.fasterxml.jackson.annotation.JsonIgnore;
11
+import com.fasterxml.jackson.annotation.JsonInclude;
12
+
13
+/**
14
+ * Entity基类
15
+ * 
16
+ * @author ruoyi
17
+ */
18
+public class BaseEntity implements Serializable
19
+{
20
+    private static final long serialVersionUID = 1L;
21
+
22
+    /** 搜索值 */
23
+    @TableField(exist = false)
24
+    @JsonIgnore
25
+    private String searchValue;
26
+
27
+    /** 创建者 */
28
+    private String createBy;
29
+
30
+    /** 创建时间 */
31
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
32
+    private Date createTime;
33
+
34
+    /** 更新者 */
35
+    private String updateBy;
36
+
37
+    /** 更新时间 */
38
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
39
+    private Date updateTime;
40
+
41
+    /** 备注 */
42
+    private String remark;
43
+
44
+    /** 请求参数 */
45
+    @TableField(exist = false)
46
+    @JsonInclude(JsonInclude.Include.NON_EMPTY)
47
+    private Map<String, Object> params;
48
+
49
+    public String getSearchValue()
50
+    {
51
+        return searchValue;
52
+    }
53
+
54
+    public void setSearchValue(String searchValue)
55
+    {
56
+        this.searchValue = searchValue;
57
+    }
58
+
59
+    public String getCreateBy()
60
+    {
61
+        return createBy;
62
+    }
63
+
64
+    public void setCreateBy(String createBy)
65
+    {
66
+        this.createBy = createBy;
67
+    }
68
+
69
+    public Date getCreateTime()
70
+    {
71
+        return createTime;
72
+    }
73
+
74
+    public void setCreateTime(Date createTime)
75
+    {
76
+        this.createTime = createTime;
77
+    }
78
+
79
+    public String getUpdateBy()
80
+    {
81
+        return updateBy;
82
+    }
83
+
84
+    public void setUpdateBy(String updateBy)
85
+    {
86
+        this.updateBy = updateBy;
87
+    }
88
+
89
+    public Date getUpdateTime()
90
+    {
91
+        return updateTime;
92
+    }
93
+
94
+    public void setUpdateTime(Date updateTime)
95
+    {
96
+        this.updateTime = updateTime;
97
+    }
98
+
99
+    public String getRemark()
100
+    {
101
+        return remark;
102
+    }
103
+
104
+    public void setRemark(String remark)
105
+    {
106
+        this.remark = remark;
107
+    }
108
+
109
+    public Map<String, Object> getParams()
110
+    {
111
+        if (params == null)
112
+        {
113
+            params = new HashMap<>();
114
+        }
115
+        return params;
116
+    }
117
+
118
+    public void setParams(Map<String, Object> params)
119
+    {
120
+        this.params = params;
121
+    }
122
+}

+ 98 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/BaseLargeScreenQueryParamDto.java

@@ -0,0 +1,98 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import com.fasterxml.jackson.annotation.JsonFormat;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Data;
6
+
7
+import java.io.Serializable;
8
+import java.util.Date;
9
+
10
+/**
11
+ * 大屏查询参数
12
+ *
13
+ * @author ruoyi
14
+ */
15
+@Data
16
+public class BaseLargeScreenQueryParamDto implements Serializable {
17
+
18
+    private static final long serialVersionUID = 1L;
19
+
20
+    /**
21
+     * 指定日期
22
+     */
23
+    @JsonFormat(pattern = "yyyy-MM-dd")
24
+    private Date specifiedDate;
25
+
26
+    /**
27
+     * 开始日期
28
+     */
29
+    @JsonFormat(pattern = "yyyy-MM-dd")
30
+    private Date startDate;
31
+
32
+    /**
33
+     * 结束日期
34
+     */
35
+    @JsonFormat(pattern = "yyyy-MM-dd")
36
+    private Date endDate;
37
+
38
+    /**
39
+     * 用户ID
40
+     */
41
+    private Long userId;
42
+
43
+    /**
44
+     * 部门ID
45
+     */
46
+    private Long deptId;
47
+
48
+    /**
49
+     * 级别类型 1:一级类别 2:二级类别 默认二级类别
50
+     */
51
+    @ApiModelProperty("级别类型 1:一级类别 2:二级类别 默认二级类别")
52
+    private Integer levelType = 2;
53
+
54
+    /**
55
+     * 物品分类编码
56
+     */
57
+    @ApiModelProperty("物品分类编码")
58
+    private String categoryCode;
59
+    /**
60
+     * 位置编码
61
+     */
62
+    @ApiModelProperty("位置编码")
63
+    private String positionCode;
64
+
65
+    /**
66
+     * 科室id
67
+     */
68
+    @ApiModelProperty("科室id")
69
+    private Long inspectDepartmentId;
70
+
71
+    /**
72
+     * 一级分类code
73
+     */
74
+    @ApiModelProperty("一级分类code")
75
+    private String categoryCodeOne;
76
+    /**
77
+     * 二级分类code
78
+     */
79
+    @ApiModelProperty("二级分类code")
80
+    private String categoryCodeTwo;
81
+    /**
82
+     * 移交公安
83
+     */
84
+    @ApiModelProperty("移交公安")
85
+    private String isPolice;
86
+    /**
87
+     * 故意隐匿
88
+     */
89
+    @ApiModelProperty("故意隐匿")
90
+    private String isConceal;
91
+
92
+    /**
93
+     * 班组id
94
+     */
95
+    @ApiModelProperty("班组id")
96
+    private Long inspectTeamId;
97
+
98
+}

+ 53 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/DataPermissionResult.java

@@ -0,0 +1,53 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import com.sundot.airport.common.enums.DataPermissionType;
4
+
5
+/**
6
+ * 数据权限结果类
7
+ *
8
+ * @author ruoyi
9
+ */
10
+public class DataPermissionResult {
11
+    
12
+    /**
13
+     * 权限类型
14
+     */
15
+    private DataPermissionType permissionType;
16
+    
17
+    /**
18
+     * 对应的值
19
+     */
20
+    private Long value;
21
+    
22
+    public DataPermissionResult() {
23
+    }
24
+    
25
+    public DataPermissionResult(DataPermissionType permissionType, Long value) {
26
+        this.permissionType = permissionType;
27
+        this.value = value;
28
+    }
29
+    
30
+    public DataPermissionType getPermissionType() {
31
+        return permissionType;
32
+    }
33
+    
34
+    public void setPermissionType(DataPermissionType permissionType) {
35
+        this.permissionType = permissionType;
36
+    }
37
+    
38
+    public Long getValue() {
39
+        return value;
40
+    }
41
+    
42
+    public void setValue(Long value) {
43
+        this.value = value;
44
+    }
45
+    
46
+    @Override
47
+    public String toString() {
48
+        return "DataPermissionResult{" +
49
+                "permissionType=" + permissionType +
50
+                ", value=" + value +
51
+                '}';
52
+    }
53
+}

+ 62 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/DeptUserTreeSelect.java

@@ -0,0 +1,62 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import java.util.List;
4
+import java.util.stream.Collectors;
5
+
6
+import com.fasterxml.jackson.annotation.JsonInclude;
7
+import com.sundot.airport.common.constant.UserConstants;
8
+import com.sundot.airport.common.core.domain.entity.SysDept;
9
+import com.sundot.airport.common.core.domain.entity.SysUser;
10
+import com.sundot.airport.common.utils.StringUtils;
11
+
12
+/**
13
+ * 部门用户树结构实体类
14
+ * 
15
+ * @author ruoyi
16
+ */
17
+public class DeptUserTreeSelect extends TreeSelect {
18
+    private static final long serialVersionUID = 1L;
19
+
20
+    /** 节点类型(dept-部门 user-用户) */
21
+    private String nodeType;
22
+
23
+    public DeptUserTreeSelect() {
24
+        super();
25
+    }
26
+
27
+    /**
28
+     * 部门节点构造方法
29
+     * 
30
+     * @param dept 部门信息
31
+     */
32
+    public DeptUserTreeSelect(SysDept dept) {
33
+        super();
34
+        this.setId(dept.getDeptId());
35
+        this.setLabel(dept.getDeptName());
36
+        this.setParentId(dept.getParentId());
37
+        this.setDeptType(dept.getDeptType());
38
+        this.nodeType = "dept";
39
+        this.setDisabled(StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()));
40
+    }
41
+
42
+    /**
43
+     * 用户节点构造方法
44
+     * 
45
+     * @param user 用户信息
46
+     */
47
+    public DeptUserTreeSelect(SysUser user) {
48
+        super();
49
+        this.setId(user.getUserId());
50
+        this.setLabel(user.getNickName());
51
+        this.setParentId(user.getDeptId());
52
+        this.nodeType = "user";
53
+    }
54
+
55
+    public String getNodeType() {
56
+        return nodeType;
57
+    }
58
+
59
+    public void setNodeType(String nodeType) {
60
+        this.nodeType = nodeType;
61
+    }
62
+}

+ 115 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/R.java

@@ -0,0 +1,115 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import java.io.Serializable;
4
+import com.sundot.airport.common.constant.HttpStatus;
5
+
6
+/**
7
+ * 响应信息主体
8
+ *
9
+ * @author ruoyi
10
+ */
11
+public class R<T> implements Serializable
12
+{
13
+    private static final long serialVersionUID = 1L;
14
+
15
+    /** 成功 */
16
+    public static final int SUCCESS = HttpStatus.SUCCESS;
17
+
18
+    /** 失败 */
19
+    public static final int FAIL = HttpStatus.ERROR;
20
+
21
+    private int code;
22
+
23
+    private String msg;
24
+
25
+    private T data;
26
+
27
+    public static <T> R<T> ok()
28
+    {
29
+        return restResult(null, SUCCESS, "操作成功");
30
+    }
31
+
32
+    public static <T> R<T> ok(T data)
33
+    {
34
+        return restResult(data, SUCCESS, "操作成功");
35
+    }
36
+
37
+    public static <T> R<T> ok(T data, String msg)
38
+    {
39
+        return restResult(data, SUCCESS, msg);
40
+    }
41
+
42
+    public static <T> R<T> fail()
43
+    {
44
+        return restResult(null, FAIL, "操作失败");
45
+    }
46
+
47
+    public static <T> R<T> fail(String msg)
48
+    {
49
+        return restResult(null, FAIL, msg);
50
+    }
51
+
52
+    public static <T> R<T> fail(T data)
53
+    {
54
+        return restResult(data, FAIL, "操作失败");
55
+    }
56
+
57
+    public static <T> R<T> fail(T data, String msg)
58
+    {
59
+        return restResult(data, FAIL, msg);
60
+    }
61
+
62
+    public static <T> R<T> fail(int code, String msg)
63
+    {
64
+        return restResult(null, code, msg);
65
+    }
66
+
67
+    private static <T> R<T> restResult(T data, int code, String msg)
68
+    {
69
+        R<T> apiResult = new R<>();
70
+        apiResult.setCode(code);
71
+        apiResult.setData(data);
72
+        apiResult.setMsg(msg);
73
+        return apiResult;
74
+    }
75
+
76
+    public int getCode()
77
+    {
78
+        return code;
79
+    }
80
+
81
+    public void setCode(int code)
82
+    {
83
+        this.code = code;
84
+    }
85
+
86
+    public String getMsg()
87
+    {
88
+        return msg;
89
+    }
90
+
91
+    public void setMsg(String msg)
92
+    {
93
+        this.msg = msg;
94
+    }
95
+
96
+    public T getData()
97
+    {
98
+        return data;
99
+    }
100
+
101
+    public void setData(T data)
102
+    {
103
+        this.data = data;
104
+    }
105
+
106
+    public static <T> Boolean isError(R<T> ret)
107
+    {
108
+        return !isSuccess(ret);
109
+    }
110
+
111
+    public static <T> Boolean isSuccess(R<T> ret)
112
+    {
113
+        return R.SUCCESS == ret.getCode();
114
+    }
115
+}

+ 81 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/SysLargeScreenDetailDto.java

@@ -0,0 +1,81 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.math.BigDecimal;
6
+
7
+/**
8
+ * 能力画像-明细
9
+ *
10
+ * @author ruoyi
11
+ * @date 2025-09-07
12
+ */
13
+@Data
14
+public class SysLargeScreenDetailDto {
15
+
16
+    /**
17
+     * 主键
18
+     */
19
+    private Long id;
20
+
21
+    /**
22
+     * 编码
23
+     */
24
+    private String code;
25
+
26
+    /**
27
+     * 名称
28
+     */
29
+    private String name;
30
+
31
+    /**
32
+     * 人均巡检问题数
33
+     */
34
+    private BigDecimal checkCount;
35
+
36
+    /**
37
+     * 测试平均分
38
+     */
39
+    private BigDecimal testScore;
40
+
41
+    /**
42
+     * 人均查获数量
43
+     */
44
+    private BigDecimal avgSeizureCount;
45
+
46
+    /**
47
+     * 资质等级
48
+     */
49
+    private String qualificationLevel;
50
+
51
+    /**
52
+     * 人均出勤天数
53
+     */
54
+    private BigDecimal avgWorkingDays;
55
+
56
+    /**
57
+     * 人均上岗时长
58
+     */
59
+    private BigDecimal avgWorkingHours;
60
+
61
+    /**
62
+     * 学习成长平均分
63
+     */
64
+    private BigDecimal learningGrowthScore;
65
+
66
+    /**
67
+     * 工作风格
68
+     */
69
+    private String workingStyle;
70
+
71
+    /**
72
+     * 主观印象
73
+     */
74
+    private String subjectiveImpression;
75
+
76
+    /**
77
+     * 工作年限
78
+     */
79
+    private BigDecimal workYears;
80
+
81
+}

+ 31 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/SysLargeScreenWorkingPortraitDto.java

@@ -0,0 +1,31 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import lombok.Data;
4
+
5
+import java.math.BigDecimal;
6
+
7
+/**
8
+ * 工作画像-总体概览
9
+ *
10
+ * @author ruoyi
11
+ * @date 2025-09-07
12
+ */
13
+@Data
14
+public class SysLargeScreenWorkingPortraitDto {
15
+
16
+    /**
17
+     * 人均在岗时长
18
+     */
19
+    private BigDecimal avgWorkingHours;
20
+
21
+    /**
22
+     * 工作产出
23
+     */
24
+    private BigDecimal workOutput;
25
+
26
+    /**
27
+     * 管理推动
28
+     */
29
+    private BigDecimal managementPromotion;
30
+
31
+}

+ 79 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/TreeEntity.java

@@ -0,0 +1,79 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import java.util.ArrayList;
4
+import java.util.List;
5
+
6
+/**
7
+ * Tree基类
8
+ * 
9
+ * @author ruoyi
10
+ */
11
+public class TreeEntity extends BaseEntity
12
+{
13
+    private static final long serialVersionUID = 1L;
14
+
15
+    /** 父菜单名称 */
16
+    private String parentName;
17
+
18
+    /** 父菜单ID */
19
+    private Long parentId;
20
+
21
+    /** 显示顺序 */
22
+    private Integer orderNum;
23
+
24
+    /** 祖级列表 */
25
+    private String ancestors;
26
+
27
+    /** 子部门 */
28
+    private List<?> children = new ArrayList<>();
29
+
30
+    public String getParentName()
31
+    {
32
+        return parentName;
33
+    }
34
+
35
+    public void setParentName(String parentName)
36
+    {
37
+        this.parentName = parentName;
38
+    }
39
+
40
+    public Long getParentId()
41
+    {
42
+        return parentId;
43
+    }
44
+
45
+    public void setParentId(Long parentId)
46
+    {
47
+        this.parentId = parentId;
48
+    }
49
+
50
+    public Integer getOrderNum()
51
+    {
52
+        return orderNum;
53
+    }
54
+
55
+    public void setOrderNum(Integer orderNum)
56
+    {
57
+        this.orderNum = orderNum;
58
+    }
59
+
60
+    public String getAncestors()
61
+    {
62
+        return ancestors;
63
+    }
64
+
65
+    public void setAncestors(String ancestors)
66
+    {
67
+        this.ancestors = ancestors;
68
+    }
69
+
70
+    public List<?> getChildren()
71
+    {
72
+        return children;
73
+    }
74
+
75
+    public void setChildren(List<?> children)
76
+    {
77
+        this.children = children;
78
+    }
79
+}

+ 63 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/TreeQuery.java

@@ -0,0 +1,63 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import java.io.Serializable;
4
+
5
+/**
6
+ * TreeQuery树结构实体类
7
+ * 
8
+ * @author ruoyi
9
+ */
10
+public class TreeQuery implements Serializable
11
+{
12
+    private static final long serialVersionUID = 1L;
13
+
14
+    /** 节点ID */
15
+    private Long id;
16
+
17
+    /** 节点名称 */
18
+    private String label;
19
+
20
+    /** 树结构类型 */
21
+    private String treeType;
22
+
23
+    /** 最大层级 */
24
+    private Integer maxLevel;
25
+
26
+
27
+
28
+    public Long getId()
29
+    {
30
+        return id;
31
+    }
32
+
33
+    public void setId(Long id)
34
+    {
35
+        this.id = id;
36
+    }
37
+
38
+    public String getLabel()
39
+    {
40
+        return label;
41
+    }
42
+
43
+    public void setLabel(String label)
44
+    {
45
+        this.label = label;
46
+    }
47
+
48
+    public String getTreeType() {
49
+        return treeType;
50
+    }
51
+
52
+    public void setTreeType(String treeType) {
53
+        this.treeType = treeType;
54
+    }
55
+
56
+    public Integer getMaxLevel() {
57
+        return maxLevel;
58
+    }
59
+
60
+    public void setMaxLevel(Integer maxLevel) {
61
+        this.maxLevel = maxLevel;
62
+    }
63
+}

+ 136 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/TreeSelect.java

@@ -0,0 +1,136 @@
1
+package com.sundot.airport.common.core.domain;
2
+
3
+import java.io.Serializable;
4
+import java.util.List;
5
+import java.util.stream.Collectors;
6
+import com.fasterxml.jackson.annotation.JsonInclude;
7
+import com.sundot.airport.common.constant.UserConstants;
8
+import com.sundot.airport.common.core.domain.entity.SysDept;
9
+import com.sundot.airport.common.core.domain.entity.SysMenu;
10
+import com.sundot.airport.common.utils.StringUtils;
11
+
12
+/**
13
+ * Treeselect树结构实体类
14
+ * 
15
+ * @author ruoyi
16
+ */
17
+public class TreeSelect implements Serializable
18
+{
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /** 节点ID */
22
+    private Long id;
23
+
24
+    /** 节点名称 */
25
+    private String label;
26
+
27
+    /** 节点code */
28
+    private String code;
29
+
30
+    /** 节点禁用 */
31
+    private boolean disabled = false;
32
+
33
+    /** 上级 */
34
+    private Long parentId;
35
+
36
+    /**
37
+     * 部门类型
38
+     */
39
+    private String deptType;
40
+
41
+    /** 子节点 */
42
+    @JsonInclude(JsonInclude.Include.NON_EMPTY)
43
+    private List<TreeSelect> children;
44
+
45
+    public TreeSelect()
46
+    {
47
+
48
+    }
49
+
50
+    public TreeSelect(Long id,String code,String label,Long parentId)
51
+    {
52
+        this.id = id;
53
+        this.code = code;
54
+        this.label = label;
55
+        this.parentId = parentId;
56
+    }
57
+
58
+    public TreeSelect(SysDept dept)
59
+    {
60
+        this.id = dept.getDeptId();
61
+        this.label = dept.getDeptName();
62
+        this.deptType = dept.getDeptType();
63
+        this.disabled = StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus());
64
+        this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
65
+    }
66
+
67
+    public TreeSelect(SysMenu menu)
68
+    {
69
+        this.id = menu.getMenuId();
70
+        this.label = menu.getMenuName();
71
+        this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
72
+    }
73
+
74
+    public Long getId()
75
+    {
76
+        return id;
77
+    }
78
+
79
+    public void setId(Long id)
80
+    {
81
+        this.id = id;
82
+    }
83
+
84
+    public String getLabel()
85
+    {
86
+        return label;
87
+    }
88
+
89
+    public void setLabel(String label)
90
+    {
91
+        this.label = label;
92
+    }
93
+
94
+    public String getCode() {
95
+        return code;
96
+    }
97
+
98
+    public void setCode(String code) {
99
+        this.code = code;
100
+    }
101
+
102
+    public boolean isDisabled()
103
+    {
104
+        return disabled;
105
+    }
106
+
107
+    public void setDisabled(boolean disabled)
108
+    {
109
+        this.disabled = disabled;
110
+    }
111
+
112
+    public List<TreeSelect> getChildren()
113
+    {
114
+        return children;
115
+    }
116
+
117
+    public void setChildren(List<TreeSelect> children)
118
+    {
119
+        this.children = children;
120
+    }
121
+
122
+    public Long getParentId() {
123
+        return parentId;
124
+    }
125
+
126
+    public void setParentId(Long parentId) {
127
+        this.parentId = parentId;
128
+    }
129
+    public String getDeptType() {
130
+        return deptType;
131
+    }
132
+
133
+    public void setDeptType(String deptType) {
134
+        this.deptType = deptType;
135
+    }
136
+}

+ 231 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysDept.java

@@ -0,0 +1,231 @@
1
+package com.sundot.airport.common.core.domain.entity;
2
+
3
+import java.util.ArrayList;
4
+import java.util.List;
5
+import javax.validation.constraints.Email;
6
+import javax.validation.constraints.NotBlank;
7
+import javax.validation.constraints.NotNull;
8
+import javax.validation.constraints.Size;
9
+
10
+import org.apache.commons.lang3.builder.ToStringBuilder;
11
+import org.apache.commons.lang3.builder.ToStringStyle;
12
+import com.sundot.airport.common.core.domain.BaseEntity;
13
+
14
+/**
15
+ * 部门表 sys_dept
16
+ *
17
+ * @author ruoyi
18
+ */
19
+public class SysDept extends BaseEntity {
20
+    private static final long serialVersionUID = 1L;
21
+
22
+    /**
23
+     * 部门ID
24
+     */
25
+    private Long deptId;
26
+
27
+    /**
28
+     * 父部门ID
29
+     */
30
+    private Long parentId;
31
+
32
+    /**
33
+     * 祖级列表
34
+     */
35
+    private String ancestors;
36
+
37
+    /**
38
+     * 部门名称
39
+     */
40
+    private String deptName;
41
+
42
+    /**
43
+     * 显示顺序
44
+     */
45
+    private Integer orderNum;
46
+
47
+    /**
48
+     * 负责人
49
+     */
50
+    private String leader;
51
+
52
+    /**
53
+     * 联系电话
54
+     */
55
+    private String phone;
56
+
57
+    /**
58
+     * 邮箱
59
+     */
60
+    private String email;
61
+
62
+    /**
63
+     * 部门状态:0正常,1停用
64
+     */
65
+    private String status;
66
+
67
+    /**
68
+     * 删除标志(0代表存在 2代表删除)
69
+     */
70
+    private String delFlag;
71
+
72
+    /**
73
+     * 父部门名称
74
+     */
75
+    private String parentName;
76
+
77
+    /**
78
+     * 子部门
79
+     */
80
+    private List<SysDept> children = new ArrayList<SysDept>();
81
+
82
+    /**
83
+     * 部门类型
84
+     */
85
+    private String deptType;
86
+
87
+    /**
88
+     * 部门类型名称
89
+     */
90
+    private String deptTypeDesc;
91
+
92
+    public Long getDeptId() {
93
+        return deptId;
94
+    }
95
+
96
+    public void setDeptId(Long deptId) {
97
+        this.deptId = deptId;
98
+    }
99
+
100
+    public Long getParentId() {
101
+        return parentId;
102
+    }
103
+
104
+    public void setParentId(Long parentId) {
105
+        this.parentId = parentId;
106
+    }
107
+
108
+    public String getAncestors() {
109
+        return ancestors;
110
+    }
111
+
112
+    public void setAncestors(String ancestors) {
113
+        this.ancestors = ancestors;
114
+    }
115
+
116
+    @NotBlank(message = "部门名称不能为空")
117
+    @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
118
+    public String getDeptName() {
119
+        return deptName;
120
+    }
121
+
122
+    public void setDeptName(String deptName) {
123
+        this.deptName = deptName;
124
+    }
125
+
126
+    @NotNull(message = "显示顺序不能为空")
127
+    public Integer getOrderNum() {
128
+        return orderNum;
129
+    }
130
+
131
+    public void setOrderNum(Integer orderNum) {
132
+        this.orderNum = orderNum;
133
+    }
134
+
135
+    public String getLeader() {
136
+        return leader;
137
+    }
138
+
139
+    public void setLeader(String leader) {
140
+        this.leader = leader;
141
+    }
142
+
143
+    @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
144
+    public String getPhone() {
145
+        return phone;
146
+    }
147
+
148
+    public void setPhone(String phone) {
149
+        this.phone = phone;
150
+    }
151
+
152
+    @Email(message = "邮箱格式不正确")
153
+    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
154
+    public String getEmail() {
155
+        return email;
156
+    }
157
+
158
+    public void setEmail(String email) {
159
+        this.email = email;
160
+    }
161
+
162
+    public String getStatus() {
163
+        return status;
164
+    }
165
+
166
+    public void setStatus(String status) {
167
+        this.status = status;
168
+    }
169
+
170
+    public String getDelFlag() {
171
+        return delFlag;
172
+    }
173
+
174
+    public void setDelFlag(String delFlag) {
175
+        this.delFlag = delFlag;
176
+    }
177
+
178
+    public String getParentName() {
179
+        return parentName;
180
+    }
181
+
182
+    public void setParentName(String parentName) {
183
+        this.parentName = parentName;
184
+    }
185
+
186
+    public List<SysDept> getChildren() {
187
+        return children;
188
+    }
189
+
190
+    public void setChildren(List<SysDept> children) {
191
+        this.children = children;
192
+    }
193
+
194
+    public String getDeptType() {
195
+        return deptType;
196
+    }
197
+
198
+    public void setDeptType(String deptType) {
199
+        this.deptType = deptType;
200
+    }
201
+
202
+    public String getDeptTypeDesc() {
203
+        return deptTypeDesc;
204
+    }
205
+
206
+    public void setDeptTypeDesc(String deptTypeDesc) {
207
+        this.deptTypeDesc = deptTypeDesc;
208
+    }
209
+
210
+    @Override
211
+    public String toString() {
212
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
213
+                .append("deptId", getDeptId())
214
+                .append("parentId", getParentId())
215
+                .append("ancestors", getAncestors())
216
+                .append("deptName", getDeptName())
217
+                .append("orderNum", getOrderNum())
218
+                .append("leader", getLeader())
219
+                .append("phone", getPhone())
220
+                .append("email", getEmail())
221
+                .append("status", getStatus())
222
+                .append("delFlag", getDelFlag())
223
+                .append("createBy", getCreateBy())
224
+                .append("createTime", getCreateTime())
225
+                .append("updateBy", getUpdateBy())
226
+                .append("updateTime", getUpdateTime())
227
+                .append("deptType", getDeptType())
228
+                .append("deptTypeDesc", getDeptTypeDesc())
229
+                .toString();
230
+    }
231
+}

+ 176 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysDictData.java

@@ -0,0 +1,176 @@
1
+package com.sundot.airport.common.core.domain.entity;
2
+
3
+import javax.validation.constraints.NotBlank;
4
+import javax.validation.constraints.Size;
5
+import org.apache.commons.lang3.builder.ToStringBuilder;
6
+import org.apache.commons.lang3.builder.ToStringStyle;
7
+import com.sundot.airport.common.annotation.Excel;
8
+import com.sundot.airport.common.annotation.Excel.ColumnType;
9
+import com.sundot.airport.common.constant.UserConstants;
10
+import com.sundot.airport.common.core.domain.BaseEntity;
11
+
12
+/**
13
+ * 字典数据表 sys_dict_data
14
+ * 
15
+ * @author ruoyi
16
+ */
17
+public class SysDictData extends BaseEntity
18
+{
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /** 字典编码 */
22
+    @Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
23
+    private Long dictCode;
24
+
25
+    /** 字典排序 */
26
+    @Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
27
+    private Long dictSort;
28
+
29
+    /** 字典标签 */
30
+    @Excel(name = "字典标签")
31
+    private String dictLabel;
32
+
33
+    /** 字典键值 */
34
+    @Excel(name = "字典键值")
35
+    private String dictValue;
36
+
37
+    /** 字典类型 */
38
+    @Excel(name = "字典类型")
39
+    private String dictType;
40
+
41
+    /** 样式属性(其他样式扩展) */
42
+    private String cssClass;
43
+
44
+    /** 表格字典样式 */
45
+    private String listClass;
46
+
47
+    /** 是否默认(Y是 N否) */
48
+    @Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
49
+    private String isDefault;
50
+
51
+    /** 状态(0正常 1停用) */
52
+    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
53
+    private String status;
54
+
55
+    public Long getDictCode()
56
+    {
57
+        return dictCode;
58
+    }
59
+
60
+    public void setDictCode(Long dictCode)
61
+    {
62
+        this.dictCode = dictCode;
63
+    }
64
+
65
+    public Long getDictSort()
66
+    {
67
+        return dictSort;
68
+    }
69
+
70
+    public void setDictSort(Long dictSort)
71
+    {
72
+        this.dictSort = dictSort;
73
+    }
74
+
75
+    @NotBlank(message = "字典标签不能为空")
76
+    @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
77
+    public String getDictLabel()
78
+    {
79
+        return dictLabel;
80
+    }
81
+
82
+    public void setDictLabel(String dictLabel)
83
+    {
84
+        this.dictLabel = dictLabel;
85
+    }
86
+
87
+    @NotBlank(message = "字典键值不能为空")
88
+    @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
89
+    public String getDictValue()
90
+    {
91
+        return dictValue;
92
+    }
93
+
94
+    public void setDictValue(String dictValue)
95
+    {
96
+        this.dictValue = dictValue;
97
+    }
98
+
99
+    @NotBlank(message = "字典类型不能为空")
100
+    @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
101
+    public String getDictType()
102
+    {
103
+        return dictType;
104
+    }
105
+
106
+    public void setDictType(String dictType)
107
+    {
108
+        this.dictType = dictType;
109
+    }
110
+
111
+    @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
112
+    public String getCssClass()
113
+    {
114
+        return cssClass;
115
+    }
116
+
117
+    public void setCssClass(String cssClass)
118
+    {
119
+        this.cssClass = cssClass;
120
+    }
121
+
122
+    public String getListClass()
123
+    {
124
+        return listClass;
125
+    }
126
+
127
+    public void setListClass(String listClass)
128
+    {
129
+        this.listClass = listClass;
130
+    }
131
+
132
+    public boolean getDefault()
133
+    {
134
+        return UserConstants.YES.equals(this.isDefault);
135
+    }
136
+
137
+    public String getIsDefault()
138
+    {
139
+        return isDefault;
140
+    }
141
+
142
+    public void setIsDefault(String isDefault)
143
+    {
144
+        this.isDefault = isDefault;
145
+    }
146
+
147
+    public String getStatus()
148
+    {
149
+        return status;
150
+    }
151
+
152
+    public void setStatus(String status)
153
+    {
154
+        this.status = status;
155
+    }
156
+    
157
+    @Override
158
+    public String toString() {
159
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
160
+            .append("dictCode", getDictCode())
161
+            .append("dictSort", getDictSort())
162
+            .append("dictLabel", getDictLabel())
163
+            .append("dictValue", getDictValue())
164
+            .append("dictType", getDictType())
165
+            .append("cssClass", getCssClass())
166
+            .append("listClass", getListClass())
167
+            .append("isDefault", getIsDefault())
168
+            .append("status", getStatus())
169
+            .append("createBy", getCreateBy())
170
+            .append("createTime", getCreateTime())
171
+            .append("updateBy", getUpdateBy())
172
+            .append("updateTime", getUpdateTime())
173
+            .append("remark", getRemark())
174
+            .toString();
175
+    }
176
+}

+ 96 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysDictType.java

@@ -0,0 +1,96 @@
1
+package com.sundot.airport.common.core.domain.entity;
2
+
3
+import javax.validation.constraints.NotBlank;
4
+import javax.validation.constraints.Pattern;
5
+import javax.validation.constraints.Size;
6
+import org.apache.commons.lang3.builder.ToStringBuilder;
7
+import org.apache.commons.lang3.builder.ToStringStyle;
8
+import com.sundot.airport.common.annotation.Excel;
9
+import com.sundot.airport.common.annotation.Excel.ColumnType;
10
+import com.sundot.airport.common.core.domain.BaseEntity;
11
+
12
+/**
13
+ * 字典类型表 sys_dict_type
14
+ * 
15
+ * @author ruoyi
16
+ */
17
+public class SysDictType extends BaseEntity
18
+{
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /** 字典主键 */
22
+    @Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
23
+    private Long dictId;
24
+
25
+    /** 字典名称 */
26
+    @Excel(name = "字典名称")
27
+    private String dictName;
28
+
29
+    /** 字典类型 */
30
+    @Excel(name = "字典类型")
31
+    private String dictType;
32
+
33
+    /** 状态(0正常 1停用) */
34
+    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
35
+    private String status;
36
+
37
+    public Long getDictId()
38
+    {
39
+        return dictId;
40
+    }
41
+
42
+    public void setDictId(Long dictId)
43
+    {
44
+        this.dictId = dictId;
45
+    }
46
+
47
+    @NotBlank(message = "字典名称不能为空")
48
+    @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
49
+    public String getDictName()
50
+    {
51
+        return dictName;
52
+    }
53
+
54
+    public void setDictName(String dictName)
55
+    {
56
+        this.dictName = dictName;
57
+    }
58
+
59
+    @NotBlank(message = "字典类型不能为空")
60
+    @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
61
+    @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)")
62
+    public String getDictType()
63
+    {
64
+        return dictType;
65
+    }
66
+
67
+    public void setDictType(String dictType)
68
+    {
69
+        this.dictType = dictType;
70
+    }
71
+
72
+    public String getStatus()
73
+    {
74
+        return status;
75
+    }
76
+
77
+    public void setStatus(String status)
78
+    {
79
+        this.status = status;
80
+    }
81
+    
82
+    @Override
83
+    public String toString() {
84
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
85
+            .append("dictId", getDictId())
86
+            .append("dictName", getDictName())
87
+            .append("dictType", getDictType())
88
+            .append("status", getStatus())
89
+            .append("createBy", getCreateBy())
90
+            .append("createTime", getCreateTime())
91
+            .append("updateBy", getUpdateBy())
92
+            .append("updateTime", getUpdateTime())
93
+            .append("remark", getRemark())
94
+            .toString();
95
+    }
96
+}

+ 274 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysMenu.java

@@ -0,0 +1,274 @@
1
+package com.sundot.airport.common.core.domain.entity;
2
+
3
+import java.util.ArrayList;
4
+import java.util.List;
5
+import javax.validation.constraints.NotBlank;
6
+import javax.validation.constraints.NotNull;
7
+import javax.validation.constraints.Size;
8
+
9
+import org.apache.commons.lang3.builder.ToStringBuilder;
10
+import org.apache.commons.lang3.builder.ToStringStyle;
11
+import com.sundot.airport.common.core.domain.BaseEntity;
12
+
13
+/**
14
+ * 菜单权限表 sys_menu
15
+ *
16
+ * @author ruoyi
17
+ */
18
+public class SysMenu extends BaseEntity {
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /**
22
+     * 菜单ID
23
+     */
24
+    private Long menuId;
25
+
26
+    /**
27
+     * 菜单名称
28
+     */
29
+    private String menuName;
30
+
31
+    /**
32
+     * 父菜单名称
33
+     */
34
+    private String parentName;
35
+
36
+    /**
37
+     * 父菜单ID
38
+     */
39
+    private Long parentId;
40
+
41
+    /**
42
+     * 显示顺序
43
+     */
44
+    private Integer orderNum;
45
+
46
+    /**
47
+     * 路由地址
48
+     */
49
+    private String path;
50
+
51
+    /**
52
+     * 组件路径
53
+     */
54
+    private String component;
55
+
56
+    /**
57
+     * 路由参数
58
+     */
59
+    private String query;
60
+
61
+    /**
62
+     * 路由名称,默认和路由地址相同的驼峰格式(注意:因为vue3版本的router会删除名称相同路由,为避免名字的冲突,特殊情况可以自定义)
63
+     */
64
+    private String routeName;
65
+
66
+    /**
67
+     * 是否为外链(0是 1否)
68
+     */
69
+    private String isFrame;
70
+
71
+    /**
72
+     * 是否缓存(0缓存 1不缓存)
73
+     */
74
+    private String isCache;
75
+
76
+    /**
77
+     * 类型(M目录 C菜单 F按钮)
78
+     */
79
+    private String menuType;
80
+
81
+    /**
82
+     * 显示状态(0显示 1隐藏)
83
+     */
84
+    private String visible;
85
+
86
+    /**
87
+     * 菜单状态(0正常 1停用)
88
+     */
89
+    private String status;
90
+
91
+    /**
92
+     * 权限字符串
93
+     */
94
+    private String perms;
95
+
96
+    /**
97
+     * 菜单图标
98
+     */
99
+    private String icon;
100
+
101
+    /**
102
+     * 子菜单
103
+     */
104
+    private List<SysMenu> children = new ArrayList<SysMenu>();
105
+
106
+    public Long getMenuId() {
107
+        return menuId;
108
+    }
109
+
110
+    public void setMenuId(Long menuId) {
111
+        this.menuId = menuId;
112
+    }
113
+
114
+    @NotBlank(message = "菜单名称不能为空")
115
+    @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
116
+    public String getMenuName() {
117
+        return menuName;
118
+    }
119
+
120
+    public void setMenuName(String menuName) {
121
+        this.menuName = menuName;
122
+    }
123
+
124
+    public String getParentName() {
125
+        return parentName;
126
+    }
127
+
128
+    public void setParentName(String parentName) {
129
+        this.parentName = parentName;
130
+    }
131
+
132
+    public Long getParentId() {
133
+        return parentId;
134
+    }
135
+
136
+    public void setParentId(Long parentId) {
137
+        this.parentId = parentId;
138
+    }
139
+
140
+    @NotNull(message = "显示顺序不能为空")
141
+    public Integer getOrderNum() {
142
+        return orderNum;
143
+    }
144
+
145
+    public void setOrderNum(Integer orderNum) {
146
+        this.orderNum = orderNum;
147
+    }
148
+
149
+    @Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
150
+    public String getPath() {
151
+        return path;
152
+    }
153
+
154
+    public void setPath(String path) {
155
+        this.path = path;
156
+    }
157
+
158
+    @Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
159
+    public String getComponent() {
160
+        return component;
161
+    }
162
+
163
+    public void setComponent(String component) {
164
+        this.component = component;
165
+    }
166
+
167
+    public String getQuery() {
168
+        return query;
169
+    }
170
+
171
+    public void setQuery(String query) {
172
+        this.query = query;
173
+    }
174
+
175
+    public String getRouteName() {
176
+        return routeName;
177
+    }
178
+
179
+    public void setRouteName(String routeName) {
180
+        this.routeName = routeName;
181
+    }
182
+
183
+    public String getIsFrame() {
184
+        return isFrame;
185
+    }
186
+
187
+    public void setIsFrame(String isFrame) {
188
+        this.isFrame = isFrame;
189
+    }
190
+
191
+    public String getIsCache() {
192
+        return isCache;
193
+    }
194
+
195
+    public void setIsCache(String isCache) {
196
+        this.isCache = isCache;
197
+    }
198
+
199
+    @NotBlank(message = "菜单类型不能为空")
200
+    public String getMenuType() {
201
+        return menuType;
202
+    }
203
+
204
+    public void setMenuType(String menuType) {
205
+        this.menuType = menuType;
206
+    }
207
+
208
+    public String getVisible() {
209
+        return visible;
210
+    }
211
+
212
+    public void setVisible(String visible) {
213
+        this.visible = visible;
214
+    }
215
+
216
+    public String getStatus() {
217
+        return status;
218
+    }
219
+
220
+    public void setStatus(String status) {
221
+        this.status = status;
222
+    }
223
+
224
+    @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
225
+    public String getPerms() {
226
+        return perms;
227
+    }
228
+
229
+    public void setPerms(String perms) {
230
+        this.perms = perms;
231
+    }
232
+
233
+    public String getIcon() {
234
+        return icon;
235
+    }
236
+
237
+    public void setIcon(String icon) {
238
+        this.icon = icon;
239
+    }
240
+
241
+    public List<SysMenu> getChildren() {
242
+        return children;
243
+    }
244
+
245
+    public void setChildren(List<SysMenu> children) {
246
+        this.children = children;
247
+    }
248
+
249
+    @Override
250
+    public String toString() {
251
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
252
+                .append("menuId", getMenuId())
253
+                .append("menuName", getMenuName())
254
+                .append("parentId", getParentId())
255
+                .append("orderNum", getOrderNum())
256
+                .append("path", getPath())
257
+                .append("component", getComponent())
258
+                .append("query", getQuery())
259
+                .append("routeName", getRouteName())
260
+                .append("isFrame", getIsFrame())
261
+                .append("IsCache", getIsCache())
262
+                .append("menuType", getMenuType())
263
+                .append("visible", getVisible())
264
+                .append("status ", getStatus())
265
+                .append("perms", getPerms())
266
+                .append("icon", getIcon())
267
+                .append("createBy", getCreateBy())
268
+                .append("createTime", getCreateTime())
269
+                .append("updateBy", getUpdateBy())
270
+                .append("updateTime", getUpdateTime())
271
+                .append("remark", getRemark())
272
+                .toString();
273
+    }
274
+}

+ 265 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysRole.java

@@ -0,0 +1,265 @@
1
+package com.sundot.airport.common.core.domain.entity;
2
+
3
+import java.util.Set;
4
+import javax.validation.constraints.NotBlank;
5
+import javax.validation.constraints.NotNull;
6
+import javax.validation.constraints.Size;
7
+
8
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
9
+import org.apache.commons.lang3.builder.ToStringBuilder;
10
+import org.apache.commons.lang3.builder.ToStringStyle;
11
+import com.sundot.airport.common.annotation.Excel;
12
+import com.sundot.airport.common.annotation.Excel.ColumnType;
13
+import com.sundot.airport.common.core.domain.BaseEntity;
14
+
15
+/**
16
+ * 角色表 sys_role
17
+ *
18
+ * @author ruoyi
19
+ */
20
+@JsonIgnoreProperties(ignoreUnknown = true)
21
+public class SysRole extends BaseEntity {
22
+    private static final long serialVersionUID = 1L;
23
+
24
+    /**
25
+     * 角色ID
26
+     */
27
+    @Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
28
+    private Long roleId;
29
+
30
+    /**
31
+     * 角色名称
32
+     */
33
+    @Excel(name = "角色名称")
34
+    private String roleName;
35
+
36
+    /**
37
+     * 角色权限
38
+     */
39
+    @Excel(name = "角色权限")
40
+    private String roleKey;
41
+
42
+    /**
43
+     * 角色排序
44
+     */
45
+    @Excel(name = "角色排序")
46
+    private Integer roleSort;
47
+
48
+    /**
49
+     * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
50
+     */
51
+    @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
52
+    private String dataScope;
53
+
54
+    /**
55
+     * 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)
56
+     */
57
+    private boolean menuCheckStrictly;
58
+
59
+    /**
60
+     * 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )
61
+     */
62
+    private boolean deptCheckStrictly;
63
+
64
+    /**
65
+     * 角色状态(0正常 1停用)
66
+     */
67
+    @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
68
+    private String status;
69
+
70
+    /**
71
+     * 删除标志(0代表存在 2代表删除)
72
+     */
73
+    private String delFlag;
74
+
75
+    /**
76
+     * 用户是否存在此角色标识 默认不存在
77
+     */
78
+    private boolean flag = false;
79
+
80
+    /**
81
+     * 菜单组
82
+     */
83
+    private Long[] menuIds;
84
+
85
+    /**
86
+     * 部门组(数据权限)
87
+     */
88
+    private Long[] deptIds;
89
+
90
+    /**
91
+     * 角色菜单权限
92
+     */
93
+    private Set<String> permissions;
94
+
95
+    /**
96
+     * 非首页应用组
97
+     */
98
+    private Long[] appIds;
99
+
100
+    /**
101
+     * 首页应用组
102
+     */
103
+    private Long[] homePageAppIds;
104
+
105
+    public SysRole() {
106
+
107
+    }
108
+
109
+    public SysRole(Long roleId) {
110
+        this.roleId = roleId;
111
+    }
112
+
113
+    public Long getRoleId() {
114
+        return roleId;
115
+    }
116
+
117
+    public void setRoleId(Long roleId) {
118
+        this.roleId = roleId;
119
+    }
120
+
121
+    public boolean isAdmin() {
122
+        return isAdmin(this.roleId);
123
+    }
124
+
125
+    public static boolean isAdmin(Long roleId) {
126
+        return roleId != null && 1L == roleId;
127
+    }
128
+
129
+    @NotBlank(message = "角色名称不能为空")
130
+    @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
131
+    public String getRoleName() {
132
+        return roleName;
133
+    }
134
+
135
+    public void setRoleName(String roleName) {
136
+        this.roleName = roleName;
137
+    }
138
+
139
+    @NotBlank(message = "权限字符不能为空")
140
+    @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
141
+    public String getRoleKey() {
142
+        return roleKey;
143
+    }
144
+
145
+    public void setRoleKey(String roleKey) {
146
+        this.roleKey = roleKey;
147
+    }
148
+
149
+    @NotNull(message = "显示顺序不能为空")
150
+    public Integer getRoleSort() {
151
+        return roleSort;
152
+    }
153
+
154
+    public void setRoleSort(Integer roleSort) {
155
+        this.roleSort = roleSort;
156
+    }
157
+
158
+    public String getDataScope() {
159
+        return dataScope;
160
+    }
161
+
162
+    public void setDataScope(String dataScope) {
163
+        this.dataScope = dataScope;
164
+    }
165
+
166
+    public boolean isMenuCheckStrictly() {
167
+        return menuCheckStrictly;
168
+    }
169
+
170
+    public void setMenuCheckStrictly(boolean menuCheckStrictly) {
171
+        this.menuCheckStrictly = menuCheckStrictly;
172
+    }
173
+
174
+    public boolean isDeptCheckStrictly() {
175
+        return deptCheckStrictly;
176
+    }
177
+
178
+    public void setDeptCheckStrictly(boolean deptCheckStrictly) {
179
+        this.deptCheckStrictly = deptCheckStrictly;
180
+    }
181
+
182
+    public String getStatus() {
183
+        return status;
184
+    }
185
+
186
+    public void setStatus(String status) {
187
+        this.status = status;
188
+    }
189
+
190
+    public String getDelFlag() {
191
+        return delFlag;
192
+    }
193
+
194
+    public void setDelFlag(String delFlag) {
195
+        this.delFlag = delFlag;
196
+    }
197
+
198
+    public boolean isFlag() {
199
+        return flag;
200
+    }
201
+
202
+    public void setFlag(boolean flag) {
203
+        this.flag = flag;
204
+    }
205
+
206
+    public Long[] getMenuIds() {
207
+        return menuIds;
208
+    }
209
+
210
+    public void setMenuIds(Long[] menuIds) {
211
+        this.menuIds = menuIds;
212
+    }
213
+
214
+    public Long[] getDeptIds() {
215
+        return deptIds;
216
+    }
217
+
218
+    public void setDeptIds(Long[] deptIds) {
219
+        this.deptIds = deptIds;
220
+    }
221
+
222
+    public Set<String> getPermissions() {
223
+        return permissions;
224
+    }
225
+
226
+    public void setPermissions(Set<String> permissions) {
227
+        this.permissions = permissions;
228
+    }
229
+
230
+    public Long[] getAppIds() {
231
+        return appIds;
232
+    }
233
+
234
+    public void setAppIds(Long[] appIds) {
235
+        this.appIds = appIds;
236
+    }
237
+
238
+    public Long[] getHomePageAppIds() {
239
+        return homePageAppIds;
240
+    }
241
+
242
+    public void setHomePageAppIds(Long[] homePageAppIds) {
243
+        this.homePageAppIds = homePageAppIds;
244
+    }
245
+
246
+    @Override
247
+    public String toString() {
248
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
249
+                .append("roleId", getRoleId())
250
+                .append("roleName", getRoleName())
251
+                .append("roleKey", getRoleKey())
252
+                .append("roleSort", getRoleSort())
253
+                .append("dataScope", getDataScope())
254
+                .append("menuCheckStrictly", isMenuCheckStrictly())
255
+                .append("deptCheckStrictly", isDeptCheckStrictly())
256
+                .append("status", getStatus())
257
+                .append("delFlag", getDelFlag())
258
+                .append("createBy", getCreateBy())
259
+                .append("createTime", getCreateTime())
260
+                .append("updateBy", getUpdateBy())
261
+                .append("updateTime", getUpdateTime())
262
+                .append("remark", getRemark())
263
+                .toString();
264
+    }
265
+}

Fichier diff supprimé car celui-ci est trop grand
+ 919 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysUser.java


+ 69 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/model/LoginBody.java

@@ -0,0 +1,69 @@
1
+package com.sundot.airport.common.core.domain.model;
2
+
3
+/**
4
+ * 用户登录对象
5
+ * 
6
+ * @author ruoyi
7
+ */
8
+public class LoginBody
9
+{
10
+    /**
11
+     * 用户名
12
+     */
13
+    private String username;
14
+
15
+    /**
16
+     * 用户密码
17
+     */
18
+    private String password;
19
+
20
+    /**
21
+     * 验证码
22
+     */
23
+    private String code;
24
+
25
+    /**
26
+     * 唯一标识
27
+     */
28
+    private String uuid;
29
+
30
+    public String getUsername()
31
+    {
32
+        return username;
33
+    }
34
+
35
+    public void setUsername(String username)
36
+    {
37
+        this.username = username;
38
+    }
39
+
40
+    public String getPassword()
41
+    {
42
+        return password;
43
+    }
44
+
45
+    public void setPassword(String password)
46
+    {
47
+        this.password = password;
48
+    }
49
+
50
+    public String getCode()
51
+    {
52
+        return code;
53
+    }
54
+
55
+    public void setCode(String code)
56
+    {
57
+        this.code = code;
58
+    }
59
+
60
+    public String getUuid()
61
+    {
62
+        return uuid;
63
+    }
64
+
65
+    public void setUuid(String uuid)
66
+    {
67
+        this.uuid = uuid;
68
+    }
69
+}

+ 266 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/model/LoginUser.java

@@ -0,0 +1,266 @@
1
+package com.sundot.airport.common.core.domain.model;
2
+
3
+import com.alibaba.fastjson2.annotation.JSONField;
4
+import com.sundot.airport.common.core.domain.entity.SysUser;
5
+import org.springframework.security.core.GrantedAuthority;
6
+import org.springframework.security.core.userdetails.UserDetails;
7
+import java.util.Collection;
8
+import java.util.Set;
9
+
10
+/**
11
+ * 登录用户身份权限
12
+ * 
13
+ * @author ruoyi
14
+ */
15
+public class LoginUser implements UserDetails
16
+{
17
+    private static final long serialVersionUID = 1L;
18
+
19
+    /**
20
+     * 用户ID
21
+     */
22
+    private Long userId;
23
+
24
+    /**
25
+     * 部门ID
26
+     */
27
+    private Long deptId;
28
+
29
+    /**
30
+     * 用户唯一标识
31
+     */
32
+    private String token;
33
+
34
+    /**
35
+     * 登录时间
36
+     */
37
+    private Long loginTime;
38
+
39
+    /**
40
+     * 过期时间
41
+     */
42
+    private Long expireTime;
43
+
44
+    /**
45
+     * 登录IP地址
46
+     */
47
+    private String ipaddr;
48
+
49
+    /**
50
+     * 登录地点
51
+     */
52
+    private String loginLocation;
53
+
54
+    /**
55
+     * 浏览器类型
56
+     */
57
+    private String browser;
58
+
59
+    /**
60
+     * 操作系统
61
+     */
62
+    private String os;
63
+
64
+    /**
65
+     * 权限列表
66
+     */
67
+    private Set<String> permissions;
68
+
69
+    /**
70
+     * 用户信息
71
+     */
72
+    private SysUser user;
73
+
74
+    public LoginUser()
75
+    {
76
+    }
77
+
78
+    public LoginUser(SysUser user, Set<String> permissions)
79
+    {
80
+        this.user = user;
81
+        this.permissions = permissions;
82
+    }
83
+
84
+    public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions)
85
+    {
86
+        this.userId = userId;
87
+        this.deptId = deptId;
88
+        this.user = user;
89
+        this.permissions = permissions;
90
+    }
91
+
92
+    public Long getUserId()
93
+    {
94
+        return userId;
95
+    }
96
+
97
+    public void setUserId(Long userId)
98
+    {
99
+        this.userId = userId;
100
+    }
101
+
102
+    public Long getDeptId()
103
+    {
104
+        return deptId;
105
+    }
106
+
107
+    public void setDeptId(Long deptId)
108
+    {
109
+        this.deptId = deptId;
110
+    }
111
+
112
+    public String getToken()
113
+    {
114
+        return token;
115
+    }
116
+
117
+    public void setToken(String token)
118
+    {
119
+        this.token = token;
120
+    }
121
+
122
+    @JSONField(serialize = false)
123
+    @Override
124
+    public String getPassword()
125
+    {
126
+        return user.getPassword();
127
+    }
128
+
129
+    @Override
130
+    public String getUsername()
131
+    {
132
+        return user.getUserName();
133
+    }
134
+
135
+    /**
136
+     * 账户是否未过期,过期无法验证
137
+     */
138
+    @JSONField(serialize = false)
139
+    @Override
140
+    public boolean isAccountNonExpired()
141
+    {
142
+        return true;
143
+    }
144
+
145
+    /**
146
+     * 指定用户是否解锁,锁定的用户无法进行身份验证
147
+     * 
148
+     * @return
149
+     */
150
+    @JSONField(serialize = false)
151
+    @Override
152
+    public boolean isAccountNonLocked()
153
+    {
154
+        return true;
155
+    }
156
+
157
+    /**
158
+     * 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
159
+     * 
160
+     * @return
161
+     */
162
+    @JSONField(serialize = false)
163
+    @Override
164
+    public boolean isCredentialsNonExpired()
165
+    {
166
+        return true;
167
+    }
168
+
169
+    /**
170
+     * 是否可用 ,禁用的用户不能身份验证
171
+     * 
172
+     * @return
173
+     */
174
+    @JSONField(serialize = false)
175
+    @Override
176
+    public boolean isEnabled()
177
+    {
178
+        return true;
179
+    }
180
+
181
+    public Long getLoginTime()
182
+    {
183
+        return loginTime;
184
+    }
185
+
186
+    public void setLoginTime(Long loginTime)
187
+    {
188
+        this.loginTime = loginTime;
189
+    }
190
+
191
+    public String getIpaddr()
192
+    {
193
+        return ipaddr;
194
+    }
195
+
196
+    public void setIpaddr(String ipaddr)
197
+    {
198
+        this.ipaddr = ipaddr;
199
+    }
200
+
201
+    public String getLoginLocation()
202
+    {
203
+        return loginLocation;
204
+    }
205
+
206
+    public void setLoginLocation(String loginLocation)
207
+    {
208
+        this.loginLocation = loginLocation;
209
+    }
210
+
211
+    public String getBrowser()
212
+    {
213
+        return browser;
214
+    }
215
+
216
+    public void setBrowser(String browser)
217
+    {
218
+        this.browser = browser;
219
+    }
220
+
221
+    public String getOs()
222
+    {
223
+        return os;
224
+    }
225
+
226
+    public void setOs(String os)
227
+    {
228
+        this.os = os;
229
+    }
230
+
231
+    public Long getExpireTime()
232
+    {
233
+        return expireTime;
234
+    }
235
+
236
+    public void setExpireTime(Long expireTime)
237
+    {
238
+        this.expireTime = expireTime;
239
+    }
240
+
241
+    public Set<String> getPermissions()
242
+    {
243
+        return permissions;
244
+    }
245
+
246
+    public void setPermissions(Set<String> permissions)
247
+    {
248
+        this.permissions = permissions;
249
+    }
250
+
251
+    public SysUser getUser()
252
+    {
253
+        return user;
254
+    }
255
+
256
+    public void setUser(SysUser user)
257
+    {
258
+        this.user = user;
259
+    }
260
+
261
+    @Override
262
+    public Collection<? extends GrantedAuthority> getAuthorities()
263
+    {
264
+        return null;
265
+    }
266
+}

+ 11 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/model/RegisterBody.java

@@ -0,0 +1,11 @@
1
+package com.sundot.airport.common.core.domain.model;
2
+
3
+/**
4
+ * 用户注册对象
5
+ * 
6
+ * @author ruoyi
7
+ */
8
+public class RegisterBody extends LoginBody
9
+{
10
+
11
+}

+ 101 - 0
airport-common/src/main/java/com/sundot/airport/common/core/page/PageDomain.java

@@ -0,0 +1,101 @@
1
+package com.sundot.airport.common.core.page;
2
+
3
+import com.sundot.airport.common.utils.StringUtils;
4
+
5
+/**
6
+ * 分页数据
7
+ * 
8
+ * @author ruoyi
9
+ */
10
+public class PageDomain
11
+{
12
+    /** 当前记录起始索引 */
13
+    private Integer pageNum;
14
+
15
+    /** 每页显示记录数 */
16
+    private Integer pageSize;
17
+
18
+    /** 排序列 */
19
+    private String orderByColumn;
20
+
21
+    /** 排序的方向desc或者asc */
22
+    private String isAsc = "asc";
23
+
24
+    /** 分页参数合理化 */
25
+    private Boolean reasonable = true;
26
+
27
+    public String getOrderBy()
28
+    {
29
+        if (StringUtils.isEmpty(orderByColumn))
30
+        {
31
+            return "";
32
+        }
33
+        return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
34
+    }
35
+
36
+    public Integer getPageNum()
37
+    {
38
+        return pageNum;
39
+    }
40
+
41
+    public void setPageNum(Integer pageNum)
42
+    {
43
+        this.pageNum = pageNum;
44
+    }
45
+
46
+    public Integer getPageSize()
47
+    {
48
+        return pageSize;
49
+    }
50
+
51
+    public void setPageSize(Integer pageSize)
52
+    {
53
+        this.pageSize = pageSize;
54
+    }
55
+
56
+    public String getOrderByColumn()
57
+    {
58
+        return orderByColumn;
59
+    }
60
+
61
+    public void setOrderByColumn(String orderByColumn)
62
+    {
63
+        this.orderByColumn = orderByColumn;
64
+    }
65
+
66
+    public String getIsAsc()
67
+    {
68
+        return isAsc;
69
+    }
70
+
71
+    public void setIsAsc(String isAsc)
72
+    {
73
+        if (StringUtils.isNotEmpty(isAsc))
74
+        {
75
+            // 兼容前端排序类型
76
+            if ("ascending".equals(isAsc))
77
+            {
78
+                isAsc = "asc";
79
+            }
80
+            else if ("descending".equals(isAsc))
81
+            {
82
+                isAsc = "desc";
83
+            }
84
+            this.isAsc = isAsc;
85
+        }
86
+    }
87
+
88
+    public Boolean getReasonable()
89
+    {
90
+        if (StringUtils.isNull(reasonable))
91
+        {
92
+            return Boolean.TRUE;
93
+        }
94
+        return reasonable;
95
+    }
96
+
97
+    public void setReasonable(Boolean reasonable)
98
+    {
99
+        this.reasonable = reasonable;
100
+    }
101
+}

+ 124 - 0
airport-common/src/main/java/com/sundot/airport/common/core/page/TableDataInfo.java

@@ -0,0 +1,124 @@
1
+package com.sundot.airport.common.core.page;
2
+
3
+import java.io.Serializable;
4
+import java.util.List;
5
+
6
+/**
7
+ * 表格分页数据对象
8
+ * 
9
+ * @author ruoyi
10
+ */
11
+public class TableDataInfo implements Serializable
12
+{
13
+    private static final long serialVersionUID = 1L;
14
+
15
+    /** 总记录数 */
16
+    private long total;
17
+    
18
+    /** 当前页码 */
19
+    private int pageNum;
20
+    
21
+    /** 总页数 */
22
+    private int pages;
23
+    
24
+    /** 每页显示条数 */
25
+    private int pageSize;
26
+
27
+    /** 列表数据 */
28
+    private List<?> rows;
29
+
30
+    /** 消息状态码 */
31
+    private int code;
32
+
33
+    /** 消息内容 */
34
+    private String msg;
35
+
36
+    /**
37
+     * 表格数据对象
38
+     */
39
+    public TableDataInfo()
40
+    {
41
+    }
42
+
43
+    /**
44
+     * 分页
45
+     * 
46
+     * @param list 列表数据
47
+     * @param total 总记录数
48
+     */
49
+    public TableDataInfo(List<?> list, long total)
50
+    {
51
+        this.rows = list;
52
+        this.total = total;
53
+    }
54
+
55
+    public long getTotal()
56
+    {
57
+        return total;
58
+    }
59
+
60
+    public void setTotal(long total)
61
+    {
62
+        this.total = total;
63
+    }
64
+
65
+    public int getPageNum()
66
+    {
67
+        return pageNum;
68
+    }
69
+
70
+    public void setPageNum(int pageNum)
71
+    {
72
+        this.pageNum = pageNum;
73
+    }
74
+
75
+    public int getPages()
76
+    {
77
+        return pages;
78
+    }
79
+
80
+    public void setPages(int pages)
81
+    {
82
+        this.pages = pages;
83
+    }
84
+
85
+    public int getPageSize()
86
+    {
87
+        return pageSize;
88
+    }
89
+
90
+    public void setPageSize(int pageSize)
91
+    {
92
+        this.pageSize = pageSize;
93
+    }
94
+
95
+    public List<?> getRows()
96
+    {
97
+        return rows;
98
+    }
99
+
100
+    public void setRows(List<?> rows)
101
+    {
102
+        this.rows = rows;
103
+    }
104
+
105
+    public int getCode()
106
+    {
107
+        return code;
108
+    }
109
+
110
+    public void setCode(int code)
111
+    {
112
+        this.code = code;
113
+    }
114
+
115
+    public String getMsg()
116
+    {
117
+        return msg;
118
+    }
119
+
120
+    public void setMsg(String msg)
121
+    {
122
+        this.msg = msg;
123
+    }
124
+}

+ 56 - 0
airport-common/src/main/java/com/sundot/airport/common/core/page/TableSupport.java

@@ -0,0 +1,56 @@
1
+package com.sundot.airport.common.core.page;
2
+
3
+import com.sundot.airport.common.core.text.Convert;
4
+import com.sundot.airport.common.utils.ServletUtils;
5
+
6
+/**
7
+ * 表格数据处理
8
+ * 
9
+ * @author ruoyi
10
+ */
11
+public class TableSupport
12
+{
13
+    /**
14
+     * 当前记录起始索引
15
+     */
16
+    public static final String PAGE_NUM = "pageNum";
17
+
18
+    /**
19
+     * 每页显示记录数
20
+     */
21
+    public static final String PAGE_SIZE = "pageSize";
22
+
23
+    /**
24
+     * 排序列
25
+     */
26
+    public static final String ORDER_BY_COLUMN = "orderByColumn";
27
+
28
+    /**
29
+     * 排序的方向 "desc" 或者 "asc".
30
+     */
31
+    public static final String IS_ASC = "isAsc";
32
+
33
+    /**
34
+     * 分页参数合理化
35
+     */
36
+    public static final String REASONABLE = "reasonable";
37
+
38
+    /**
39
+     * 封装分页对象
40
+     */
41
+    public static PageDomain getPageDomain()
42
+    {
43
+        PageDomain pageDomain = new PageDomain();
44
+        pageDomain.setPageNum(Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1));
45
+        pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10));
46
+        pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN));
47
+        pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC));
48
+        pageDomain.setReasonable(ServletUtils.getParameterToBool(REASONABLE));
49
+        return pageDomain;
50
+    }
51
+
52
+    public static PageDomain buildPageRequest()
53
+    {
54
+        return getPageDomain();
55
+    }
56
+}

+ 306 - 0
airport-common/src/main/java/com/sundot/airport/common/core/redis/RedisCache.java

@@ -0,0 +1,306 @@
1
+package com.sundot.airport.common.core.redis;
2
+
3
+import java.util.Collection;
4
+import java.util.Iterator;
5
+import java.util.List;
6
+import java.util.Map;
7
+import java.util.Set;
8
+import java.util.concurrent.TimeUnit;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.data.redis.core.BoundSetOperations;
11
+import org.springframework.data.redis.core.HashOperations;
12
+import org.springframework.data.redis.core.RedisTemplate;
13
+import org.springframework.data.redis.core.ValueOperations;
14
+import org.springframework.stereotype.Component;
15
+
16
+/**
17
+ * spring redis 工具类
18
+ *
19
+ * @author ruoyi
20
+ **/
21
+@SuppressWarnings(value = { "unchecked", "rawtypes" })
22
+@Component
23
+public class RedisCache
24
+{
25
+    @Autowired
26
+    public RedisTemplate redisTemplate;
27
+
28
+    /**
29
+     * 缓存基本的对象,Integer、String、实体类等
30
+     *
31
+     * @param key 缓存的键值
32
+     * @param value 缓存的值
33
+     */
34
+    public <T> void setCacheObject(final String key, final T value)
35
+    {
36
+        redisTemplate.opsForValue().set(key, value);
37
+    }
38
+
39
+    /**
40
+     * 缓存基本的对象,Integer、String、实体类等
41
+     *
42
+     * @param key 缓存的键值
43
+     * @param value 缓存的值
44
+     * @param timeout 时间
45
+     * @param timeUnit 时间颗粒度
46
+     */
47
+    public <T> void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit)
48
+    {
49
+        redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
50
+    }
51
+
52
+    /**
53
+     * 设置有效时间
54
+     *
55
+     * @param key Redis键
56
+     * @param timeout 超时时间
57
+     * @return true=设置成功;false=设置失败
58
+     */
59
+    public boolean expire(final String key, final long timeout)
60
+    {
61
+        return expire(key, timeout, TimeUnit.SECONDS);
62
+    }
63
+
64
+    /**
65
+     * 设置有效时间
66
+     *
67
+     * @param key Redis键
68
+     * @param timeout 超时时间
69
+     * @param unit 时间单位
70
+     * @return true=设置成功;false=设置失败
71
+     */
72
+    public boolean expire(final String key, final long timeout, final TimeUnit unit)
73
+    {
74
+        return redisTemplate.expire(key, timeout, unit);
75
+    }
76
+
77
+    /**
78
+     * 获取有效时间
79
+     *
80
+     * @param key Redis键
81
+     * @return 有效时间
82
+     */
83
+    public long getExpire(final String key)
84
+    {
85
+        return redisTemplate.getExpire(key);
86
+    }
87
+
88
+    /**
89
+     * 判断 key是否存在
90
+     *
91
+     * @param key 键
92
+     * @return true 存在 false不存在
93
+     */
94
+    public Boolean hasKey(String key)
95
+    {
96
+        return redisTemplate.hasKey(key);
97
+    }
98
+
99
+    /**
100
+     * 获得缓存的基本对象。
101
+     *
102
+     * @param key 缓存键值
103
+     * @return 缓存键值对应的数据
104
+     */
105
+    public <T> T getCacheObject(final String key)
106
+    {
107
+        ValueOperations<String, T> operation = redisTemplate.opsForValue();
108
+        return operation.get(key);
109
+    }
110
+
111
+    /**
112
+     * 删除单个对象
113
+     *
114
+     * @param key
115
+     */
116
+    public boolean deleteObject(final String key)
117
+    {
118
+        return redisTemplate.delete(key);
119
+    }
120
+
121
+    /**
122
+     * 删除集合对象
123
+     *
124
+     * @param collection 多个对象
125
+     * @return
126
+     */
127
+    public boolean deleteObject(final Collection collection)
128
+    {
129
+        return redisTemplate.delete(collection) > 0;
130
+    }
131
+
132
+    /**
133
+     * 缓存List数据
134
+     *
135
+     * @param key 缓存的键值
136
+     * @param dataList 待缓存的List数据
137
+     * @return 缓存的对象
138
+     */
139
+    public <T> long setCacheList(final String key, final List<T> dataList)
140
+    {
141
+        Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
142
+        return count == null ? 0 : count;
143
+    }
144
+
145
+    /**
146
+     * 获得缓存的list对象
147
+     *
148
+     * @param key 缓存的键值
149
+     * @return 缓存键值对应的数据
150
+     */
151
+    public <T> List<T> getCacheList(final String key)
152
+    {
153
+        return redisTemplate.opsForList().range(key, 0, -1);
154
+    }
155
+
156
+    /**
157
+     * 缓存Set
158
+     *
159
+     * @param key 缓存键值
160
+     * @param dataSet 缓存的数据
161
+     * @return 缓存数据的对象
162
+     */
163
+    public <T> BoundSetOperations<String, T> setCacheSet(final String key, final Set<T> dataSet)
164
+    {
165
+        BoundSetOperations<String, T> setOperation = redisTemplate.boundSetOps(key);
166
+        Iterator<T> it = dataSet.iterator();
167
+        while (it.hasNext())
168
+        {
169
+            setOperation.add(it.next());
170
+        }
171
+        return setOperation;
172
+    }
173
+
174
+    /**
175
+     * 获得缓存的set
176
+     *
177
+     * @param key
178
+     * @return
179
+     */
180
+    public <T> Set<T> getCacheSet(final String key)
181
+    {
182
+        return redisTemplate.opsForSet().members(key);
183
+    }
184
+
185
+    /**
186
+     * 缓存Map
187
+     *
188
+     * @param key
189
+     * @param dataMap
190
+     */
191
+    public <T> void setCacheMap(final String key, final Map<String, T> dataMap)
192
+    {
193
+        if (dataMap != null) {
194
+            redisTemplate.opsForHash().putAll(key, dataMap);
195
+        }
196
+    }
197
+
198
+    /**
199
+     * 获得缓存的Map
200
+     *
201
+     * @param key
202
+     * @return
203
+     */
204
+    public <T> Map<String, T> getCacheMap(final String key)
205
+    {
206
+        return redisTemplate.opsForHash().entries(key);
207
+    }
208
+
209
+    /**
210
+     * 往Hash中存入数据
211
+     *
212
+     * @param key Redis键
213
+     * @param hKey Hash键
214
+     * @param value 值
215
+     */
216
+    public <T> void setCacheMapValue(final String key, final String hKey, final T value)
217
+    {
218
+        redisTemplate.opsForHash().put(key, hKey, value);
219
+    }
220
+
221
+    /**
222
+     * 获取Hash中的数据
223
+     *
224
+     * @param key Redis键
225
+     * @param hKey Hash键
226
+     * @return Hash中的对象
227
+     */
228
+    public <T> T getCacheMapValue(final String key, final String hKey)
229
+    {
230
+        HashOperations<String, String, T> opsForHash = redisTemplate.opsForHash();
231
+        return opsForHash.get(key, hKey);
232
+    }
233
+
234
+    /**
235
+     * 获取多个Hash中的数据
236
+     *
237
+     * @param key Redis键
238
+     * @param hKeys Hash键集合
239
+     * @return Hash对象集合
240
+     */
241
+    public <T> List<T> getMultiCacheMapValue(final String key, final Collection<Object> hKeys)
242
+    {
243
+        return redisTemplate.opsForHash().multiGet(key, hKeys);
244
+    }
245
+
246
+    /**
247
+     * 删除Hash中的某条数据
248
+     *
249
+     * @param key Redis键
250
+     * @param hKey Hash键
251
+     * @return 是否成功
252
+     */
253
+    public boolean deleteCacheMapValue(final String key, final String hKey)
254
+    {
255
+        return redisTemplate.opsForHash().delete(key, hKey) > 0;
256
+    }
257
+
258
+    /**
259
+     * 普通缓存放入
260
+     * - 如果键不存在则设置成功
261
+     *
262
+     * @param key 键
263
+     * @param value 值
264
+     * @return true成功 false失败
265
+     */
266
+    public Boolean setNX(String key, String value) {
267
+        try {
268
+            return redisTemplate.opsForValue().setIfAbsent(key, value);
269
+        } catch (Exception e) {
270
+
271
+            return false;
272
+        }
273
+    }
274
+
275
+    /**
276
+     * 普通缓存放入并设置时间
277
+     * - 如果键不存在则设置成功
278
+     *
279
+     * @param key 键
280
+     * @param value 值
281
+     * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
282
+     * @return true成功 false 失败
283
+     */
284
+    public Boolean setNX(String key, String value, long time) {
285
+        try {
286
+            if (time > 0) {
287
+                return redisTemplate.opsForValue().setIfAbsent(key, value, time, TimeUnit.SECONDS);
288
+            } else {
289
+                return setNX(key, value);
290
+            }
291
+        } catch (Exception e) {
292
+            return false;
293
+        }
294
+    }
295
+
296
+    /**
297
+     * 获得缓存的基本对象列表
298
+     *
299
+     * @param pattern 字符串前缀
300
+     * @return 对象列表
301
+     */
302
+    public Collection<String> keys(final String pattern)
303
+    {
304
+        return redisTemplate.keys(pattern);
305
+    }
306
+}

+ 94 - 0
airport-common/src/main/java/com/sundot/airport/common/core/redis/RedisSerialGenerator.java

@@ -0,0 +1,94 @@
1
+package com.sundot.airport.common.core.redis;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.data.redis.core.StringRedisTemplate;
5
+import org.springframework.stereotype.Component;
6
+
7
+import java.text.SimpleDateFormat;
8
+import java.util.Date;
9
+import java.util.concurrent.TimeUnit;
10
+
11
+/**
12
+ * Redis自增ID生成工具类
13
+ * 格式:前缀 + 日期 + 自增序列号
14
+ */
15
+@Component
16
+public class RedisSerialGenerator {
17
+
18
+    @Autowired
19
+    private StringRedisTemplate redisTemplate;
20
+
21
+    // 默认配置
22
+    private static final String DEFAULT_PREFIX = "DEFAULT";
23
+    private static final String DEFAULT_DATE_PATTERN = "yyyyMMdd";
24
+    private static final int DEFAULT_SERIAL_LENGTH = 4;
25
+    private static final int DEFAULT_EXPIRE_DAYS = 30;
26
+    private static final String REDIS_KEY_PREFIX = "serial:generator:";
27
+
28
+    /**
29
+     * 生成默认格式的序列号 (ORD + yyyyMMdd + 4位序列号)
30
+     */
31
+    public String generate() {
32
+        return generate(DEFAULT_PREFIX, DEFAULT_DATE_PATTERN, DEFAULT_SERIAL_LENGTH);
33
+    }
34
+
35
+    /**
36
+     * 生成带自定义前缀的序列号
37
+     */
38
+    public String generate(String prefix) {
39
+        return generate(prefix, DEFAULT_DATE_PATTERN, DEFAULT_SERIAL_LENGTH);
40
+    }
41
+
42
+    /**
43
+     * 生成完整自定义格式的序列号
44
+     *
45
+     * @param prefix       前缀
46
+     * @param datePattern  日期格式
47
+     * @param serialLength 序列号长度
48
+     */
49
+    public String generate(String prefix, String datePattern, int serialLength) {
50
+        String datePart = formatDate(new Date(), datePattern);
51
+        String redisKey = buildRedisKey(prefix, datePart);
52
+
53
+        // 原子性自增操作
54
+        Long sequence = redisTemplate.opsForValue().increment(redisKey);
55
+
56
+        // 如果是新创建的key,设置过期时间
57
+        if (sequence != null && sequence == 1L) {
58
+            redisTemplate.expire(redisKey, DEFAULT_EXPIRE_DAYS, TimeUnit.DAYS);
59
+        }
60
+
61
+        // 格式化序列号部分
62
+        String serialPart = String.format("%0" + serialLength + "d", sequence);
63
+
64
+        return prefix + datePart + serialPart;
65
+    }
66
+
67
+    /**
68
+     * 获取指定日期的当前序列号(不递增)
69
+     */
70
+    public Long getCurrentSequence(String prefix, Date date) {
71
+        String datePart = formatDate(date, DEFAULT_DATE_PATTERN);
72
+        String redisKey = buildRedisKey(prefix, datePart);
73
+        String value = redisTemplate.opsForValue().get(redisKey);
74
+        return value == null ? 0L : Long.parseLong(value);
75
+    }
76
+
77
+    /**
78
+     * 重置指定日期的序列号
79
+     */
80
+    public void resetSequence(String prefix, Date date) {
81
+        String datePart = formatDate(date, DEFAULT_DATE_PATTERN);
82
+        String redisKey = buildRedisKey(prefix, datePart);
83
+        redisTemplate.delete(redisKey);
84
+    }
85
+
86
+    private String formatDate(Date date, String pattern) {
87
+        return new SimpleDateFormat(pattern).format(date);
88
+    }
89
+
90
+    private String buildRedisKey(String prefix, String datePart) {
91
+        return REDIS_KEY_PREFIX + prefix + ":" + datePart;
92
+    }
93
+
94
+}

+ 86 - 0
airport-common/src/main/java/com/sundot/airport/common/core/text/CharsetKit.java

@@ -0,0 +1,86 @@
1
+package com.sundot.airport.common.core.text;
2
+
3
+import java.nio.charset.Charset;
4
+import java.nio.charset.StandardCharsets;
5
+import com.sundot.airport.common.utils.StringUtils;
6
+
7
+/**
8
+ * 字符集工具类
9
+ * 
10
+ * @author ruoyi
11
+ */
12
+public class CharsetKit
13
+{
14
+    /** ISO-8859-1 */
15
+    public static final String ISO_8859_1 = "ISO-8859-1";
16
+    /** UTF-8 */
17
+    public static final String UTF_8 = "UTF-8";
18
+    /** GBK */
19
+    public static final String GBK = "GBK";
20
+
21
+    /** ISO-8859-1 */
22
+    public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1);
23
+    /** UTF-8 */
24
+    public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8);
25
+    /** GBK */
26
+    public static final Charset CHARSET_GBK = Charset.forName(GBK);
27
+
28
+    /**
29
+     * 转换为Charset对象
30
+     * 
31
+     * @param charset 字符集,为空则返回默认字符集
32
+     * @return Charset
33
+     */
34
+    public static Charset charset(String charset)
35
+    {
36
+        return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset);
37
+    }
38
+
39
+    /**
40
+     * 转换字符串的字符集编码
41
+     * 
42
+     * @param source 字符串
43
+     * @param srcCharset 源字符集,默认ISO-8859-1
44
+     * @param destCharset 目标字符集,默认UTF-8
45
+     * @return 转换后的字符集
46
+     */
47
+    public static String convert(String source, String srcCharset, String destCharset)
48
+    {
49
+        return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset));
50
+    }
51
+
52
+    /**
53
+     * 转换字符串的字符集编码
54
+     * 
55
+     * @param source 字符串
56
+     * @param srcCharset 源字符集,默认ISO-8859-1
57
+     * @param destCharset 目标字符集,默认UTF-8
58
+     * @return 转换后的字符集
59
+     */
60
+    public static String convert(String source, Charset srcCharset, Charset destCharset)
61
+    {
62
+        if (null == srcCharset)
63
+        {
64
+            srcCharset = StandardCharsets.ISO_8859_1;
65
+        }
66
+
67
+        if (null == destCharset)
68
+        {
69
+            destCharset = StandardCharsets.UTF_8;
70
+        }
71
+
72
+        if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset))
73
+        {
74
+            return source;
75
+        }
76
+        return new String(source.getBytes(srcCharset), destCharset);
77
+    }
78
+
79
+    /**
80
+     * @return 系统字符集编码
81
+     */
82
+    public static String systemCharset()
83
+    {
84
+        return Charset.defaultCharset().name();
85
+    }
86
+}

Fichier diff supprimé car celui-ci est trop grand
+ 1018 - 0
airport-common/src/main/java/com/sundot/airport/common/core/text/Convert.java


+ 92 - 0
airport-common/src/main/java/com/sundot/airport/common/core/text/StrFormatter.java

@@ -0,0 +1,92 @@
1
+package com.sundot.airport.common.core.text;
2
+
3
+import com.sundot.airport.common.utils.StringUtils;
4
+
5
+/**
6
+ * 字符串格式化
7
+ * 
8
+ * @author ruoyi
9
+ */
10
+public class StrFormatter
11
+{
12
+    public static final String EMPTY_JSON = "{}";
13
+    public static final char C_BACKSLASH = '\\';
14
+    public static final char C_DELIM_START = '{';
15
+    public static final char C_DELIM_END = '}';
16
+
17
+    /**
18
+     * 格式化字符串<br>
19
+     * 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
20
+     * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
21
+     * 例:<br>
22
+     * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
23
+     * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
24
+     * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
25
+     * 
26
+     * @param strPattern 字符串模板
27
+     * @param argArray 参数列表
28
+     * @return 结果
29
+     */
30
+    public static String format(final String strPattern, final Object... argArray)
31
+    {
32
+        if (StringUtils.isEmpty(strPattern) || StringUtils.isEmpty(argArray))
33
+        {
34
+            return strPattern;
35
+        }
36
+        final int strPatternLength = strPattern.length();
37
+
38
+        // 初始化定义好的长度以获得更好的性能
39
+        StringBuilder sbuf = new StringBuilder(strPatternLength + 50);
40
+
41
+        int handledPosition = 0;
42
+        int delimIndex;// 占位符所在位置
43
+        for (int argIndex = 0; argIndex < argArray.length; argIndex++)
44
+        {
45
+            delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition);
46
+            if (delimIndex == -1)
47
+            {
48
+                if (handledPosition == 0)
49
+                {
50
+                    return strPattern;
51
+                }
52
+                else
53
+                { // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果
54
+                    sbuf.append(strPattern, handledPosition, strPatternLength);
55
+                    return sbuf.toString();
56
+                }
57
+            }
58
+            else
59
+            {
60
+                if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH)
61
+                {
62
+                    if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH)
63
+                    {
64
+                        // 转义符之前还有一个转义符,占位符依旧有效
65
+                        sbuf.append(strPattern, handledPosition, delimIndex - 1);
66
+                        sbuf.append(Convert.utf8Str(argArray[argIndex]));
67
+                        handledPosition = delimIndex + 2;
68
+                    }
69
+                    else
70
+                    {
71
+                        // 占位符被转义
72
+                        argIndex--;
73
+                        sbuf.append(strPattern, handledPosition, delimIndex - 1);
74
+                        sbuf.append(C_DELIM_START);
75
+                        handledPosition = delimIndex + 1;
76
+                    }
77
+                }
78
+                else
79
+                {
80
+                    // 正常占位符
81
+                    sbuf.append(strPattern, handledPosition, delimIndex);
82
+                    sbuf.append(Convert.utf8Str(argArray[argIndex]));
83
+                    handledPosition = delimIndex + 2;
84
+                }
85
+            }
86
+        }
87
+        // 加入最后一个占位符后所有的字符
88
+        sbuf.append(strPattern, handledPosition, strPattern.length());
89
+
90
+        return sbuf.toString();
91
+    }
92
+}

+ 179 - 0
airport-common/src/main/java/com/sundot/airport/common/domain/BaseAttachment.java

@@ -0,0 +1,179 @@
1
+package com.sundot.airport.common.domain;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import org.apache.commons.lang3.builder.ToStringBuilder;
7
+import org.apache.commons.lang3.builder.ToStringStyle;
8
+import com.sundot.airport.common.annotation.Excel;
9
+import com.sundot.airport.common.core.domain.BaseEntity;
10
+
11
+/**
12
+ * 附件对象 base_attachment
13
+ *
14
+ * @author ruoyi
15
+ * @date 2025-07-14
16
+ */
17
+@TableName("base_attachment")
18
+public class BaseAttachment extends BaseEntity {
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /**
22
+     * 租户号
23
+     */
24
+    private String tenantId;
25
+
26
+    /**
27
+     * 乐观锁
28
+     */
29
+    private Long revision;
30
+
31
+    /**
32
+     * 来源类型
33
+     */
34
+    @Excel(name = "来源类型")
35
+    private String sourceType;
36
+
37
+    /**
38
+     * 来源类型名称
39
+     */
40
+    @Excel(name = "来源类型名称")
41
+    private String sourceTypeName;
42
+
43
+    /**
44
+     * 来源表单ID
45
+     */
46
+    @Excel(name = "来源表单ID")
47
+    private Long sourceId;
48
+
49
+    /**
50
+     * 来源表单名称
51
+     */
52
+    @Excel(name = "来源表单名称")
53
+    private String sourceName;
54
+
55
+    /**
56
+     * 主键
57
+     */
58
+    @TableId(type = IdType.AUTO)
59
+    private Long id;
60
+
61
+    /**
62
+     * 附件ID
63
+     */
64
+    @Excel(name = "附件ID")
65
+    private String attachmentId;
66
+
67
+    /**
68
+     * 附件名称
69
+     */
70
+    @Excel(name = "附件名称")
71
+    private String attachmentName;
72
+
73
+    /**
74
+     * 附件URL
75
+     */
76
+    @Excel(name = "附件URL")
77
+    private String attachmentUrl;
78
+
79
+    public void setTenantId(String tenantId) {
80
+        this.tenantId = tenantId;
81
+    }
82
+
83
+    public String getTenantId() {
84
+        return tenantId;
85
+    }
86
+
87
+    public void setRevision(Long revision) {
88
+        this.revision = revision;
89
+    }
90
+
91
+    public Long getRevision() {
92
+        return revision;
93
+    }
94
+
95
+    public void setSourceType(String sourceType) {
96
+        this.sourceType = sourceType;
97
+    }
98
+
99
+    public String getSourceType() {
100
+        return sourceType;
101
+    }
102
+
103
+    public void setSourceTypeName(String sourceTypeName) {
104
+        this.sourceTypeName = sourceTypeName;
105
+    }
106
+
107
+    public String getSourceTypeName() {
108
+        return sourceTypeName;
109
+    }
110
+
111
+    public void setSourceId(Long sourceId) {
112
+        this.sourceId = sourceId;
113
+    }
114
+
115
+    public Long getSourceId() {
116
+        return sourceId;
117
+    }
118
+
119
+    public void setSourceName(String sourceName) {
120
+        this.sourceName = sourceName;
121
+    }
122
+
123
+    public String getSourceName() {
124
+        return sourceName;
125
+    }
126
+
127
+    public void setId(Long id) {
128
+        this.id = id;
129
+    }
130
+
131
+    public Long getId() {
132
+        return id;
133
+    }
134
+
135
+    public void setAttachmentId(String attachmentId) {
136
+        this.attachmentId = attachmentId;
137
+    }
138
+
139
+    public String getAttachmentId() {
140
+        return attachmentId;
141
+    }
142
+
143
+    public void setAttachmentName(String attachmentName) {
144
+        this.attachmentName = attachmentName;
145
+    }
146
+
147
+    public String getAttachmentName() {
148
+        return attachmentName;
149
+    }
150
+
151
+    public void setAttachmentUrl(String attachmentUrl) {
152
+        this.attachmentUrl = attachmentUrl;
153
+    }
154
+
155
+    public String getAttachmentUrl() {
156
+        return attachmentUrl;
157
+    }
158
+
159
+    @Override
160
+    public String toString() {
161
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
162
+                .append("tenantId", getTenantId())
163
+                .append("revision", getRevision())
164
+                .append("createBy", getCreateBy())
165
+                .append("createTime", getCreateTime())
166
+                .append("updateBy", getUpdateBy())
167
+                .append("updateTime", getUpdateTime())
168
+                .append("remark", getRemark())
169
+                .append("sourceType", getSourceType())
170
+                .append("sourceTypeName", getSourceTypeName())
171
+                .append("sourceId", getSourceId())
172
+                .append("sourceName", getSourceName())
173
+                .append("id", getId())
174
+                .append("attachmentId", getAttachmentId())
175
+                .append("attachmentName", getAttachmentName())
176
+                .append("attachmentUrl", getAttachmentUrl())
177
+                .toString();
178
+    }
179
+}

+ 174 - 0
airport-common/src/main/java/com/sundot/airport/common/domain/BaseRead.java

@@ -0,0 +1,174 @@
1
+package com.sundot.airport.common.domain;
2
+
3
+import org.apache.commons.lang3.builder.ToStringBuilder;
4
+import org.apache.commons.lang3.builder.ToStringStyle;
5
+import com.sundot.airport.common.annotation.Excel;
6
+import com.sundot.airport.common.core.domain.BaseEntity;
7
+
8
+/**
9
+ * 已读对象 base_read
10
+ *
11
+ * @author ruoyi
12
+ * @date 2025-09-09
13
+ */
14
+public class BaseRead extends BaseEntity {
15
+    private static final long serialVersionUID = 1L;
16
+
17
+    /**
18
+     * 租户号
19
+     */
20
+    private String tenantId;
21
+
22
+    /**
23
+     * 乐观锁
24
+     */
25
+    private Long revision;
26
+
27
+    /**
28
+     * 类型
29
+     */
30
+    @Excel(name = "类型")
31
+    private String type;
32
+
33
+    /**
34
+     * 类型描述
35
+     */
36
+    @Excel(name = "类型描述")
37
+    private String typeDesc;
38
+
39
+    /**
40
+     * 用户ID
41
+     */
42
+    @Excel(name = "用户ID")
43
+    private Long userId;
44
+
45
+    /**
46
+     * 用户名称
47
+     */
48
+    @Excel(name = "用户名称")
49
+    private String userName;
50
+
51
+    /**
52
+     * 主键
53
+     */
54
+    private Long id;
55
+
56
+    /**
57
+     * 表单ID
58
+     */
59
+    @Excel(name = "表单ID")
60
+    private Long formId;
61
+
62
+    /**
63
+     * 表单编码
64
+     */
65
+    @Excel(name = "表单编码")
66
+    private String formCode;
67
+
68
+    /**
69
+     * 表单名称
70
+     */
71
+    @Excel(name = "表单名称")
72
+    private String formName;
73
+
74
+    public void setTenantId(String tenantId) {
75
+        this.tenantId = tenantId;
76
+    }
77
+
78
+    public String getTenantId() {
79
+        return tenantId;
80
+    }
81
+
82
+    public void setRevision(Long revision) {
83
+        this.revision = revision;
84
+    }
85
+
86
+    public Long getRevision() {
87
+        return revision;
88
+    }
89
+
90
+    public void setType(String type) {
91
+        this.type = type;
92
+    }
93
+
94
+    public String getType() {
95
+        return type;
96
+    }
97
+
98
+    public void setTypeDesc(String typeDesc) {
99
+        this.typeDesc = typeDesc;
100
+    }
101
+
102
+    public String getTypeDesc() {
103
+        return typeDesc;
104
+    }
105
+
106
+    public void setUserId(Long userId) {
107
+        this.userId = userId;
108
+    }
109
+
110
+    public Long getUserId() {
111
+        return userId;
112
+    }
113
+
114
+    public void setUserName(String userName) {
115
+        this.userName = userName;
116
+    }
117
+
118
+    public String getUserName() {
119
+        return userName;
120
+    }
121
+
122
+    public void setId(Long id) {
123
+        this.id = id;
124
+    }
125
+
126
+    public Long getId() {
127
+        return id;
128
+    }
129
+
130
+    public void setFormId(Long formId) {
131
+        this.formId = formId;
132
+    }
133
+
134
+    public Long getFormId() {
135
+        return formId;
136
+    }
137
+
138
+    public void setFormCode(String formCode) {
139
+        this.formCode = formCode;
140
+    }
141
+
142
+    public String getFormCode() {
143
+        return formCode;
144
+    }
145
+
146
+    public void setFormName(String formName) {
147
+        this.formName = formName;
148
+    }
149
+
150
+    public String getFormName() {
151
+        return formName;
152
+    }
153
+
154
+    @Override
155
+    public String toString() {
156
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
157
+                .append("tenantId", getTenantId())
158
+                .append("revision", getRevision())
159
+                .append("createBy", getCreateBy())
160
+                .append("createTime", getCreateTime())
161
+                .append("updateBy", getUpdateBy())
162
+                .append("updateTime", getUpdateTime())
163
+                .append("remark", getRemark())
164
+                .append("type", getType())
165
+                .append("typeDesc", getTypeDesc())
166
+                .append("userId", getUserId())
167
+                .append("userName", getUserName())
168
+                .append("id", getId())
169
+                .append("formId", getFormId())
170
+                .append("formCode", getFormCode())
171
+                .append("formName", getFormName())
172
+                .toString();
173
+    }
174
+}

+ 0 - 0
airport-common/src/main/java/com/sundot/airport/common/domain/portrait/ApprovalDurationStats.java


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff