Browse Source

版本1.0代码

dylan 3 năm trước cách đây
mục cha
commit
73c1398525
100 tập tin đã thay đổi với 8803 bổ sung9 xóa
  1. 74 1
      pom.xml
  2. 8 0
      src/main/java/org/springblade/constant/BusinessConstant.java
  3. 93 0
      src/main/java/org/springblade/enums/EquipmentActiveEnum.java
  4. 93 0
      src/main/java/org/springblade/enums/EquipmentStatusEnum.java
  5. 96 0
      src/main/java/org/springblade/enums/OrderFromEnum.java
  6. 101 0
      src/main/java/org/springblade/enums/OrderStatusEnum.java
  7. 93 0
      src/main/java/org/springblade/enums/RtuReportStatusEnum.java
  8. 93 0
      src/main/java/org/springblade/enums/WarningActiveEnum.java
  9. 93 0
      src/main/java/org/springblade/enums/WarningStatusEnum.java
  10. 116 0
      src/main/java/org/springblade/etl/EtlTask.java
  11. 126 0
      src/main/java/org/springblade/etl/EtlTaskManager.java
  12. 84 0
      src/main/java/org/springblade/etl/EtlWarningTask.java
  13. 225 0
      src/main/java/org/springblade/etl/TestDataTask.java
  14. 169 0
      src/main/java/org/springblade/etl/TestWarnTask.java
  15. 155 0
      src/main/java/org/springblade/etl/entity/EtlWarningInfoEntity.java
  16. 22 0
      src/main/java/org/springblade/etl/mapper/EtlWarningInfoMapper.java
  17. 67 0
      src/main/java/org/springblade/etl/mapper/EtlWarningInfoMapper.xml
  18. 27 0
      src/main/java/org/springblade/etl/service/IEtlWarningService.java
  19. 29 0
      src/main/java/org/springblade/etl/service/impl/EtlWarningServiceImpl.java
  20. 352 0
      src/main/java/org/springblade/modules/business/check/order/controller/RtuCheckOrderController.java
  21. 44 0
      src/main/java/org/springblade/modules/business/check/order/dto/CheckOrderInfoDTO.java
  22. 83 0
      src/main/java/org/springblade/modules/business/check/order/entity/CheckOrderInfoEntity.java
  23. 36 0
      src/main/java/org/springblade/modules/business/check/order/mapper/RtuCheckOrderMapper.java
  24. 83 0
      src/main/java/org/springblade/modules/business/check/order/mapper/RtuCheckOrderMapper.xml
  25. 42 0
      src/main/java/org/springblade/modules/business/check/order/service/IRtuCheckOrderService.java
  26. 51 0
      src/main/java/org/springblade/modules/business/check/order/service/impl/RtuCheckOrderServiceImpl.java
  27. 85 0
      src/main/java/org/springblade/modules/business/check/order/vo/CheckOrderInfoVO.java
  28. 62 0
      src/main/java/org/springblade/modules/business/check/order/wrapper/RtuCheckOrderWrapper.java
  29. 159 0
      src/main/java/org/springblade/modules/business/check/process/controller/RtuOrderProcessController.java
  30. 317 0
      src/main/java/org/springblade/modules/business/check/process/entity/OrderProcessInfoEntity.java
  31. 27 0
      src/main/java/org/springblade/modules/business/check/process/mapper/RtuOrderProcessMapper.java
  32. 89 0
      src/main/java/org/springblade/modules/business/check/process/mapper/RtuOrderProcessMapper.xml
  33. 30 0
      src/main/java/org/springblade/modules/business/check/process/service/IRtuOrderProcessService.java
  34. 32 0
      src/main/java/org/springblade/modules/business/check/process/service/impl/RtuOrderProcessServiceImpl.java
  35. 45 0
      src/main/java/org/springblade/modules/business/check/process/vo/OrderProcessInfoVO.java
  36. 41 0
      src/main/java/org/springblade/modules/business/check/process/wrapper/RtuOrderProcessWrapper.java
  37. 843 0
      src/main/java/org/springblade/modules/business/data/manage/controller/DataManageController.java
  38. 64 0
      src/main/java/org/springblade/modules/business/data/manage/entity/RtuInfoTableDataEntity.java
  39. 32 8
      src/main/java/org/springblade/modules/business/desk/controller/NoticeController.java
  40. 112 0
      src/main/java/org/springblade/modules/business/equipment/inspection/base/controller/EquipmentInspectionController.java
  41. 49 0
      src/main/java/org/springblade/modules/business/equipment/inspection/base/entity/EquipmentInspectionInfoEntity.java
  42. 22 0
      src/main/java/org/springblade/modules/business/equipment/inspection/base/mapper/EquipmentInspectionMapper.java
  43. 18 0
      src/main/java/org/springblade/modules/business/equipment/inspection/base/mapper/EquipmentInspectionMapper.xml
  44. 22 0
      src/main/java/org/springblade/modules/business/equipment/inspection/base/service/IEquipmentInspectionService.java
  45. 25 0
      src/main/java/org/springblade/modules/business/equipment/inspection/base/service/impl/EquipmentInspectionServiceImpl.java
  46. 24 0
      src/main/java/org/springblade/modules/business/equipment/inspection/base/vo/EquipmentInspectionInfoVO.java
  47. 37 0
      src/main/java/org/springblade/modules/business/equipment/inspection/base/wrapper/EquipmentInspectionWrapper.java
  48. 284 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/controller/EquipmentInspectionPlanController.java
  49. 48 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/dto/EquipmentInspectionRtuDTO.java
  50. 92 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/entity/EquipmentInspectionPlanEntity.java
  51. 33 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/entity/EquipmentInspectionRtuEntity.java
  52. 33 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/mapper/EquipmentInspectionPlanMapper.java
  53. 24 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/mapper/EquipmentInspectionPlanMapper.xml
  54. 40 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/mapper/EquipmentInspectionPlanRtuMapper.java
  55. 98 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/mapper/EquipmentInspectionPlanRtuMapper.xml
  56. 32 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/service/IEquipmentInspectionPlanRtuService.java
  57. 29 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/service/IEquipmentInspectionPlanService.java
  58. 37 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/service/impl/EquipmentInspectionPlanRtuServiceImpl.java
  59. 34 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/service/impl/EquipmentInspectionPlanServiceImpl.java
  60. 50 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/vo/EquipmentInspectionPlanVO.java
  61. 83 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/vo/EquipmentInspectionRtuVO.java
  62. 61 0
      src/main/java/org/springblade/modules/business/equipment/inspection/plan/wrapper/EquipmentInspectionPlanWrapper.java
  63. 160 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/controller/EquipmentInspectionReportController.java
  64. 42 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/dto/EquipmentInspectionReportDTO.java
  65. 503 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/entity/EquipmentInspectionReportEntity.java
  66. 37 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/mapper/EquipmentInspectionReportMapper.java
  67. 227 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/mapper/EquipmentInspectionReportMapper.xml
  68. 32 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/service/IEquipmentInspectionReportService.java
  69. 33 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/service/impl/EquipmentInspectionReportServiceImpl.java
  70. 60 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/vo/EquipmentInspectionReportVO.java
  71. 66 0
      src/main/java/org/springblade/modules/business/equipment/inspection/report/wrapper/EquipmentInspectionReportWrapper.java
  72. 261 0
      src/main/java/org/springblade/modules/business/project/base/controller/ProjectBaseInfoController.java
  73. 105 0
      src/main/java/org/springblade/modules/business/project/base/entity/ProjectInfoEntity.java
  74. 65 0
      src/main/java/org/springblade/modules/business/project/base/entity/ProjectTreeNodeEntity.java
  75. 51 0
      src/main/java/org/springblade/modules/business/project/base/entity/ProjectWarningSettingEntity.java
  76. 34 0
      src/main/java/org/springblade/modules/business/project/base/mapper/ProjectInfoMapper.java
  77. 68 0
      src/main/java/org/springblade/modules/business/project/base/mapper/ProjectInfoMapper.xml
  78. 21 0
      src/main/java/org/springblade/modules/business/project/base/mapper/ProjectWarningSettingMapper.java
  79. 21 0
      src/main/java/org/springblade/modules/business/project/base/mapper/ProjectWarningSettingMapper.xml
  80. 48 0
      src/main/java/org/springblade/modules/business/project/base/service/IProjectBaseInfoService.java
  81. 21 0
      src/main/java/org/springblade/modules/business/project/base/service/IProjectWarningSettingService.java
  82. 51 0
      src/main/java/org/springblade/modules/business/project/base/service/impl/ProjectBaseInfoServiceImpl.java
  83. 25 0
      src/main/java/org/springblade/modules/business/project/base/service/impl/ProjectWarningSettingServiceImpl.java
  84. 46 0
      src/main/java/org/springblade/modules/business/project/base/vo/ProjectInfoVO.java
  85. 57 0
      src/main/java/org/springblade/modules/business/project/base/wrapper/ProjectInfoWrapper.java
  86. 185 0
      src/main/java/org/springblade/modules/business/project/servicePerson/controller/ProjectServicePersonController.java
  87. 71 0
      src/main/java/org/springblade/modules/business/project/servicePerson/entity/ServicePersonEntity.java
  88. 21 0
      src/main/java/org/springblade/modules/business/project/servicePerson/mapper/ProjectServicePersonMapper.java
  89. 23 0
      src/main/java/org/springblade/modules/business/project/servicePerson/mapper/ProjectServicePersonMapper.xml
  90. 21 0
      src/main/java/org/springblade/modules/business/project/servicePerson/service/IProjectServicePersonService.java
  91. 26 0
      src/main/java/org/springblade/modules/business/project/servicePerson/service/impl/ProjectServicePersonServiceImpl.java
  92. 24 0
      src/main/java/org/springblade/modules/business/project/servicePerson/vo/ServicePersonVO.java
  93. 34 0
      src/main/java/org/springblade/modules/business/project/servicePerson/wrapper/ProjectServicePersonWrapper.java
  94. 167 0
      src/main/java/org/springblade/modules/business/rtu/base/controller/RtuBaseInfoController.java
  95. 30 0
      src/main/java/org/springblade/modules/business/rtu/base/dto/RtuInfoDTO.java
  96. 324 0
      src/main/java/org/springblade/modules/business/rtu/base/entity/RtuInfoEntity.java
  97. 38 0
      src/main/java/org/springblade/modules/business/rtu/base/mapper/RtuInfoMapper.java
  98. 160 0
      src/main/java/org/springblade/modules/business/rtu/base/mapper/RtuInfoMapper.xml
  99. 33 0
      src/main/java/org/springblade/modules/business/rtu/base/service/IRtuBaseInfoService.java
  100. 44 0
      src/main/java/org/springblade/modules/business/rtu/base/service/impl/RtuBaseInfoServiceImpl.java

+ 74 - 1
pom.xml

@@ -23,7 +23,9 @@
 
         <spring.boot.version>2.3.12.RELEASE</spring.boot.version>
         <spring.platform.version>Cairo-SR8</spring.platform.version>
-
+        <!--<poi.version>4.1.1</poi.version>-->
+        <!--<easypoi.version>4.1.2</easypoi.version>-->
+        <revision>3.1.1</revision>
     </properties>
 
     <dependencyManagement>
@@ -49,6 +51,7 @@
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
+
         </dependencies>
     </dependencyManagement>
 
@@ -77,6 +80,76 @@
             <artifactId>BladeX-Boot-Flow</artifactId>
             <version>${bladex.project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.kafka</groupId>
+            <artifactId>spring-kafka</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-websocket</artifactId>
+            <!--<exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-web</artifactId>
+                </exclusion>
+            </exclusions>-->
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-oss</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.core</groupId>
+            <artifactId>jersey-common</artifactId>
+            <version>2.28</version>
+        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>cn.afterturn</groupId>-->
+            <!--<artifactId>easypoi-spring-boot-starter</artifactId>-->
+            <!--<version>4.1.2</version>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel-core</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel-support</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml-schemas</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>ooxml-schemas</artifactId>
+            <version>1.4</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 8 - 0
src/main/java/org/springblade/constant/BusinessConstant.java

@@ -16,6 +16,14 @@ package org.springblade.constant;
  * Remark:认为有必要的其他信息
  */
 public class BusinessConstant {
+	public static final  String ROLE_SUPER_ADMIN ="administrator";
 
 
+	public static final  String ROLE_ADMIN ="admin";
+
+	public static final  String ROLE_ORG_ADMIN ="org_admin";
+
+	public static final  String ROLE_ORG_SERVICE_PERSON ="org_servcie_person";
+
+	public static final  String ROLE_ORG_SERVICE_PERSON_ID ="1123598816738675205";
 }

+ 93 - 0
src/main/java/org/springblade/enums/EquipmentActiveEnum.java

@@ -0,0 +1,93 @@
+package org.springblade.enums;
+
+public enum EquipmentActiveEnum {
+	/**
+	 * 关闭
+	 */
+	ACTIVE_OFF(0, "关闭"),
+
+	/**
+	 * 开启
+	 */
+	ACTIVE_OPEN(1, "开启");
+
+
+
+	private int code;
+
+	private String name;
+
+	private EquipmentActiveEnum(int code, String name) {
+		this.code = code;
+		this.name = name;
+	}
+
+	/**
+	 * Function:根据code来获取对应的name
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return java.lang.String
+	 * @throws Exception
+	 */
+	public static String getName(int code) {
+		for (EquipmentActiveEnum type : EquipmentActiveEnum.values()) {
+			if (type.code == code) {
+				return type.name;
+			}
+		}
+		return "";
+	}
+
+	/**
+	 * Function:根据code来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static EquipmentActiveEnum getEnumByCode(int code) {
+		for (EquipmentActiveEnum type : EquipmentActiveEnum.values()) {
+			if (type.code == code) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	/**
+	 * Function:根据name来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param name
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static EquipmentActiveEnum getEnumByName(String name) {
+		for (EquipmentActiveEnum type : EquipmentActiveEnum.values()) {
+			if (type.name.equals(name)) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}

+ 93 - 0
src/main/java/org/springblade/enums/EquipmentStatusEnum.java

@@ -0,0 +1,93 @@
+package org.springblade.enums;
+
+public enum EquipmentStatusEnum {
+	/**
+	 * 正常
+	 */
+	STATUS_RUN(0, "正常"),
+
+	/**
+	 * 故障
+	 */
+	STATUS_FAILURE(1, "故障");
+
+
+
+	private int code;
+
+	private String name;
+
+	private EquipmentStatusEnum(int code, String name) {
+		this.code = code;
+		this.name = name;
+	}
+
+	/**
+	 * Function:根据code来获取对应的name
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return java.lang.String
+	 * @throws Exception
+	 */
+	public static String getName(int code) {
+		for (EquipmentStatusEnum type : EquipmentStatusEnum.values()) {
+			if (type.code == code) {
+				return type.name;
+			}
+		}
+		return "";
+	}
+
+	/**
+	 * Function:根据code来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static EquipmentStatusEnum getEnumByCode(int code) {
+		for (EquipmentStatusEnum type : EquipmentStatusEnum.values()) {
+			if (type.code == code) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	/**
+	 * Function:根据name来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param name
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static EquipmentStatusEnum getEnumByName(String name) {
+		for (EquipmentStatusEnum type : EquipmentStatusEnum.values()) {
+			if (type.name.equals(name)) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}

+ 96 - 0
src/main/java/org/springblade/enums/OrderFromEnum.java

@@ -0,0 +1,96 @@
+package org.springblade.enums;
+
+public enum OrderFromEnum {
+	/**
+	 * 人工添加
+	 */
+	FROM_MANUALLY("manually", "人工添加"),
+
+	/**
+	 * 设备预警
+	 */
+	FROM_WARNING("warning", "设备预警"),
+
+	/**
+	 * 设备巡检
+	 */
+	FROM_INSPECTION("inspection", "设备巡检");
+
+	private String code;
+
+	private String name;
+
+	private OrderFromEnum(String code, String name) {
+		this.code = code;
+		this.name = name;
+	}
+
+	/**
+	 * Function:根据code来获取对应的name
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return java.lang.String
+	 * @throws Exception
+	 */
+	public static String getName(String code) {
+		for (OrderFromEnum type : OrderFromEnum.values()) {
+			if (type.code == code) {
+				return type.name;
+			}
+		}
+		return "";
+	}
+
+	/**
+	 * Function:根据code来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static OrderFromEnum getEnumByCode(String code) {
+		for (OrderFromEnum type : OrderFromEnum.values()) {
+			if (type.code == code) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	/**
+	 * Function:根据name来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param name
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static OrderFromEnum getEnumByName(String name) {
+		for (OrderFromEnum type : OrderFromEnum.values()) {
+			if (type.name.equals(name)) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}

+ 101 - 0
src/main/java/org/springblade/enums/OrderStatusEnum.java

@@ -0,0 +1,101 @@
+package org.springblade.enums;
+
+public enum OrderStatusEnum {
+	/**
+	 * 工单创建
+	 */
+	STATUS_CREATE(1, "工单创建"),
+
+	/**
+	 * 工单接单
+	 */
+	STATUS_CONFIRM(2, "工单接单"),
+
+	/**
+	 * 工单处理
+	 */
+	STATUS_PROCESS(3, "工单处理"),
+
+	/**
+	 * 工单关闭
+	 */
+	STATUS_CLOSE(4, "工单关闭");
+
+	private int code;
+
+	private String name;
+
+	private OrderStatusEnum(int code, String name) {
+		this.code = code;
+		this.name = name;
+	}
+
+	/**
+	 * Function:根据code来获取对应的name
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return java.lang.String
+	 * @throws Exception
+	 */
+	public static String getName(int code) {
+		for (OrderStatusEnum type : OrderStatusEnum.values()) {
+			if (type.code == code) {
+				return type.name;
+			}
+		}
+		return "";
+	}
+
+	/**
+	 * Function:根据code来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static OrderStatusEnum getEnumByCode(int code) {
+		for (OrderStatusEnum type : OrderStatusEnum.values()) {
+			if (type.code == code) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	/**
+	 * Function:根据name来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param name
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static OrderStatusEnum getEnumByName(String name) {
+		for (OrderStatusEnum type : OrderStatusEnum.values()) {
+			if (type.name.equals(name)) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}

+ 93 - 0
src/main/java/org/springblade/enums/RtuReportStatusEnum.java

@@ -0,0 +1,93 @@
+package org.springblade.enums;
+
+public enum RtuReportStatusEnum {
+	/**
+	 * 未填报
+	 */
+	STATUS_0(0, "未填报"),
+
+	/**
+	 * 已提交
+	 */
+	STATUS_1(1, "已提交");
+
+
+
+	private int code;
+
+	private String name;
+
+	private RtuReportStatusEnum(int code, String name) {
+		this.code = code;
+		this.name = name;
+	}
+
+	/**
+	 * Function:根据code来获取对应的name
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return java.lang.String
+	 * @throws Exception
+	 */
+	public static String getName(int code) {
+		for (RtuReportStatusEnum type : RtuReportStatusEnum.values()) {
+			if (type.code == code) {
+				return type.name;
+			}
+		}
+		return "";
+	}
+
+	/**
+	 * Function:根据code来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static RtuReportStatusEnum getEnumByCode(int code) {
+		for (RtuReportStatusEnum type : RtuReportStatusEnum.values()) {
+			if (type.code == code) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	/**
+	 * Function:根据name来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param name
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static RtuReportStatusEnum getEnumByName(String name) {
+		for (RtuReportStatusEnum type : RtuReportStatusEnum.values()) {
+			if (type.name.equals(name)) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}

+ 93 - 0
src/main/java/org/springblade/enums/WarningActiveEnum.java

@@ -0,0 +1,93 @@
+package org.springblade.enums;
+
+public enum WarningActiveEnum {
+	/**
+	 * 关闭
+	 */
+	ACTIVE_OFF(0, "关闭"),
+
+	/**
+	 * 开启
+	 */
+	ACTIVE_OPEN(1, "开启");
+
+
+
+	private int code;
+
+	private String name;
+
+	private WarningActiveEnum(int code, String name) {
+		this.code = code;
+		this.name = name;
+	}
+
+	/**
+	 * Function:根据code来获取对应的name
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return java.lang.String
+	 * @throws Exception
+	 */
+	public static String getName(int code) {
+		for (WarningActiveEnum type : WarningActiveEnum.values()) {
+			if (type.code == code) {
+				return type.name;
+			}
+		}
+		return "";
+	}
+
+	/**
+	 * Function:根据code来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static WarningActiveEnum getEnumByCode(int code) {
+		for (WarningActiveEnum type : WarningActiveEnum.values()) {
+			if (type.code == code) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	/**
+	 * Function:根据name来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param name
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static WarningActiveEnum getEnumByName(String name) {
+		for (WarningActiveEnum type : WarningActiveEnum.values()) {
+			if (type.name.equals(name)) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}

+ 93 - 0
src/main/java/org/springblade/enums/WarningStatusEnum.java

@@ -0,0 +1,93 @@
+package org.springblade.enums;
+
+public enum WarningStatusEnum {
+	/**
+	 * 关闭
+	 */
+	STATUS_HAPPEN(0, "预警中"),
+
+	/**
+	 * 开启
+	 */
+	STATUS_CLOSE(1, "恢复");
+
+
+
+	private int code;
+
+	private String name;
+
+	private WarningStatusEnum(int code, String name) {
+		this.code = code;
+		this.name = name;
+	}
+
+	/**
+	 * Function:根据code来获取对应的name
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return java.lang.String
+	 * @throws Exception
+	 */
+	public static String getName(int code) {
+		for (WarningStatusEnum type : WarningStatusEnum.values()) {
+			if (type.code == code) {
+				return type.name;
+			}
+		}
+		return "";
+	}
+
+	/**
+	 * Function:根据code来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param code
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static WarningStatusEnum getEnumByCode(int code) {
+		for (WarningStatusEnum type : WarningStatusEnum.values()) {
+			if (type.code == code) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	/**
+	 * Function:根据name来获取对应的枚举常量
+	 * Author: Admin
+	 * Date:2021/6/26
+	 * @param name
+	 * @return com.zhgzjg.web.enums.DeleteFlag
+	 * @throws Exception
+	 */
+	public static WarningStatusEnum getEnumByName(String name) {
+		for (WarningStatusEnum type : WarningStatusEnum.values()) {
+			if (type.name.equals(name)) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}

+ 116 - 0
src/main/java/org/springblade/etl/EtlTask.java

@@ -0,0 +1,116 @@
+/**
+ * Copyright
+ * All right reserved.
+ * 项目名称:
+ * 创建日期:2022/5/22
+ */
+package org.springblade.etl;
+
+import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.etl.entity.EtlWarningInfoEntity;
+import org.springblade.etl.service.IEtlWarningService;
+import org.springblade.modules.business.rtu.base.service.IRtuBaseInfoService;
+import org.springblade.modules.business.warning.entity.RtuWarningInfoEntity;
+import org.springblade.modules.business.warning.service.IRtuWarningService;
+import org.springframework.data.redis.core.HashOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.messaging.simp.SimpMessagingTemplate;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.Callable;
+
+/***
+ * Date:2022/5/22
+ * Title: 环境辐射与气象监测系统(KRS) 模块
+ * Description:MODBUS TCP 协议传输 ,读取任务
+ * @author swp
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Slf4j
+public class EtlTask implements Callable<Integer> {
+
+	private RedisTemplate redisTemplate;
+	private IEtlWarningService etlWarningService;
+	private SimpMessagingTemplate messagingTemplate;
+
+	public EtlTask(RedisTemplate redisTemplate, IEtlWarningService etlWarningService,  SimpMessagingTemplate messagingTemplate){
+		this.redisTemplate=redisTemplate;
+		this.etlWarningService=etlWarningService;
+		this.messagingTemplate=messagingTemplate;
+	}
+
+	@Override
+	public Integer call()  {
+		try {
+
+//			HashOperations<String, String, String> opsHash = redisTemplate.opsForHash();
+//			SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//
+//			Calendar calendar = Calendar.getInstance();
+//			calendar.set(Calendar.HOUR_OF_DAY, 0);
+//			calendar.set(Calendar.MINUTE, 0);
+//			calendar.set(Calendar.SECOND, 0);
+//			Date lastProcessDate = calendar.getTime();
+//			if (opsHash.hasKey("data_process_time", "warning")) {
+//				String dt = opsHash.get("data_process_time", "warning");
+//				lastProcessDate = timeFormat.parse(dt);
+//			}
+//			List<EtlWarningInfoEntity> list = etlWarningService.getEtlWarning(lastProcessDate);
+//			if (null != list && list.size() > 0) {
+//				for (WarningInfo warningInfo : list) {
+//					String jsonObject = JSONObject.toJSONString(warningInfo);
+//					DataProcessHolder.newInstance().dataProcess.kafkaTemplate.send("ywxt.warning", jsonObject);
+//					LogHelper.info("find warning : "+jsonObject);
+//				}
+//				WarningInfo lastwarn= list.get(list.size()-1);
+//				opsHash.put("data_process_time", "warning", timeFormat.format(lastwarn.getCreateTime()));
+//			}
+//
+//
+//
+//			Date startTm = new Date();
+//			String timeStartText = DateUtil.format(startTm, "yyyy年MM月dd日 HH时mm分ss秒");
+//
+//
+//			HashOperations<String, String, String> opsHash = redisTemplate.opsForHash();
+//
+//			long rtus =rtuBaseInfoService.count();
+//
+//			opsHash.put("real_data_info","rtus",Long.toString(rtus));
+//
+//
+//			LambdaUpdateWrapper<RtuWarningInfoEntity> updateWrapper = Wrappers.<RtuWarningInfoEntity>update().lambda();
+//			updateWrapper.eq(RtuWarningInfoEntity::getIsDeleted, 0);
+//			updateWrapper.eq(RtuWarningInfoEntity::getWarningStatus, 0);
+//			long warningRtus=rtuWarningService.count(updateWrapper);
+//
+//			opsHash.put("real_data_info","warningRtus",Long.toString(warningRtus));
+//
+//			opsHash.put("real_data_info","delayOrders","1");
+//			opsHash.put("real_data_info","equipmentInspectionCount","0");
+//
+//
+//			JSONObject info = new JSONObject();
+//			info.put("rtus",rtus);
+//			info.put("warningRtus",warningRtus);
+//			info.put("delayOrders",0);
+//			info.put("equipmentInspectionCount",0);
+//
+//		//	messagingTemplate.convertAndSend("real_data_info", info.toJSONString());
+//
+//			Date endTime = new Date();
+			//log.info("实时数据统计任务结束 用时:{} 毫秒", (endTime.getTime() - startTm.getTime()));
+		} catch (Exception e) {
+			log.error("实时数据统计任务异常 {}", e.getMessage());
+		}
+		return 0;
+	}
+}

+ 126 - 0
src/main/java/org/springblade/etl/EtlTaskManager.java

@@ -0,0 +1,126 @@
+/**
+ * Copyright
+ * All right reserved.
+ * 项目名称:
+ * 创建日期:2022/5/23
+ */
+package org.springblade.etl;
+
+
+import lombok.extern.slf4j.Slf4j;
+import org.glassfish.jersey.internal.guava.ThreadFactoryBuilder;
+import org.springblade.etl.service.IEtlWarningService;
+import org.springblade.modules.business.project.base.service.IProjectBaseInfoService;
+import org.springblade.modules.business.rtu.base.service.IRtuBaseInfoService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataGroundService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRainService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRiverService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRsvrService;
+import org.springblade.modules.business.rtumanage.service.IRtuManageService;
+import org.springblade.modules.business.warning.service.IOriginalWarningService;
+import org.springblade.modules.business.warning.service.IRtuWarningService;
+import org.springblade.modules.system.service.IDictBizService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.kafka.core.KafkaTemplate;
+import org.springframework.messaging.simp.SimpMessagingTemplate;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.concurrent.*;
+
+/***
+ * Date:2022/5/22
+ * Title: 环境辐射与气象监测系统(KRS) 模块
+ * Description:MODBUS TCP 协议传输 ,任务管理
+ * @author swp
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Slf4j
+@Component
+@EnableScheduling
+public class EtlTaskManager {
+
+	/**
+	 * 公共线程池
+	 **/
+	private static ThreadFactory publicThreadFactory = new ThreadFactoryBuilder().setNameFormat("public-thread-pool-%d").build();
+	private static ExecutorService publicThreadPool = new ThreadPoolExecutor(1, 1,
+		0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(1024), publicThreadFactory, new ThreadPoolExecutor.AbortPolicy());
+
+	@Resource
+	private  IEtlWarningService etlWarningService;
+
+	@Resource
+	private IRtuWarningService  rtuWarningService;
+
+	@Resource
+	private IRtuBaseInfoService rtuBaseInfoService;
+
+	@Resource
+	private IProjectBaseInfoService projectBaseInfoService;
+
+	@Resource
+	private IRtuDataRiverService dataRiverService;
+
+	@Resource
+	private IRtuDataRsvrService dataRsvrService;
+
+	@Resource
+	private IRtuDataRainService dataRainService;
+
+	@Resource
+	private IRtuDataGroundService dataGroundService;
+
+	@Autowired
+	private KafkaTemplate<String, String> kafkaTemplate;
+
+	@Autowired
+	private SimpMessagingTemplate messagingTemplate;
+
+	@Autowired
+	private RedisTemplate redisTemplate;
+
+	@Resource
+	private IDictBizService  dictBizService;
+
+	@Resource
+	private IRtuManageService rtuManageService;
+
+	@Resource
+	private IOriginalWarningService originalWarningService;
+
+
+	@Scheduled(cron = "0 0 0/1 * * * ")
+	public void warnTask() {
+		try {
+
+			TestDataTask task = new TestDataTask(redisTemplate, kafkaTemplate, messagingTemplate, etlWarningService, rtuWarningService, rtuBaseInfoService, projectBaseInfoService, dataRainService, dataRiverService, dataRsvrService, dataGroundService, dictBizService, rtuManageService);
+			FutureTask<Integer> futureTask = new FutureTask<>(task);
+			publicThreadPool.execute(futureTask);
+
+			TestWarnTask task2 = new TestWarnTask(redisTemplate,kafkaTemplate,messagingTemplate,etlWarningService,rtuWarningService,rtuBaseInfoService,projectBaseInfoService,dataRainService,dataRiverService,dataRsvrService,dataGroundService,originalWarningService);
+			FutureTask<Integer> futureTask2 = new FutureTask<>(task2);
+			publicThreadPool.execute(futureTask2);
+
+		} catch (Exception e) {
+			log.error("{}",e.getMessage());
+		}
+	}
+
+//	@Scheduled(cron = "0 3 0/1 * * * ")
+//	public void dataTask() {
+//		try {
+//			TestDataTask task = new TestDataTask(redisTemplate,kafkaTemplate,messagingTemplate,etlWarningService,rtuWarningService,rtuBaseInfoService,projectBaseInfoService,dataRainService,dataRiverService,dataRsvrService,dataGroundService,dictBizService,rtuManageService);
+//			FutureTask<Integer> futureTask = new FutureTask<>(task);
+//			publicThreadPool.execute(futureTask);
+//
+//		} catch (Exception e) {
+//			log.error("{}",e.getMessage());
+//		}
+//	}
+
+}

+ 84 - 0
src/main/java/org/springblade/etl/EtlWarningTask.java

@@ -0,0 +1,84 @@
+/**
+ * Copyright
+ * All right reserved.
+ * 项目名称:
+ * 创建日期:2022/5/22
+ */
+package org.springblade.etl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.etl.entity.EtlWarningInfoEntity;
+import org.springblade.etl.service.IEtlWarningService;
+import org.springblade.modules.business.warning.entity.RtuWarningInfoEntity;
+import org.springblade.modules.business.warning.service.IRtuWarningService;
+import org.springframework.data.redis.core.HashOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.kafka.core.KafkaTemplate;
+import org.springframework.messaging.simp.SimpMessagingTemplate;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.Callable;
+
+/***
+ * Date:2022/5/22
+ * Title: 环境辐射与气象监测系统(KRS) 模块
+ * Description:MODBUS TCP 协议传输 ,读取任务
+ * @author swp
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Slf4j
+public class EtlWarningTask implements Callable<Integer> {
+
+	private RedisTemplate redisTemplate;
+	private SimpMessagingTemplate messagingTemplate;
+	private KafkaTemplate<String, String> kafkaTemplate;
+	private IEtlWarningService etlWarningService;
+	private IRtuWarningService rtuWarningService;
+
+	public EtlWarningTask(RedisTemplate redisTemplate, KafkaTemplate<String, String> kafkaTemplate , SimpMessagingTemplate messagingTemplate, IEtlWarningService etlWarningService, IRtuWarningService rtuWarningService){
+		this.redisTemplate=redisTemplate;
+		this.kafkaTemplate=kafkaTemplate;
+		this.messagingTemplate=messagingTemplate;
+		this.etlWarningService=etlWarningService;
+		this.rtuWarningService=rtuWarningService;
+	}
+
+	@Override
+	public Integer call()  {
+		try {
+			HashOperations<String, String, String> opsHash = redisTemplate.opsForHash();
+			SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+			Calendar calendar = Calendar.getInstance();
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			Date lastProcessDate = calendar.getTime();
+			if (opsHash.hasKey("data_process_time", "warning")) {
+				String dt = opsHash.get("data_process_time", "warning");
+				lastProcessDate = timeFormat.parse(dt);
+			}
+			LambdaQueryWrapper<EtlWarningInfoEntity> wrapper = Wrappers.<EtlWarningInfoEntity>query().lambda();
+			wrapper.gt(EtlWarningInfoEntity::getOriginalCreateTime,lastProcessDate);
+			wrapper.orderByAsc(EtlWarningInfoEntity::getOriginalCreateTime);
+			List<EtlWarningInfoEntity> list = etlWarningService.list(wrapper);
+			if (null != list && list.size() > 0) {
+				for (EtlWarningInfoEntity warningInfo : list) {
+					RtuWarningInfoEntity rtuWarningInfoEntity=new RtuWarningInfoEntity();
+					rtuWarningService.save(rtuWarningInfoEntity);
+				}
+				EtlWarningInfoEntity lastwarn= list.get(list.size()-1);
+				opsHash.put("data_process_time", "warning", timeFormat.format(lastwarn.getOriginalCreateTime()));
+			}
+
+		} catch (Exception e) {
+			log.error("测试数据任务异常 {}", e.getMessage());
+		}
+		return 0;
+	}
+}

+ 225 - 0
src/main/java/org/springblade/etl/TestDataTask.java

@@ -0,0 +1,225 @@
+/**
+ * Copyright
+ * All right reserved.
+ * 项目名称:
+ * 创建日期:2022/5/22
+ */
+package org.springblade.etl;
+
+import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.core.tool.jackson.JsonUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.enums.EquipmentStatusEnum;
+import org.springblade.enums.OrderFromEnum;
+import org.springblade.enums.WarningStatusEnum;
+import org.springblade.etl.entity.EtlWarningInfoEntity;
+import org.springblade.etl.service.IEtlWarningService;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.service.IProjectBaseInfoService;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.service.IRtuBaseInfoService;
+import org.springblade.modules.business.rtu.data.entity.RtuDataGroundEntity;
+import org.springblade.modules.business.rtu.data.entity.RtuDataRainEntity;
+import org.springblade.modules.business.rtu.data.entity.RtuDataRiverEntity;
+import org.springblade.modules.business.rtu.data.entity.RtuDataRsvrEntity;
+import org.springblade.modules.business.rtu.data.service.IRtuDataGroundService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRainService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRiverService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRsvrService;
+import org.springblade.modules.business.rtumanage.entity.RtuStatusEntity;
+import org.springblade.modules.business.rtumanage.service.IRtuManageService;
+import org.springblade.modules.business.warning.entity.RtuWarningInfoEntity;
+import org.springblade.modules.business.warning.service.IRtuWarningService;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springblade.modules.system.service.IDictBizService;
+import org.springframework.data.redis.core.HashOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.kafka.core.KafkaTemplate;
+import org.springframework.messaging.simp.SimpMessagingTemplate;
+
+import java.lang.reflect.Array;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.Callable;
+
+/***
+ * Date:2022/5/22
+ * Title: 环境辐射与气象监测系统(KRS) 模块
+ * Description:MODBUS TCP 协议传输 ,读取任务
+ * @author swp
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Slf4j
+public class TestDataTask implements Callable<Integer> {
+
+	private RedisTemplate redisTemplate;
+	private SimpMessagingTemplate messagingTemplate;
+	private KafkaTemplate<String, String> kafkaTemplate;
+	private IEtlWarningService etlWarningService;
+	private IRtuWarningService rtuWarningService;
+	private IRtuBaseInfoService rtuBaseInfoService;
+	private IProjectBaseInfoService projectBaseInfoService;
+	private IRtuDataGroundService dataGroundService;
+	private IRtuDataRainService dataRainService;
+	private IRtuDataRsvrService dataRsvrService;
+	private IRtuDataRiverService dataRiverService;
+	private IDictBizService dictBizService;
+	private IRtuManageService manageService;
+
+	public TestDataTask(RedisTemplate redisTemplate, KafkaTemplate<String, String> kafkaTemplate, SimpMessagingTemplate messagingTemplate, IEtlWarningService etlWarningService, IRtuWarningService rtuWarningService, IRtuBaseInfoService rtuBaseInfoService, IProjectBaseInfoService projectBaseInfoService, IRtuDataRainService dataRainService, IRtuDataRiverService dataRiverService, IRtuDataRsvrService dataRsvrService, IRtuDataGroundService dataGroundService, IDictBizService dictBizService, IRtuManageService manageService) {
+		this.redisTemplate = redisTemplate;
+		this.kafkaTemplate = kafkaTemplate;
+		this.messagingTemplate = messagingTemplate;
+		this.etlWarningService = etlWarningService;
+		this.rtuWarningService = rtuWarningService;
+		this.rtuBaseInfoService = rtuBaseInfoService;
+		this.projectBaseInfoService = projectBaseInfoService;
+		this.dataGroundService = dataGroundService;
+		this.dataRainService = dataRainService;
+		this.dataRiverService = dataRiverService;
+		this.dataRsvrService = dataRsvrService;
+		this.dictBizService = dictBizService;
+		this.manageService = manageService;
+	}
+
+	@Override
+	public Integer call() {
+		try {
+			LambdaQueryWrapper<ProjectInfoEntity> wrapper = Wrappers.<ProjectInfoEntity>query().lambda();
+			wrapper.eq(ProjectInfoEntity::getIsDeleted, 0);
+			List<ProjectInfoEntity> projectInfoEntityList = projectBaseInfoService.list(wrapper);
+			for (ProjectInfoEntity projectInfoEntity : projectInfoEntityList) {
+				LambdaQueryWrapper<RtuInfoEntity> rtuWrapper = Wrappers.<RtuInfoEntity>query().lambda();
+				rtuWrapper.eq(RtuInfoEntity::getProjectId, projectInfoEntity.getId());
+				rtuWrapper.orderByAsc(RtuInfoEntity::getRtuCode);
+				List<RtuInfoEntity> rtuInfoEntityList = rtuBaseInfoService.list(rtuWrapper);
+				if (null != rtuInfoEntityList && rtuInfoEntityList.size() > 0) {
+					List<DictBiz> kindDict = dictBizService.getList("rtu_kind");
+					//List<DictBiz> kindDict = DictBizCache.getList("rtu_kind");
+					Calendar calendar = Calendar.getInstance();
+					calendar.set(Calendar.MINUTE, 0);
+					calendar.set(Calendar.SECOND, 0);
+					//生成业务数据
+					for (RtuInfoEntity rtuInfoEntity : rtuInfoEntityList) {
+						LambdaQueryWrapper<RtuStatusEntity> statusWrapper = Wrappers.<RtuStatusEntity>query().lambda();
+						statusWrapper.eq(RtuStatusEntity::getRtuCode, rtuInfoEntity.getRtuCode());
+						RtuStatusEntity statusEntity = manageService.getOne(statusWrapper);
+						if (null == statusEntity || statusEntity.getRunStatusId() == EquipmentStatusEnum.STATUS_RUN.getCode()) {
+
+
+							String rtuKinds = rtuInfoEntity.getRtuKinds();
+							String[] kinds = rtuKinds.split(",");
+							for (String k : kinds) {
+								for (DictBiz biz : kindDict) {
+									if (biz.getId() == Func.toLong(k)) {
+										if (biz.getDictKey().equals("rain")) {
+											LambdaQueryWrapper<RtuWarningInfoEntity> warnWrapper = Wrappers.<RtuWarningInfoEntity>query().lambda();
+											warnWrapper.eq(RtuWarningInfoEntity::getRtuCode, rtuInfoEntity.getRtuCode());
+											warnWrapper.isNull(RtuWarningInfoEntity::getWarningRecoveryTime);
+											RtuWarningInfoEntity warningInfoEntity = rtuWarningService.getOne(warnWrapper);
+
+
+											LambdaQueryWrapper<RtuDataRainEntity> dataWrapper = Wrappers.<RtuDataRainEntity>query().lambda();
+											dataWrapper.eq(RtuDataRainEntity::getRtuCode, rtuInfoEntity.getRtuCode());
+											RtuDataRainEntity rainEntity = dataRainService.getOne(dataWrapper);
+											if (null == rainEntity) {
+												rainEntity = new RtuDataRainEntity();
+											}
+											java.util.Random random = new java.util.Random();
+											Double drp = random.nextDouble();
+											rainEntity.setDrp(drp);
+											rainEntity.setRtuCode(rtuInfoEntity.getRtuCode());
+											rainEntity.setTm(calendar.getTime());
+											dataRainService.saveOrUpdate(rainEntity);
+
+
+										} else if (biz.getDictKey().equals("ground")) {
+											LambdaQueryWrapper<RtuDataGroundEntity> dataWrapper = Wrappers.<RtuDataGroundEntity>query().lambda();
+											dataWrapper.eq(RtuDataGroundEntity::getRtuCode, rtuInfoEntity.getRtuCode());
+											RtuDataGroundEntity groundEntity = dataGroundService.getOne(dataWrapper);
+											if (null == groundEntity) {
+												groundEntity = new RtuDataGroundEntity();
+											}
+
+
+											groundEntity.setRtuCode(rtuInfoEntity.getRtuCode());
+											java.util.Random random = new java.util.Random();
+											groundEntity.setSrlslm(random.nextDouble());
+											groundEntity.setVtavslm(random.nextDouble());
+											groundEntity.setSlm10(random.nextDouble());
+											groundEntity.setSlm20(random.nextDouble());
+											groundEntity.setSlm30(random.nextDouble());
+											groundEntity.setSlm40(random.nextDouble());
+											groundEntity.setSlm60(random.nextDouble());
+											groundEntity.setSlm80(random.nextDouble());
+											groundEntity.setSlm100(random.nextDouble());
+
+											groundEntity.setTm(calendar.getTime());
+											dataGroundService.saveOrUpdate(groundEntity);
+
+
+										} else if (biz.getDictKey().equals("river")) {
+											LambdaQueryWrapper<RtuDataRiverEntity> dataWrapper = Wrappers.<RtuDataRiverEntity>query().lambda();
+											dataWrapper.eq(RtuDataRiverEntity::getRtuCode, rtuInfoEntity.getRtuCode());
+											RtuDataRiverEntity riverEntity = dataRiverService.getOne(dataWrapper);
+											if (null == riverEntity) {
+												riverEntity = new RtuDataRiverEntity();
+											}
+
+
+											riverEntity.setRtuCode(rtuInfoEntity.getRtuCode());
+											java.util.Random random = new java.util.Random();
+											riverEntity.setZ(random.nextDouble());
+											riverEntity.setTm(calendar.getTime());
+											dataRiverService.saveOrUpdate(riverEntity);
+
+
+										} else if (biz.getDictKey().equals("rsvr")) {
+											LambdaQueryWrapper<RtuDataRsvrEntity> dataWrapper = Wrappers.<RtuDataRsvrEntity>query().lambda();
+											dataWrapper.eq(RtuDataRsvrEntity::getRtuCode, rtuInfoEntity.getRtuCode());
+											RtuDataRsvrEntity rsvrEntity = dataRsvrService.getOne(dataWrapper);
+											if (null == rsvrEntity) {
+												rsvrEntity = new RtuDataRsvrEntity();
+											}
+
+											rsvrEntity.setRtuCode(rtuInfoEntity.getRtuCode());
+											java.util.Random random = new java.util.Random();
+											rsvrEntity.setRz(random.nextDouble());
+											rsvrEntity.setTm(calendar.getTime());
+											dataRsvrService.saveOrUpdate(rsvrEntity);
+
+
+										}
+										break;
+									}
+								}
+							}
+
+							RtuStatusEntity newStatus = new RtuStatusEntity();
+							newStatus.setRunStatusId(EquipmentStatusEnum.STATUS_RUN.getCode());
+							newStatus.setRtuCode(rtuInfoEntity.getRtuCode());
+							newStatus.setLastUpTime(calendar.getTime());
+							kafkaTemplate.send("ywxt.rtu.status", JsonUtil.toJson(newStatus));
+
+						}
+					}
+				}
+			}
+			String timeStartText = DateUtil.format(new Date(), "yyyy年MM月dd日 HH时mm分ss秒");
+			log.info("模似数据生成{}", timeStartText);
+
+		} catch (Exception e) {
+			log.error("模似数据任务异常 {}", e.getMessage());
+		}
+		return 0;
+	}
+}

+ 169 - 0
src/main/java/org/springblade/etl/TestWarnTask.java

@@ -0,0 +1,169 @@
+/**
+ * Copyright
+ * All right reserved.
+ * 项目名称:
+ * 创建日期:2022/5/22
+ */
+package org.springblade.etl;
+
+import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.core.tool.jackson.JsonUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.enums.WarningStatusEnum;
+import org.springblade.etl.service.IEtlWarningService;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.service.IProjectBaseInfoService;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.service.IRtuBaseInfoService;
+import org.springblade.modules.business.rtu.data.entity.RtuDataGroundEntity;
+import org.springblade.modules.business.rtu.data.entity.RtuDataRainEntity;
+import org.springblade.modules.business.rtu.data.entity.RtuDataRiverEntity;
+import org.springblade.modules.business.rtu.data.entity.RtuDataRsvrEntity;
+import org.springblade.modules.business.rtu.data.service.IRtuDataGroundService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRainService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRiverService;
+import org.springblade.modules.business.rtu.data.service.IRtuDataRsvrService;
+import org.springblade.modules.business.warning.entity.OriginalWarningInfoEntity;
+import org.springblade.modules.business.warning.entity.RtuWarningInfoEntity;
+import org.springblade.modules.business.warning.service.IOriginalWarningService;
+import org.springblade.modules.business.warning.service.IRtuWarningService;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.kafka.core.KafkaTemplate;
+import org.springframework.messaging.simp.SimpMessagingTemplate;
+
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.Callable;
+
+/***
+ * Date:2022/5/22
+ * Title: 环境辐射与气象监测系统(KRS) 模块
+ * Description:MODBUS TCP 协议传输 ,读取任务
+ * @author swp
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Slf4j
+public class TestWarnTask implements Callable<Integer> {
+
+	private RedisTemplate redisTemplate;
+	private SimpMessagingTemplate messagingTemplate;
+	private KafkaTemplate<String, String> kafkaTemplate;
+	private IEtlWarningService etlWarningService;
+	private IRtuWarningService rtuWarningService;
+	private IRtuBaseInfoService rtuBaseInfoService;
+	private IProjectBaseInfoService projectBaseInfoService;
+	private IRtuDataGroundService dataGroundService;
+	private IRtuDataRainService dataRainService;
+	private IRtuDataRsvrService dataRsvrService;
+	private IRtuDataRiverService dataRiverService;
+	private IOriginalWarningService originalWarningService;
+
+	public TestWarnTask(RedisTemplate redisTemplate, KafkaTemplate<String, String> kafkaTemplate, SimpMessagingTemplate messagingTemplate, IEtlWarningService etlWarningService, IRtuWarningService rtuWarningService, IRtuBaseInfoService rtuBaseInfoService, IProjectBaseInfoService projectBaseInfoService, IRtuDataRainService dataRainService, IRtuDataRiverService dataRiverService, IRtuDataRsvrService dataRsvrService, IRtuDataGroundService dataGroundService,IOriginalWarningService originalWarningService) {
+		this.redisTemplate = redisTemplate;
+		this.kafkaTemplate = kafkaTemplate;
+		this.messagingTemplate = messagingTemplate;
+		this.etlWarningService = etlWarningService;
+		this.rtuWarningService = rtuWarningService;
+		this.rtuBaseInfoService = rtuBaseInfoService;
+		this.projectBaseInfoService = projectBaseInfoService;
+		this.dataGroundService = dataGroundService;
+		this.dataRainService = dataRainService;
+		this.dataRiverService = dataRiverService;
+		this.dataRsvrService = dataRsvrService;
+		this.originalWarningService=originalWarningService;
+	}
+
+	@Override
+	public Integer call() {
+		try {
+			LambdaQueryWrapper<ProjectInfoEntity> wrapper = Wrappers.<ProjectInfoEntity>query().lambda();
+			wrapper.eq(ProjectInfoEntity::getIsDeleted, 0);
+			List<ProjectInfoEntity> projectInfoEntityList = projectBaseInfoService.list(wrapper);
+			for (ProjectInfoEntity projectInfoEntity : projectInfoEntityList) {
+				LambdaQueryWrapper<RtuInfoEntity> rtuWrapper = Wrappers.<RtuInfoEntity>query().lambda();
+				rtuWrapper.eq(RtuInfoEntity::getProjectId, projectInfoEntity.getId());
+				rtuWrapper.orderByAsc(RtuInfoEntity::getRtuCode);
+				List<RtuInfoEntity> rtuInfoEntityList = rtuBaseInfoService.list(rtuWrapper);
+				if (null != rtuInfoEntityList && rtuInfoEntityList.size() > 0) {
+					//生成预警信息
+					while (true) {
+						java.util.Random random = new java.util.Random();
+						int index = random.nextInt(rtuInfoEntityList.size());
+						RtuInfoEntity toWarnRtuEntity = rtuInfoEntityList.get(index);
+
+						LambdaQueryWrapper<RtuWarningInfoEntity> warnWrapper = Wrappers.<RtuWarningInfoEntity>query().lambda();
+						warnWrapper.eq(RtuWarningInfoEntity::getRtuCode, toWarnRtuEntity.getRtuCode());
+						warnWrapper.eq(RtuWarningInfoEntity::getIsDeleted, 0);
+						warnWrapper.isNull(RtuWarningInfoEntity::getWarningRecoveryTime);
+
+						RtuWarningInfoEntity entity = rtuWarningService.getOne(warnWrapper);
+						if (null == entity) {
+
+							OriginalWarningInfoEntity originalWarningInfoEntity=new OriginalWarningInfoEntity();
+							originalWarningInfoEntity.setRtuCode(toWarnRtuEntity.getRtuCode());
+							originalWarningInfoEntity.setWarnName(toWarnRtuEntity.getRtuName()+"-预警");
+							originalWarningInfoEntity.setWarnTime(new Date());
+							originalWarningInfoEntity.setWarnLevelCode("严重");
+							originalWarningInfoEntity.setWarnInfo("降水量超限预警");
+							originalWarningInfoEntity.setWarnStatus(5);
+							originalWarningInfoEntity.setReviewStatus("2");
+							originalWarningInfoEntity.setType("1");
+							originalWarningInfoEntity.setRainWarnRate(1);
+							originalWarningInfoEntity.setWarnSort("监测雨量");
+							originalWarningInfoEntity.setWarnLocation("全市");
+							originalWarningInfoEntity.setWarnAdcd("全市");
+							originalWarningInfoEntity.setUserAdcd("全市");
+							originalWarningInfoEntity.setWarnLgtd("116.727371");
+							originalWarningInfoEntity.setWarnLttd("39.906744");
+							originalWarningInfoEntity.setIntv("1小时");
+
+
+
+
+							originalWarningInfoEntity.setDrp(random.nextDouble());
+							originalWarningInfoEntity.setZ(random.nextDouble());
+							originalWarningInfoEntity.setQ(random.nextDouble());
+							originalWarningInfoEntity.setWptn("水势");
+							originalWarningInfoEntity.setRz(random.nextDouble());
+
+							originalWarningInfoEntity.setRwptn("水势");
+
+							originalWarningInfoEntity.setInq(random.nextDouble());
+
+							originalWarningService.save(originalWarningInfoEntity);
+
+							RtuWarningInfoEntity rtuWarningInfoEntity = new RtuWarningInfoEntity();
+							rtuWarningInfoEntity.setWarningKind("监测雨量");
+							rtuWarningInfoEntity.setWarningDesc("降水量超限预警");
+							rtuWarningInfoEntity.setRtuCode(toWarnRtuEntity.getRtuCode());
+							rtuWarningInfoEntity.setWarningHappenTime(new Date());
+							rtuWarningInfoEntity.setDataFromId(originalWarningInfoEntity.getId());
+							rtuWarningInfoEntity.setWarningStatus(WarningStatusEnum.STATUS_HAPPEN.getCode());
+
+							rtuWarningService.save(rtuWarningInfoEntity);
+
+							kafkaTemplate.send("ywxt.warning", JsonUtil.toJson(rtuWarningInfoEntity));
+
+
+							break;
+						}
+					}
+
+				}
+
+			}
+			String timeStartText = DateUtil.format(new Date(), "yyyy年MM月dd日 HH时mm分ss秒");
+			log.info("模似预警生成{}", timeStartText);
+
+		} catch (Exception e) {
+			log.error("模似预警务异常 {}", e.getMessage());
+		}
+		return 0;
+	}
+}

+ 155 - 0
src/main/java/org/springblade/etl/entity/EtlWarningInfoEntity.java

@@ -0,0 +1,155 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/8
+ */
+package org.springblade.etl.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/***
+ * Date:2022/9/8
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("etl_st_warning_info")
+public class EtlWarningInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	@ApiModelProperty("id")
+	private Long id;
+
+	@ApiModelProperty("测站编码")
+	private String stcd;
+
+	@ApiModelProperty("预警名称")
+	private String warnName;
+
+	@ApiModelProperty("预警发生时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8"
+	)
+	private Date warnTime;
+
+	@ApiModelProperty("预警等级")
+	private String warnLevelCode;
+
+	@ApiModelProperty("预警信息")
+	private String warnInfo;
+	/**
+	 * 预警状态,(-1审核未通过,0未审核,1待内部预警,2待外部预警,3待响应启动,4待响应反馈,5已启动响应)
+	 */
+	@ApiModelProperty("预警状态")
+	private Integer warnStatus;
+
+	/**
+	 * 审核状态(1关闭,2通过)
+	 */
+	@ApiModelProperty("审核状态")
+	private String reviewStatus;
+
+	/**
+	 * 站类(1雨量站2河道水情站3水库水情站,4政区.5人工)
+	 */
+	@ApiModelProperty("站类")
+	private String type;
+
+	@ApiModelProperty("备注")
+	private String remark;
+
+	/**
+	 * 雨量站预警频率(1,2,3,4,5,6)对应(30分钟,1小时,3小时,6小时,12小时,24小时)
+	 */
+	@ApiModelProperty("雨量站预警频率")
+	private Integer rainWarnRate;
+
+	/***
+	 * 预警类别(监测雨量、监测河道水位、监测水库水位、政区预警、河道洪水、泥石流、山体滑坡、工程险情、突发)
+	 */
+	@ApiModelProperty("预警类别")
+	private String warnSort;
+
+
+	@ApiModelProperty("预警定位(点,面)")
+	private String warnLocation;
+
+	@ApiModelProperty("预警政区")
+	private String warnAdcd;
+
+	@ApiModelProperty("用户政区")
+	private String userAdcd;
+
+	@ApiModelProperty("预警点经度")
+	private String warnLgtd;
+
+	@ApiModelProperty("预警点纬度")
+	private String warnLttd;
+
+	@ApiModelProperty("降雨时段")
+	private String intv;
+
+	@ApiModelProperty("降雨总量")
+	private Double drp;
+
+	@ApiModelProperty("河道水位")
+	private Double z;
+
+	@ApiModelProperty("河道流量")
+	private Double q;
+
+	@ApiModelProperty("河道水势")
+	private String wptn;
+
+	@ApiModelProperty("水库水位")
+	private Double rz;
+
+	@ApiModelProperty("水库水势")
+	private String rwptn;
+
+	@ApiModelProperty("水库流量")
+	private Double inq;
+
+	@ApiModelProperty("关联预警Id")
+	private String relWarnId;
+
+	@ApiModelProperty("原创建人")
+	private Long originalCreateUser;
+
+	@ApiModelProperty("原创建时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8"
+	)
+	private Date originalCreateTime;
+
+	@ApiModelProperty("原表更新人")
+	private Long originalUpdateUser;
+
+	@ApiModelProperty("原表更新时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8"
+	)
+	private Date originalUpdateTime;
+}

+ 22 - 0
src/main/java/org/springblade/etl/mapper/EtlWarningInfoMapper.java

@@ -0,0 +1,22 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/24
+ */
+package org.springblade.etl.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.etl.entity.EtlWarningInfoEntity;
+
+
+/***
+ * Date:2022/8/24
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface EtlWarningInfoMapper extends BaseMapper<EtlWarningInfoEntity> {
+}

+ 67 - 0
src/main/java/org/springblade/etl/mapper/EtlWarningInfoMapper.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.etl.mapper.EtlWarningInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="etlWarningInfoEntityResultMap" type="org.springblade.etl.entity.EtlWarningInfoEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+
+        <result column="STCD" property="stcd"/>
+        <result column="WARN_NAME" property="warnName"/>
+        <result column="WARN_TIME" property="warnTime"/>
+        <result column="WARN_LEVEL_CODE" property="warnLevelCode"/>
+        <result column="WARN_INFO" property="warnInfo"/>
+        <result column="WARN_STATUS" property="warnStatus"/>
+        <result column="REVIEW_STATUS" property="reviewStatus"/>
+        <result column="TYPE" property="type"/>
+        <result column="REMARK" property="remark"/>
+        <result column="RAIN_WARN_RATE" property="rainWarnRate"/>
+        <result column="WARN_SORT" property="warnSort"/>
+        <result column="WARN_LOCATION" property="warnLocation"/>
+        <result column="WARN_ADCD" property="warnAdcd"/>
+        <result column="USER_ADCD" property="userAdcd"/>
+        <result column="WARN_LGTD" property="warnLgtd"/>
+        <result column="WARN_LTTD" property="warnLttd"/>
+        <result column="INTV" property="intv"/>
+        <result column="DRP" property="drp"/>
+        <result column="Z" property="z"/>
+        <result column="Q" property="q"/>
+        <result column="WPTN" property="wptn"/>
+        <result column="RZ" property="rz"/>
+        <result column="RWPTN" property="rwptn"/>
+        <result column="INQ" property="inq"/>
+        <result column="REL_WARN_ID" property="relWarnId"/>
+        <result column="ORIGINAL_CREATE_USER" property="originalCreateUser"/>
+        <result column="ORIGINAL_CREATE_TIME" property="originalCreateTime"/>
+        <result column="ORIGINAL_UPDATE_USER" property="originalUpdateUser"/>
+        <result column="ORIGINAL_UPDATE_TIME" property="originalUpdateTime"/>
+    </resultMap>
+
+
+
+
+    <!--<select id="selectPage" resultMap="checkOrderInfoVOResultMap">-->
+        <!--SELECT-->
+         <!--o.*,u.real_name,i.rtu_name,p.project_name,d2.dept_name AS org_name-->
+        <!--FROM-->
+        <!--rtu_failure_check_order o-->
+        <!--LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code-->
+        <!--LEFT JOIN blade_user u ON u.id = o.update_user-->
+        <!--LEFT JOIN  project_info p ON i.project_id = p.id-->
+        <!--LEFT JOIN  blade_dept d2 ON i.org_id = d2.id-->
+        <!--WHERE-->
+        <!--o.is_deleted = 0-->
+        <!--<if test="checkOrderInfoDTO.rtuCode!=null">-->
+            <!--and o.rtu_code like concat(concat('%', #{checkOrderInfoDTO.rtuCode}), '%')-->
+        <!--</if>-->
+        <!--<if test="checkOrderInfoDTO.rtuName!=null">-->
+            <!--and i.rtu_name like concat(concat('%', #{checkOrderInfoDTO.rtuName}), '%')-->
+        <!--</if>-->
+    <!--</select>-->
+</mapper>

+ 27 - 0
src/main/java/org/springblade/etl/service/IEtlWarningService.java

@@ -0,0 +1,27 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/8
+ */
+package org.springblade.etl.service;
+
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.etl.entity.EtlWarningInfoEntity;
+
+
+import java.util.Date;
+import java.util.List;
+
+
+/***
+ * Date:2022/9/8
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IEtlWarningService extends BaseService<EtlWarningInfoEntity> {
+
+}

+ 29 - 0
src/main/java/org/springblade/etl/service/impl/EtlWarningServiceImpl.java

@@ -0,0 +1,29 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/8
+ */
+package org.springblade.etl.service.impl;
+
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.etl.entity.EtlWarningInfoEntity;
+import org.springblade.etl.mapper.EtlWarningInfoMapper;
+import org.springblade.etl.service.IEtlWarningService;
+
+import org.springframework.stereotype.Service;
+
+
+
+/***
+ * Date:2022/9/8
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class EtlWarningServiceImpl extends BaseServiceImpl<EtlWarningInfoMapper, EtlWarningInfoEntity> implements IEtlWarningService {
+
+}

+ 352 - 0
src/main/java/org/springblade/modules/business/check/order/controller/RtuCheckOrderController.java

@@ -0,0 +1,352 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.order.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.constant.BusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.ConcurrentDateFormat;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.enums.EquipmentStatusEnum;
+import org.springblade.enums.OrderFromEnum;
+import org.springblade.enums.OrderStatusEnum;
+import org.springblade.enums.WarningStatusEnum;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+import org.springblade.modules.business.check.order.mapper.RtuCheckOrderMapper;
+import org.springblade.modules.business.check.order.service.IRtuCheckOrderService;
+import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
+import org.springblade.modules.business.check.order.wrapper.RtuCheckOrderWrapper;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+import org.springblade.modules.business.check.process.service.IRtuOrderProcessService;
+import org.springblade.modules.business.check.process.vo.OrderProcessInfoVO;
+import org.springblade.modules.business.check.process.wrapper.RtuOrderProcessWrapper;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.project.base.entity.ProjectTreeNodeEntity;
+import org.springblade.modules.business.rtumanage.entity.RtuStatusEntity;
+import org.springblade.modules.business.rtumanage.service.IRtuManageService;
+import org.springblade.modules.business.warning.entity.RtuWarningInfoEntity;
+import org.springblade.modules.business.warning.service.IRtuWarningService;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springblade.modules.system.service.IDictBizService;
+import org.springblade.modules.system.service.IUserService;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/rtu/check/order")
+@AllArgsConstructor
+@Api(value = "测站设备故障工单管理模块", tags = "测站设备故障工单管理模块")
+public class RtuCheckOrderController extends BladeController {
+
+	private final IRtuCheckOrderService checkOrderService;
+	private final IRtuOrderProcessService processService;
+	private final IRtuWarningService warningService;
+	private final IDictBizService dictBizService;
+	private final IRtuManageService manageService;
+
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "列表", notes = "传入CheckOrderInfoDTO")
+	public R<List<CheckOrderInfoVO>> page(CheckOrderInfoDTO checkOrderInfoDTO) {
+
+
+		LambdaQueryWrapper<CheckOrderInfoEntity> wrapper = Wrappers.<CheckOrderInfoEntity>query().lambda();
+		if (checkOrderInfoDTO.getRtuCode() != null) {
+			wrapper.eq(CheckOrderInfoEntity::getRtuCode, checkOrderInfoDTO.getRtuCode());
+		}
+		wrapper.orderByAsc(CheckOrderInfoEntity::getOrderStatusKey);
+		wrapper.orderByDesc(CheckOrderInfoEntity::getUpdateTime);
+		//wrapper.last("limit 1");
+		List<CheckOrderInfoEntity> pages = checkOrderService.list(wrapper);
+
+		return R.data(RtuCheckOrderWrapper.build().listVO(pages));
+	}
+
+	/**
+	 * 多表联合查询自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "orgId", value = "机构ID", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "projectId", value = "项目ID", paramType = "query", dataType = "string")
+	})
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入checkOrderInfoDTO")
+	public R<IPage<CheckOrderInfoVO>> page(@ApiIgnore CheckOrderInfoDTO checkOrderInfoDTO, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_SUPER_ADMIN.equals(user.getRoleName())) {
+			if (user.getDeptId().equals("" + checkOrderInfoDTO.getOrgId())) {
+				checkOrderInfoDTO.setOrgId(null);
+				checkOrderInfoDTO.setProjectId(null);
+			}
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+			if (checkOrderInfoDTO.getOrgId() == null) {
+				checkOrderInfoDTO.setOrgId(Func.toLong(user.getDeptId()));
+			}
+		}
+
+		IPage<CheckOrderInfoVO> pages = checkOrderService.selectPage(Condition.getPage(query), checkOrderInfoDTO);
+		List<CheckOrderInfoVO> list = pages.getRecords();
+		for (CheckOrderInfoVO v : list) {
+			RtuCheckOrderWrapper.build().addInfoVO(v);
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 多表联合查询自定义分页
+	 */
+	@GetMapping("/my/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string")
+	})
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入checkOrderInfoDTO")
+	public R<IPage<CheckOrderInfoVO>> mypage(@ApiIgnore CheckOrderInfoDTO checkOrderInfoDTO, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		checkOrderInfoDTO.setOrderConfirmUser(user.getUserId());
+		IPage<CheckOrderInfoVO> pages = checkOrderService.selectPage(Condition.getPage(query), checkOrderInfoDTO);
+		List<CheckOrderInfoVO> list = pages.getRecords();
+		for (CheckOrderInfoVO v : list) {
+			RtuCheckOrderWrapper.build().addInfoVO(v);
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 多表联合查询自定义分页
+	 */
+	@GetMapping("/today/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string")
+	})
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入checkOrderInfoDTO")
+	public R<IPage<CheckOrderInfoVO>> todayPage(@ApiIgnore CheckOrderInfoDTO checkOrderInfoDTO, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+			checkOrderInfoDTO.setOrgId(Func.toLong(user.getDeptId()));
+		} else {
+			checkOrderInfoDTO.setOrgId(null);
+		}
+		Date date = new Date();
+		String dt = Func.formatDateTime(date);
+		checkOrderInfoDTO.setCreateTime(Func.parse(dt, ConcurrentDateFormat.of("yyyy-MM-dd")));
+		IPage<CheckOrderInfoVO> pages = checkOrderService.selectPage(Condition.getPage(query), checkOrderInfoDTO);
+		List<CheckOrderInfoVO> list = pages.getRecords();
+		for (CheckOrderInfoVO v : list) {
+			RtuCheckOrderWrapper.build().addInfoVO(v);
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入CheckOrderInfoEntity")
+	public R<CheckOrderInfoVO> detail(CheckOrderInfoEntity checkOrderInfoEntity) {
+		CheckOrderInfoEntity detail = checkOrderService.getOne(Condition.getQueryWrapper(checkOrderInfoEntity));
+		return R.data(RtuCheckOrderWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入checkOrderInfoEntity")
+	public R save(@RequestBody CheckOrderInfoEntity checkOrderInfoEntity) {
+		List<DictBiz> statusdicts = DictBizCache.getList("rtu_check_order_status");
+		for (DictBiz biz : statusdicts) {
+			if (biz.getDictKey().equals("" + OrderStatusEnum.STATUS_CREATE.getCode())) {
+				checkOrderInfoEntity.setOrderStatusKey(biz.getId());
+				break;
+			}
+		}
+
+		checkOrderService.save(checkOrderInfoEntity);
+		OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
+		processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+		processInfoEntity.setOrderStatusKey(checkOrderInfoEntity.getOrderStatusKey());
+		processInfoEntity.setProcessDesc(checkOrderInfoEntity.getOrderDesc());
+		return R.status(processService.save(processInfoEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入checkOrderInfoEntity")
+	public R update(@RequestBody CheckOrderInfoEntity checkOrderInfoEntity) {
+		return R.status(checkOrderService.updateById(checkOrderInfoEntity));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入checkOrderInfoEntity")
+	public R submit(@RequestBody CheckOrderInfoEntity checkOrderInfoEntity) {
+		return R.status(checkOrderService.saveOrUpdate(checkOrderInfoEntity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入projectInfoEntity")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = checkOrderService.deleteLogic(Func.toLongList(ids));
+		return R.status(temp);
+	}
+
+	/**
+	 * 工单关闭
+	 *
+	 * @param checkOrderInfoEntity
+	 * @return
+	 */
+	@PostMapping("/close")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "id", value = "工单ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "orderDesc", value = "处理意见", paramType = "query", dataType = "string")
+	})
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "工单关闭", notes = "传入checkOrderInfoEntity")
+	public R orderClose(@ApiIgnore CheckOrderInfoEntity checkOrderInfoEntity) {
+		BladeUser user = AuthUtil.getUser();
+		List<DictBiz> statusdicts = dictBizService.getList("rtu_check_order_status");
+		for (DictBiz biz : statusdicts) {
+			if (biz.getDictKey().equals("" + OrderStatusEnum.STATUS_CLOSE.getCode())) {
+				checkOrderInfoEntity.setOrderStatusKey(biz.getId());
+				break;
+			}
+		}
+
+		checkOrderService.updateOrderStatus(checkOrderInfoEntity);
+		OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
+		processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+		processInfoEntity.setOrderStatusKey(checkOrderInfoEntity.getOrderStatusKey());
+		processInfoEntity.setProcessDesc(checkOrderInfoEntity.getOrderDesc());
+
+		processInfoEntity.setCreateUser(user.getUserId());
+		processInfoEntity.setUpdateUser(user.getUserId());
+		processService.save(processInfoEntity);
+
+		CheckOrderInfoEntity detail = this.checkOrderService.getById(checkOrderInfoEntity.getId());
+		List<DictBiz> orderFromDict = dictBizService.getList("rtu_check_order_from");
+		for (DictBiz biz : orderFromDict) {
+			if (biz.getDictKey().equals(OrderFromEnum.FROM_WARNING.getCode())) {
+				RtuWarningInfoEntity warningInfoEntity = this.warningService.getById(detail.getWarnId());
+				warningInfoEntity.setWarningRecoveryTime(new Date());
+				warningInfoEntity.setWarningStatus(WarningStatusEnum.STATUS_CLOSE.getCode());
+				warningInfoEntity.setUpdateTime(new Date());
+				warningInfoEntity.setUpdateUser(user.getUserId());
+				this.warningService.updateById(warningInfoEntity);
+				break;
+			}
+		}
+
+		RtuStatusEntity rtuStatusEntity = new RtuStatusEntity();
+		rtuStatusEntity.setRunStatusId(EquipmentStatusEnum.STATUS_RUN.getCode());
+		this.manageService.updateRtuStatus(rtuStatusEntity);
+
+		return R.success("工单关闭已操作成功!");
+	}
+
+
+	/**
+	 * 查询最新的数据
+	 */
+	@GetMapping("/last/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<List<CheckOrderInfoVO>> lastList() {
+		LambdaQueryWrapper<CheckOrderInfoEntity> wrapper = Wrappers.<CheckOrderInfoEntity>query().lambda();
+		wrapper.orderByDesc(CheckOrderInfoEntity::getUpdateTime);
+		wrapper.last("limit 1");
+		List<CheckOrderInfoEntity> pages = checkOrderService.list(wrapper);
+		return R.data(RtuCheckOrderWrapper.build().listVO(pages));
+	}
+
+
+	/**
+	 * 工单确认
+	 *
+	 * @param checkOrderInfoEntity
+	 * @return
+	 */
+	@PostMapping("/confirm")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "工单确认", notes = "传入checkOrderInfoEntity")
+	public R orderConfirm(@RequestBody CheckOrderInfoEntity checkOrderInfoEntity) {
+		List<DictBiz> statusdicts = DictBizCache.getList("rtu_check_order_status");
+		for (DictBiz biz : statusdicts) {
+			if (biz.getDictKey().equals("" + OrderStatusEnum.STATUS_CONFIRM.getCode())) {
+				checkOrderInfoEntity.setOrderStatusKey(biz.getId());
+				break;
+			}
+		}
+		BladeUser user = AuthUtil.getUser();
+		CheckOrderInfoEntity detail = this.checkOrderService.getById(checkOrderInfoEntity.getId());
+		if (null == detail || null != detail.getOrderConfirmUser()) {
+			return R.status(false);
+		}
+
+		//LambdaUpdateWrapper<CheckOrderInfoEntity> wrapper = Wrappers.<CheckOrderInfoEntity>update().lambda();
+		//wrapper.set(CheckOrderInfoEntity::getOrderStatusKey,checkOrderInfoEntity.getOrderStatusKey());
+		//wrapper.set(CheckOrderInfoEntity::getOrderConfirmUser,user.getUserId());
+		detail.setOrderStatusKey(checkOrderInfoEntity.getOrderStatusKey());
+		detail.setOrderConfirmUser(user.getUserId());
+		detail.setUpdateTime(new Date());
+		checkOrderService.updateById(detail);
+
+
+		OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
+		processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+		processInfoEntity.setOrderStatusKey(checkOrderInfoEntity.getOrderStatusKey());
+		processInfoEntity.setProcessDesc(user.getRoleName() + " " + user.getUserName() + " 已经确认工单");
+		return R.status(processService.save(processInfoEntity));
+	}
+
+
+}

+ 44 - 0
src/main/java/org/springblade/modules/business/check/order/dto/CheckOrderInfoDTO.java

@@ -0,0 +1,44 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.order.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CheckOrderInfoDTO extends CheckOrderInfoEntity {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty("测站名称")
+	private String rtuName;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+}

+ 83 - 0
src/main/java/org/springblade/modules/business/check/order/entity/CheckOrderInfoEntity.java

@@ -0,0 +1,83 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.order.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("rtu_failure_check_order")
+public class CheckOrderInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 测站编码
+	 */
+	@ApiModelProperty("测站编码")
+	private String rtuCode;
+
+
+	/**
+	 * 工单来源,字典
+	 */
+	@ApiModelProperty("工单来源")
+	private Long orderFromKey;
+
+
+	/**
+	 * 工单状态,字典
+	 */
+	@ApiModelProperty("工单状态")
+	private Long orderStatusKey;
+
+	/**
+	 * 工单说明
+	 */
+	@ApiModelProperty(value = "工单说明")
+	private String orderDesc;
+	/**
+	 * 工单确认人
+	 */
+	@ApiModelProperty(value = "工单确认人")
+	private Long orderConfirmUser;
+	/**
+	 * 预警ID
+	 */
+	@ApiModelProperty(value = "预警ID")
+	private Long warnId;
+
+	/**
+	 * 预警ID
+	 */
+	@ApiModelProperty(value = "预警ID")
+	private Integer orderClose;
+
+	/**
+	 * 预警ID
+	 */
+	@ApiModelProperty(value = "预警ID")
+	private Integer orderConfirm;
+
+
+}

+ 36 - 0
src/main/java/org/springblade/modules/business/check/order/mapper/RtuCheckOrderMapper.java

@@ -0,0 +1,36 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.order.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
+
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface RtuCheckOrderMapper extends BaseMapper<CheckOrderInfoEntity> {
+	/**
+	 * 自定义分页
+	 *
+	 * @param page   分页
+	 * @param checkOrderInfoDTO 实体
+	 * @return List<RtuInfoVO>
+	 */
+	List<CheckOrderInfoVO> selectPage(IPage page, @Param("checkOrderInfoDTO") CheckOrderInfoDTO checkOrderInfoDTO);
+}

+ 83 - 0
src/main/java/org/springblade/modules/business/check/order/mapper/RtuCheckOrderMapper.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.check.order.mapper.RtuCheckOrderMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="checkOrderInfoResultMap" type="org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="order_desc" property="orderDesc"/>
+        <result column="order_from_key" property="orderFromKey"/>
+        <result column="order_status_key" property="orderStatusKey"/>
+        <result column="order_confirm_user" property="orderConfirmUser"/>
+        <result column="warn_id" property="warnId"/>
+
+    </resultMap>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="checkOrderInfoVOResultMap" type="org.springblade.modules.business.check.order.vo.CheckOrderInfoVO">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="order_desc" property="orderDesc"/>
+        <result column="order_from_key" property="orderFromKey"/>
+        <result column="order_status_key" property="orderStatusKey"/>
+        <result column="order_confirm_user" property="orderConfirmUser"/>
+        <result column="rtu_name" property="rtuName"/>
+        <result column="real_name" property="processorName"/>
+        <result column="project_name" property="projectName"/>
+        <result column="org_name" property="orgName"/>
+        <result column="warn_id" property="warnId"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="location_desc" property="locationDesc"/>
+    </resultMap>
+
+
+    <select id="selectPage" resultMap="checkOrderInfoVOResultMap">
+        SELECT
+         o.*,u.real_name,i.rtu_name,p.project_name,d2.dept_name AS org_name,i.lng,i.lat,i.location_desc
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code
+        LEFT JOIN blade_user u ON u.id = o.update_user
+        LEFT JOIN project_info p ON i.project_id = p.id
+        LEFT JOIN blade_user_dept ud ON ud.user_id=u.id
+        LEFT JOIN blade_dept d2 ON ud.dept_id = d2.id
+        WHERE
+        o.is_deleted = 0
+        <if test="checkOrderInfoDTO.rtuCode!=null">
+            and o.rtu_code like concat(concat('%', #{checkOrderInfoDTO.rtuCode}), '%')
+        </if>
+        <if test="checkOrderInfoDTO.rtuName!=null">
+            and i.rtu_name like concat(concat('%', #{checkOrderInfoDTO.rtuName}), '%')
+        </if>
+        <if test="checkOrderInfoDTO.orgId!=null">
+            and i.org_id = #{checkOrderInfoDTO.orgId}
+        </if>
+        <if test="checkOrderInfoDTO.projectId !=null">
+            and i.project_id = #{checkOrderInfoDTO.projectId}
+        </if>
+        <if test="checkOrderInfoDTO.orderConfirmUser!=null">
+            and o.order_confirm_user = #{checkOrderInfoDTO.orderConfirmUser}
+        </if>
+
+        <if test="checkOrderInfoDTO.createTime!=null">
+            and o.create_time >= #{checkOrderInfoDTO.createTime}
+        </if>
+
+         order by o.update_time desc
+
+    </select>
+</mapper>

+ 42 - 0
src/main/java/org/springblade/modules/business/check/order/service/IRtuCheckOrderService.java

@@ -0,0 +1,42 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.order.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtumanage.vo.RtuStatusVO;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IRtuCheckOrderService extends BaseService<CheckOrderInfoEntity> {
+	/**
+	 * 自定义分页
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	IPage<CheckOrderInfoVO> selectPage(IPage<CheckOrderInfoVO> page, CheckOrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 更新工单状态
+	 * @param orderInfoEntity
+	 * @return
+	 */
+	boolean updateOrderStatus(CheckOrderInfoEntity orderInfoEntity);
+}

+ 51 - 0
src/main/java/org/springblade/modules/business/check/order/service/impl/RtuCheckOrderServiceImpl.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.order.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.enums.OrderStatusEnum;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+import org.springblade.modules.business.check.order.mapper.RtuCheckOrderMapper;
+import org.springblade.modules.business.check.order.service.IRtuCheckOrderService;
+import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class RtuCheckOrderServiceImpl extends BaseServiceImpl<RtuCheckOrderMapper, CheckOrderInfoEntity> implements IRtuCheckOrderService {
+	@Override
+	public IPage<CheckOrderInfoVO> selectPage(IPage<CheckOrderInfoVO> page, CheckOrderInfoDTO checkOrderInfoDTO) {
+		return page.setRecords(baseMapper.selectPage(page, checkOrderInfoDTO));
+	}
+
+	@Override
+	public boolean updateOrderStatus(CheckOrderInfoEntity orderInfoEntity) {
+
+		LambdaUpdateWrapper<CheckOrderInfoEntity> updateWrapper = Wrappers.<CheckOrderInfoEntity>update().lambda();
+		updateWrapper.eq(CheckOrderInfoEntity::getId, orderInfoEntity.getId());
+		updateWrapper.set(CheckOrderInfoEntity::getOrderStatusKey, orderInfoEntity.getOrderStatusKey());
+		updateWrapper.set(CheckOrderInfoEntity::getOrderDesc, orderInfoEntity.getOrderDesc());
+		updateWrapper.set(CheckOrderInfoEntity::getUpdateTime, new Date());
+		this.update(updateWrapper);
+
+		return false;
+	}
+}

+ 85 - 0
src/main/java/org/springblade/modules/business/check/order/vo/CheckOrderInfoVO.java

@@ -0,0 +1,85 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.order.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CheckOrderInfoVO extends CheckOrderInfoEntity {
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty(value = "测站名称")
+	private String rtuName;
+
+	/**
+	 * 经度
+	 */
+	@ApiModelProperty(value = "经度")
+	private String lng;
+
+	/**
+	 * 纬度
+	 */
+	@ApiModelProperty(value = "纬度")
+	private String lat;
+
+	/**
+	 * 测站位置说明
+	 */
+	@ApiModelProperty(value = "测站位置说明")
+	private String locationDesc;
+
+	/**
+	 * 项目名称
+	 */
+	@ApiModelProperty(value = "项目名称")
+	private String projectName;
+
+	/**
+	 * 机构名称
+	 */
+	@ApiModelProperty(value = "机构名称")
+	private String orgName;
+
+	/**
+	 * 工单来源名称
+	 */
+	@ApiModelProperty(value = "工单来源")
+	private String orderFromName;
+
+	/**
+	 * 工单状态名称
+	 */
+	@ApiModelProperty(value = "工单状态")
+	private String orderStatusName;
+
+	/**
+	 * 处理人名称
+	 */
+	@ApiModelProperty(value = "处理人")
+	private String processorName;
+
+	/**
+	 * 是否确认
+	 */
+	@ApiModelProperty(value = "是否确认")
+	private Integer isConfirm;
+}

+ 62 - 0
src/main/java/org/springblade/modules/business/check/order/wrapper/RtuCheckOrderWrapper.java

@@ -0,0 +1,62 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.order.wrapper;
+
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+import org.springblade.modules.business.project.base.wrapper.ProjectInfoWrapper;
+import org.springblade.modules.system.entity.DictBiz;
+
+import java.util.Objects;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public class RtuCheckOrderWrapper extends BaseEntityWrapper<CheckOrderInfoEntity, CheckOrderInfoVO> {
+	public static RtuCheckOrderWrapper build() {
+		return new RtuCheckOrderWrapper();
+	}
+
+	@Override
+	public CheckOrderInfoVO entityVO(CheckOrderInfoEntity entity) {
+		CheckOrderInfoVO checkOrderInfoVO = Objects.requireNonNull(BeanUtil.copy(entity, CheckOrderInfoVO.class));
+		DictBiz biz=DictBizCache.getById(checkOrderInfoVO.getOrderFromKey());
+		checkOrderInfoVO.setOrderFromName(biz.getDictValue());
+		biz=DictBizCache.getById(checkOrderInfoVO.getOrderStatusKey());
+		checkOrderInfoVO.setOrderStatusName(biz.getDictValue());
+
+		if (checkOrderInfoVO.getOrderConfirmUser() != null){
+			checkOrderInfoVO.setIsConfirm(1);
+		}else{
+			checkOrderInfoVO.setIsConfirm(0);
+		}
+		return checkOrderInfoVO;
+	}
+
+	public CheckOrderInfoVO addInfoVO(CheckOrderInfoVO checkOrderInfoVO) {
+		DictBiz biz=DictBizCache.getById(checkOrderInfoVO.getOrderFromKey());
+		checkOrderInfoVO.setOrderFromName(biz.getDictValue());
+		biz=DictBizCache.getById(checkOrderInfoVO.getOrderStatusKey());
+		checkOrderInfoVO.setOrderStatusName(biz.getDictValue());
+		if (checkOrderInfoVO.getOrderConfirmUser() != null){
+			checkOrderInfoVO.setIsConfirm(1);
+		}else{
+			checkOrderInfoVO.setIsConfirm(0);
+		}
+		return checkOrderInfoVO;
+	}
+}

+ 159 - 0
src/main/java/org/springblade/modules/business/check/process/controller/RtuOrderProcessController.java

@@ -0,0 +1,159 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.process.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.enums.OrderStatusEnum;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+import org.springblade.modules.business.check.order.service.IRtuCheckOrderService;
+import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
+import org.springblade.modules.business.check.order.wrapper.RtuCheckOrderWrapper;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+import org.springblade.modules.business.check.process.service.IRtuOrderProcessService;
+import org.springblade.modules.business.check.process.vo.OrderProcessInfoVO;
+import org.springblade.modules.business.check.process.wrapper.RtuOrderProcessWrapper;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IUserService;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/rtu/check/order/process")
+@AllArgsConstructor
+@Api(value = "工单处理管理模块", tags = "工单处理管理模块")
+public class RtuOrderProcessController extends BladeController {
+	private final IRtuOrderProcessService rtuOrderProcessService;
+	private final IRtuCheckOrderService checkOrderService;
+    private final IUserService userService;
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<OrderProcessInfoVO>> list(Query query) {
+		IPage<OrderProcessInfoEntity> pages = rtuOrderProcessService.page(Condition.getPage(query));
+		return R.data(RtuOrderProcessWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 多表联合查询自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "id", value = "工单ID", paramType = "query", dataType = "long")
+	})
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入checkOrderInfoDTO")
+	public R<IPage<OrderProcessInfoVO>> page(CheckOrderInfoDTO checkOrderInfoDTO, Query query) {
+		IPage<OrderProcessInfoEntity> pages = rtuOrderProcessService.selectPage(Condition.getPage(query), checkOrderInfoDTO);
+		return R.data(RtuOrderProcessWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "id", value = "填报ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入orderProcessInfoEntity")
+	public R<OrderProcessInfoVO> detail(OrderProcessInfoEntity orderProcessInfoEntity) {
+		OrderProcessInfoEntity detail = rtuOrderProcessService.getOne(Condition.getQueryWrapper(orderProcessInfoEntity));
+		OrderProcessInfoVO vo =RtuOrderProcessWrapper.build().entityVO(detail);
+		CheckOrderInfoEntity checkOrderInfoEntity = checkOrderService.getById(vo.getOrderId());
+		User user= userService.getById(checkOrderInfoEntity.getOrderConfirmUser());
+		vo.setOrderConfirmUserName(user.getRealName());
+		DictBiz biz= DictBizCache.getById(checkOrderInfoEntity.getOrderFromKey());
+		vo.setOrderFromText(biz.getDictValue());
+		return R.data(vo);
+	}
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入orderProcessInfoEntity")
+	public R save(@RequestBody OrderProcessInfoEntity orderProcessInfoEntity) {
+		CheckOrderInfoEntity checkOrderInfoEntity = new CheckOrderInfoEntity();
+		checkOrderInfoEntity.setId(orderProcessInfoEntity.getOrderId());
+		List<DictBiz> statusdicts= DictBizCache.getList("rtu_check_order_status");
+		for (DictBiz biz:statusdicts){
+			if (biz.getDictKey().equals(""+OrderStatusEnum.STATUS_PROCESS.getCode())){
+				checkOrderInfoEntity.setOrderStatusKey(biz.getId());
+				break;
+			}
+		}
+
+		checkOrderInfoEntity.setOrderDesc(orderProcessInfoEntity.getProcessDesc());
+		checkOrderService.updateOrderStatus(checkOrderInfoEntity);
+
+		orderProcessInfoEntity.setOrderStatusKey(checkOrderInfoEntity.getOrderStatusKey());
+		return R.status(rtuOrderProcessService.save(orderProcessInfoEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入orderProcessInfoEntity")
+	public R update(@RequestBody OrderProcessInfoEntity orderProcessInfoEntity) {
+		return R.status(rtuOrderProcessService.updateById(orderProcessInfoEntity));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入orderProcessInfoEntity")
+	public R submit(@RequestBody OrderProcessInfoEntity orderProcessInfoEntity) {
+		return R.status(rtuOrderProcessService.saveOrUpdate(orderProcessInfoEntity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入projectInfoEntity")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = rtuOrderProcessService.deleteLogic(Func.toLongList(ids));
+		return R.status(temp);
+	}
+
+
+}

+ 317 - 0
src/main/java/org/springblade/modules/business/check/process/entity/OrderProcessInfoEntity.java

@@ -0,0 +1,317 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.process.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("rtu_failure_check_order_process")
+public class OrderProcessInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+
+	/**
+	 * 工单ID
+	 */
+	@ApiModelProperty("工单ID")
+	private Long orderId;
+
+
+	/**
+	 * 处理说明
+	 */
+	@ApiModelProperty("处理说明")
+	private String processDesc;
+
+	/**
+	 * 图片一是否拍摄
+	 */
+	@ApiModelProperty("图片一是否拍摄")
+	private Integer basePhoto1Take;
+
+
+	/**
+	 * 图片一路径
+	 */
+	@ApiModelProperty("图片一路径")
+	private String basePhoto1Url;
+
+	/**
+	 * 图片二是否拍摄
+	 */
+	@ApiModelProperty("图片二是否拍摄")
+	private Integer basePhoto2Take;
+
+	/**
+	 * 图片二路径
+	 */
+	@ApiModelProperty("图片二路径")
+	private String basePhoto2Url;
+
+	/**
+	 * 工单状态,字典
+	 */
+	@ApiModelProperty("工单状态")
+	private Long orderStatusKey;
+
+
+	/**
+	 * RTU是否更换:0 否,1更换
+	 */
+	@ApiModelProperty("RTU是否更换")
+	private Integer rtuReplace;
+
+	/**
+	 * RTU说明
+	 */
+	@ApiModelProperty("RTU说明")
+	private String rtuDesc;
+
+	/**
+	 * RTU图片是否拍摄
+	 */
+	@ApiModelProperty("RTU图片是否拍摄")
+	private Integer rtuPhotoTake;
+
+	/**
+	 * RTU图片路径
+	 */
+	@ApiModelProperty("RTU图片路径")
+	private String rtuPhotoUrl;
+
+
+
+	/**
+	 * 测站运行状态:0 正常 1未修复
+	 */
+	@ApiModelProperty("测站运行状态")
+	private Integer rtuStatus;
+
+	/**
+	 * 翻斗式雨量计是否更换:0 否,1更换
+	 */
+	@ApiModelProperty("翻斗式雨量计是否更换")
+	private Integer rainSensorReplace;
+
+	/**
+	 * 雨量计说明
+	 */
+	@ApiModelProperty("雨量计说明")
+	private String rainSensorDesc;
+
+	/**
+	 * 是否有安装雨量计: 0 无,1 有
+	 */
+	@ApiModelProperty("是否有安装雨量计")
+	private Integer rainSensorActive;
+
+	/**
+	 * 雨量计状态:0 正常 1故障
+	 */
+	@ApiModelProperty("雨量计状态")
+	private Integer rainSensorStatus;
+
+	/**
+	 * 雨量计图片是否拍摄
+	 */
+	@ApiModelProperty("雨量计图片是否拍摄")
+	private Integer rainSensorPhotoTake;
+
+	/**
+	 * 雨量计图片路径
+	 */
+	@ApiModelProperty("雨量计图片路径")
+	private String rainSensorPhotoUrl;
+
+
+
+	/**
+	 * 水位计是否更换:0 否,1更换
+	 */
+	@ApiModelProperty("水位计是否更换:0 否,1更换")
+	private Integer waterSensorReplace;
+
+	/**
+	 * 水位计说明
+	 */
+	@ApiModelProperty("水位计说明")
+	private String waterSensorDesc;
+
+	/**
+	 * 是否有安装水位计: 0 无,1 有
+	 */
+	@ApiModelProperty("是否有安装水位计")
+	private Integer waterLevelSensorActive;
+
+	/**
+	 * 水位计状态:0 正常 1故障
+	 */
+	@ApiModelProperty("水位计状态")
+	private Integer waterLevelSensorStatus;
+
+
+
+	/**
+	 * 水位计图片是否拍摄
+	 */
+	@ApiModelProperty("水位计图片是否拍摄")
+	private Integer waterSensorPhotoTake;
+
+	/**
+	 * 水位计图片路径
+	 */
+	@ApiModelProperty("水位计图片路径")
+	private String waterSensorPhotoUrl;
+
+
+	/**
+	 * 墒情传感器是否更换:0 否,1更换
+	 */
+	@ApiModelProperty("墒情传感器是否更换:0 否,1更换")
+	private Integer groundSensorReplace;
+
+	/**
+	 * 墒情传感器说明
+	 */
+	@ApiModelProperty("墒情传感器说明")
+	private String groundSensorDesc;
+
+	/**
+	 * 是否有安装墒情计: 0 无,1 有
+	 */
+	@ApiModelProperty("是否有安装墒情计")
+	private Integer groundWaterSensorActive;
+	/**
+	 * 墒情计状态:0 正常 1故障
+	 */
+	@ApiModelProperty("墒情计状态")
+	private Integer groundWaterSensorStatus;
+
+	/**
+	 * 墒情图片是否拍摄
+	 */
+	@ApiModelProperty("墒情图片是否拍摄")
+	private Integer groundSensorPhotoTake;
+
+	/**
+	 * 墒情图片路径
+	 */
+	@ApiModelProperty("墒情图片路径")
+	private String groundSensorPhotoUrl;
+
+	/**
+	 *  蓄电池是否更换:0 否,1更换
+	 */
+	@ApiModelProperty("蓄电池是否更换:0 否,1更换")
+	private Integer batteryReplace;
+
+	/**
+	 *  太阳能板是否更换:0 否,1更换
+	 */
+	@ApiModelProperty("太阳能板是否更换:0 否,1更换")
+	private Integer sunPowerReplace;
+
+	/**
+	 * 供电系统状态:0 正常 1故障
+	 */
+	@ApiModelProperty("供电系统状态")
+	private Integer powerStatus;
+
+	/**
+	 * 供电说明
+	 */
+	@ApiModelProperty("供电说明")
+	private String powerDesc;
+
+	/**
+	 * 电池图片是否拍摄
+	 */
+	@ApiModelProperty("电池图片是否拍摄")
+	private Integer batteryPhotoTake;
+
+	/**
+	 * 电池图片路径
+	 */
+	@ApiModelProperty("电池图片路径")
+	private String batteryPhotoUrl;
+
+	/**
+	 * 太阳能板图片是否拍摄
+	 */
+	@ApiModelProperty("太阳能板图片是否拍摄")
+	private Integer sunPhotoTake;
+
+	/**
+	 * 太阳能板图片路径
+	 */
+	@ApiModelProperty("太阳能板图片路径")
+	private String sunPhotoUrl;
+
+	/**
+	 * 是否使用移动网络: 0 无,1 有
+	 */
+	@ApiModelProperty("是否有安装4G卡")
+	private Integer networkActive;
+
+	/**
+	 * 4G卡状态:0 正常 1故障
+	 */
+	@ApiModelProperty("4G卡状态")
+	private Integer networkStatus;
+
+	/**
+	 * 移动网络是否欠费: 0 正常,1 欠费
+	 */
+	@ApiModelProperty("移动网络是否欠费")
+	private Integer networkOverdue;
+
+	/**
+	 * 移动网络说明
+	 */
+	@ApiModelProperty("移动网络说明")
+	private String networkDesc;
+
+	/**
+	 * 是否使用卫星通讯: 0 无,1 有
+	 */
+	@ApiModelProperty("是否使用卫星通讯")
+	private Integer satelliteActive;
+
+	/**
+	 * 卫星通讯状态:0 正常 1故障
+	 */
+	@ApiModelProperty("卫星通讯状态")
+	private Integer satelliteStatus;
+
+	/**
+	 * 卫星通讯说明
+	 */
+	@ApiModelProperty("卫星通讯说明")
+	private String satelliteDesc;
+}

+ 27 - 0
src/main/java/org/springblade/modules/business/check/process/mapper/RtuOrderProcessMapper.java

@@ -0,0 +1,27 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.process.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface RtuOrderProcessMapper  extends BaseMapper<OrderProcessInfoEntity> {
+	List<OrderProcessInfoEntity> selectPage(IPage page, @Param("checkOrderInfoDTO") CheckOrderInfoDTO checkOrderInfoDTO);
+}

+ 89 - 0
src/main/java/org/springblade/modules/business/check/process/mapper/RtuOrderProcessMapper.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.check.process.mapper.RtuOrderProcessMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderProcessInfoResultMap"
+               type="org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+
+        <result column="order_id" property="orderId"/>
+        <result column="process_desc" property="processDesc"/>
+        <result column="order_status_key" property="orderStatusKey"/>
+
+        <result column="rtu_replace" property="rtuReplace"/>
+        <result column="rtu_desc" property="rtuDesc"/>
+        <result column="rtu_status" property="rtuStatus"/>
+
+        <result column="rain_sensor_replace" property="rainSensorReplace"/>
+        <result column="rain_sensor_desc" property="rainSensorDesc"/>
+        <result column="rain_sensor_status" property="rainSensorStatus"/>
+        <result column="rain_sensor_active" property="rainSensorActive"/>
+
+        <result column="water_sensor_replace" property="waterSensorReplace"/>
+        <result column="water_sensor_desc" property="waterSensorDesc"/>
+        <result column="water_level_sensor_status" property="waterLevelSensorStatus"/>
+        <result column="water_level_sensor_active" property="waterLevelSensorActive"/>
+
+        <result column="ground_sensor_replace_date" property="groundSensorReplace"/>
+        <result column="ground_sensor_desc" property="groundSensorDesc"/>
+        <result column="ground_water_sensor_status" property="groundWaterSensorStatus"/>
+        <result column="ground_water_sensor_active" property="groundWaterSensorActive"/>
+
+        <result column="battery_replace" property="batteryReplace"/>
+        <result column="sun_power_replace" property="sunPowerReplace"/>
+        <result column="power_desc" property="powerDesc"/>
+        <result column="power_status" property="powerStatus"/>
+
+        <result column="network_overdue" property="networkOverdue"/>
+        <result column="network_desc" property="networkDesc"/>
+        <result column="network_status" property="networkStatus"/>
+        <result column="network_active" property="networkActive"/>
+
+        <result column="satellite_desc" property="satelliteDesc"/>
+        <result column="satellite_status" property="satelliteStatus"/>
+        <result column="satellite_active" property="satelliteActive"/>
+
+
+        <result column="base_photo1_take" property="basePhoto1Take"/>
+        <result column="base_photo1_url" property="basePhoto1Url"/>
+        <result column="base_photo2_take" property="basePhoto2Take"/>
+        <result column="base_photo2_url" property="basePhoto2Url"/>
+        <result column="rtu_photo_take" property="rtuPhotoTake"/>
+        <result column="rtu_photo_url" property="rtuPhotoUrl"/>
+        <result column="rain_sensor_photo_take" property="rainSensorPhotoTake"/>
+        <result column="rain_sensor_photo_url" property="rainSensorPhotoUrl"/>
+        <result column="water_sensor_photo_take" property="waterSensorPhotoTake"/>
+        <result column="water_sensor_photo_url" property="waterSensorPhotoUrl"/>
+        <result column="ground_sensor_photo_take" property="groundSensorPhotoTake"/>
+        <result column="ground_sensor_photo_url" property="groundSensorPhotoUrl"/>
+        <result column="battery_photo_take" property="batteryPhotoTake"/>
+        <result column="battery_photo_url" property="batteryPhotoUrl"/>
+        <result column="sun_photo_take" property="sunPhotoTake"/>
+        <result column="sun_photo_url" property="sunPhotoUrl"/>
+
+    </resultMap>
+
+
+    <select id="selectPage" resultMap="orderProcessInfoResultMap">
+        SELECT
+        p.*
+        FROM
+        rtu_failure_check_order_process p
+        WHERE
+        p.is_deleted = 0
+        <if test="checkOrderInfoDTO.id!=null">
+            and p.order_id =#{checkOrderInfoDTO.id}
+        </if>
+
+        order by p.create_time desc
+
+    </select>
+
+</mapper>

+ 30 - 0
src/main/java/org/springblade/modules/business/check/process/service/IRtuOrderProcessService.java

@@ -0,0 +1,30 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.process.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IRtuOrderProcessService extends BaseService<OrderProcessInfoEntity> {
+	/**
+	 * 按工单ID查找填报处理记录
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	IPage<OrderProcessInfoEntity> selectPage(IPage<OrderProcessInfoEntity> page, CheckOrderInfoDTO checkOrderInfoDTO);
+}

+ 32 - 0
src/main/java/org/springblade/modules/business/check/process/service/impl/RtuOrderProcessServiceImpl.java

@@ -0,0 +1,32 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.process.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+import org.springblade.modules.business.check.process.mapper.RtuOrderProcessMapper;
+import org.springblade.modules.business.check.process.service.IRtuOrderProcessService;
+import org.springframework.stereotype.Service;
+
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class RtuOrderProcessServiceImpl  extends BaseServiceImpl<RtuOrderProcessMapper, OrderProcessInfoEntity> implements IRtuOrderProcessService {
+	@Override
+	public IPage<OrderProcessInfoEntity> selectPage(IPage<OrderProcessInfoEntity> page, CheckOrderInfoDTO checkOrderInfoDTO) {
+		return page.setRecords(baseMapper.selectPage(page, checkOrderInfoDTO));
+	}
+}

+ 45 - 0
src/main/java/org/springblade/modules/business/check/process/vo/OrderProcessInfoVO.java

@@ -0,0 +1,45 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.process.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrderProcessInfoVO extends OrderProcessInfoEntity {
+	/**
+	 * 工单状态名称
+	 */
+	@ApiModelProperty("工单状态")
+	private String orderStatusName;
+
+	/**
+	 * 工单确认人名称
+	 */
+	@ApiModelProperty("工单确认人名称")
+	private String orderConfirmUserName;
+
+	/**
+	 * 工单来源
+	 */
+	@ApiModelProperty("工单来源")
+	private String orderFromText;
+
+
+
+}

+ 41 - 0
src/main/java/org/springblade/modules/business/check/process/wrapper/RtuOrderProcessWrapper.java

@@ -0,0 +1,41 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.check.process.wrapper;
+
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+import org.springblade.modules.business.check.process.vo.OrderProcessInfoVO;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+import org.springblade.modules.business.project.base.wrapper.ProjectInfoWrapper;
+import org.springblade.modules.system.entity.DictBiz;
+
+import java.util.Objects;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public class RtuOrderProcessWrapper extends BaseEntityWrapper<OrderProcessInfoEntity, OrderProcessInfoVO> {
+	public static RtuOrderProcessWrapper build() {
+		return new RtuOrderProcessWrapper();
+	}
+	@Override
+	public OrderProcessInfoVO entityVO(OrderProcessInfoEntity entity) {
+		OrderProcessInfoVO orderProcessInfoVO = Objects.requireNonNull(BeanUtil.copy(entity, OrderProcessInfoVO.class));
+		DictBiz biz= DictBizCache.getById(entity.getOrderStatusKey());
+		orderProcessInfoVO.setOrderStatusName(biz.getDictValue());
+		return orderProcessInfoVO;
+	}
+
+}

+ 843 - 0
src/main/java/org/springblade/modules/business/data/manage/controller/DataManageController.java

@@ -0,0 +1,843 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/31
+ */
+package org.springblade.modules.business.data.manage.controller;
+
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.read.listener.ReadListener;
+import com.alibaba.fastjson.JSON;
+import com.bstek.ureport.parser.impl.searchform.DatetimeInputParser;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.log.annotation.ApiLog;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.ConcurrentDateFormat;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.business.data.manage.entity.RtuInfoTableDataEntity;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.service.IProjectBaseInfoService;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.service.IRtuBaseInfoService;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+
+/***
+ * Date:2022/8/31
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/data/manage")
+@AllArgsConstructor
+@Api(value = "数据管理模块", tags = "数据管理模块")
+public class DataManageController extends BladeController {
+
+	final IProjectBaseInfoService projectBaseInfoService;
+
+	final IRtuBaseInfoService rtuBaseInfoService;
+
+	private Double tranformPos(String lng) {
+		lng = lng
+			.trim()
+			.replace("g", "");
+		if (lng.indexOf("o") >= 0 || lng.indexOf("°") >= 0 || lng.indexOf("°") >= 0 || lng.indexOf("°") >= 0) {
+			lng = lng
+				.trim()
+				.replace("o", ":")
+				.replace("°", ":")
+				.replace("°", ":")
+				.replace("°", ":")
+				.replace("′", ":")
+				.replace("'", ":")
+				.replace("\"", "")
+				.replace("″", "")
+				.replace(".", ":");
+
+			String[] lntArr = lng.split(":");
+			Double result = 0D;
+			if (lntArr.length == 1) {
+				String[] lntArr2 = new String[3];
+				lntArr2[0] = lntArr[0];
+				lntArr2[1] = "0";
+				lntArr2[2] = "0";
+				lntArr = lntArr2;
+			} else if (lntArr.length == 2) {
+				String[] lntArr2 = new String[3];
+				lntArr2[0] = lntArr[0];
+				lntArr2[1] = lntArr[1];
+				lntArr2[2] = "0";
+				lntArr = lntArr2;
+			}
+			for (int i = lntArr.length; i > 0; i--) {
+				String str = lntArr[i - 1];
+				if (null != str) {
+					str = str.trim();
+					if (null != str && str.length() > 0) {
+						double v = Double.parseDouble(str);
+						if (i == 1) {
+							result = v + result;
+						} else {
+							result = (result + v) / 60;
+						}
+					} else {
+						double v = 0.0;
+						if (i == 1) {
+							result = v + result;
+						} else {
+							result = (result + v) / 60;
+						}
+					}
+				} else {
+					double v = 0.0;
+					if (i == 1) {
+						result = v + result;
+					} else {
+						result = (result + v) / 60;
+					}
+				}
+			}
+			return result;
+		} else {
+			String lng2 = lng;
+			lng2 = lng2
+				.trim()
+				.replace(".", ":");
+			String[] vs = lng2.split(":");
+			if (vs.length > 1) {
+				lng = lng
+					.trim()
+					.replace("o", ":")
+					.replace("°", ":")
+					.replace("°", ":")
+					.replace("°", ":")
+					.replace("′", ":")
+					.replace("'", ":")
+					.replace("\"", "")
+					.replace("″", "")
+					.replace(".", ":");
+
+				String[] lntArr = lng.split(":");
+				Double result = 0D;
+				if (lntArr.length == 1) {
+					String[] lntArr2 = new String[3];
+					lntArr2[0] = lntArr[0];
+					lntArr2[1] = "0";
+					lntArr2[2] = "0";
+					lntArr = lntArr2;
+				} else if (lntArr.length == 2) {
+					String[] lntArr2 = new String[3];
+					lntArr2[0] = lntArr[0];
+					lntArr2[1] = lntArr[1];
+					lntArr2[2] = "0";
+					lntArr = lntArr2;
+				}
+				for (int i = lntArr.length; i > 0; i--) {
+					String str = lntArr[i - 1];
+					if (null != str) {
+						str = str.trim();
+						if (null != str && str.length() > 0) {
+							double v = Double.parseDouble(str);
+							if (i == 1) {
+								result = v + result;
+							} else {
+								result = (result + v) / 60;
+							}
+						} else {
+							double v = 0.0;
+							if (i == 1) {
+								result = v + result;
+							} else {
+								result = (result + v) / 60;
+							}
+						}
+					} else {
+						double v = 0.0;
+						if (i == 1) {
+							result = v + result;
+						} else {
+							result = (result + v) / 60;
+						}
+					}
+				}
+				return result;
+			} else {
+				double v = Double.parseDouble(lng);
+				return v;
+			}
+
+		}
+
+	}
+
+	public static boolean isLetterDigit(String str) {
+		String regex = "^[a-z0-9A-Z]+$";
+		return str.matches(regex);
+	}
+
+
+	@ApiLog("测站信息-导入")
+	@GetMapping(value = "/import/rtu/test")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "导入测站信息", notes = "")
+	public R importTest() {
+		try {
+
+
+			String filePath = "D:\\tmp\\rtu\\xa.xlsx";
+
+			// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
+			EasyExcel.read(filePath, RtuInfoTableDataEntity.class, new ReadListener() {
+				@Override
+				public void invoke(Object o, AnalysisContext analysisContext) {
+					System.out.println(JSON.toJSONString(o));
+				}
+
+				@Override
+				public void doAfterAllAnalysed(AnalysisContext analysisContext) {
+
+				}
+			}).sheet().doRead();
+
+
+//			int sheetIndex = 0;
+//
+//			// 定义输入流
+//			FileInputStream fis = null;
+//			List<Map> datas = null;
+//
+//			try {
+//				// 创建输入流对象
+//				fis = new FileInputStream(filePath);
+//				// 创建一个easypoi使用的配置类
+//				ImportParams params = new ImportParams();
+//				// 设置表格坐标
+//				params.setStartSheetIndex(sheetIndex);
+//				// 校验Excel文件,去掉空行
+//				params.setNeedVerify(true);
+//				// 读取数据
+//				datas = ExcelImportUtil.importExcel(fis, Map.class, params);
+//			} catch (Exception e) {
+//				e.printStackTrace();
+//			} finally {
+//				try {
+//					if (fis != null) {
+//						fis.close();
+//					}
+//				} catch (IOException e) {
+//					e.printStackTrace();
+//				}
+//			}
+//
+//			for (Map apiInfo : datas) {
+//				System.out.println(apiInfo);
+//			}
+
+			return R.success("导入成功");
+		} catch (Exception e) {
+			return R.fail("导入错误 " + e.getMessage());
+		}
+	}
+
+
+	@ApiLog("测站信息-导入")
+	@PostMapping(value = "/import/rtu")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "导入测站信息", notes = "")
+	public R<Map<String, String>> importRtuTable(MultipartFile file, @RequestParam Map<String, Object> postData) {
+		try {
+			if (file.isEmpty() || !postData.containsKey("projectId")) {
+				return R.fail("上传文件为空");
+			}
+			if (!postData.containsKey("projectId")) {
+				return R.fail("参数为空");
+			}
+			String projectIdText = (String) postData.get("projectId");
+			Long projectId = Long.parseLong(projectIdText);
+			ProjectInfoEntity projectInfoEntity = projectBaseInfoService.getById(projectId);
+			Long orgId = projectInfoEntity.getOrgId();
+
+			InputStream inputStream = file.getInputStream();
+			String fileName = file.getOriginalFilename();
+			List<RtuInfoTableDataEntity> list = new LinkedList<>();
+			if (fileName.endsWith("xlsx")) {
+				EasyExcel.read(inputStream, RtuInfoTableDataEntity.class, new ReadListener() {
+					@Override
+					public void invoke(Object o, AnalysisContext analysisContext) {
+						RtuInfoTableDataEntity dataEntity = (RtuInfoTableDataEntity) o;
+						list.add(dataEntity);
+					}
+
+					@Override
+					public void doAfterAllAnalysed(AnalysisContext analysisContext) {
+						for (int i = 2; i < list.size(); i++) {
+							RtuInfoTableDataEntity dataEntity = list.get(i);
+							if (null != dataEntity.getRtuCode()) {
+								String rtuCode = dataEntity.getRtuCode().trim();
+								if (rtuCode.length() > 0) {
+									if (isLetterDigit(rtuCode)) {
+										RtuInfoEntity rtuInfoEntity = new RtuInfoEntity();
+										rtuInfoEntity.setRtuCode(rtuCode);
+										if (null != dataEntity.getCity()) {
+											rtuInfoEntity.setAdCity(dataEntity.getCity().trim());
+										}
+										if (null != dataEntity.getDist()) {
+											rtuInfoEntity.setAdDist(dataEntity.getDist().trim());
+										}
+										if (null != dataEntity.getRtuName()) {
+											rtuInfoEntity.setRtuName(dataEntity.getRtuName().trim());
+										}
+										if (null != dataEntity.getRtuKind()) {
+											rtuInfoEntity.setIsRain(0);
+											rtuInfoEntity.setIsRiver(0);
+											rtuInfoEntity.setIsRes(0);
+											rtuInfoEntity.setIsGround(0);
+											String kinds = dataEntity.getRtuKind().trim();
+											if (kinds.length() > 0) {
+												List<DictBiz> bizs = DictBizCache.getList("rtu_kind");
+												String kindList = "";
+												if (kinds.contains("水位")) {
+													rtuInfoEntity.setIsRes(1);
+													rtuInfoEntity.setIsRiver(1);
+													for (DictBiz biz : bizs) {
+														if (biz.getDictKey().equals("river")) {
+															if (kindList.length() > 0) {
+																kindList += ",";
+															}
+															kindList += Long.toString(biz.getId());
+														} else if (biz.getDictKey().equals("rsvr")) {
+															if (kindList.length() > 0) {
+																kindList += ",";
+															}
+															kindList += Long.toString(biz.getId());
+														}
+													}
+													rtuInfoEntity.setRtuKinds(kindList);
+												}
+												if (kinds.contains("雨量")) {
+													rtuInfoEntity.setIsRain(1);
+													for (DictBiz biz : bizs) {
+														if (biz.getDictKey().equals("rain")) {
+															if (kindList.length() > 0) {
+																kindList += ",";
+															}
+															kindList += Long.toString(biz.getId());
+															break;
+														}
+													}
+												}
+												if (kinds.contains("墒情")) {
+													rtuInfoEntity.setIsGround(1);
+													for (DictBiz biz : bizs) {
+														if (biz.getDictKey().equals("ground")) {
+															if (kindList.length() > 0) {
+																kindList += ",";
+															}
+															kindList += Long.toString(biz.getId());
+															break;
+														}
+													}
+												}
+												rtuInfoEntity.setRtuKinds(kindList);
+											}
+										}
+
+										if (null != dataEntity.getLocationDesc()) {
+											rtuInfoEntity.setLocationDesc(dataEntity.getLocationDesc().trim());
+										}
+
+										if (null != dataEntity.getLng()) {
+											ArrayList<String> textArr = new ArrayList<>();
+											textArr.add("");
+											String location = dataEntity.getLng().trim();
+											for (int l = 0; l < location.length(); l++) {
+												String subtext = location.substring(l, l + 1);
+												if (Func.isNumeric(subtext)) {
+													String str = textArr.get(textArr.size()-1);
+													str += subtext;
+													textArr.set(textArr.size()-1,str);
+												} else {
+													textArr.add("");
+												}
+											}
+											ArrayList<String> tmp = new ArrayList<>();
+											for(String text:textArr){
+												if (text.length()>0){
+													tmp.add(text);
+												}
+											}
+											if (tmp.size() >=4 ) {
+												//度分秒,秒有小数点
+												String v = tmp.get(2) + "." + tmp.get(3);
+												double lat = Double.parseDouble(v);
+												lat = lat / 60.0;
+												v = tmp.get(1);
+												lat = (Double.parseDouble(v) + lat) / 60.0;
+												v = tmp.get(0);
+												lat = Double.parseDouble(v) + lat;
+												rtuInfoEntity.setLng(String.format("%.06f", lat));
+											} else if (tmp.size() == 3) {
+												//度分秒
+												String v = tmp.get(2);
+												double lat = Double.parseDouble(v);
+												lat = lat / 60.0;
+												v = tmp.get(1);
+												lat = (Double.parseDouble(v) + lat) / 60.0;
+												v = tmp.get(0);
+												lat = Double.parseDouble(v) + lat;
+												rtuInfoEntity.setLng(String.format("%.06f", lat));
+
+											} else if (tmp.size() == 2) {
+												//度
+												String v = tmp.get(0) + "." + tmp.get(1);
+												double lat = Double.parseDouble(v);
+												rtuInfoEntity.setLng(String.format("%.06f", lat));
+											}
+
+										}
+
+										if (null != dataEntity.getLat()) {
+											ArrayList<String> textArr = new ArrayList<>();
+											textArr.add("");
+											String location = dataEntity.getLat().trim();
+											for (int l = 0; l < location.length(); l++) {
+												String subtext = location.substring(l, l + 1);
+												if (Func.isNumeric(subtext)) {
+													String str = textArr.get(textArr.size()-1);
+													str += subtext;
+													textArr.set(textArr.size()-1,str);
+												} else {
+													textArr.add("");
+												}
+											}
+											ArrayList<String> tmp = new ArrayList<>();
+											for(String text:textArr){
+												if (text.length()>0){
+													tmp.add(text);
+												}
+											}
+											if (tmp.size() >=4 ) {
+												//度分秒,秒有小数点
+												String v = tmp.get(2) + "." + tmp.get(3);
+												double lat = Double.parseDouble(v);
+												lat = lat / 60.0;
+												v = tmp.get(1);
+												lat = (Double.parseDouble(v) + lat) / 60.0;
+												v = tmp.get(0);
+												lat = Double.parseDouble(v) + lat;
+												rtuInfoEntity.setLat(String.format("%.06f", lat));
+											} else if (tmp.size() == 3) {
+												//度分秒
+												String v = tmp.get(2);
+												double lat = Double.parseDouble(v);
+												lat = lat / 60.0;
+												v = tmp.get(1);
+												lat = (Double.parseDouble(v) + lat) / 60.0;
+												v = tmp.get(0);
+												lat = Double.parseDouble(v) + lat;
+												rtuInfoEntity.setLat(String.format("%.06f", lat));
+
+											} else if (tmp.size() == 2) {
+												//度
+												String v = tmp.get(0) + "." + tmp.get(1);
+												double lat = Double.parseDouble(v);
+												rtuInfoEntity.setLat(String.format("%.06f", lat));
+											}
+
+										}
+										if (null != dataEntity.getManageCompany()) {
+											rtuInfoEntity.setManageCompany(dataEntity.getManageCompany().trim());
+										}
+
+
+										if (null != dataEntity.getRtuBrand()) {
+											rtuInfoEntity.setRtuBrand(dataEntity.getRtuBrand().trim());
+										}
+
+										if (null != dataEntity.getRtuModel()) {
+											rtuInfoEntity.setRtuModel(dataEntity.getRtuModel().trim());
+										}
+
+										if (null != dataEntity.getRtuReplaceDate()) {
+											ArrayList<String> textArr = new ArrayList<>();
+											textArr.add("");
+											String replaceDate = dataEntity.getRtuReplaceDate().trim();
+											for (int l = 0; l < replaceDate.length(); l++) {
+												String subtext = replaceDate.substring(l, l + 1);
+												if (Func.isNumeric(subtext)) {
+													String str = textArr.get(textArr.size()-1);
+													str += subtext;
+													textArr.set(textArr.size()-1,str);
+												} else {
+													textArr.add("");
+												}
+											}
+											ArrayList<String> tmp = new ArrayList<>();
+											for(String text:textArr){
+												if (text.length()>0){
+													tmp.add(text);
+												}
+											}
+
+											if (tmp.size() >= 3) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-" + tmp.get(2);
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setRtuReplaceDate(dt);
+											} else if (tmp.size() == 2) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-01";
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setRtuReplaceDate(dt);
+											}
+
+										}
+										if (null != dataEntity.getToSheng()) {
+											if (dataEntity.getToSheng().trim().equals("是")) {
+												rtuInfoEntity.setDatagramToSheng(1);
+											} else {
+												rtuInfoEntity.setDatagramToSheng(0);
+											}
+										} else {
+											rtuInfoEntity.setDatagramToSheng(0);
+										}
+
+										if (null != dataEntity.getToShi()) {
+											if (dataEntity.getToShi().trim().equals("是")) {
+												rtuInfoEntity.setDatagramToShi(1);
+											} else {
+												rtuInfoEntity.setDatagramToShi(0);
+											}
+										} else {
+											rtuInfoEntity.setDatagramToShi(0);
+										}
+
+										if (null != dataEntity.getToQu()) {
+											if (dataEntity.getToQu().trim().equals("是")) {
+												rtuInfoEntity.setDatagramToQu(1);
+											} else {
+												rtuInfoEntity.setDatagramToQu(0);
+											}
+										} else {
+											rtuInfoEntity.setDatagramToQu(0);
+										}
+
+										if (null != dataEntity.getRainSensorBrand()) {
+											rtuInfoEntity.setRainSensorBrand(dataEntity.getRainSensorBrand().trim());
+										}
+
+										if (null != dataEntity.getRainSensorModel()) {
+											rtuInfoEntity.setRainSensorModel(dataEntity.getRainSensorModel().trim());
+										}
+
+										if (null != dataEntity.getRainSensorReplaceDate()) {
+
+											ArrayList<String> textArr = new ArrayList<>();
+											textArr.add("");
+											String replaceDate = dataEntity.getRainSensorReplaceDate().trim();
+											for (int l = 0; l < replaceDate.length(); l++) {
+												String subtext = replaceDate.substring(l, l + 1);
+												if (Func.isNumeric(subtext)) {
+													String str = textArr.get(textArr.size()-1);
+													str += subtext;
+													textArr.set(textArr.size()-1,str);
+												} else {
+													textArr.add("");
+												}
+											}
+											ArrayList<String> tmp = new ArrayList<>();
+											for(String text:textArr){
+												if (text.length()>0){
+													tmp.add(text);
+												}
+											}
+
+											if (tmp.size() >= 3) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-" + tmp.get(2);
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setRainSensorReplaceDate(dt);
+											} else if (tmp.size() == 2) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-01";
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setRainSensorReplaceDate(dt);
+											}
+
+
+										}
+
+										if (null != dataEntity.getWaterSensorType()) {
+											List<DictBiz> bizs = DictBizCache.getList("water_level_sensor_type");
+											for (DictBiz biz : bizs) {
+												if (dataEntity.getWaterSensorType().trim().contains(biz.getDictValue())) {
+													rtuInfoEntity.setWaterSensorType(biz.getId());
+													break;
+												}
+											}
+										}
+
+										if (null != dataEntity.getWaterSensorBrand()) {
+											rtuInfoEntity.setWaterSensorBrand(dataEntity.getWaterSensorBrand().trim());
+										}
+
+										if (null != dataEntity.getWaterSensorModel()) {
+											rtuInfoEntity.setWaterSensorModel(dataEntity.getWaterSensorModel().trim());
+										}
+
+										if (null != dataEntity.getWaterSensorReplaceDate()) {
+											ArrayList<String> textArr = new ArrayList<>();
+											textArr.add("");
+											String replaceDate = dataEntity.getWaterSensorReplaceDate().trim();
+											for (int l = 0; l < replaceDate.length(); l++) {
+												String subtext = replaceDate.substring(l, l + 1);
+												if (Func.isNumeric(subtext)) {
+													String str = textArr.get(textArr.size()-1);
+													str += subtext;
+													textArr.set(textArr.size()-1,str);
+												} else {
+													textArr.add("");
+												}
+											}
+											ArrayList<String> tmp = new ArrayList<>();
+											for(String text:textArr){
+												if (text.length()>0){
+													tmp.add(text);
+												}
+											}
+
+											if (tmp.size() >= 3) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-" + tmp.get(2);
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setWaterSensorReplaceDate(dt);
+											} else if (tmp.size() == 2) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-01";
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setWaterSensorReplaceDate(dt);
+											}
+
+
+										}
+
+										if (null != dataEntity.getGroundSensorType()) {
+											List<DictBiz> bizs = DictBizCache.getList("ground_water_sensor_type");
+											for (DictBiz biz : bizs) {
+												if (dataEntity.getGroundSensorType().trim().contains(biz.getDictValue())) {
+													rtuInfoEntity.setGroundSensorType(biz.getId());
+													break;
+												}
+											}
+										}
+
+										if (null != dataEntity.getGroundSensorBrand()) {
+											rtuInfoEntity.setGroundSensorBrand(dataEntity.getGroundSensorBrand().trim());
+										}
+
+										if (null != dataEntity.getGroundSensorModel()) {
+											rtuInfoEntity.setGroundSensorModel(dataEntity.getGroundSensorModel().trim());
+										}
+
+										if (null != dataEntity.getGroundSensorReplaceDate()) {
+											ArrayList<String> textArr = new ArrayList<>();
+											textArr.add("");
+											String replaceDate = dataEntity.getGroundSensorReplaceDate().trim();
+											for (int l = 0; l < replaceDate.length(); l++) {
+												String subtext = replaceDate.substring(l, l + 1);
+												if (Func.isNumeric(subtext)) {
+													String str = textArr.get(textArr.size()-1);
+													str += subtext;
+													textArr.set(textArr.size()-1,str);
+												} else {
+													textArr.add("");
+												}
+											}
+											ArrayList<String> tmp = new ArrayList<>();
+											for(String text:textArr){
+												if (text.length()>0){
+													tmp.add(text);
+												}
+											}
+
+											if (tmp.size() >= 3) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-" + tmp.get(2);
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setGroundSensorReplaceDate(dt);
+											} else if (tmp.size() == 2) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-01";
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setGroundSensorReplaceDate(dt);
+											}
+
+
+										}
+
+										if (null != dataEntity.getBatteryModel()) {
+											rtuInfoEntity.setBatteryModel(dataEntity.getBatteryModel().trim());
+										}
+
+										if (null != dataEntity.getBatteryReplaceDate()) {
+											ArrayList<String> textArr = new ArrayList<>();
+											textArr.add("");
+											String replaceDate = dataEntity.getBatteryReplaceDate().trim();
+											for (int l = 0; l < replaceDate.length(); l++) {
+												String subtext = replaceDate.substring(l, l + 1);
+												if (Func.isNumeric(subtext)) {
+													String str = textArr.get(textArr.size()-1);
+													str += subtext;
+													textArr.set(textArr.size()-1,str);
+												} else {
+													textArr.add("");
+												}
+											}
+											ArrayList<String> tmp = new ArrayList<>();
+											for(String text:textArr){
+												if (text.length()>0){
+													tmp.add(text);
+												}
+											}
+
+											if (tmp.size() >= 3) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-" + tmp.get(2);
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setBatteryReplaceDate(dt);
+											} else if (tmp.size() == 2) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-01";
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setBatteryReplaceDate(dt);
+											}
+
+
+										}
+
+										if (null != dataEntity.getSunModel()) {
+											rtuInfoEntity.setSunPowerModel(dataEntity.getSunModel().trim());
+										}
+
+										if (null != dataEntity.getSimId()) {
+											rtuInfoEntity.setNetworkSimId(dataEntity.getSimId().trim());
+										}
+
+										if (null != dataEntity.getSimPay()) {
+											rtuInfoEntity.setNetworkPayer(dataEntity.getSimPay().trim());
+										}
+
+										if (null != dataEntity.getSimOverdate()) {
+											ArrayList<String> textArr = new ArrayList<>();
+											textArr.add("");
+											String replaceDate = dataEntity.getSimOverdate().trim();
+											for (int l = 0; l < replaceDate.length(); l++) {
+												String subtext = replaceDate.substring(l, l + 1);
+												if (Func.isNumeric(subtext)) {
+													String str = textArr.get(textArr.size()-1);
+													str += subtext;
+													textArr.set(textArr.size()-1,str);
+												} else {
+													textArr.add("");
+												}
+											}
+											ArrayList<String> tmp = new ArrayList<>();
+											for(String text:textArr){
+												if (text.length()>0){
+													tmp.add(text);
+												}
+											}
+
+											if (tmp.size() >= 3) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-" + tmp.get(2);
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setNetworkPayEndDate(dt);
+											} else if (tmp.size() == 2) {
+												String v = tmp.get(0) + "-" + tmp.get(1) + "-01";
+												Date dt = Func.parse(v, ConcurrentDateFormat.of("yyyy-MM-dd"));
+												rtuInfoEntity.setNetworkPayEndDate(dt);
+											}
+
+
+										}
+
+										if (null != dataEntity.getSatellite()) {
+											if (dataEntity.getSatellite().trim().equals("是")) {
+												rtuInfoEntity.setIsSatellite(1);
+											} else {
+												rtuInfoEntity.setIsSatellite(0);
+											}
+
+										} else {
+											rtuInfoEntity.setIsSatellite(0);
+										}
+
+										if (null != dataEntity.getSatelliteModel()) {
+											List<DictBiz> bizs = DictBizCache.getList("satellite_model");
+											for (DictBiz biz : bizs) {
+												if (dataEntity.getSatelliteModel().trim().contains(biz.getDictValue())) {
+													rtuInfoEntity.setSatelliteModel(biz.getId());
+													break;
+												}
+											}
+
+										}
+
+										if (null != dataEntity.getRemark()) {
+											rtuInfoEntity.setRemark(dataEntity.getRemark().trim());
+										}
+
+										rtuInfoEntity.setProjectId(projectId);
+										rtuInfoEntity.setOrgId(orgId);
+
+
+										RtuInfoEntity entity = rtuBaseInfoService.rtuInfoByRtuCode(rtuInfoEntity.getRtuCode());
+										if (null != entity) {
+											rtuInfoEntity.setId(entity.getId());
+										}
+										rtuBaseInfoService.saveOrUpdate(rtuInfoEntity);
+
+										System.out.println("save record********************");
+
+									}else{
+										System.out.println(" record is null ********************");
+										System.out.println(JSON.toJSON(dataEntity).toString());
+									}
+								} else {
+									System.out.println(" record is null ********************");
+									System.out.println(JSON.toJSON(dataEntity).toString());
+								}
+							} else {
+								System.out.println(" record is null ********************");
+								System.out.println(JSON.toJSON(dataEntity).toString());
+							}
+
+						}
+
+						//更新导入时间
+						projectBaseInfoService.updateImportTime(projectId,new Date());
+					}
+				}).sheet().doRead();
+
+			} else {
+				return R.fail("上传文件格式错误");
+			}
+
+			return R.success("导入成功");
+		} catch (IOException e) {
+			e.printStackTrace();
+			return R.fail("导入错误 " + e.getMessage());
+		} catch (Exception e) {
+			e.printStackTrace();
+			return R.fail("导入错误 " + e.getMessage());
+		}
+	}
+}

+ 64 - 0
src/main/java/org/springblade/modules/business/data/manage/entity/RtuInfoTableDataEntity.java

@@ -0,0 +1,64 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/31
+ */
+package org.springblade.modules.business.data.manage.entity;
+
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/31
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Getter
+@Setter
+@EqualsAndHashCode
+public class RtuInfoTableDataEntity {
+
+	private String index;
+	private String city;
+	private String dist;
+	private String rtuName;
+	private String rtuCode;
+	private String rtuKind;
+	private String locationDesc;
+	private String lng;
+	private String lat;
+	private String manageCompany;
+	private String rtuBrand;
+	private String rtuModel;
+	private String rtuReplaceDate;
+	private String toQu;
+	private String toShi;
+	private String toSheng;
+	private String rainSensorBrand;
+	private String rainSensorModel;
+	private String rainSensorReplaceDate;
+	private String waterSensorType;
+	private String waterSensorBrand;
+	private String waterSensorModel;
+	private String waterSensorReplaceDate;
+	private String groundSensorType;
+	private String groundSensorBrand;
+	private String groundSensorModel;
+	private String groundSensorReplaceDate;
+	private String batteryModel;
+	private String batteryReplaceDate;
+	private String sunModel;
+	private String simId;
+	private String simPay;
+	private String simOverdate;
+	private String satellite;
+	private String satelliteModel;
+	private String remark;
+}

+ 32 - 8
src/main/java/org/springblade/modules/business/desk/controller/NoticeController.java

@@ -6,7 +6,10 @@
  */
 package org.springblade.modules.business.desk.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.github.xiaoymin.knife4j.annotations.ApiSort;
 import io.swagger.annotations.*;
@@ -22,9 +25,13 @@ import org.springblade.modules.business.desk.entity.NoticeEntity;
 import org.springblade.modules.business.desk.service.INoticeService;
 import org.springblade.modules.business.desk.vo.NoticeVO;
 import org.springblade.modules.business.desk.wrapper.NoticeWrapper;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+import org.springblade.modules.business.equipment.inspection.report.vo.EquipmentInspectionReportVO;
+import org.springblade.modules.business.equipment.inspection.report.wrapper.EquipmentInspectionReportWrapper;
 import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
 
+import java.util.List;
 import java.util.Map;
 
 /***
@@ -38,7 +45,7 @@ import java.util.Map;
  */
 @TenantDS
 @RestController
-@RequestMapping(AppConstant.APPLICATION_DESK_NAME + "/notice")
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME+ "/notice")
 @AllArgsConstructor
 @ApiSort(2)
 @Api(value = "用户博客", tags = "博客接口")
@@ -61,15 +68,18 @@ public class NoticeController extends BladeController {
 	 * 分页
 	 */
 	@GetMapping("/list")
-	@ApiImplicitParams({
-		@ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"),
-		@ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string")
-	})
+//	@ApiImplicitParams({
+//		@ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"),
+//		@ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string")
+//	})
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入notice")
-	public R<IPage<NoticeVO>> list(@ApiIgnore @RequestParam Map<String, Object> notice, Query query) {
-		NoticeWrapper.build().noticeQuery(notice);
-		IPage<NoticeEntity> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, NoticeEntity.class));
+	public R<IPage<NoticeVO>> list( Query query) {
+//		() -> NoticeWrapper.build().noticeQuery(notice)
+		LambdaQueryWrapper<NoticeEntity> wrapper = Wrappers.<NoticeEntity>query().lambda();
+		wrapper.orderByDesc(NoticeEntity::getReleaseTime);
+
+		IPage<NoticeEntity> pages = noticeService.page(Condition.getPage(query),wrapper);
 		return R.data(NoticeWrapper.build().pageVO(pages));
 	}
 
@@ -129,4 +139,18 @@ public class NoticeController extends BladeController {
 		return R.status(temp);
 	}
 
+	/**
+	 * 查询最新的数据
+	 */
+	@GetMapping("/last/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<List<NoticeVO>> lastList() {
+		LambdaQueryWrapper<NoticeEntity> wrapper = Wrappers.<NoticeEntity>query().lambda();
+		wrapper.orderByDesc(NoticeEntity::getCreateTime);
+		wrapper.last("limit 1");
+		List<NoticeEntity> pages = noticeService.list(wrapper);
+		return R.data(NoticeWrapper.build().listVO(pages));
+	}
+
 }

+ 112 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/base/controller/EquipmentInspectionController.java

@@ -0,0 +1,112 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.base.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity;
+import org.springblade.modules.business.equipment.inspection.base.service.IEquipmentInspectionService;
+import org.springblade.modules.business.equipment.inspection.base.vo.EquipmentInspectionInfoVO;
+import org.springblade.modules.business.equipment.inspection.base.wrapper.EquipmentInspectionWrapper;
+import org.springblade.modules.system.entity.User;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/equipment/inspection")
+@AllArgsConstructor
+@Api(value = "设备巡检管理模块", tags = "设备巡检管理模块")
+public class EquipmentInspectionController extends BladeController {
+	private final IEquipmentInspectionService equipmentInspectionService;
+
+
+	/**
+	 * 全部列表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "全部列表,不分页")
+	public R<List<EquipmentInspectionInfoVO>> list() {
+		List<EquipmentInspectionInfoEntity> pages = equipmentInspectionService.list();
+		return R.data(EquipmentInspectionWrapper.build().listVO(pages));
+	}
+
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入orderProcessInfoEntity")
+	public R<EquipmentInspectionInfoVO> detail(EquipmentInspectionInfoEntity equipmentInspectionInfoEntity) {
+		EquipmentInspectionInfoEntity detail = equipmentInspectionService.getOne(Condition.getQueryWrapper(equipmentInspectionInfoEntity));
+		return R.data(EquipmentInspectionWrapper.build().entityVO(detail));
+	}
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入orderProcessInfoEntity")
+	public R save(@RequestBody EquipmentInspectionInfoEntity equipmentInspectionInfoEntity) {
+		return R.status(equipmentInspectionService.save(equipmentInspectionInfoEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入orderProcessInfoEntity")
+	public R update(@RequestBody EquipmentInspectionInfoEntity equipmentInspectionInfoEntity) {
+		return R.status(equipmentInspectionService.updateById(equipmentInspectionInfoEntity));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入orderProcessInfoEntity")
+	public R submit(@RequestBody EquipmentInspectionInfoEntity equipmentInspectionInfoEntity) {
+		return R.status(equipmentInspectionService.saveOrUpdate(equipmentInspectionInfoEntity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入projectInfoEntity")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = equipmentInspectionService.deleteLogic(Func.toLongList(ids));
+		return R.status(temp);
+	}
+
+}

+ 49 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/base/entity/EquipmentInspectionInfoEntity.java

@@ -0,0 +1,49 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.base.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("equipment_inspection")
+public class EquipmentInspectionInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+
+	/**
+	 * 巡检标题
+	 */
+	@ApiModelProperty("巡检标题")
+	private String inspectionTitle;
+
+	/**
+	 * 巡检年度
+	 */
+	@ApiModelProperty("巡检年度")
+	private Date inspectionDate;
+
+}

+ 22 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/base/mapper/EquipmentInspectionMapper.java

@@ -0,0 +1,22 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.base.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface EquipmentInspectionMapper  extends BaseMapper<EquipmentInspectionInfoEntity> {
+}

+ 18 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/base/mapper/EquipmentInspectionMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.equipment.inspection.base.mapper.EquipmentInspectionMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="EquipmentInspectionInfoResultMap" type="org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="inspection_title" property="inspectionTitle"/>
+        <result column="inspection_date" property="inspectionDate"/>
+    </resultMap>
+
+</mapper>

+ 22 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/base/service/IEquipmentInspectionService.java

@@ -0,0 +1,22 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.base.service;
+
+
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IEquipmentInspectionService extends BaseService<EquipmentInspectionInfoEntity> {
+}

+ 25 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/base/service/impl/EquipmentInspectionServiceImpl.java

@@ -0,0 +1,25 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.base.service.impl;
+
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity;
+import org.springblade.modules.business.equipment.inspection.base.mapper.EquipmentInspectionMapper;
+import org.springblade.modules.business.equipment.inspection.base.service.IEquipmentInspectionService;
+import org.springframework.stereotype.Service;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class EquipmentInspectionServiceImpl  extends BaseServiceImpl<EquipmentInspectionMapper, EquipmentInspectionInfoEntity> implements IEquipmentInspectionService {
+}

+ 24 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/base/vo/EquipmentInspectionInfoVO.java

@@ -0,0 +1,24 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.base.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EquipmentInspectionInfoVO extends EquipmentInspectionInfoEntity {
+}

+ 37 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/base/wrapper/EquipmentInspectionWrapper.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.base.wrapper;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity;
+import org.springblade.modules.business.equipment.inspection.base.vo.EquipmentInspectionInfoVO;
+
+import java.util.Objects;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+
+public class EquipmentInspectionWrapper extends BaseEntityWrapper<EquipmentInspectionInfoEntity,EquipmentInspectionInfoVO> {
+	public static EquipmentInspectionWrapper build() {
+		return new EquipmentInspectionWrapper();
+	}
+
+	@Override
+	public EquipmentInspectionInfoVO entityVO(EquipmentInspectionInfoEntity entity) {
+		EquipmentInspectionInfoVO equipmentInspectionInfoVO = Objects.requireNonNull(BeanUtil.copy(entity, EquipmentInspectionInfoVO.class));
+		return equipmentInspectionInfoVO;
+	}
+}

+ 284 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/controller/EquipmentInspectionPlanController.java

@@ -0,0 +1,284 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.controller;
+
+import cn.hutool.db.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.constant.BusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.enums.IsValidEnum;
+import org.springblade.enums.RtuReportStatusEnum;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+import org.springblade.modules.business.desk.entity.NoticeEntity;
+import org.springblade.modules.business.desk.wrapper.NoticeWrapper;
+import org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity;
+import org.springblade.modules.business.equipment.inspection.base.service.IEquipmentInspectionService;
+import org.springblade.modules.business.equipment.inspection.base.vo.EquipmentInspectionInfoVO;
+import org.springblade.modules.business.equipment.inspection.base.wrapper.EquipmentInspectionWrapper;
+import org.springblade.modules.business.equipment.inspection.plan.dto.EquipmentInspectionRtuDTO;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.plan.service.IEquipmentInspectionPlanRtuService;
+import org.springblade.modules.business.equipment.inspection.plan.service.IEquipmentInspectionPlanService;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionPlanVO;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO;
+import org.springblade.modules.business.equipment.inspection.plan.wrapper.EquipmentInspectionPlanWrapper;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+import org.springblade.modules.business.equipment.inspection.report.service.IEquipmentInspectionReportService;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.service.IRtuBaseInfoService;
+import org.springblade.modules.business.rtu.base.vo.RtuInfoVO;
+import org.springblade.modules.business.rtu.base.wrapper.RtuInfoWrapper;
+import org.springblade.modules.business.rtumanage.entity.TreeNodeEntity;
+import org.springblade.modules.system.entity.Dept;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.*;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/equipment/inspection/plan")
+@AllArgsConstructor
+@Api(value = "设备巡检计划管理模块", tags = "设备巡检计划管理模块")
+public class EquipmentInspectionPlanController extends BladeController {
+	private final IEquipmentInspectionPlanService planService;
+	private final IEquipmentInspectionPlanRtuService planRtuService;
+	private final IRtuBaseInfoService rtuBaseInfoService;
+	private final IEquipmentInspectionReportService reportService;
+
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "inspectionId", value = "巡检年度ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<EquipmentInspectionPlanVO>> list(@ApiIgnore @RequestParam Map<String, Object> planEntity, Query query) {
+		EquipmentInspectionPlanWrapper.build().planQuery(planEntity);
+		IPage<EquipmentInspectionPlanEntity> pages = planService.page(Condition.getPage(query), Condition.getQueryWrapper(planEntity, EquipmentInspectionPlanEntity.class));
+		return R.data(EquipmentInspectionPlanWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<EquipmentInspectionPlanVO>> page(Query query) {
+		LambdaQueryWrapper<EquipmentInspectionPlanEntity> wrapper = Wrappers.<EquipmentInspectionPlanEntity>query().lambda();
+		wrapper.eq(EquipmentInspectionPlanEntity::getIsDeleted, 0L);
+		wrapper.orderByDesc(EquipmentInspectionPlanEntity::getInspectionStartTime);
+
+		IPage<EquipmentInspectionPlanEntity> pages = planService.page(Condition.getPage(query), wrapper);
+		return R.data(EquipmentInspectionPlanWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 不分页列表
+	 */
+	@GetMapping("/all/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<List<EquipmentInspectionPlanVO>> allPlan() {
+		LambdaQueryWrapper<EquipmentInspectionPlanEntity> wrapper = Wrappers.<EquipmentInspectionPlanEntity>query().lambda();
+		wrapper.eq(EquipmentInspectionPlanEntity::getIsDeleted, 0L);
+		wrapper.orderByDesc(EquipmentInspectionPlanEntity::getInspectionStartTime);
+		List<EquipmentInspectionPlanEntity> list = planService.list(wrapper);
+		return R.data(EquipmentInspectionPlanWrapper.build().listVO(list));
+	}
+
+
+	/**
+	 * 列表,不分页
+	 *
+	 * @return
+	 */
+	@GetMapping("/rtu/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "orgId", value = "机构ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "projectId", value = "项目ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "planId", value = "计划ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<EquipmentInspectionRtuVO>> rtuPage(@ApiIgnore EquipmentInspectionRtuDTO rtuDTO, Query query) {
+
+		BladeUser user = AuthUtil.getUser();
+
+		if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+
+		} else {
+		     if (user.getDeptId().equals(""+rtuDTO.getOrgId())){
+				 rtuDTO.setOrgId(null);
+				 rtuDTO.setProjectId(null);
+			 }
+		}
+
+		IPage<EquipmentInspectionRtuVO> page = planRtuService.selectPage(Condition.getPage(query), rtuDTO);
+		List<EquipmentInspectionRtuVO> rtuInfoVOList = page.getRecords();
+		for (EquipmentInspectionRtuVO vo : rtuInfoVOList) {
+			if (null != vo.getReportTime()) {
+				vo.setReportStatus(RtuReportStatusEnum.STATUS_1.getCode());
+			} else {
+				vo.setReportStatus(RtuReportStatusEnum.STATUS_0.getCode());
+			}
+		}
+		return R.data(page);
+	}
+
+	@GetMapping("/my/rtu/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "orgId", value = "机构ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "projectId", value = "项目ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "planId", value = "计划ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<EquipmentInspectionRtuVO>> myRtuPage(@ApiIgnore EquipmentInspectionRtuDTO rtuDTO, Query query) {
+
+		BladeUser user = AuthUtil.getUser();
+
+		if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+
+		} else {
+			if (user.getDeptId().equals(""+rtuDTO.getOrgId())){
+				rtuDTO.setOrgId(null);
+				rtuDTO.setProjectId(null);
+			}
+		}
+
+		IPage<EquipmentInspectionRtuVO> page = planRtuService.selectPage(Condition.getPage(query), rtuDTO);
+		List<EquipmentInspectionRtuVO> rtuInfoVOList = page.getRecords();
+		for (EquipmentInspectionRtuVO vo : rtuInfoVOList) {
+			if (null != vo.getReportTime()) {
+				vo.setReportStatus(RtuReportStatusEnum.STATUS_1.getCode());
+			} else {
+				vo.setReportStatus(RtuReportStatusEnum.STATUS_0.getCode());
+			}
+		}
+		return R.data(page);
+	}
+
+
+
+	/**
+	 * 查询当前年度巡检计划
+	 */
+	@GetMapping("/list/year")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "projectId", value = "项目ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "列表")
+	public R<IPage<EquipmentInspectionPlanVO>> currentYearList(EquipmentInspectionPlanEntity planEntity, Query query) {
+
+		LambdaQueryWrapper<EquipmentInspectionPlanEntity> wrapper = Wrappers.<EquipmentInspectionPlanEntity>query().lambda();
+//		BladeUser user = AuthUtil.getUser();
+//		if (BusinessConstant.ROLE_ADMIN.equals(user.getRoleName())) {
+//		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+//			wrapper.eq(EquipmentInspectionPlanEntity::getOrgId, user.getDeptId());
+//		}
+		if (planEntity.getPlanTitle() != null && planEntity.getPlanTitle().length() > 0) {
+			wrapper.like(EquipmentInspectionPlanEntity::getPlanTitle, planEntity.getPlanTitle());
+		}
+		if (planEntity.getProjectId() != null) {
+			wrapper.eq(EquipmentInspectionPlanEntity::getProjectId, planEntity.getProjectId());
+		}
+
+
+		wrapper.orderByDesc(EquipmentInspectionPlanEntity::getCreateTime);
+		//wrapper.last("limit 1");
+
+		IPage<EquipmentInspectionPlanEntity> pages = planService.page(Condition.getPage(query), wrapper);
+		return R.data(EquipmentInspectionPlanWrapper.build().pageVO(pages));
+	}
+
+	@GetMapping("/last")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入orderProcessInfoEntity")
+	public R<EquipmentInspectionPlanVO> lastPlan(EquipmentInspectionPlanEntity planEntity) {
+		EquipmentInspectionPlanEntity detail = planService.getOne(Condition.getQueryWrapper(planEntity));
+		return R.data(EquipmentInspectionPlanWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入orderProcessInfoEntity")
+	public R<EquipmentInspectionPlanVO> detail(EquipmentInspectionPlanEntity planEntity) {
+		EquipmentInspectionPlanEntity detail = planService.getOne(Condition.getQueryWrapper(planEntity));
+		return R.data(EquipmentInspectionPlanWrapper.build().entityVO(detail));
+	}
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入planEntity")
+	public R save(@RequestBody EquipmentInspectionPlanEntity planEntity) {
+		return R.status(planService.save(planEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入planEntity")
+	public R update(@RequestBody EquipmentInspectionPlanEntity planEntity) {
+		return R.status(planService.updateById(planEntity));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入planEntity")
+	public R submit(@RequestBody EquipmentInspectionPlanEntity planEntity) {
+		return R.status(planService.saveOrUpdate(planEntity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入projectInfoEntity")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = planService.deleteLogic(Func.toLongList(ids));
+		return R.status(temp);
+	}
+}

+ 48 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/dto/EquipmentInspectionRtuDTO.java

@@ -0,0 +1,48 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/11
+ */
+package org.springblade.modules.business.equipment.inspection.plan.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/***
+ * Date:2022/9/11
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EquipmentInspectionRtuDTO extends RtuInfoEntity {
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+
+	/**
+	 * 计划ID
+	 */
+	@ApiModelProperty("计划ID")
+	private Long planId;
+}

+ 92 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/entity/EquipmentInspectionPlanEntity.java

@@ -0,0 +1,92 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("equipment_inspection_plan")
+public class EquipmentInspectionPlanEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 巡检年度索引ID
+	 */
+	@ApiModelProperty("巡检年度索引ID")
+	private Long inspectionId;
+
+	/**
+	 * 计划标题
+	 */
+	@ApiModelProperty("计划标题")
+	private String planTitle;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+
+	/**
+	 * 计划开始时间
+	 */
+	@ApiModelProperty("计划开始时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date inspectionStartTime;
+
+	/**
+	 * 计划结束时间
+	 */
+	@ApiModelProperty("计划结束时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date inspectionEndTime;
+
+	/**
+	 * 备注说明
+	 */
+	@ApiModelProperty("备注说明")
+	private String remark;
+}

+ 33 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/entity/EquipmentInspectionRtuEntity.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/11
+ */
+package org.springblade.modules.business.equipment.inspection.plan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/***
+ * Date:2022/9/11
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("rtu_info")
+public class EquipmentInspectionRtuEntity extends RtuInfoEntity {
+
+
+}

+ 33 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/mapper/EquipmentInspectionPlanMapper.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
+import org.springblade.modules.business.equipment.inspection.plan.dto.EquipmentInspectionRtuDTO;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionPlanVO;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO;
+import org.springblade.modules.business.rtu.base.vo.RtuInfoVO;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface EquipmentInspectionPlanMapper extends BaseMapper<EquipmentInspectionPlanEntity> {
+
+
+}

+ 24 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/mapper/EquipmentInspectionPlanMapper.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.equipment.inspection.plan.mapper.EquipmentInspectionPlanMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderProcessInfoResultMap"
+               type="org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="inspection_id" property="inspectionId"/>
+        <result column="plan_title" property="planTitle"/>
+        <result column="org_id" property="orgId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="inspection_start_time" property="inspectionStartTime"/>
+        <result column="inspection_end_time" property="inspectionEndTime"/>
+        <result column="remark" property="remark"/>
+    </resultMap>
+
+</mapper>

+ 40 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/mapper/EquipmentInspectionPlanRtuMapper.java

@@ -0,0 +1,40 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.business.equipment.inspection.plan.dto.EquipmentInspectionRtuDTO;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionRtuEntity;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtumanage.vo.RtuStatusVO;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface EquipmentInspectionPlanRtuMapper extends BaseMapper<EquipmentInspectionRtuEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page   分页
+	 * @param rtuDTO 实体
+	 * @return List<RtuInfoVO>
+	 */
+
+	List<EquipmentInspectionRtuVO> selectPage(IPage page, @Param("rtuDTO") EquipmentInspectionRtuDTO rtuDTO);
+}

+ 98 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/mapper/EquipmentInspectionPlanRtuMapper.xml

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.equipment.inspection.plan.mapper.EquipmentInspectionPlanRtuMapper">
+
+
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="rtuVOResultMap" type="org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="rtu_name" property="rtuName"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="org_id" property="orgId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="manageCompany" property="manage_company"/>
+
+
+        <result column="rtu_kinds" property="rtuKinds"/>
+        <result column="remark" property="remark"/>
+        <result column="location_desc" property="locationDesc"/>
+        <result column="remark" property="remark"/>
+        <result column="is_rain" property="isRain"/>
+        <result column="is_river" property="isRiver"/>
+        <result column="is_res" property="isRes"/>
+
+        <result column="is_ground" property="isGround"/>
+        <result column="is_satellite" property="isSatellite"/>
+
+        <result column="rtu_brand" property="rtuBrand"/>
+        <result column="rtu_model" property="rtuModel"/>
+        <result column="rtu_replace_date" property="rtuReplaceDate"/>
+        <result column="datagram_to_sheng" property="datagramToSheng"/>
+        <result column="datagram_to_shi" property="datagramToShi"/>
+        <result column="datagram_to_qu" property="datagramToQu"/>
+
+        <result column="rain_sensor_brand" property="rainSensorBrand"/>
+        <result column="rain_sensor_model" property="rainSensorModel"/>
+        <result column="rain_sensor_replace_date" property="rainSensorReplaceDate"/>
+
+        <result column="water_sensor_type" property="waterSensorType"/>
+        <result column="water_sensor_brand" property="waterSensorModel"/>
+        <result column="water_sensor_model" property="waterSensorModel"/>
+        <result column="water_sensor_replace_date" property="waterSensorReplaceDate"/>
+
+        <result column="ground_sensor_type" property="groundSensorType"/>
+        <result column="ground_sensor_brand" property="groundSensorBrand"/>
+        <result column="ground_sensor_model" property="groundSensorModel"/>
+        <result column="ground_sensor_replace_date" property="groundSensorReplaceDate"/>
+
+        <result column="battery_model" property="batteryModel"/>
+        <result column="battery_replace_date" property="batteryReplaceDate"/>
+        <result column="sun_power_model" property="sunPowerModel"/>
+
+        <result column="network_sim_id" property="networkSimId"/>
+        <result column="network_payer" property="networkPayer"/>
+        <result column="network_pay_end_date" property="networkPayEndDate"/>
+
+        <result column="satellite_model" property="satelliteModel"/>
+
+        <result column="project_name" property="projectName"/>
+        <result column="org_name" property="orgName"/>
+        <result column="reportTime" property="reportTime"/>
+
+    </resultMap>
+
+
+    <select id="selectPage" resultMap="rtuVOResultMap">
+        SELECT
+        n.*,
+        p.project_name ,d.dept_name AS org_name,r.create_time AS  reportTime
+        FROM
+        rtu_info n
+        LEFT JOIN  project_info p ON n.project_id = p.id
+        LEFT JOIN  blade_dept d ON n.org_id = d.id
+        LEFT JOIN equipment_inspection_report_info r ON r.rtu_code= n.rtu_code
+        WHERE
+        n.is_deleted = 0
+        <if test="rtuDTO.orgId!=null">
+            and n.org_id = #{rtuDTO.orgId}
+        </if>
+        <if test="rtuDTO.projectId!=null">
+            and n.project_id = #{rtuDTO.projectId}
+        </if>
+        <if test="rtuDTO.planId!=null">
+            and r.planId = #{planEntity.planId}
+        </if>
+
+        order  by n.org_id,n.project_id,n.rtu_code,r.create_time
+
+    </select>
+</mapper>

+ 32 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/service/IEquipmentInspectionPlanRtuService.java

@@ -0,0 +1,32 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.equipment.inspection.plan.dto.EquipmentInspectionRtuDTO;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionRtuEntity;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IEquipmentInspectionPlanRtuService extends BaseService<EquipmentInspectionRtuEntity> {
+	/**
+	 * 自定义分页
+	 * @param page
+	 * @param rtuDTO
+	 * @return
+	 */
+	IPage<EquipmentInspectionRtuVO> selectPage(IPage<EquipmentInspectionRtuVO> page, EquipmentInspectionRtuDTO rtuDTO);
+}

+ 29 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/service/IEquipmentInspectionPlanService.java

@@ -0,0 +1,29 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.check.order.dto.CheckOrderInfoDTO;
+import org.springblade.modules.business.check.order.vo.CheckOrderInfoVO;
+import org.springblade.modules.business.equipment.inspection.plan.dto.EquipmentInspectionRtuDTO;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionPlanVO;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO;
+import org.springblade.modules.business.rtu.base.vo.RtuInfoVO;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IEquipmentInspectionPlanService extends BaseService<EquipmentInspectionPlanEntity> {
+
+}

+ 37 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/service/impl/EquipmentInspectionPlanRtuServiceImpl.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.business.equipment.inspection.plan.dto.EquipmentInspectionRtuDTO;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionRtuEntity;
+import org.springblade.modules.business.equipment.inspection.plan.mapper.EquipmentInspectionPlanMapper;
+import org.springblade.modules.business.equipment.inspection.plan.mapper.EquipmentInspectionPlanRtuMapper;
+import org.springblade.modules.business.equipment.inspection.plan.service.IEquipmentInspectionPlanRtuService;
+import org.springblade.modules.business.equipment.inspection.plan.service.IEquipmentInspectionPlanService;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO;
+import org.springframework.stereotype.Service;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class EquipmentInspectionPlanRtuServiceImpl extends BaseServiceImpl<EquipmentInspectionPlanRtuMapper, EquipmentInspectionRtuEntity> implements IEquipmentInspectionPlanRtuService {
+
+
+	@Override
+	public IPage<EquipmentInspectionRtuVO> selectPage(IPage<EquipmentInspectionRtuVO> page, EquipmentInspectionRtuDTO rtuDTO) {
+		return page.setRecords(baseMapper.selectPage(page, rtuDTO));
+	}
+}

+ 34 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/service/impl/EquipmentInspectionPlanServiceImpl.java

@@ -0,0 +1,34 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.business.check.process.entity.OrderProcessInfoEntity;
+import org.springblade.modules.business.check.process.mapper.RtuOrderProcessMapper;
+import org.springblade.modules.business.check.process.service.IRtuOrderProcessService;
+import org.springblade.modules.business.equipment.inspection.plan.dto.EquipmentInspectionRtuDTO;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.plan.mapper.EquipmentInspectionPlanMapper;
+import org.springblade.modules.business.equipment.inspection.plan.service.IEquipmentInspectionPlanService;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionPlanVO;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionRtuVO;
+import org.springframework.stereotype.Service;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class EquipmentInspectionPlanServiceImpl extends BaseServiceImpl<EquipmentInspectionPlanMapper, EquipmentInspectionPlanEntity> implements IEquipmentInspectionPlanService {
+
+
+}

+ 50 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/vo/EquipmentInspectionPlanVO.java

@@ -0,0 +1,50 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EquipmentInspectionPlanVO extends EquipmentInspectionPlanEntity {
+	/**
+	 * 巡检索引标题
+	 */
+	@ApiModelProperty("巡检索引标题")
+	private String inspectionTitle;
+
+	/**
+	 * 机构名称
+	 */
+	@ApiModelProperty("机构名称")
+	private String orgName;
+
+	/**
+	 * 项目名称
+	 */
+	@ApiModelProperty("项目名称")
+	private String projectName;
+
+	/**
+	 * 计划是否已经过期,2 有效 ,1 失效
+	 */
+	@ApiModelProperty("计划过期")
+	private Integer planClose;
+}

+ 83 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/vo/EquipmentInspectionRtuVO.java

@@ -0,0 +1,83 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/11
+ */
+package org.springblade.modules.business.equipment.inspection.plan.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/***
+ * Date:2022/9/11
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EquipmentInspectionRtuVO extends RtuInfoEntity {
+
+	/**
+	 * 机构名称
+	 */
+	@ApiModelProperty(value = "机构名称")
+	private String orgName;
+
+
+	/**
+	 * 项目名称
+	 */
+	@ApiModelProperty(value = "项目名称")
+	private String projectName;
+
+	/**
+	 * 行政区
+	 */
+	@ApiModelProperty(value = "行政区")
+	private String areaName;
+
+
+	/**
+	 * 测站类型
+	 */
+	@ApiModelProperty(value = "测站类型")
+	private List<DictBiz> kindList;
+
+	/**
+	 * 测站类型概要
+	 */
+	@ApiModelProperty(value = "测站类型概要")
+	private String rtuKindDesc;
+
+	/**
+	 * 填报时间
+	 */
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss",
+		timezone = "GMT+8"
+	)
+	@ApiModelProperty(value = "填报时间")
+	private Date reportTime;
+
+	/**
+	 * 填报状态: 0 未报, 1已提交
+	 */
+	@ApiModelProperty(value = "填报状态")
+	private Integer reportStatus;
+
+}

+ 61 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/plan/wrapper/EquipmentInspectionPlanWrapper.java

@@ -0,0 +1,61 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.plan.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.enums.IsValidEnum;
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.plan.vo.EquipmentInspectionPlanVO;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.vo.RtuInfoVO;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.Objects;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public class EquipmentInspectionPlanWrapper extends BaseEntityWrapper<EquipmentInspectionPlanEntity, EquipmentInspectionPlanVO> {
+	public static EquipmentInspectionPlanWrapper build() {
+		return new EquipmentInspectionPlanWrapper();
+	}
+
+	@Override
+	public EquipmentInspectionPlanVO entityVO(EquipmentInspectionPlanEntity entity) {
+		EquipmentInspectionPlanVO equipmentInspectionPlanVO = Objects.requireNonNull(BeanUtil.copy(entity, EquipmentInspectionPlanVO.class));
+
+		Date dt = new Date();
+		if (dt.after(entity.getInspectionEndTime())){
+			equipmentInspectionPlanVO.setPlanClose(IsValidEnum.VALID_1.getCode());
+		}else{
+			equipmentInspectionPlanVO.setPlanClose(IsValidEnum.VALID_2.getCode());
+		}
+
+		return equipmentInspectionPlanVO;
+	}
+
+	public void planQuery(Map<String, Object> plan) {
+		// 此场景仅在 pg数据库 map类型传参的情况下需要处理,entity传参已经包含数据类型,则无需关心
+		// 针对 pg数据库 int类型字段查询需要强转的处理示例
+		String searchKey = "inspectionId";
+		if (Func.isNotEmpty(plan.get(searchKey))) {
+			// 数据库字段为int类型,设置"="查询,具体查询参数请见 @org.springblade.core.mp.support.SqlKeyword
+			plan.put(searchKey.concat("_equal"), Func.toLong(plan.get(searchKey)));
+			// 默认"like"查询,pg数据库 场景会报错,所以将其删除
+			plan.remove(searchKey);
+		}
+	}
+
+}

+ 160 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/controller/EquipmentInspectionReportController.java

@@ -0,0 +1,160 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.report.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+
+
+import org.springblade.modules.business.equipment.inspection.plan.entity.EquipmentInspectionPlanEntity;
+import org.springblade.modules.business.equipment.inspection.report.dto.EquipmentInspectionReportDTO;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+import org.springblade.modules.business.equipment.inspection.report.service.IEquipmentInspectionReportService;
+import org.springblade.modules.business.equipment.inspection.report.vo.EquipmentInspectionReportVO;
+import org.springblade.modules.business.equipment.inspection.report.wrapper.EquipmentInspectionReportWrapper;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+import java.util.Map;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/equipment/inspection/report")
+@AllArgsConstructor
+@Api(value = "设备巡检填报管理模块", tags = "设备巡检填报管理模块")
+public class EquipmentInspectionReportController extends BladeController {
+	private final IEquipmentInspectionReportService reportService;
+
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "planId", value = "巡检计划ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<EquipmentInspectionReportVO>> list(@ApiIgnore @RequestParam Map<String, Object> reportEntity, Query query) {
+		EquipmentInspectionReportWrapper.build().reportQuery(reportEntity);
+		IPage<EquipmentInspectionReportEntity> pages = reportService.page(Condition.getPage(query),Condition.getQueryWrapper(reportEntity, EquipmentInspectionReportEntity.class));
+		return R.data(EquipmentInspectionReportWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "planId", value = "巡检计划ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "orgId", value = "机构ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "projectId", value = "项目ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<EquipmentInspectionReportVO>> page(@ApiIgnore EquipmentInspectionReportDTO reportDTO, Query query) {
+//		LambdaQueryWrapper<EquipmentInspectionReportEntity> wrapper = Wrappers.<EquipmentInspectionReportEntity>query().lambda();
+//		wrapper.eq(EquipmentInspectionReportEntity::getIsDeleted,0L);
+//		wrapper.eq(EquipmentInspectionReportEntity::getPlanId,reportDTO.getPlanId());
+
+		IPage<EquipmentInspectionReportVO> pages = reportService.selectPage(Condition.getPage(query),reportDTO);
+		return R.data(pages);
+	}
+
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "id", value = "ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入orderProcessInfoEntity")
+	public R<EquipmentInspectionReportVO> detail(EquipmentInspectionReportEntity reportEntity) {
+		EquipmentInspectionReportEntity detail = reportService.getOne(Condition.getQueryWrapper(reportEntity));
+		return R.data(EquipmentInspectionReportWrapper.build().entityVO(detail));
+	}
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入reportEntity")
+	public R save(@RequestBody EquipmentInspectionReportEntity reportEntity) {
+		return R.status(reportService.save(reportEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入reportEntity")
+	public R update(@RequestBody EquipmentInspectionReportEntity reportEntity) {
+		return R.status(reportService.updateById(reportEntity));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入reportEntity")
+	public R submit(@RequestBody EquipmentInspectionReportEntity reportEntity) {
+		return R.status(reportService.saveOrUpdate(reportEntity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = reportService.deleteLogic(Func.toLongList(ids));
+		return R.status(temp);
+	}
+
+	/**
+	 * 查询最新的数据
+	 */
+	@GetMapping("/last/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<List<EquipmentInspectionReportVO>> lastList() {
+		LambdaQueryWrapper<EquipmentInspectionReportEntity> wrapper = Wrappers.<EquipmentInspectionReportEntity>query().lambda();
+		wrapper.orderByDesc(EquipmentInspectionReportEntity::getUpdateTime);
+		wrapper.last("limit 1");
+		List<EquipmentInspectionReportEntity> pages = reportService.list(wrapper);
+		return R.data(EquipmentInspectionReportWrapper.build().listVO(pages));
+	}
+
+}

+ 42 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/dto/EquipmentInspectionReportDTO.java

@@ -0,0 +1,42 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/7
+ */
+package org.springblade.modules.business.equipment.inspection.report.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+
+/***
+ * Date:2022/9/7
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EquipmentInspectionReportDTO extends EquipmentInspectionReportEntity {
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty("测站名称")
+	private String rtuName;
+}

+ 503 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/entity/EquipmentInspectionReportEntity.java

@@ -0,0 +1,503 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.report.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("equipment_inspection_report_info")
+public class EquipmentInspectionReportEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 计划ID
+	 */
+	@ApiModelProperty("计划ID")
+	private Long planId;
+
+	/**
+	 * 测站编码
+	 */
+	@ApiModelProperty("测站编码")
+	private String rtuCode;
+
+	/**
+	 * 填报总结说明
+	 */
+	@ApiModelProperty("填报总结说明")
+	private String reportDesc;
+
+	/**
+	 * 图片一是否拍摄
+	 */
+	@ApiModelProperty("图片一是否拍摄")
+	private Integer basePhoto1Take;
+
+
+	/**
+	 * 图片一路径
+	 */
+	@ApiModelProperty("图片一路径")
+	private String basePhoto1Url;
+
+	/**
+	 * 图片二是否拍摄
+	 */
+	@ApiModelProperty("图片二是否拍摄")
+	private Integer basePhoto2Take;
+
+	/**
+	 * 图片二路径
+	 */
+	@ApiModelProperty("图片二路径")
+	private String basePhoto2Url;
+
+	/**
+	 * 站点具体位置描述
+	 */
+	@ApiModelProperty("站点具体位置描述")
+	private String buildLocationDesc;
+
+	/**
+	 * 经度
+	 */
+	@ApiModelProperty("经度")
+	private String lng;
+
+	/**
+	 * 纬度
+	 */
+	@ApiModelProperty("纬度")
+	private String lat;
+
+	/**
+	 * 运维单位
+	 */
+	@ApiModelProperty("运维单位")
+	private String manageCompany;
+
+	/**
+	 * 测站类型
+	 */
+	@ApiModelProperty("测站类型")
+	private String rtuKinds;
+
+	/**
+	 * RTU品牌
+	 */
+	@ApiModelProperty("RTU品牌")
+	private String rtuBrand;
+
+	/**
+	 * RTU型号
+	 */
+	@ApiModelProperty("RTU型号")
+	private String rtuModel;
+
+	/**
+	 * RTU更换日期
+	 */
+	@ApiModelProperty("RTU更换日期")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rtuReplaceDate;
+
+	/**
+	 * 上报
+	 */
+	@ApiModelProperty("RTU发往县")
+	private Integer datagramToLevel1;
+
+	/**
+	 * 上报
+	 */
+	@ApiModelProperty("RTU发往市")
+	private Integer datagramToLevel2;
+
+	/**
+	 * 上报
+	 */
+	@ApiModelProperty("RTU发往省")
+	private Integer datagramToLevel3;
+
+	/**
+	 * RTU说明
+	 */
+	@ApiModelProperty("RTU说明")
+	private String rtuDesc;
+
+	/**
+	 * 测站运行状态:0 正常 1故障
+	 */
+	@ApiModelProperty("测站运行状态")
+	private Integer rtuStatus;
+
+	/**
+	 * RTU图片是否拍摄
+	 */
+	@ApiModelProperty("RTU图片是否拍摄")
+	private Integer rtuPhotoTake;
+
+	/**
+	 * RTU图片路径
+	 */
+	@ApiModelProperty("RTU图片路径")
+	private String rtuPhotoUrl;
+
+
+	/**
+	 * 翻斗式雨量计品牌
+	 */
+	@ApiModelProperty("翻斗式雨量计品牌")
+	private String rainSensorBrand;
+
+	/**
+	 * 翻斗式雨量计型号
+	 */
+	@ApiModelProperty("翻斗式雨量计型号")
+	private String rainSensorModel;
+
+	/**
+	 * 翻斗式雨量计更换时间
+	 */
+	@ApiModelProperty("翻斗式雨量计更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rainSensorReplaceDate;
+
+	/**
+	 * 雨量计说明
+	 */
+	@ApiModelProperty("雨量计说明")
+	private String rainSensorDesc;
+
+	/**
+	 * 是否有安装雨量计: 0 无,1 有
+	 */
+	@ApiModelProperty("是否有安装雨量计")
+	private Integer rainSensorActive;
+
+	/**
+	 * 雨量计状态:0 正常 1故障
+	 */
+	@ApiModelProperty("雨量计状态")
+	private Integer rainSensorStatus;
+
+	/**
+	 * 雨量计图片是否拍摄
+	 */
+	@ApiModelProperty("雨量计图片是否拍摄")
+	private Integer rainSensorPhotoTake;
+
+	/**
+	 * 雨量计图片路径
+	 */
+	@ApiModelProperty("雨量计图片路径")
+	private String rainSensorPhotoUrl;
+
+
+	/**
+	 * 水位计传感器类型(雷达/超声波),字典,传入ID
+	 */
+	@ApiModelProperty("水位计传感器类型(雷达/超声波)")
+	private Long waterSensorType;
+
+	/**
+	 * 水位计品牌
+	 */
+	@ApiModelProperty("水位计品牌")
+	private String waterSensorBrand;
+
+	/**
+	 * 水位计型号
+	 */
+	@ApiModelProperty("水位计型号")
+	private String waterSensorModel;
+
+	/**
+	 * 水位计更换时间
+	 */
+	@ApiModelProperty("水位计更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date waterSensorReplaceDate;
+
+	/**
+	 * 水位计说明
+	 */
+	@ApiModelProperty("水位计说明")
+	private String waterSensorDesc;
+
+	/**
+	 * 是否有安装水位计: 0 无,1 有
+	 */
+	@ApiModelProperty("是否有安装水位计")
+	private Integer waterLevelSensorActive;
+
+	/**
+	 * 水位计状态:0 正常 1故障
+	 */
+	@ApiModelProperty("水位计状态")
+	private Integer waterLevelSensorStatus;
+
+
+	/**
+	 * 水位计图片是否拍摄
+	 */
+	@ApiModelProperty("水位计图片是否拍摄")
+	private Integer waterSensorPhotoTake;
+
+	/**
+	 * 水位计图片路径
+	 */
+	@ApiModelProperty("水位计图片路径")
+	private String waterSensorPhotoUrl;
+
+
+	/**
+	 * 墒情站传感器类型(插针式、导管式),字典,传入ID
+	 */
+	@ApiModelProperty("墒情站传感器类型(插针式、导管式)")
+	private Long groundSensorType;
+
+	/**
+	 * 墒情传感器品牌
+	 */
+	@ApiModelProperty("墒情传感器品牌")
+	private String groundSensorBrand;
+
+	/**
+	 * 墒情传感器型号
+	 */
+	@ApiModelProperty("墒情传感器型号")
+	private String groundSensorModel;
+
+	/**
+	 * 墒情传感器更换时间
+	 */
+	@ApiModelProperty("墒情传感器更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date groundSensorReplaceDate;
+
+	/**
+	 * 墒情传感器说明
+	 */
+	@ApiModelProperty("墒情传感器说明")
+	private String groundSensorDesc;
+
+	/**
+	 * 是否有安装墒情计: 0 无,1 有
+	 */
+	@ApiModelProperty("是否有安装墒情计")
+	private Integer groundWaterSensorActive;
+	/**
+	 * 墒情计状态:0 正常 1故障
+	 */
+	@ApiModelProperty("墒情计状态")
+	private Integer groundWaterSensorStatus;
+
+	/**
+	 * 墒情图片是否拍摄
+	 */
+	@ApiModelProperty("墒情图片是否拍摄")
+	private Integer groundSensorPhotoTake;
+
+	/**
+	 * 墒情图片路径
+	 */
+	@ApiModelProperty("墒情图片路径")
+	private String groundSensorPhotoUrl;
+
+
+	/**
+	 * 蓄电池容量(AH)
+	 */
+	@ApiModelProperty("蓄电池容量(AH)")
+	private String batteryModel;
+
+	/**
+	 *  蓄电池更换时间
+	 */
+	@ApiModelProperty("蓄电池更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date batteryReplaceDate;
+
+	/**
+	 * 太阳能板(w)
+	 */
+	@ApiModelProperty("太阳能板(w)")
+	private String sunPowerModel;
+
+	/**
+	 *  太阳能板更换时间
+	 */
+	@ApiModelProperty("太阳能板更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date sunPowerReplaceDate;
+
+	/**
+	 * 供电系统状态:0 正常 1故障
+	 */
+	@ApiModelProperty("供电系统状态")
+	private Integer powerStatus;
+
+	/**
+	 * 供电说明
+	 */
+	@ApiModelProperty("供电说明")
+	private String powerDesc;
+
+	/**
+	 * 电池图片是否拍摄
+	 */
+	@ApiModelProperty("电池图片是否拍摄")
+	private Integer batteryPhotoTake;
+
+	/**
+	 * 电池图片路径
+	 */
+	@ApiModelProperty("电池图片路径")
+	private String batteryPhotoUrl;
+
+	/**
+	 * 太阳能板图片是否拍摄
+	 */
+	@ApiModelProperty("太阳能板图片是否拍摄")
+	private Integer sunPhotoTake;
+
+	/**
+	 * 太阳能板图片路径
+	 */
+	@ApiModelProperty("太阳能板图片路径")
+	private String sunPhotoUrl;
+
+
+	/**
+	 * SIM卡号(具体物联网ICCID/电话号码)
+	 */
+	@ApiModelProperty("SIM卡号(具体物联网ICCID/电话号码)")
+	private String simCcid;
+
+	/**
+	 * SIM卡开卡单位
+	 */
+	@ApiModelProperty("SIM卡开卡单位")
+	private String simPay;
+
+	/**
+	 * SIM卡缴费截止时间
+	 */
+	@ApiModelProperty("SIM卡缴费截止时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date simPayEndDate;
+
+
+	/**
+	 * 是否使用移动网络: 0 无,1 有
+	 */
+	@ApiModelProperty("是否有安装4G卡")
+	private Integer networkActive;
+
+	/**
+	 * 4G卡状态:0 正常 1故障
+	 */
+	@ApiModelProperty("4G卡状态")
+	private Integer networkStatus;
+
+
+	/**
+	 * 移动网络说明
+	 */
+	@ApiModelProperty("移动网络说明")
+	private String networkDesc;
+
+	/**
+	 * 是否卫星通讯
+	 */
+	@ApiModelProperty("是否卫星通讯")
+	private Integer satellite;
+
+	/**
+	 * 通讯模式(北斗2代/北斗3代),字典,传入ID
+	 */
+	@ApiModelProperty("通讯模式(北斗2代/北斗3代)")
+	private Long satelliteModel;
+
+	/**
+	 * 是否使用卫星通讯: 0 无,1 有
+	 */
+	@ApiModelProperty("是否使用卫星通讯")
+	private Integer satelliteActive;
+
+	/**
+	 * 卫星通讯状态:0 正常 1故障
+	 */
+	@ApiModelProperty("卫星通讯状态")
+	private Integer satelliteStatus;
+
+	/**
+	 * 卫星通讯说明
+	 */
+	@ApiModelProperty("卫星通讯说明")
+	private String satelliteDesc;
+
+
+}

+ 37 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/mapper/EquipmentInspectionReportMapper.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.report.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.business.equipment.inspection.report.dto.EquipmentInspectionReportDTO;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+import org.springblade.modules.business.equipment.inspection.report.vo.EquipmentInspectionReportVO;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtumanage.vo.RtuStatusVO;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface EquipmentInspectionReportMapper extends BaseMapper<EquipmentInspectionReportEntity> {
+	/**
+	 * 自定义分页
+	 *
+	 * @param page   分页
+	 * @param reportDTO 实体
+	 * @return List<EquipmentInspectionReportVO>
+	 */
+	List<EquipmentInspectionReportVO> selectPage(IPage page, @Param("reportDTO") EquipmentInspectionReportDTO reportDTO);
+}

+ 227 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/mapper/EquipmentInspectionReportMapper.xml

@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.equipment.inspection.report.mapper.EquipmentInspectionReportMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderProcessInfoResultMap"
+               type="org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="plan_id" property="planId"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="report_desc" property="reportDesc"/>
+        <result column="build_location_desc" property="buildLocationDesc"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="manage_company" property="manageCompany"/>
+        <result column="rtu_kinds" property="rtuKinds"/>
+        <result column="rtu_brand" property="rtuBrand"/>
+        <result column="rtu_model" property="rtuModel"/>
+        <result column="rtu_replace_date" property="rtuReplaceDate"/>
+        <result column="datagram_to_level1" property="datagramToLevel1"/>
+        <result column="datagram_to_level2" property="datagramToLevel2"/>
+        <result column="datagram_to_level3" property="datagramToLevel3"/>
+        <result column="rtu_desc" property="rtuDesc"/>
+
+        <result column="rain_sensor_brand" property="rainSensorBrand"/>
+        <result column="rain_sensor_model" property="rainSensorModel"/>
+        <result column="rain_sensor_replace_date" property="rainSensorReplaceDate"/>
+
+        <result column="rain_sensor_desc" property="rainSensorDesc"/>
+
+        <result column="water_sensor_type" property="waterSensorType"/>
+        <result column="water_sensor_brand" property="waterSensorBrand"/>
+        <result column="water_sensor_model" property="waterSensorModel"/>
+        <result column="water_sensor_replace_date" property="waterSensorReplaceDate"/>
+        <result column="water_sensor_desc" property="waterSensorDesc"/>
+
+
+
+        <result column="ground_sensor_type" property="groundSensorType"/>
+        <result column="ground_sensor_brand" property="groundSensorBrand"/>
+        <result column="ground_sensor_model" property="groundSensorModel"/>
+        <result column="ground_sensor_replace_date" property="groundSensorReplaceDate"/>
+        <result column="ground_sensor_desc" property="groundSensorDesc"/>
+
+
+        <result column="battery_model" property="batteryModel"/>
+        <result column="battery_replace_date" property="batteryReplaceDate"/>
+        <result column="sun_power_model" property="sunPowerModel"/>
+        <result column="sun_power_replace_date" property="sunPowerReplaceDate"/>
+        <result column="power_desc" property="powerDesc"/>
+
+
+        <result column="sim_ccid" property="simCcid"/>
+        <result column="sim_pay" property="simPay"/>
+        <result column="sim_pay_end_date" property="simPayEndDate"/>
+        <result column="network_desc" property="networkDesc"/>
+
+
+        <result column="satellite" property="satellite"/>
+        <result column="satellite_model" property="satelliteModel"/>
+        <result column="satellite_desc" property="satelliteDesc"/>
+
+
+        <result column="rtu_status" property="rtuStatus"/>
+        <result column="rain_sensor_status" property="rainSensorStatus"/>
+        <result column="water_level_sensor_status" property="waterLevelSensorStatus"/>
+        <result column="ground_water_sensor_status" property="groundWaterSensorStatus"/>
+        <result column="network_status" property="networkStatus"/>
+        <result column="satellite_status" property="satelliteStatus"/>
+        <result column="power_status" property="powerStatus"/>
+        <result column="rain_sensor_active" property="rainSensorActive"/>
+        <result column="water_level_sensor_active" property="waterLevelSensorActive"/>
+        <result column="ground_water_sensor_active" property="groundWaterSensorActive"/>
+        <result column="network_active" property="networkActive"/>
+        <result column="satellite_active" property="satelliteActive"/>
+
+
+        <result column="base_photo1_take" property="basePhoto1Take"/>
+        <result column="base_photo1_url" property="basePhoto1Url"/>
+        <result column="base_photo2_take" property="basePhoto2Take"/>
+        <result column="base_photo2_url" property="basePhoto2Url"/>
+        <result column="rtu_photo_take" property="rtuPhotoTake"/>
+        <result column="rtu_photo_url" property="rtuPhotoUrl"/>
+        <result column="rain_sensor_photo_take" property="rainSensorPhotoTake"/>
+        <result column="rain_sensor_photo_url" property="rainSensorPhotoUrl"/>
+        <result column="water_sensor_photo_take" property="waterSensorPhotoTake"/>
+        <result column="water_sensor_photo_url" property="waterSensorPhotoUrl"/>
+        <result column="ground_sensor_photo_take" property="groundSensorPhotoTake"/>
+        <result column="ground_sensor_photo_url" property="groundSensorPhotoUrl"/>
+        <result column="battery_photo_take" property="batteryPhotoTake"/>
+        <result column="battery_photo_url" property="batteryPhotoUrl"/>
+        <result column="sun_photo_take" property="sunPhotoTake"/>
+        <result column="sun_photo_url" property="sunPhotoUrl"/>
+    </resultMap>
+
+
+    <resultMap id="reportVOResultMap"
+               type="org.springblade.modules.business.equipment.inspection.report.vo.EquipmentInspectionReportVO">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="plan_id" property="planId"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="report_desc" property="reportDesc"/>
+        <result column="build_location_desc" property="buildLocationDesc"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="manage_company" property="manageCompany"/>
+        <result column="rtu_kinds" property="rtuKinds"/>
+        <result column="rtu_brand" property="rtuBrand"/>
+        <result column="rtu_model" property="rtuModel"/>
+        <result column="rtu_replace_date" property="rtuReplaceDate"/>
+        <result column="datagram_to_level1" property="datagramToLevel1"/>
+        <result column="datagram_to_level2" property="datagramToLevel2"/>
+        <result column="datagram_to_level3" property="datagramToLevel3"/>
+        <result column="rtu_desc" property="rtuDesc"/>
+
+        <result column="rain_sensor_brand" property="rainSensorBrand"/>
+        <result column="rain_sensor_model" property="rainSensorModel"/>
+        <result column="rain_sensor_replace_date" property="rainSensorReplaceDate"/>
+
+        <result column="rain_sensor_desc" property="rainSensorDesc"/>
+
+        <result column="water_sensor_type" property="waterSensorType"/>
+        <result column="water_sensor_brand" property="waterSensorBrand"/>
+        <result column="water_sensor_model" property="waterSensorModel"/>
+        <result column="water_sensor_replace_date" property="waterSensorReplaceDate"/>
+        <result column="water_sensor_desc" property="waterSensorDesc"/>
+
+
+
+        <result column="ground_sensor_type" property="groundSensorType"/>
+        <result column="ground_sensor_brand" property="groundSensorBrand"/>
+        <result column="ground_sensor_model" property="groundSensorModel"/>
+        <result column="ground_sensor_replace_date" property="groundSensorReplaceDate"/>
+        <result column="ground_sensor_desc" property="groundSensorDesc"/>
+
+
+        <result column="battery_model" property="batteryModel"/>
+        <result column="battery_replace_date" property="batteryReplaceDate"/>
+        <result column="sun_power_model" property="sunPowerModel"/>
+        <result column="sun_power_replace_date" property="sunPowerReplaceDate"/>
+        <result column="power_desc" property="powerDesc"/>
+
+
+        <result column="sim_ccid" property="simCcid"/>
+        <result column="sim_pay" property="simPay"/>
+        <result column="sim_pay_end_date" property="simPayEndDate"/>
+        <result column="network_desc" property="networkDesc"/>
+
+
+        <result column="satellite" property="satellite"/>
+        <result column="satellite_model" property="satelliteModel"/>
+        <result column="satellite_desc" property="satelliteDesc"/>
+
+
+        <result column="rtu_status" property="rtuStatus"/>
+        <result column="rain_sensor_status" property="rainSensorStatus"/>
+        <result column="water_level_sensor_status" property="waterLevelSensorStatus"/>
+        <result column="ground_water_sensor_status" property="groundWaterSensorStatus"/>
+        <result column="network_status" property="networkStatus"/>
+        <result column="satellite_status" property="satelliteStatus"/>
+        <result column="power_status" property="powerStatus"/>
+        <result column="rain_sensor_active" property="rainSensorActive"/>
+        <result column="water_level_sensor_active" property="waterLevelSensorActive"/>
+        <result column="ground_water_sensor_active" property="groundWaterSensorActive"/>
+        <result column="network_active" property="networkActive"/>
+        <result column="satellite_active" property="satelliteActive"/>
+
+
+        <result column="base_photo1_take" property="basePhoto1Take"/>
+        <result column="base_photo1_url" property="basePhoto1Url"/>
+        <result column="base_photo2_take" property="basePhoto2Take"/>
+        <result column="base_photo2_url" property="basePhoto2Url"/>
+        <result column="rtu_photo_take" property="rtuPhotoTake"/>
+        <result column="rtu_photo_url" property="rtuPhotoUrl"/>
+        <result column="rain_sensor_photo_take" property="rainSensorPhotoTake"/>
+        <result column="rain_sensor_photo_url" property="rainSensorPhotoUrl"/>
+        <result column="water_sensor_photo_take" property="waterSensorPhotoTake"/>
+        <result column="water_sensor_photo_url" property="waterSensorPhotoUrl"/>
+        <result column="ground_sensor_photo_take" property="groundSensorPhotoTake"/>
+        <result column="ground_sensor_photo_url" property="groundSensorPhotoUrl"/>
+        <result column="battery_photo_take" property="batteryPhotoTake"/>
+        <result column="battery_photo_url" property="batteryPhotoUrl"/>
+        <result column="sun_photo_take" property="sunPhotoTake"/>
+        <result column="sun_photo_url" property="sunPhotoUrl"/>
+
+        <result column="org_id" property="orgId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="rtu_name" property="rtuName"/>
+    </resultMap>
+
+    <select id="selectPage" resultMap="reportVOResultMap">
+        SELECT
+        r.*, rtu.rtu_name,rtu.org_id,rtu.project_id
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN  rtu_info rtu ON rtu.rtu_code = r.rtu_code
+
+        WHERE
+        r.is_deleted = 0
+        and r.plan_id = #{reportDTO.planId}
+        <if test="reportDTO.rtuName!=null">
+            and rtu.rtu_name like concat(concat('%', #{reportDTO.rtuName}), '%')
+        </if>
+        <if test="reportDTO.rtuCode!=null">
+            and r.rtu_code like concat(concat('%', #{reportDTO.rtuCode}), '%')
+        </if>
+        <if test="reportDTO.orgId!=null">
+            and rtu.org_id = #{reportDTO.orgId}
+        </if>
+        <if test="reportDTO.projectId!=null ">
+            and rtu.project_id = #{reportDTO.projectId}
+        </if>
+        order by r.rtu_code
+    </select>
+</mapper>

+ 32 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/service/IEquipmentInspectionReportService.java

@@ -0,0 +1,32 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.report.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.equipment.inspection.report.dto.EquipmentInspectionReportDTO;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+import org.springblade.modules.business.equipment.inspection.report.vo.EquipmentInspectionReportVO;
+
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IEquipmentInspectionReportService extends BaseService<EquipmentInspectionReportEntity> {
+	/**
+	 * 自定义分页
+	 * @param page
+	 * @param reportDTO
+	 * @return
+	 */
+	IPage<EquipmentInspectionReportVO> selectPage(IPage<EquipmentInspectionReportVO> page, EquipmentInspectionReportDTO reportDTO);
+}

+ 33 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/service/impl/EquipmentInspectionReportServiceImpl.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.report.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+
+import org.springblade.modules.business.equipment.inspection.report.dto.EquipmentInspectionReportDTO;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+import org.springblade.modules.business.equipment.inspection.report.mapper.EquipmentInspectionReportMapper;
+import org.springblade.modules.business.equipment.inspection.report.service.IEquipmentInspectionReportService;
+import org.springblade.modules.business.equipment.inspection.report.vo.EquipmentInspectionReportVO;
+import org.springframework.stereotype.Service;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class EquipmentInspectionReportServiceImpl extends BaseServiceImpl<EquipmentInspectionReportMapper, EquipmentInspectionReportEntity> implements IEquipmentInspectionReportService {
+	@Override
+	public IPage<EquipmentInspectionReportVO> selectPage(IPage<EquipmentInspectionReportVO> page, EquipmentInspectionReportDTO reportDTO) {
+		return page.setRecords(baseMapper.selectPage(page, reportDTO));
+	}
+}

+ 60 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/vo/EquipmentInspectionReportVO.java

@@ -0,0 +1,60 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.report.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EquipmentInspectionReportVO extends EquipmentInspectionReportEntity {
+	/**
+	 * 水位计型号
+	 */
+	@ApiModelProperty("水位计型号")
+     private String waterSensorTypeText;
+
+	/**
+	 * 墒情站传感器类型(插针式、导管式),字典,传入ID
+	 */
+	@ApiModelProperty("墒情站传感器类型(插针式、导管式)")
+	private String groundSensorTypeText;
+
+	/**
+	 * 通讯模式(北斗2代/北斗3代),字典,传入ID
+	 */
+	@ApiModelProperty("通讯模式(北斗2代/北斗3代)")
+	private String satelliteModelText;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty("测站名称")
+	private String rtuName;
+}

+ 66 - 0
src/main/java/org/springblade/modules/business/equipment/inspection/report/wrapper/EquipmentInspectionReportWrapper.java

@@ -0,0 +1,66 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.equipment.inspection.report.wrapper;
+
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.business.equipment.inspection.base.wrapper.EquipmentInspectionWrapper;
+import org.springblade.modules.business.equipment.inspection.report.entity.EquipmentInspectionReportEntity;
+import org.springblade.modules.business.equipment.inspection.report.vo.EquipmentInspectionReportVO;
+import org.springblade.modules.system.entity.DictBiz;
+
+import java.util.Map;
+import java.util.Objects;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+
+public class EquipmentInspectionReportWrapper extends BaseEntityWrapper<EquipmentInspectionReportEntity, EquipmentInspectionReportVO> {
+	public static EquipmentInspectionReportWrapper build() {
+		return new EquipmentInspectionReportWrapper();
+	}
+
+	@Override
+	public EquipmentInspectionReportVO entityVO(EquipmentInspectionReportEntity entity) {
+		EquipmentInspectionReportVO equipmentInspectionReportVO = Objects.requireNonNull(BeanUtil.copy(entity, EquipmentInspectionReportVO.class));
+
+		DictBiz biz = DictBizCache.getById(entity.getWaterSensorType());
+		if (null != biz) {
+			equipmentInspectionReportVO.setWaterSensorTypeText(biz.getDictValue());
+		}
+		biz = DictBizCache.getById(entity.getGroundSensorType());
+		if (null != biz) {
+			equipmentInspectionReportVO.setGroundSensorTypeText(biz.getDictValue());
+		}
+		biz = DictBizCache.getById(entity.getSatelliteModel());
+		if (null != biz) {
+			equipmentInspectionReportVO.setSatelliteModelText(biz.getDictValue());
+		}
+
+		return equipmentInspectionReportVO;
+	}
+
+	public void reportQuery(Map<String, Object> report) {
+		// 此场景仅在 pg数据库 map类型传参的情况下需要处理,entity传参已经包含数据类型,则无需关心
+		// 针对 pg数据库 int类型字段查询需要强转的处理示例
+		String searchKey = "inspectionId";
+		if (Func.isNotEmpty(report.get(searchKey))) {
+			// 数据库字段为int类型,设置"="查询,具体查询参数请见 @org.springblade.core.mp.support.SqlKeyword
+			report.put(searchKey.concat("_equal"), Func.toLong(report.get(searchKey)));
+			// 默认"like"查询,pg数据库 场景会报错,所以将其删除
+			report.remove(searchKey);
+		}
+	}
+}

+ 261 - 0
src/main/java/org/springblade/modules/business/project/base/controller/ProjectBaseInfoController.java

@@ -0,0 +1,261 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.base.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.constant.BusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
+import org.springblade.modules.business.desk.entity.NoticeEntity;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.entity.ProjectTreeNodeEntity;
+import org.springblade.modules.business.project.base.entity.ProjectWarningSettingEntity;
+import org.springblade.modules.business.project.base.service.IProjectBaseInfoService;
+import org.springblade.modules.business.project.base.service.IProjectWarningSettingService;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+import org.springblade.modules.business.project.base.wrapper.ProjectInfoWrapper;
+import org.springblade.modules.system.entity.Dept;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IDeptService;
+import org.springblade.modules.system.service.IUserService;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/project/base")
+@AllArgsConstructor
+@Api(value = "项目信息基础管理", tags = "项目信息基础管理")
+public class ProjectBaseInfoController extends BladeController {
+	private final IProjectBaseInfoService projectBaseInfoService;
+	private final IProjectWarningSettingService warningSettingService;
+	private final IDeptService deptService;
+	private final IUserService userService;
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<ProjectInfoVO>> list(Query query) {
+		IPage<ProjectInfoEntity> pages = projectBaseInfoService.page(Condition.getPage(query));
+		return R.data(ProjectInfoWrapper.build().pageVO(pages));
+	}
+
+	@GetMapping("/org/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<List<ProjectInfoVO>> orglist() {
+		LambdaQueryWrapper<ProjectInfoEntity> wrapper = Wrappers.<ProjectInfoEntity>query().lambda();
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_ADMIN.equals(user.getRoleName())) {
+
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+			wrapper.eq(ProjectInfoEntity::getOrgId, user.getDeptId());
+		}
+		wrapper.eq(ProjectInfoEntity::getIsDeleted, 0);
+		List<ProjectInfoEntity> pages = projectBaseInfoService.list(wrapper);
+		return R.data(ProjectInfoWrapper.build().listVO(pages));
+	}
+
+	/**
+	 * 多表联合查询自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "query", dataType = "string"),
+
+	})
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页")
+	public R<IPage<ProjectInfoVO>> page(@ApiIgnore  ProjectInfoEntity entity, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_ADMIN.equals(user.getRoleName())) {
+
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+			entity.setOrgId(Func.toLong(user.getDeptId()));
+		}
+		IPage<ProjectInfoVO> pages = projectBaseInfoService.selectPage(entity, Condition.getPage(query));
+		return R.data(pages);
+	}
+
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入projectInfoEntity")
+	public R<ProjectInfoVO> detail(ProjectInfoEntity projectInfoEntity) {
+		ProjectInfoEntity detail = projectBaseInfoService.getOne(Condition.getQueryWrapper(projectInfoEntity));
+		return R.data(ProjectInfoWrapper.build().entityVO(detail));
+	}
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入ProjectInfoEntity")
+	public R save(@RequestBody ProjectInfoEntity projectInfoEntity) {
+		return R.status(projectBaseInfoService.save(projectInfoEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入ProjectInfoEntity")
+	public R update(@RequestBody ProjectInfoEntity projectInfoEntity) {
+		return R.status(projectBaseInfoService.updateById(projectInfoEntity));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入projectInfoEntity")
+	public R submit(@RequestBody ProjectInfoEntity projectInfoEntity) {
+		return R.status(projectBaseInfoService.saveOrUpdate(projectInfoEntity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入projectInfoEntity")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = projectBaseInfoService.deleteLogic(Func.toLongList(ids));
+		return R.status(temp);
+	}
+
+	/**
+	 * 项目预警配置保存或修改
+	 *
+	 * @param projectInfoEntity
+	 * @return
+	 */
+	@PostMapping("/setting/warning/submit")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "id", value = "项目ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "warnActive", value = "预警开关", paramType = "query", dataType = "int"),
+		@ApiImplicitParam(name = "delayTime", value = "延时", paramType = "query", dataType = "int")
+	})
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "项目预警配置新增或修改", notes = "传入warningSettingEntity")
+	public R warningSubmit(@ApiIgnore ProjectInfoEntity projectInfoEntity) {
+		//return R.status(warningSettingService.saveOrUpdate(warningSettingEntity));
+
+		LambdaUpdateWrapper<ProjectInfoEntity> wrapper = Wrappers.<ProjectInfoEntity>update().lambda();
+		wrapper.set(ProjectInfoEntity::getWarnActive, projectInfoEntity.getWarnActive());
+		wrapper.set(ProjectInfoEntity::getDelayTime, projectInfoEntity.getDelayTime());
+		wrapper.eq(ProjectInfoEntity::getId, projectInfoEntity.getId());
+
+		this.projectBaseInfoService.update(wrapper);
+
+		return R.success("预警设置操作成功");
+	}
+
+	@GetMapping("/tree")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情")
+	public R<List<ProjectTreeNodeEntity>> projectTree() {
+		BladeUser user = AuthUtil.getUser();
+		List<ProjectTreeNodeEntity> tree = new LinkedList<>();
+		if (BusinessConstant.ROLE_ADMIN.equals(user.getRoleName())) {
+			LambdaQueryWrapper<Dept> wrapper = Wrappers.<Dept>query().lambda();
+			wrapper.eq(Dept::getParentId, 0);
+			Dept dept = this.deptService.getOne(wrapper);
+			ProjectTreeNodeEntity root = new ProjectTreeNodeEntity();
+			root.setText(dept.getDeptName());
+			root.setValue("" + dept.getId() + "-0");
+			root.setOrgId(dept.getId());
+
+			List<ProjectTreeNodeEntity> orgNode = new LinkedList<>();
+			root.setChildren(orgNode);
+			tree.add(root);
+			List<Dept> childs = this.deptService.getDeptChild(dept.getId());
+			if (null != childs && childs.size() > 0) {
+				for (Dept child : childs) {
+					ProjectTreeNodeEntity entity = new ProjectTreeNodeEntity();
+					entity.setText(child.getDeptName());
+					entity.setValue("" + child.getId() + "-0");
+					entity.setOrgId(child.getId());
+
+					List<ProjectTreeNodeEntity> projectNode = new LinkedList<>();
+					entity.setChildren(projectNode);
+					orgNode.add(entity);
+					LambdaQueryWrapper<ProjectInfoEntity> projectwrapper = Wrappers.<ProjectInfoEntity>query().lambda();
+					projectwrapper.eq(ProjectInfoEntity::getOrgId, child.getId());
+
+					List<ProjectInfoEntity> projectInfoEntities = this.projectBaseInfoService.list(projectwrapper);
+					for (ProjectInfoEntity p : projectInfoEntities) {
+						entity = new ProjectTreeNodeEntity();
+						entity.setText(p.getProjectName());
+						entity.setValue("" + child.getId() + "-" + p.getId());
+						entity.setOrgId(child.getId());
+						entity.setProjectId(p.getId());
+						projectNode.add(entity);
+					}
+				}
+			}
+
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+
+			ProjectTreeNodeEntity root = new ProjectTreeNodeEntity();
+			root.setText("北京大恒");
+			root.setValue("0");
+			List<ProjectTreeNodeEntity> projectNode = new LinkedList<>();
+			root.setChildren(projectNode);
+			tree.add(root);
+
+			ProjectTreeNodeEntity entity = new ProjectTreeNodeEntity();
+			entity.setText("赤峰市");
+			entity.setValue("1");
+			projectNode.add(entity);
+
+			entity = new ProjectTreeNodeEntity();
+			entity.setText("锡盟");
+			entity.setValue("2");
+			projectNode.add(entity);
+
+		}
+
+		return R.data(tree);
+	}
+
+}

+ 105 - 0
src/main/java/org/springblade/modules/business/project/base/entity/ProjectInfoEntity.java

@@ -0,0 +1,105 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.base.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("project_info")
+public class ProjectInfoEntity  extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+
+	/**
+	 * 项目名称
+	 */
+	@ApiModelProperty(value = "项目名称")
+	private String projectName;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty(value = "机构ID")
+	private Long orgId;
+
+	/**
+	 * 项目负责人
+	 */
+	@ApiModelProperty(value = "项目负责人")
+	private String manageName;
+
+	/**
+	 * 联系电话
+	 */
+	@ApiModelProperty(value = "联系电话")
+	private String contactPhone;
+
+	/**
+	 * 规约ID
+	 */
+	@ApiModelProperty(value = "规约ID")
+	private Long agreementId;
+
+	/**
+	 * 供电方式ID
+	 */
+	@ApiModelProperty(value = "供电方式ID")
+	private Long powerTypeId;
+
+
+	/**
+	 * 备注说明
+	 */
+	@ApiModelProperty(value = "备注说明")
+	private String remark;
+
+	/**
+	 * 测站导入时间
+	 */
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss",
+		timezone = "GMT+8"
+	)
+	@ApiModelProperty(value = "测站导入时间")
+	private String importTime;
+
+	/**
+	 * 预警开关
+	 */
+	@ApiModelProperty(value = "预警开关")
+	private Integer warnActive;
+
+	/**
+	 * 延时时长
+	 */
+	@ApiModelProperty(value = "延时时长")
+	private Integer delayTime;
+}

+ 65 - 0
src/main/java/org/springblade/modules/business/project/base/entity/ProjectTreeNodeEntity.java

@@ -0,0 +1,65 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/28
+ */
+package org.springblade.modules.business.project.base.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/28
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProjectTreeNodeEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+	/**
+	 * 标题
+	 */
+	@ApiModelProperty("标题")
+	private String text;
+
+	/**
+	 * 值
+	 */
+	@ApiModelProperty("值")
+	private String value;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+
+
+	/**
+	 * 子列表
+	 */
+	@ApiModelProperty("子列表")
+	private List<ProjectTreeNodeEntity> children;
+}

+ 51 - 0
src/main/java/org/springblade/modules/business/project/base/entity/ProjectWarningSettingEntity.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.project.base.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("project_warning_setting")
+public class ProjectWarningSettingEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private long projectId;
+
+	/**
+	 * 预警开关
+	 */
+	@ApiModelProperty("预警开关")
+	private int warningActive;
+
+	/**
+	 * 报文充许延时时长,单位分钟
+	 */
+	@ApiModelProperty("报文充许延时时长")
+	private int datagramDelayTime;
+}

+ 34 - 0
src/main/java/org/springblade/modules/business/project/base/mapper/ProjectInfoMapper.java

@@ -0,0 +1,34 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.base.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface ProjectInfoMapper extends BaseMapper<ProjectInfoEntity> {
+	/**
+	 * 自定义分页
+	 *
+	 * @param page   分页
+	 * @return List<RtuInfoVO>
+	 */
+	List<ProjectInfoVO> selectPage(@Param("projectInfoEntity") ProjectInfoEntity projectInfoEntity, IPage page);
+}

+ 68 - 0
src/main/java/org/springblade/modules/business/project/base/mapper/ProjectInfoMapper.xml

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.project.base.mapper.ProjectInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="projectInfoResultMap" type="org.springblade.modules.business.project.base.entity.ProjectInfoEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="project_name" property="projectName"/>
+        <result column="org_id" property="orgId"/>
+        <result column="manage_name" property="manageName"/>
+        <result column="contact_phone" property="contactPhone"/>
+        <result column="mail" property="mail"/>
+        <result column="agreement_id" property="agreementId"/>
+        <result column="power_type_id" property="powerTypeId"/>
+        <result column="remark" property="remark"/>
+        <result column="import_time" property="importTime"/>
+        <result column="warn_active" property="warnActive"/>
+        <result column="delay_time" property="delayTime"/>
+    </resultMap>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="projectInfoVOResultMap" type="org.springblade.modules.business.project.base.vo.ProjectInfoVO">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="project_name" property="projectName"/>
+        <result column="org_id" property="orgId"/>
+        <result column="dept_name" property="orgName"/>
+        <result column="manage_name" property="manageName"/>
+        <result column="contact_phone" property="contactPhone"/>
+        <result column="mail" property="mail"/>
+        <result column="agreement_id" property="agreementId"/>
+        <result column="power_type_id" property="powerTypeId"/>
+        <result column="remark" property="remark"/>
+        <result column="import_time" property="importTime"/>
+        <result column="warn_active" property="warnActive"/>
+        <result column="delay_time" property="delayTime"/>
+    </resultMap>
+
+
+    <select id="selectPage" resultMap="projectInfoVOResultMap">
+        SELECT
+        n.*
+        ,d.dept_name
+        FROM
+        project_info n
+        LEFT JOIN blade_dept d ON d.id = n.org_id
+        WHERE
+        n.is_deleted = 0
+        <if test="projectInfoEntity.projectName!=null">
+            and n.project_name like concat(concat('%', #{projectInfoEntity.projectName}), '%')
+        </if>
+        <if test="projectInfoEntity.orgId!=null">
+            and n.org_id = #{projectInfoEntity.orgId}
+        </if>
+
+    </select>
+</mapper>

+ 21 - 0
src/main/java/org/springblade/modules/business/project/base/mapper/ProjectWarningSettingMapper.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.project.base.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.modules.business.project.base.entity.ProjectWarningSettingEntity;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface ProjectWarningSettingMapper extends BaseMapper<ProjectWarningSettingEntity> {
+}

+ 21 - 0
src/main/java/org/springblade/modules/business/project/base/mapper/ProjectWarningSettingMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.project.base.mapper.ProjectWarningSettingMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="projectInfoResultMap" type="org.springblade.modules.business.project.base.entity.ProjectWarningSettingEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="project_id" property="projectId"/>
+        <result column="warning_active" property="warningActive"/>
+        <result column="datagram_delay_time" property="datagramDelayTime"/>
+
+    </resultMap>
+
+
+</mapper>

+ 48 - 0
src/main/java/org/springblade/modules/business/project/base/service/IProjectBaseInfoService.java

@@ -0,0 +1,48 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.base.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.entity.ProjectWarningSettingEntity;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+
+import java.util.Date;
+
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IProjectBaseInfoService extends BaseService<ProjectInfoEntity> {
+	/**
+	 * 自定义分页
+	 * @param page
+	 * @return
+	 */
+	IPage<ProjectInfoVO> selectPage(ProjectInfoEntity entity,IPage<ProjectInfoVO> page);
+
+	/**
+	 * 项目预警配置
+	 * @param warningSettingEntity
+	 * @return
+	 */
+	boolean  warningSaveOrUpdate(ProjectWarningSettingEntity warningSettingEntity);
+
+	/**
+	 * 更新测站导入时间
+	 * @param date
+	 * @return
+	 */
+	boolean  updateImportTime(Long projectId,Date date);
+
+}

+ 21 - 0
src/main/java/org/springblade/modules/business/project/base/service/IProjectWarningSettingService.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.project.base.service;
+
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.project.base.entity.ProjectWarningSettingEntity;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IProjectWarningSettingService  extends BaseService<ProjectWarningSettingEntity> {
+}

+ 51 - 0
src/main/java/org/springblade/modules/business/project/base/service/impl/ProjectBaseInfoServiceImpl.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.base.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.entity.ProjectWarningSettingEntity;
+import org.springblade.modules.business.project.base.mapper.ProjectInfoMapper;
+import org.springblade.modules.business.project.base.service.IProjectBaseInfoService;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class ProjectBaseInfoServiceImpl  extends BaseServiceImpl<ProjectInfoMapper, ProjectInfoEntity> implements IProjectBaseInfoService {
+	@Override
+	public IPage<ProjectInfoVO> selectPage(ProjectInfoEntity entity,IPage<ProjectInfoVO> page) {
+		return page.setRecords(baseMapper.selectPage(entity,page));
+	}
+
+	@Override
+	public boolean warningSaveOrUpdate(ProjectWarningSettingEntity warningSettingEntity) {
+
+		return false;
+	}
+
+	@Override
+	public boolean updateImportTime(Long projectId,Date date) {
+		LambdaUpdateWrapper<ProjectInfoEntity> wrapper = Wrappers.<ProjectInfoEntity>update().lambda();
+		wrapper.set(ProjectInfoEntity::getImportTime,date);
+		wrapper.eq(ProjectInfoEntity::getId,projectId);
+		return this.update(wrapper);
+	}
+}

+ 25 - 0
src/main/java/org/springblade/modules/business/project/base/service/impl/ProjectWarningSettingServiceImpl.java

@@ -0,0 +1,25 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.project.base.service.impl;
+
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.business.project.base.entity.ProjectWarningSettingEntity;
+import org.springblade.modules.business.project.base.mapper.ProjectWarningSettingMapper;
+import org.springblade.modules.business.project.base.service.IProjectWarningSettingService;
+import org.springframework.stereotype.Service;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class ProjectWarningSettingServiceImpl extends BaseServiceImpl<ProjectWarningSettingMapper, ProjectWarningSettingEntity> implements IProjectWarningSettingService {
+}

+ 46 - 0
src/main/java/org/springblade/modules/business/project/base/vo/ProjectInfoVO.java

@@ -0,0 +1,46 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.base.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProjectInfoVO extends ProjectInfoEntity {
+
+	/**
+	 * 机构名称
+	 */
+	@ApiModelProperty(value = "机构名称")
+	private String orgName;
+
+
+	/**
+	 * 规约名称
+	 */
+	@ApiModelProperty(value = "规约名称")
+	private String agreementName;
+
+	/**
+	 * 供电方式名称
+	 */
+	@ApiModelProperty(value = "供电方式名称")
+	private String powerTypeName;
+}

+ 57 - 0
src/main/java/org/springblade/modules/business/project/base/wrapper/ProjectInfoWrapper.java

@@ -0,0 +1,57 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.base.wrapper;
+
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictBizEnum;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.business.desk.entity.NoticeEntity;
+import org.springblade.modules.business.desk.vo.NoticeVO;
+import org.springblade.modules.business.desk.wrapper.NoticeWrapper;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+import org.springblade.modules.system.entity.DictBiz;
+
+import java.util.Objects;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public class ProjectInfoWrapper extends BaseEntityWrapper<ProjectInfoEntity, ProjectInfoVO> {
+	public static ProjectInfoWrapper build() {
+		return new ProjectInfoWrapper();
+	}
+
+	@Override
+	public ProjectInfoVO entityVO(ProjectInfoEntity entity) {
+
+		ProjectInfoVO projectInfoVO = Objects.requireNonNull(BeanUtil.copy(entity, ProjectInfoVO.class));
+		if (entity.getAgreementId() != null){
+			DictBiz biz = DictBizCache.getById(entity.getAgreementId());
+			if (null != biz){
+				projectInfoVO.setAgreementName(biz.getDictValue());
+			}
+		}
+		if (entity.getPowerTypeId() != null){
+			DictBiz biz = DictBizCache.getById(entity.getPowerTypeId());
+			if (null != biz){
+				projectInfoVO.setPowerTypeName(biz.getDictValue());
+			}
+		}
+
+
+		return projectInfoVO;
+	}
+}

+ 185 - 0
src/main/java/org/springblade/modules/business/project/servicePerson/controller/ProjectServicePersonController.java

@@ -0,0 +1,185 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.servicePerson.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
+import org.flowable.spring.security.UserDto;
+import org.springblade.constant.BusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.DigestUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.servicePerson.entity.ServicePersonEntity;
+import org.springblade.modules.business.project.servicePerson.service.IProjectServicePersonService;
+import org.springblade.modules.business.project.servicePerson.vo.ServicePersonVO;
+import org.springblade.modules.business.project.servicePerson.wrapper.ProjectServicePersonWrapper;
+import org.springblade.modules.system.entity.Dept;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IDeptService;
+import org.springblade.modules.system.service.IUserService;
+import org.springframework.util.DigestUtils;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/project/person")
+@AllArgsConstructor
+@Api(value = "项目运维人员管理", tags = "项目运维人员管理")
+public class ProjectServicePersonController extends BladeController {
+	private final IProjectServicePersonService servicePersonService;
+	private final IUserService userService;
+	private final IDeptService deptService;
+
+	@GetMapping("/org/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<ServicePersonVO>> orgPersonList(Query query) {
+		LambdaQueryWrapper<ServicePersonEntity> wrapper = Wrappers.<ServicePersonEntity>query().lambda();
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+			wrapper.eq(ServicePersonEntity::getOrgId, user.getDeptId());
+		}
+		wrapper.eq(ServicePersonEntity::getIsDeleted, 0);
+
+		IPage<ServicePersonEntity> pages = servicePersonService.page(Condition.getPage(query),wrapper);
+		return R.data(ProjectServicePersonWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<ServicePersonVO>> list(Query query) {
+		IPage<ServicePersonEntity> pages = servicePersonService.page(Condition.getPage(query));
+		return R.data(ProjectServicePersonWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入servicePersonEntity")
+	public R<ServicePersonVO> detail(ServicePersonEntity servicePersonEntity) {
+		ServicePersonEntity detail = servicePersonService.getOne(Condition.getQueryWrapper(servicePersonEntity));
+		return R.data(ProjectServicePersonWrapper.build().entityVO(detail));
+	}
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入servicePersonEntity")
+	public R save(@RequestBody ServicePersonEntity servicePersonEntity) {
+		LambdaQueryWrapper<User> wrapper = Wrappers.<User>query().lambda();
+		wrapper.eq(User::getAccount, servicePersonEntity.getUserAccount());
+		wrapper.eq(User::getIsDeleted, 0);
+		List<User> list = userService.list(wrapper);
+		if (null != list && list.size() > 0) {
+			return R.fail("帐号已经存在");
+		}
+		User u = new User();
+		u.setAccount(servicePersonEntity.getUserAccount());
+		u.setName(servicePersonEntity.getPersonName());
+		u.setRealName(servicePersonEntity.getPersonName());
+		u.setPassword(DigestUtil.encrypt(servicePersonEntity.getUserAccount() + "@2022"));
+		u.setDeptId(servicePersonEntity.getOrgId());
+		u.setRoleId(BusinessConstant.ROLE_ORG_SERVICE_PERSON_ID);
+		u.setPostId("1562994107637354498");
+		u.setUserType(1);
+		userService.save(u);
+
+		return R.status(servicePersonService.save(servicePersonEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入servicePersonEntity")
+	public R update(@RequestBody ServicePersonEntity servicePersonEntity) {
+
+		return R.status(servicePersonService.updateById(servicePersonEntity));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入servicePersonEntity")
+	public R submit(@RequestBody ServicePersonEntity servicePersonEntity) {
+		return R.status(servicePersonService.saveOrUpdate(servicePersonEntity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入servicePersonEntity")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = servicePersonService.deleteLogic(Func.toLongList(ids));
+		return R.status(temp);
+	}
+
+
+	@GetMapping("/org/dict")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情")
+	public R<List<Dept>> orgTree() {
+
+		BladeUser user = AuthUtil.getUser();
+
+		List<Dept> list = new ArrayList<>();
+
+		if (BusinessConstant.ROLE_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_SUPER_ADMIN.equals(user.getRoleName())) {
+
+			List<Dept> root = this.deptService.getDeptChild(0L);
+			list = this.deptService.getDeptChild(root.get(0).getId());
+
+
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+
+			Dept root = this.deptService.getById(Func.toLong(user.getDeptId()));
+
+			list.add(root);
+
+		}
+		return R.data(list);
+	}
+}

+ 71 - 0
src/main/java/org/springblade/modules/business/project/servicePerson/entity/ServicePersonEntity.java

@@ -0,0 +1,71 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.servicePerson.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("project_service_person")
+public class ServicePersonEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 运维人员名称
+	 */
+	@ApiModelProperty(value = "运维人员名称")
+	private String personName;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty(value = "机构ID")
+	private String orgId;
+
+	/**
+	 * 联系电话
+	 */
+	@ApiModelProperty(value = "联系电话")
+	private String contactPhone;
+
+	/**
+	 * 邮箱
+	 */
+	@ApiModelProperty(value = "邮箱")
+	private String mail;
+
+	/**
+	 * 备注说明
+	 */
+	@ApiModelProperty(value = "备注说明")
+	private String remark;
+
+	/**
+	 * 帐号
+	 */
+	@ApiModelProperty(value = "帐号")
+	private String userAccount;
+
+}

+ 21 - 0
src/main/java/org/springblade/modules/business/project/servicePerson/mapper/ProjectServicePersonMapper.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.servicePerson.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.modules.business.project.servicePerson.entity.ServicePersonEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface ProjectServicePersonMapper extends BaseMapper<ServicePersonEntity> {
+}

+ 23 - 0
src/main/java/org/springblade/modules/business/project/servicePerson/mapper/ProjectServicePersonMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.project.servicePerson.mapper.ProjectServicePersonMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="servicePersonResultMap" type="org.springblade.modules.business.project.servicePerson.entity.ServicePersonEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="person_name" property="personName"/>
+        <result column="org_id" property="orgId"/>
+        <result column="contact_phone" property="contactPhone"/>
+        <result column="mail" property="mail"/>
+        <result column="remark" property="remark"/>
+        <result column="user_account" property="userAccount"/>
+
+    </resultMap>
+
+</mapper>

+ 21 - 0
src/main/java/org/springblade/modules/business/project/servicePerson/service/IProjectServicePersonService.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.servicePerson.service;
+
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.project.servicePerson.entity.ServicePersonEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IProjectServicePersonService extends BaseService<ServicePersonEntity> {
+}

+ 26 - 0
src/main/java/org/springblade/modules/business/project/servicePerson/service/impl/ProjectServicePersonServiceImpl.java

@@ -0,0 +1,26 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.servicePerson.service.impl;
+
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.business.project.servicePerson.entity.ServicePersonEntity;
+import org.springblade.modules.business.project.servicePerson.mapper.ProjectServicePersonMapper;
+import org.springblade.modules.business.project.servicePerson.service.IProjectServicePersonService;
+import org.springframework.stereotype.Service;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class ProjectServicePersonServiceImpl  extends BaseServiceImpl<ProjectServicePersonMapper,ServicePersonEntity> implements IProjectServicePersonService {
+
+}

+ 24 - 0
src/main/java/org/springblade/modules/business/project/servicePerson/vo/ServicePersonVO.java

@@ -0,0 +1,24 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.servicePerson.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.project.servicePerson.entity.ServicePersonEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ServicePersonVO extends ServicePersonEntity {
+}

+ 34 - 0
src/main/java/org/springblade/modules/business/project/servicePerson/wrapper/ProjectServicePersonWrapper.java

@@ -0,0 +1,34 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.project.servicePerson.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.business.project.servicePerson.entity.ServicePersonEntity;
+import org.springblade.modules.business.project.servicePerson.vo.ServicePersonVO;
+
+import java.util.Objects;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public class ProjectServicePersonWrapper extends BaseEntityWrapper<ServicePersonEntity, ServicePersonVO> {
+	public static ProjectServicePersonWrapper build() {
+		return new ProjectServicePersonWrapper();
+	}
+
+	@Override
+	public ServicePersonVO entityVO(ServicePersonEntity entity) {
+		ServicePersonVO servicePersonVO = Objects.requireNonNull(BeanUtil.copy(entity, ServicePersonVO.class));
+		return servicePersonVO;
+	}
+}

+ 167 - 0
src/main/java/org/springblade/modules/business/rtu/base/controller/RtuBaseInfoController.java

@@ -0,0 +1,167 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.rtu.base.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.constant.BusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.business.equipment.inspection.report.dto.EquipmentInspectionReportDTO;
+import org.springblade.modules.business.project.servicePerson.entity.ServicePersonEntity;
+import org.springblade.modules.business.rtu.base.dto.RtuInfoDTO;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.service.IRtuBaseInfoService;
+import org.springblade.modules.business.rtu.base.vo.RtuInfoVO;
+import org.springblade.modules.business.rtu.base.wrapper.RtuInfoWrapper;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping(AppConstant.APPLICATION_TEST_NAME + "/rtu/base")
+@AllArgsConstructor
+@Api(value = "测站设备基础管理", tags = "测站设备基础管理")
+public class RtuBaseInfoController extends BladeController {
+	private final IRtuBaseInfoService rtuBaseInfoService;
+
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<RtuInfoVO>> list(Query query) {
+		LambdaQueryWrapper<RtuInfoEntity> wrapper = Wrappers.<RtuInfoEntity>query().lambda();
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_ADMIN.equals(user.getRoleName())) {
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+			wrapper.eq(RtuInfoEntity::getOrgId,user.getDeptId());
+		}
+		wrapper.eq(RtuInfoEntity::getIsDeleted,0);
+		wrapper.orderByAsc(RtuInfoEntity::getOrgId);
+		wrapper.orderByAsc(RtuInfoEntity::getProjectId);
+		wrapper.orderByAsc(RtuInfoEntity::getRtuCode);
+
+		IPage<RtuInfoEntity> pages = rtuBaseInfoService.page(Condition.getPage(query),wrapper);
+		return R.data(RtuInfoWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 多表联合查询自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+	})
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页")
+	public R<IPage<RtuInfoVO>> page(@ApiIgnore RtuInfoDTO rtuInfoDTO, Query query) {
+
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_ADMIN.equals(user.getRoleName())) {
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_ORG_SERVICE_PERSON.equals(user.getRoleName())) {
+			rtuInfoDTO.setOrgId(Func.toLong(user.getDeptId()));
+		}
+
+		IPage<RtuInfoVO> pages = rtuBaseInfoService.selectPage(Condition.getPage(query),rtuInfoDTO);
+		List<RtuInfoVO> list = pages.getRecords();
+		for (RtuInfoVO rtuInfoVO : list) {
+			RtuInfoWrapper.build().appendInfo(rtuInfoVO);
+		}
+		return R.data(pages);
+	}
+
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入rtuInfoEntity")
+	public R<RtuInfoVO> detail(RtuInfoEntity rtuInfoEntity) {
+		RtuInfoEntity detail = rtuBaseInfoService.getOne(Condition.getQueryWrapper(rtuInfoEntity));
+		return R.data(RtuInfoWrapper.build().entityVO(detail));
+	}
+
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入rtuInfoEntity")
+	public R save(@RequestBody RtuInfoEntity rtuInfoEntity) {
+		return R.status(rtuBaseInfoService.save(rtuInfoEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入rtuInfoEntity")
+	public R update(@RequestBody RtuInfoEntity rtuInfoEntity) {
+		return R.status(rtuBaseInfoService.updateById(rtuInfoEntity));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入rtuInfoEntity")
+	public R submit(@RequestBody RtuInfoEntity rtuInfoEntity) {
+		return R.status(rtuBaseInfoService.saveOrUpdate(rtuInfoEntity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ID数组")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = rtuBaseInfoService.deleteLogic(Func.toLongList(ids));
+		return R.status(temp);
+	}
+
+	@GetMapping("/dict/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<List<DictBiz>> dictList(@RequestParam String code) {
+		List<DictBiz> dicts = DictBizCache.getList(code);
+
+		return R.data(dicts);
+	}
+
+}

+ 30 - 0
src/main/java/org/springblade/modules/business/rtu/base/dto/RtuInfoDTO.java

@@ -0,0 +1,30 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/7
+ */
+package org.springblade.modules.business.rtu.base.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+
+/***
+ * Date:2022/9/7
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class RtuInfoDTO extends RtuInfoEntity {
+	/**
+	 * 项目名称
+	 */
+	@ApiModelProperty(value = "项目名称")
+	private String projectName;
+}

+ 324 - 0
src/main/java/org/springblade/modules/business/rtu/base/entity/RtuInfoEntity.java

@@ -0,0 +1,324 @@
+/**
+ * Copyright
+ * All right reserved.
+ * 项目名称:
+ * 创建日期:2022/3/9
+ */
+package org.springblade.modules.business.rtu.base.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 实体类
+ *
+ * @author swp
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("rtu_info")
+public class RtuInfoEntity extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 测站编码
+	 */
+	@ApiModelProperty(value = "测站编码")
+	private String rtuCode;
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty(value = "测站名称")
+	private String rtuName;
+
+	/**
+	 * 所属盟市
+	 */
+	@ApiModelProperty(value = "所属盟市")
+	private String adCity;
+
+	/**
+	 * 所属盟县旗区
+	 */
+	@ApiModelProperty(value = "所属盟县旗区")
+	private String adDist;
+
+
+	/**
+	 * 经度
+	 */
+	@ApiModelProperty(value = "经度")
+	private String lng;
+
+	/**
+	 * 纬度
+	 */
+	@ApiModelProperty(value = "纬度")
+	private String lat;
+
+	/**
+	 * 管理单位
+	 */
+	@ApiModelProperty(value = "管理单位")
+	private String manageCompany;
+
+
+	/**
+	 * 测站位置说明
+	 */
+	@ApiModelProperty(value = "测站位置说明")
+	private String locationDesc;
+
+	/**
+	 * 测站类型
+	 */
+	@ApiModelProperty(value = "测站类型")
+	private String rtuKinds;
+
+	/**
+	 * 所属机构ID
+	 */
+	@ApiModelProperty(value = "所属机构")
+	private Long orgId;
+
+	/**
+	 * 所属项目ID
+	 */
+	@ApiModelProperty(value = "所属项目")
+	private Long projectId;
+
+
+	/**
+	 * 是否雨量站
+	 */
+	@ApiModelProperty(value = "是否雨量站")
+	private Integer isRain;
+
+	/**
+	 * 是否河道站
+	 */
+	@ApiModelProperty(value = "是否河道站")
+	private Integer isRiver;
+
+	/**
+	 * 是否水库站
+	 */
+	@ApiModelProperty(value = "是否水库站")
+	private Integer isRes;
+
+	/**
+	 * 是否墒情站
+	 */
+	@ApiModelProperty(value = "是否墒情站")
+	private Integer isGround;
+
+	/**
+	 * 是否北斗通信
+	 */
+	@ApiModelProperty(value = "是否北斗通信")
+	private Integer isSatellite;
+
+	/**
+	 * RTU品牌
+	 */
+	@ApiModelProperty(value = "RTU品牌")
+	private String rtuBrand;
+
+	/**
+	 * RTU型号
+	 */
+	@ApiModelProperty(value = "RTU型号")
+	private String rtuModel;
+
+	/**
+	 * RTU更换时间
+	 */
+	@ApiModelProperty(value = "RTU更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rtuReplaceDate;
+
+
+	/**
+	 * RTU发往省
+	 */
+	@ApiModelProperty(value = "RTU发往省")
+	private Integer datagramToSheng;
+
+	/**
+	 * RTU发往市
+	 */
+	@ApiModelProperty(value = "RTU发往市")
+	private Integer datagramToShi;
+
+
+	/**
+	 * RTU发往县
+	 */
+	@ApiModelProperty(value = "RTU发往县")
+	private Integer datagramToQu;
+
+	/**
+	 * 雨量传感器品牌
+	 */
+	@ApiModelProperty(value = "雨量传感器品牌")
+	private String rainSensorBrand;
+
+	/**
+	 * 雨量传感器型号
+	 */
+	@ApiModelProperty(value = "雨量传感器型号")
+	private String rainSensorModel;
+
+	/**
+	 * 雨量传感器更换时间
+	 */
+	@ApiModelProperty(value = "雨量传感器更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rainSensorReplaceDate;
+
+	/**
+	 * 水位计传感器品牌
+	 */
+	@ApiModelProperty(value = "水位计传感器品牌")
+	private String waterSensorBrand;
+
+	/**
+	 * 水位计传感器型号
+	 */
+	@ApiModelProperty(value = "水位计传感器型号")
+	private String waterSensorModel;
+
+	/**
+	 * 水位计传感器类型
+	 */
+	@ApiModelProperty(value = "水位计传感器类型")
+	private Long waterSensorType;
+
+	/**
+	 * 水位计传感器更换时间
+	 */
+	@ApiModelProperty(value = "水位计传感器更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date waterSensorReplaceDate;
+
+	/**
+	 * 墒情传感器品牌
+	 */
+	@ApiModelProperty(value = "墒情传感器品牌")
+	private String groundSensorBrand;
+
+	/**
+	 * 墒情传感器型号
+	 */
+	@ApiModelProperty(value = "墒情传感器型号")
+	private String groundSensorModel;
+
+	/**
+	 * 墒情传感器类型
+	 */
+	@ApiModelProperty(value = "墒情传感器类型")
+	private Long groundSensorType;
+
+	/**
+	 * 墒情传感器更换时间
+	 */
+	@ApiModelProperty(value = "墒情传感器更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date groundSensorReplaceDate;
+
+	/**
+	 * 供电系统电池型号
+	 */
+	@ApiModelProperty(value = "供电系统电池型号")
+	private String batteryModel;
+
+	/**
+	 * 供电系统电池更换时间
+	 */
+	@ApiModelProperty(value = "供电系统电池更换时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date batteryReplaceDate;
+
+	/**
+	 * 太阳能板型号
+	 */
+	@ApiModelProperty(value = "太阳能板型号")
+	private String sunPowerModel;
+
+	/**
+	 * SIN卡号
+	 */
+	@ApiModelProperty(value = "SIN卡号")
+	private String networkSimId;
+
+	/**
+	 * 开卡单位
+	 */
+	@ApiModelProperty(value = "开卡单位")
+	private String networkPayer;
+
+	/**
+	 * 缴费截止时间
+	 */
+	@ApiModelProperty(value = "缴费截止时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date networkPayEndDate;
+
+
+	/**
+	 * 北斗通讯类型
+	 */
+	@ApiModelProperty(value = "北斗通讯类型")
+	private Long satelliteModel;
+
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remark;
+}

+ 38 - 0
src/main/java/org/springblade/modules/business/rtu/base/mapper/RtuInfoMapper.java

@@ -0,0 +1,38 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.rtu.base.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.business.project.base.entity.ProjectInfoEntity;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+import org.springblade.modules.business.rtu.base.dto.RtuInfoDTO;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.vo.RtuInfoVO;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface RtuInfoMapper extends BaseMapper<RtuInfoEntity> {
+	/**
+	 * 自定义分页
+	 *
+	 * @param page 分页
+	 * @return List<RtuInfoVO>
+	 */
+	List<RtuInfoVO> selectPage(IPage page,@Param("rtuInfoDTO") RtuInfoDTO rtuInfoDTO);
+
+
+}

+ 160 - 0
src/main/java/org/springblade/modules/business/rtu/base/mapper/RtuInfoMapper.xml

@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.business.rtu.base.mapper.RtuInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="rtuInfoResultMap" type="org.springblade.modules.business.rtu.base.entity.RtuInfoEntity">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="rtu_name" property="rtuName"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="org_id" property="orgId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="manageCompany" property="manage_company"/>
+
+        <result column="rtu_kinds" property="rtuKinds"/>
+        <result column="remark" property="remark"/>
+        <result column="location_desc" property="locationDesc"/>
+        <result column="is_rain" property="isRain"/>
+        <result column="is_river" property="isRiver"/>
+        <result column="is_res" property="isRes"/>
+
+        <result column="is_ground" property="isGround"/>
+        <result column="is_satellite" property="isSatellite"/>
+
+        <result column="rtu_brand" property="rtuBrand"/>
+        <result column="rtu_model" property="rtuModel"/>
+        <result column="rtu_replace_date" property="rtuReplaceDate"/>
+        <result column="datagram_to_sheng" property="datagramToSheng"/>
+        <result column="datagram_to_shi" property="datagramToShi"/>
+        <result column="datagram_to_qu" property="datagramToQu"/>
+
+        <result column="rain_sensor_brand" property="rainSensorBrand"/>
+        <result column="rain_sensor_model" property="rainSensorModel"/>
+        <result column="rain_sensor_replace_date" property="rainSensorReplaceDate"/>
+
+        <result column="water_sensor_type" property="waterSensorType"/>
+        <result column="water_sensor_brand" property="waterSensorModel"/>
+        <result column="water_sensor_model" property="waterSensorModel"/>
+        <result column="water_sensor_replace_date" property="waterSensorReplaceDate"/>
+
+        <result column="ground_sensor_type" property="groundSensorType"/>
+        <result column="ground_sensor_brand" property="groundSensorBrand"/>
+        <result column="ground_sensor_model" property="groundSensorModel"/>
+        <result column="ground_sensor_replace_date" property="groundSensorReplaceDate"/>
+
+        <result column="battery_model" property="batteryModel"/>
+        <result column="battery_replace_date" property="batteryReplaceDate"/>
+        <result column="sun_power_model" property="sunPowerModel"/>
+
+        <result column="network_sim_id" property="networkSimId"/>
+        <result column="network_payer" property="networkPayer"/>
+        <result column="network_pay_end_date" property="networkPayEndDate"/>
+
+        <result column="satellite_model" property="satelliteModel"/>
+
+        <result column="ad_city" property="adCity"/>
+        <result column="ad_dist" property="adDist"/>
+
+
+
+    </resultMap>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="rtuInfoVOResultMap" type="org.springblade.modules.business.rtu.base.vo.RtuInfoVO">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="rtu_name" property="rtuName"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="org_id" property="orgId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="manageCompany" property="manage_company"/>
+
+
+        <result column="rtu_kinds" property="rtuKinds"/>
+        <result column="remark" property="remark"/>
+        <result column="location_desc" property="locationDesc"/>
+        <result column="remark" property="remark"/>
+        <result column="is_rain" property="isRain"/>
+        <result column="is_river" property="isRiver"/>
+        <result column="is_res" property="isRes"/>
+
+        <result column="is_ground" property="isGround"/>
+        <result column="is_satellite" property="isSatellite"/>
+
+        <result column="rtu_brand" property="rtuBrand"/>
+        <result column="rtu_model" property="rtuModel"/>
+        <result column="rtu_replace_date" property="rtuReplaceDate"/>
+        <result column="datagram_to_sheng" property="datagramToSheng"/>
+        <result column="datagram_to_shi" property="datagramToShi"/>
+        <result column="datagram_to_qu" property="datagramToQu"/>
+
+        <result column="rain_sensor_brand" property="rainSensorBrand"/>
+        <result column="rain_sensor_model" property="rainSensorModel"/>
+        <result column="rain_sensor_replace_date" property="rainSensorReplaceDate"/>
+
+        <result column="water_sensor_type" property="waterSensorType"/>
+        <result column="water_sensor_brand" property="waterSensorModel"/>
+        <result column="water_sensor_model" property="waterSensorModel"/>
+        <result column="water_sensor_replace_date" property="waterSensorReplaceDate"/>
+
+        <result column="ground_sensor_type" property="groundSensorType"/>
+        <result column="ground_sensor_brand" property="groundSensorBrand"/>
+        <result column="ground_sensor_model" property="groundSensorModel"/>
+        <result column="ground_sensor_replace_date" property="groundSensorReplaceDate"/>
+
+        <result column="battery_model" property="batteryModel"/>
+        <result column="battery_replace_date" property="batteryReplaceDate"/>
+        <result column="sun_power_model" property="sunPowerModel"/>
+
+        <result column="network_sim_id" property="networkSimId"/>
+        <result column="network_payer" property="networkPayer"/>
+        <result column="network_pay_end_date" property="networkPayEndDate"/>
+
+        <result column="satellite_model" property="satelliteModel"/>
+
+        <result column="project_name" property="projectName"/>
+        <result column="org_name" property="orgName"/>
+    </resultMap>
+
+
+    <select id="selectPage" resultMap="rtuInfoVOResultMap">
+        SELECT
+        n.*,
+        p.project_name ,d.dept_name AS org_name
+        FROM
+        rtu_info n
+        LEFT JOIN  project_info p ON n.project_id = p.id
+        LEFT JOIN  blade_dept d ON n.org_id = d.id
+        WHERE
+        n.is_deleted = 0
+        <if test="rtuInfoDTO.orgId!=null">
+            and n.org_id = #{rtuInfoDTO.orgId}
+        </if>
+        <if test="rtuInfoDTO.rtuName!=null">
+            and n.rtu_name like concat(concat('%', #{rtuInfoDTO.rtuName}), '%')
+        </if>
+        <if test="rtuInfoDTO.rtuCode!=null">
+            and n.rtu_code like concat(concat('%', #{rtuInfoDTO.rtuCode}), '%')
+        </if>
+        <if test="rtuInfoDTO.projectName!=null">
+            and p.project_name like concat(concat('%', #{rtuInfoDTO.projectName}), '%')
+        </if>
+        order  by n.org_id,n.project_id,n.rtu_code
+
+    </select>
+</mapper>

+ 33 - 0
src/main/java/org/springblade/modules/business/rtu/base/service/IRtuBaseInfoService.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.rtu.base.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.business.project.base.vo.ProjectInfoVO;
+import org.springblade.modules.business.rtu.base.dto.RtuInfoDTO;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.vo.RtuInfoVO;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IRtuBaseInfoService extends BaseService<RtuInfoEntity> {
+	/**
+	 * 自定义分页
+	 * @param page
+	 * @return
+	 */
+	IPage<RtuInfoVO> selectPage(IPage<RtuInfoVO> page, RtuInfoDTO rtuInfoDTO);
+
+	RtuInfoEntity rtuInfoByRtuCode(String rtuCode);
+}

+ 44 - 0
src/main/java/org/springblade/modules/business/rtu/base/service/impl/RtuBaseInfoServiceImpl.java

@@ -0,0 +1,44 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.rtu.base.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.business.rtu.base.dto.RtuInfoDTO;
+import org.springblade.modules.business.rtu.base.entity.RtuInfoEntity;
+import org.springblade.modules.business.rtu.base.mapper.RtuInfoMapper;
+import org.springblade.modules.business.rtu.base.service.IRtuBaseInfoService;
+import org.springblade.modules.business.rtu.base.vo.RtuInfoVO;
+import org.springframework.stereotype.Service;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class RtuBaseInfoServiceImpl extends BaseServiceImpl<RtuInfoMapper, RtuInfoEntity> implements IRtuBaseInfoService {
+	@Override
+	public IPage<RtuInfoVO> selectPage(IPage<RtuInfoVO> page, RtuInfoDTO rtuInfoDTO) {
+		return page.setRecords(baseMapper.selectPage(page,rtuInfoDTO));
+	}
+
+	@Override
+	public RtuInfoEntity rtuInfoByRtuCode(String rtuCode) {
+		LambdaQueryWrapper<RtuInfoEntity> wrapper = Wrappers.<RtuInfoEntity>query().lambda();
+		wrapper.eq(RtuInfoEntity::getRtuCode, rtuCode);
+		wrapper.eq(RtuInfoEntity::getIsDeleted,0);
+
+		RtuInfoEntity rtuInfoEntity =  this.getOne(wrapper);
+		return rtuInfoEntity;
+	}
+}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác