Răsfoiți Sursa

泰山运维系统云服务项目-巡检工单系统开发

dylan 2 ani în urmă
părinte
comite
ec75e39f4f
60 a modificat fișierele cu 10451 adăugiri și 42 ștergeri
  1. 1 0
      .gitignore.bak
  2. 49 22
      pom.xml
  3. 58 0
      src/main/java/org/springblade/hbase/HBaseConfig.java
  4. 550 0
      src/main/java/org/springblade/hbase/HBaseService.java
  5. 1 1
      src/main/java/org/springblade/modules/business/equipment/inspection/base/controller/EquipmentInspectionController.java
  6. 139 0
      src/main/java/org/springblade/modules/business/xjgd/enums/XjgdOrderStatusEnum.java
  7. 996 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/controller/InspectionController.java
  8. 196 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/controller/InspectionPlanController.java
  9. 780 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/controller/InspectionProcessController.java
  10. 108 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/dto/InspectionInfoDTO.java
  11. 58 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/dto/InspectionPlanInfoDTO.java
  12. 61 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/dto/InspectionProcessRecordInfoDTO.java
  13. 193 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/entity/InspectionInfoEntity.java
  14. 208 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/entity/InspectionPlanInfoEntity.java
  15. 408 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/entity/InspectionProcessRecordInfoEntity.java
  16. 36 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionMapper.java
  17. 325 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionMapper.xml
  18. 31 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionPlanMapper.java
  19. 82 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionPlanMapper.xml
  20. 95 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionProcessMapper.java
  21. 457 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionProcessMapper.xml
  22. 33 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/service/IInspectionPlanService.java
  23. 102 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/service/IInspectionProcessService.java
  24. 73 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/service/IInspectionService.java
  25. 89 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/service/impl/InspectionPlanServiceImpl.java
  26. 80 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/service/impl/InspectionProcessServiceImpl.java
  27. 69 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/service/impl/InspectionServiceImpl.java
  28. 175 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/vo/InspectionInfoVO.java
  29. 27 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/vo/InspectionPlanInfoVO.java
  30. 167 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/vo/InspectionProcessRecordInfoVO.java
  31. 35 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/wrapper/InspectionPlanWrapper.java
  32. 148 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/wrapper/InspectionProcessWrapper.java
  33. 131 0
      src/main/java/org/springblade/modules/business/xjgd/inspection/wrapper/InspectionWrapper.java
  34. 825 0
      src/main/java/org/springblade/modules/business/xjgd/order/controller/OrderController.java
  35. 447 0
      src/main/java/org/springblade/modules/business/xjgd/order/controller/OrderProcessController.java
  36. 103 0
      src/main/java/org/springblade/modules/business/xjgd/order/dto/OrderInfoDTO.java
  37. 63 0
      src/main/java/org/springblade/modules/business/xjgd/order/dto/OrderProcessRecordInfoDTO.java
  38. 183 0
      src/main/java/org/springblade/modules/business/xjgd/order/entity/OrderInfoEntity.java
  39. 426 0
      src/main/java/org/springblade/modules/business/xjgd/order/entity/OrderProcessRecordInfoEntity.java
  40. 114 0
      src/main/java/org/springblade/modules/business/xjgd/order/mapper/OrderMapper.java
  41. 413 0
      src/main/java/org/springblade/modules/business/xjgd/order/mapper/OrderMapper.xml
  42. 60 0
      src/main/java/org/springblade/modules/business/xjgd/order/mapper/OrderProcessMapper.java
  43. 325 0
      src/main/java/org/springblade/modules/business/xjgd/order/mapper/OrderProcessMapper.xml
  44. 66 0
      src/main/java/org/springblade/modules/business/xjgd/order/service/IOrderProcessService.java
  45. 131 0
      src/main/java/org/springblade/modules/business/xjgd/order/service/IOrderService.java
  46. 69 0
      src/main/java/org/springblade/modules/business/xjgd/order/service/impl/OrderProcessServiceImpl.java
  47. 270 0
      src/main/java/org/springblade/modules/business/xjgd/order/service/impl/OrderServiceImpl.java
  48. 294 0
      src/main/java/org/springblade/modules/business/xjgd/order/vo/OrderInfoVO.java
  49. 143 0
      src/main/java/org/springblade/modules/business/xjgd/order/vo/OrderProcessRecordInfoVO.java
  50. 65 0
      src/main/java/org/springblade/modules/business/xjgd/order/wrapper/OrderProcessWrapper.java
  51. 163 0
      src/main/java/org/springblade/modules/business/xjgd/order/wrapper/OrderWrapper.java
  52. 212 0
      src/main/java/org/springblade/modules/datagram/controller/DatagramController.java
  53. 26 0
      src/main/java/org/springblade/modules/datagram/controller/dto/DatagramInfoDTO.java
  54. 1 1
      src/main/java/org/springblade/modules/manage/advertisement/controller/AdvertisementManageController.java
  55. 1 1
      src/main/java/org/springblade/mq/kafka/handler/MessageHandler.java
  56. 1 1
      src/main/java/org/springblade/task/TaskManager.java
  57. 54 4
      src/main/java/org/springblade/test/TestController.java
  58. 11 1
      src/main/resources/application-dev.yml
  59. 21 9
      src/main/resources/application-test.yml
  60. 3 2
      src/main/resources/application.yml

+ 1 - 0
.gitignore.bak

@@ -0,0 +1 @@
+.idea

+ 49 - 22
pom.xml

@@ -211,43 +211,70 @@
         <dependency>
             <groupId>net.sf.jasperreports</groupId>
             <artifactId>jasperreports</artifactId>
-            <version>RELEASE</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.lowagie</groupId>
-                    <artifactId>itext</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.commons</groupId>
-                    <artifactId>commons-collections4</artifactId>
-                </exclusion>
-            </exclusions>
+            <version>6.21.2</version>
+            <!--<exclusions>-->
+                <!--<exclusion>-->
+                    <!--<groupId>com.lowagie</groupId>-->
+                    <!--<artifactId>itext</artifactId>-->
+                <!--</exclusion>-->
+                <!--<exclusion>-->
+                    <!--<groupId>org.apache.commons</groupId>-->
+                    <!--<artifactId>commons-collections4</artifactId>-->
+                <!--</exclusion>-->
+            <!--</exclusions>-->
         </dependency>
         <dependency>
             <groupId>net.sf.jasperreports</groupId>
             <artifactId>jasperreports-fonts</artifactId>
-            <version>RELEASE</version>
+            <version>6.21.2</version>
         </dependency>
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>javax.mail</artifactId>
         </dependency>
 
-
-        <dependency>
-            <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka-streams</artifactId>
-            <version>RELEASE</version>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.kafka</groupId>-->
+            <!--<artifactId>kafka-streams</artifactId>-->
+            <!--<version>RELEASE</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+            <!--<groupId>org.apache.kafka</groupId>-->
+            <!--<artifactId>kafka-streams-scala_2.13</artifactId>-->
+            <!--<version>RELEASE</version>-->
+        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka-streams-scala_2.13</artifactId>
+            <artifactId>kafka-clients</artifactId>
             <version>RELEASE</version>
         </dependency>
+
         <dependency>
-            <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka-clients</artifactId>
-            <version>RELEASE</version>
+            <groupId>org.apache.hbase</groupId>
+            <artifactId>hbase-client</artifactId>
+            <version>2.5.3</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>servlet-api-2.5</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-reload4j</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
     </dependencies>
 

+ 58 - 0
src/main/java/org/springblade/hbase/HBaseConfig.java

@@ -0,0 +1,58 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2024/3/29
+ */
+package org.springblade.hbase;
+
+
+import lombok.Data;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+
+/***
+ * Date:2024/3/29
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@Configuration
+public class HBaseConfig {
+
+    @Value("${hbase.enable}")
+    private Boolean hbaseEnable;
+
+    @Value("${hbase.zookeeper.quorum}")
+    private String quorum;
+
+    @Value("${hbase.zookeeper.property.clientPort}")
+    private String clientPort;
+
+    @Value("${hbase.zookeeper.znode.parent}")
+    private String znodeParent;
+
+//    @Bean
+//    public org.apache.hadoop.conf.Configuration configuration() {
+//        org.apache.hadoop.conf.Configuration conf = HBaseConfiguration.create();
+//        conf.set("hbase.zookeeper.quorum", quorum);
+//        conf.set("hbase.zookeeper.property.clientPort", clientPort);
+//        conf.set("zookeeper.znode.parent", znodeParent);
+//        return conf;
+//    }
+
+    @Bean
+    public HBaseService getHbaseService() {
+        org.apache.hadoop.conf.Configuration conf = HBaseConfiguration.create();
+        conf.set("hbase.zookeeper.quorum", quorum);
+        conf.set("hbase.zookeeper.property.clientPort", clientPort);
+        conf.set("zookeeper.znode.parent", znodeParent);
+        return new HBaseService(conf, hbaseEnable);
+    }
+}

+ 550 - 0
src/main/java/org/springblade/hbase/HBaseService.java

@@ -0,0 +1,550 @@
+/**
+ * 项目名称:
+ * 创建日期: 2023/4/26
+ */
+package org.springblade.hbase;
+
+import cn.hutool.core.util.IdUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.*;
+import org.apache.hadoop.hbase.util.Bytes;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.*;
+
+/**
+ * 创建日期: 2023/4/26
+ * Title: 文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author DSH
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ * @mender:(文件的修改者,文件创建者之外的人)
+ */
+@Slf4j
+public class HBaseService {
+
+	/** 默认列 - 数据上报时间 */
+	private final String COLUMN_REPORT_TIME = "report_time";
+
+	/** 默认列 - 数据创建时间 */
+	private final String COLUMN_CREATE_TIME = "create_time";
+
+	/** 默认列 - 数据创建时间 */
+	private final String COLUMN_CREATE_TIME_STR = "create_time_str";
+
+	/**
+	 * 声明静态配置
+	 */
+	private Configuration conf = null;
+	private Connection connection = null;
+
+	public HBaseService(Configuration conf, boolean enable) {
+		if (enable) {
+			this.conf = conf;
+			try {
+				log.info("HBase连接初始化...");
+				connection = ConnectionFactory.createConnection(this.conf);
+			} catch (IOException e) {
+				log.error("获取HBase连接失败");
+			}
+		} else {
+			log.info("HBase连接未初始化!");
+		}
+	}
+
+	/**
+	 * 功能: 判断表是否存在
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @return: boolean
+	 */
+	public boolean isTableExists(String tableName) {
+		boolean exists = false;
+		try {
+			TableName table = TableName.valueOf(tableName);
+			exists = connection.getAdmin().tableExists(table);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return exists;
+	}
+
+	/**
+	 * 功能: 创建表
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param columnFamily 列族
+	 * @return: boolean
+	 */
+	public boolean createTable(String tableName, List<String> columnFamily) {
+		return createTable(tableName, columnFamily, null);
+	}
+
+	/**
+	 * 功能: 预分区创建表
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param columnFamily 列族
+	 * @param keys 分区集合
+	 * @return: boolean
+	 */
+	public boolean createTable(String tableName, List<String> columnFamily, List<String> keys) {
+		if (isTableExists(tableName)) {
+			log.debug("HBase中表 {} 已存在。", tableName);
+			return false;
+		}
+		Admin admin = null;
+		try {
+			/*TableName table = TableName.valueOf(tableName);
+			HTableDescriptor desc = new HTableDescriptor(table);
+			for (String cf : columnFamily) {
+				desc.addFamily(new HColumnDescriptor(cf));
+			}*/
+			admin = connection.getAdmin();
+			List<ColumnFamilyDescriptor> familyDescriptors = new ArrayList<>(columnFamily.size());
+			for (String column : columnFamily) {
+				familyDescriptors.add(ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(column)).build());
+			}
+			TableDescriptor desc = TableDescriptorBuilder.newBuilder(TableName.valueOf(tableName)).setColumnFamilies(familyDescriptors).build();
+			if (keys == null) {
+				admin.createTable(desc);
+			} else {
+				byte[][] splitKeys = getSplitKeys(keys);
+				admin.createTable(desc, splitKeys);
+			}
+			return true;
+		} catch (IOException e) {
+			e.printStackTrace();
+		} finally {
+			close(admin, null, null);
+		}
+		return false;
+	}
+
+	/**
+	 * 功能: 删除表
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @return: boolean
+	 */
+	public boolean dropTable(String tableName) {
+		Admin admin = null;
+		try {
+			admin = connection.getAdmin();
+			if (admin.tableExists(TableName.valueOf(tableName))) {
+				admin.disableTable(TableName.valueOf(tableName));
+				admin.deleteTable(TableName.valueOf(tableName));
+				log.debug("表【" + tableName + "】删除成功!");
+			}
+		} catch (IOException e) {
+			log.error(MessageFormat.format("表【{0}】删除失败。", tableName), e);
+			return false;
+		} finally {
+			close(admin, null, null);
+		}
+		return true;
+	}
+
+	/**
+	 * 功能: 插入数据(单条)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param rowKey rowKey
+	 * @param columnFamily 列族
+	 * @param column 列
+	 * @param value 值
+	 * @param reportTime 数据填报时间,毫秒
+	 * @return: boolean
+	 */
+	public boolean putData(String tableName, String rowKey, String columnFamily, String column, String value, Long reportTime) {
+		return putData(tableName, rowKey, columnFamily, Arrays.asList(column), Arrays.asList(value), reportTime);
+	}
+
+	/**
+	 * 功能: 插入数据(批量)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param rowKey rowKey
+	 * @param columnFamily 列族
+	 * @param columns 列
+	 * @param values 值
+	 * @return: boolean
+	 */
+	public boolean putData(String tableName, String rowKey, String columnFamily, List<String> columns, List<String> values, Long reportTime) {
+		Table table = null;
+		try {
+			table = connection.getTable(TableName.valueOf(tableName));
+			Put put = new Put(Bytes.toBytes(rowKey));
+			for (int i = 0; i < columns.size(); i++) {
+				if (columns.get(i) != null && values.get(i) != null) {
+					put.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(columns.get(i)), Bytes.toBytes(values.get(i)));
+				} else {
+					throw new NullPointerException(MessageFormat.format("列名和列数据都不能为空,column:{0},value:{1}" , columns.get(i), values.get(i)));
+				}
+			}
+			if (reportTime != null) {
+				put.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(COLUMN_REPORT_TIME), Bytes.toBytes(reportTime.longValue())); // 填报时间,可能不同于创建时间,可能用于排序、过滤查询
+			}
+			put.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(COLUMN_CREATE_TIME), Bytes.toBytes(System.currentTimeMillis())); // 创建时间
+//			put.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(COLUMN_CREATE_TIME_STR), Bytes.toBytes(Long.toString(System.currentTimeMillis()))); // 创建时间字符串
+			table.put(put);
+			table.close();
+			return true;
+		} catch (IOException e) {
+			log.error(MessageFormat.format("插入数据失败,tableName:{0},rowKey:{1},columnFamily:{2}", tableName, rowKey, columnFamily), e);
+			e.printStackTrace();
+			return false;
+		} finally {
+			close(null, null, table);
+		}
+	}
+
+
+	public boolean putData(String tableName, String rowKey, String columnFamily, List<String> columns, List<String> values) {
+		Table table = null;
+		try {
+			table = connection.getTable(TableName.valueOf(tableName));
+			Put put = new Put(Bytes.toBytes(rowKey));
+			for (int i = 0; i < columns.size(); i++) {
+				if (columns.get(i) != null && values.get(i) != null) {
+					put.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(columns.get(i)), Bytes.toBytes(values.get(i)));
+				} else {
+					throw new NullPointerException(MessageFormat.format("列名和列数据都不能为空,column:{0},value:{1}" , columns.get(i), values.get(i)));
+				}
+			}
+//			if (reportTime != null) {
+//				put.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(COLUMN_REPORT_TIME), Bytes.toBytes(reportTime.longValue())); // 填报时间,可能不同于创建时间,可能用于排序、过滤查询
+//			}
+//			put.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(COLUMN_CREATE_TIME), Bytes.toBytes(System.currentTimeMillis())); // 创建时间
+//			put.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(COLUMN_CREATE_TIME_STR), Bytes.toBytes(Long.toString(System.currentTimeMillis()))); // 创建时间字符串
+			table.put(put);
+			table.close();
+			return true;
+		} catch (IOException e) {
+			log.error(MessageFormat.format("插入数据失败,tableName:{0},rowKey:{1},columnFamily:{2}", tableName, rowKey, columnFamily), e);
+			e.printStackTrace();
+			return false;
+		} finally {
+			close(null, null, table);
+		}
+	}
+
+	/**
+	 * 功能: 获取数据(全表数据)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @return: java.util.List<java.util.Map<java.lang.String,java.lang.String>>
+	 */
+	public List<Map<String, Object>> getData(String tableName) {
+		List<Map<String, Object>> list = new ArrayList<>();
+		Table table = null;
+		ResultScanner rs = null;
+		try {
+			table = connection.getTable(TableName.valueOf(tableName));
+			Scan scan = new Scan();
+
+			rs = table.getScanner(scan);
+			for (Result result : rs) {
+				HashMap<String, Object> map = new HashMap<>();
+				// rowkey
+				String row = Bytes.toString(result.getRow());
+				map.put("row", row);
+				for (Cell cell : result.listCells()) {
+					// 列族
+					String family = Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength());
+					// 列
+					String qualifier = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
+					// 值
+					Object data = null;
+					if (COLUMN_CREATE_TIME.equals(qualifier) || COLUMN_REPORT_TIME.equals(qualifier)) {
+						data = Bytes.toLong(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
+					} else {
+						data = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
+					}
+					// Timestamp
+					long timestamp = cell.getTimestamp();
+					map.put(family + ":" + qualifier, data);
+				}
+				list.add(map);
+			}
+			table.close();
+		} catch (IOException e) {
+			log.error(MessageFormat.format("获取数据(全表数据)失败,tableName:{0}", tableName), e);
+			e.printStackTrace();
+		} finally {
+			close(null, rs, table);
+		}
+		return list;
+	}
+
+	public List<Map<String, Object>> getData(String tableName, Scan scan) {
+		List<Map<String, Object>> list = new ArrayList<>();
+		Table table = null;
+		ResultScanner rs = null;
+		try {
+
+			table = connection.getTable(TableName.valueOf(tableName));
+			if (scan == null) {
+				scan = new Scan();
+			}
+			rs = table.getScanner(scan);
+			for (Result result : rs) {
+				HashMap<String, Object> map = new HashMap<>();
+				// rowkey
+				String row = Bytes.toString(result.getRow());
+				map.put("row", row);
+				for (Cell cell : result.listCells()) {
+					// 列族
+					String family = Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength());
+					// 列
+					String qualifier = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
+					// 值
+					Object data = null;
+					if (COLUMN_CREATE_TIME.equals(qualifier) || COLUMN_REPORT_TIME.equals(qualifier)) {
+						data = Bytes.toLong(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
+					} else {
+						data = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
+					}
+					// Timestamp
+					long timestamp = cell.getTimestamp();
+					map.put(family + ":" + qualifier, data);
+				}
+				list.add(map);
+			}
+			table.close();
+		} catch (IOException e) {
+			log.error(MessageFormat.format("获取数据(全表数据)失败,tableName:{0}", tableName), e);
+			e.printStackTrace();
+		} finally {
+			close(null, rs, table);
+		}
+		return list;
+	}
+
+	/**
+	 * 功能: 获取数据(根据rowkey)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param rowKey rowKey
+	 * @return: java.util.Map<java.lang.String,java.lang.String>
+	 */
+	public Map<String, Object> getData(String tableName, String rowKey) {
+		HashMap<String, Object> map = new HashMap<>();
+		try {
+			Table table = connection.getTable(TableName.valueOf(tableName));
+			Get get = new Get(Bytes.toBytes(rowKey));
+			Result result = table.get(get);
+			if (result != null && !result.isEmpty()) {
+				map.put("row", rowKey);
+				for (Cell cell : result.listCells()) {
+					// 列族
+					String family = Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength());
+					// 列
+					String qualifier = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
+					// 值
+					Object data = null;
+					if (COLUMN_CREATE_TIME.equals(qualifier) || COLUMN_REPORT_TIME.equals(qualifier)) {
+						data = Bytes.toLong(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
+					} else {
+						data = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
+					}
+					map.put(family + ":" + qualifier, data);
+				}
+			}
+			table.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return map;
+	}
+
+	/**
+	 * 功能: 获取数据(根据rowkey,列族,列)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param rowKey
+	 * @param columnFamily 列族
+	 * @param columnQualifier 列
+	 * @return: java.lang.String
+	 */
+	public String getData(String tableName, String rowKey, String columnFamily, String columnQualifier) {
+		String data = "";
+		try {
+			Table table = connection.getTable(TableName.valueOf(tableName));
+			Get get = new Get(Bytes.toBytes(rowKey));
+			get.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(columnQualifier));
+			Result result = table.get(get);
+			if (result != null && !result.isEmpty()) {
+				Cell cell = result.listCells().get(0);
+
+				// 列族
+				String family = Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength());
+				// 列
+				String qualifier = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
+				if (COLUMN_CREATE_TIME.equals(qualifier) || COLUMN_REPORT_TIME.equals(qualifier)) {
+					data = Long.toString(Bytes.toLong(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength()));
+				} else {
+					data = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
+				}
+			}
+			table.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return data;
+	}
+
+	/**
+	 * 功能: 删除数据(根据rowkey)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param rowKey
+	 * @return: void
+	 */
+	public void deleteData(String tableName, String rowKey) throws IOException {
+		Table table = connection.getTable(TableName.valueOf(tableName));
+		Delete delete = new Delete(Bytes.toBytes(rowKey));
+		table.delete(delete);
+		table.close();
+	}
+
+	/**
+	 * 功能: 删除数据(根据rowkey,列族)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param rowKey
+	 * @param columnFamily 列族
+	 * @return: void
+	 */
+	public void deleteData(String tableName, String rowKey, String columnFamily) throws IOException {
+		Table table = connection.getTable(TableName.valueOf(tableName));
+		Delete delete = new Delete(Bytes.toBytes(rowKey));
+		delete.addFamily(columnFamily.getBytes());
+		table.delete(delete);
+		table.close();
+	}
+
+	/**
+	 * 功能: 删除数据(根据rowkey,列族)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param rowKey
+	 * @param columnFamily 列族
+	 * @param column 列
+	 * @return: void
+	 */
+	public void deleteData(String tableName, String rowKey, String columnFamily, String column) throws IOException {
+		Table table = connection.getTable(TableName.valueOf(tableName));
+		Delete delete = new Delete(Bytes.toBytes(rowKey));
+		delete.addColumn(columnFamily.getBytes(), column.getBytes());
+		table.delete(delete);
+		table.close();
+	}
+
+	/**
+	 * 功能: 删除数据(多行)
+	 * 创建日期: 2023/6/7
+	 * @param tableName 表名
+	 * @param rowKeys rowKey集合
+	 * @return: void
+	 */
+	public void deleteData(String tableName, List<String> rowKeys) throws IOException {
+		Table table = connection.getTable(TableName.valueOf(tableName));
+		List<Delete> deleteList = new ArrayList<>();
+		for (String row : rowKeys) {
+			Delete delete = new Delete(Bytes.toBytes(row));
+			deleteList.add(delete);
+		}
+		table.delete(deleteList);
+		table.close();
+	}
+
+	/**
+	 * 功能: 分区【10, 20, 30】 -> ( ,10] (10,20] (20,30] (30, )
+	 * 创建日期: 2023/6/7
+	 * @param keys 分区集合[10, 20, 30]
+	 * @return: byte[][]
+	 */
+	private byte[][] getSplitKeys(List<String> keys) {
+		byte[][] splitKeys = new byte[keys.size()][];
+		TreeSet<byte[]> rows = new TreeSet<>(Bytes.BYTES_COMPARATOR);
+		for (String key : keys) {
+			rows.add(Bytes.toBytes(key));
+		}
+		int i = 0;
+		for (byte[] row : rows) {
+			splitKeys[i] = row;
+			i++;
+		}
+		return splitKeys;
+	}
+
+	/**
+	 * 功能: 查询库中所有表的表名
+	 * 创建日期: 2023/6/8
+	 * @param
+	 * @return: java.util.List<java.lang.String>
+	 */
+	public List<String> getAllTableNames() {
+		List<String> result = new ArrayList<>();
+		Admin admin = null;
+		try {
+			admin = connection.getAdmin();
+			TableName[] tableNames = admin.listTableNames();
+			for (TableName tableName : tableNames) {
+				result.add(tableName.getNameAsString());
+			}
+		} catch (IOException e) {
+			log.error("获取所有表的表名失败", e);
+		} finally {
+			close(admin, null, null);
+		}
+		return result;
+	}
+
+	/**
+	 * 功能: 关闭流
+	 * 创建日期: 2023/6/8
+	 * @param admin
+	 * @param rs
+	 * @param table
+	 * @return: void
+	 */
+	private void close(Admin admin, ResultScanner rs, Table table) {
+		if (admin != null) {
+			try {
+				admin.close();
+			} catch (IOException e) {
+				log.error("关闭Admin失败", e);
+			}
+		}
+
+		if (rs != null) {
+			rs.close();
+		}
+
+		if (table != null) {
+			try {
+				table.close();
+			} catch (IOException e) {
+				log.error("关闭Table失败", e);
+			}
+		}
+	}
+
+	/**
+	 * 功能: 创建一个新的rowKey(方便排序和查找最新记录)
+	 * 创建日期: 2023/9/20
+	 * @param
+	 * @return: java.lang.String
+	 */
+	public String createRowKey() {
+		return String.valueOf(Long.MAX_VALUE - System.currentTimeMillis()) + "-" + IdUtil.fastSimpleUUID();
+	}
+
+}

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

@@ -60,7 +60,7 @@ import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.annotation.Resource;
-import javax.jnlp.UnavailableServiceException;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;

+ 139 - 0
src/main/java/org/springblade/modules/business/xjgd/enums/XjgdOrderStatusEnum.java

@@ -0,0 +1,139 @@
+package org.springblade.modules.business.xjgd.enums;
+
+public enum XjgdOrderStatusEnum {
+    /**
+     * 工单创建
+     */
+    STATUS_CREATE(1, "新工单"),
+
+    /**
+     * 工单接单
+     */
+    STATUS_CONFIRM(2, "已接单"),
+
+    /**
+     * 工单已处理
+     */
+    STATUS_PROCESS(3, "工单已处理"),
+    /**
+     * 费用待审批
+     */
+    STATUS_COSTS_PENDING_APPROVE(4, "费用待审批"),
+    /**
+     * 工单费用审批
+     */
+    STATUS_COSTS_APPROVE(5, "工单费用审批"),
+    /**
+     * 工单费用审批通过
+     */
+    STATUS_COSTS_APPROVE_OK(6, "工单费用审批通过"),
+    /**
+     * 工单费用审批驳回
+     */
+    STATUS_COSTS_APPROVE_BACK(7, "工单费用审批驳回"),
+    /**
+     * 工单关闭待审批
+     */
+    STATUS_CLOSE_PENDING_APPROVE(8, "工单关闭待审批"),
+    /**
+     * 工单完结审批
+     */
+    STATUS_CLOSE_APPROVE(9, "工单完结审批"),
+    /**
+     * 工单关闭审批通过
+     */
+    STATUS_CLOSE_PENDING_APPROVE_OK(10, "工单关闭审批通过"),
+    /**
+     * 工单关闭审批驳回
+     */
+    STATUS_CLOSE_PENDING_APPROVE_BACK(11, "工单关闭审批驳回"),
+    /**
+     * 工单关闭
+     */
+    STATUS_CLOSE(12, "工单关闭"),
+    /**
+     * 工单取消
+     */
+    STATUS_CANCEL(13, "工单取消");
+
+    private Integer code;
+
+    private String name;
+
+    private XjgdOrderStatusEnum(Integer 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(Integer code) {
+        for (XjgdOrderStatusEnum type : XjgdOrderStatusEnum.values()) {
+            if (type.code.equals(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 XjgdOrderStatusEnum getEnumByCode(Integer code) {
+        for (XjgdOrderStatusEnum type : XjgdOrderStatusEnum.values()) {
+            if (type.code.equals(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 XjgdOrderStatusEnum getEnumByName(String name) {
+        for (XjgdOrderStatusEnum type : XjgdOrderStatusEnum.values()) {
+            if (type.name.equals(name)) {
+                return type;
+            }
+        }
+        return null;
+    }
+
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public void setCode(Integer code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 996 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/controller/InspectionController.java

@@ -0,0 +1,996 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.controller;
+
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.excel.write.metadata.WriteSheet;
+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.RequiredArgsConstructor;
+import org.springblade.constant.BusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.oss.model.BladeFile;
+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.InspectionStatusEnum;
+import org.springblade.modules.baseinfo.org.entity.DeptRegionEntity;
+import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
+import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
+
+import org.springblade.modules.business.xjgd.inspection.dto.InspectionInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.dto.InspectionProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionPlanInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionPlanService;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionProcessService;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionService;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionInfoVO;
+import org.springblade.modules.business.xjgd.inspection.wrapper.InspectionWrapper;
+import org.springblade.modules.resource.builder.oss.OssBuilder;
+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.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.*;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping("galaxy-business/xjgd/inspection")
+@RequiredArgsConstructor
+@Api(value = "设备巡检管理模块", tags = "设备巡检管理模块")
+public class InspectionController extends BladeController {
+    private final IInspectionService inspectionService;
+    private final IInspectionPlanService planService;
+    private final IDeptService deptService;
+    private final IRtuBaseInfoService rtuBaseInfoService;
+    private final IDeptRegionService deptRegionService;
+    private final IInspectionProcessService processService;
+    private final IUserService userService;
+
+    @Resource
+    private OssBuilder ossBuilder;
+
+    @Value("${export-config.workdir}")
+    private String workDir;
+
+    @Value("${export-config.inspection-unfinished-template}")
+    private String inspectionUnfinishedTemplate;
+
+    /**
+     * 全部列表
+     */
+    @GetMapping("/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "全部列表,不分页")
+    public R<List<InspectionInfoVO>> list() {
+        List<InspectionInfoEntity> pages = inspectionService.list();
+        return R.data(InspectionWrapper.build().listVO(pages));
+    }
+
+
+    @GetMapping("/page")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+    })
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入 EquipmentInspectionInfoDTO 实体类")
+    public R<IPage<InspectionInfoVO>> page(@ApiIgnore InspectionInfoDTO inspectionInfoDTO, Query query) {
+        BladeUser user = AuthUtil.getUser();
+//        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+//            if (inspectionInfoDTO.getAdCode() == null) {
+//                inspectionInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+//            }
+//        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+//            if (inspectionInfoDTO.getAdCode() == null) {
+//                LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+//                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+//                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+//                DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+//                inspectionInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+//            }
+//        }
+        if (inspectionInfoDTO.getInspectionStatusOption() == 1) {
+            inspectionInfoDTO.setInspectionStatus(InspectionStatusEnum.STATUS_TODO.getCode());
+        } else if (inspectionInfoDTO.getInspectionStatusOption() == 2) {
+            inspectionInfoDTO.setInspectionStatus(InspectionStatusEnum.STATUS_CLOSE_APPROVE.getCode());
+        } else if (inspectionInfoDTO.getInspectionStatusOption() == 3) {
+            inspectionInfoDTO.setInspectionStatus(InspectionStatusEnum.STATUS_APPROVED.getCode());
+        }
+        IPage<InspectionInfoVO> pages = inspectionService.selectPage(Condition.getPage(query), inspectionInfoDTO);
+        List<InspectionInfoVO> list = pages.getRecords();
+        for (InspectionInfoVO vo : list) {
+            InspectionWrapper.build().entityVO(vo);
+        }
+        return R.data(pages);
+    }
+
+    /**
+     * 待巡检任务
+     *
+     * @return
+     */
+    @GetMapping("/todo/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "全部列表,不分页")
+    public R<List<InspectionInfoVO>> todoList() {
+        BladeUser user = AuthUtil.getUser();
+        InspectionInfoDTO dto = new InspectionInfoDTO();
+        dto.setInspectionStatus(InspectionStatusEnum.STATUS_TODO.getCode());
+        dto.setOrgId(Func.toLong(user.getDeptId()));
+//		LambdaQueryWrapper<EquipmentInspectionInfoEntity> wrapper = Wrappers.<EquipmentInspectionInfoEntity>query().lambda();
+//		wrapper.eq(EquipmentInspectionInfoEntity::getInspectionStatus, InspectionStatusEnum.STATUS_TODO.getCode());
+//		wrapper.eq(EquipmentInspectionInfoEntity::getOrgId, Func.toLong(user.getDeptId()));
+        List<InspectionInfoVO> list = inspectionService.todoInspectionList(dto);
+        for (InspectionInfoVO vo : list) {
+            InspectionWrapper.build().entityVO(vo);
+        }
+        return R.data(list);
+    }
+
+    /**
+     * 待完结审批
+     *
+     * @return
+     */
+    @GetMapping("/close-approve/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "全部列表,不分页")
+    public R<List<InspectionInfoVO>> closeApproveList() {
+        BladeUser user = AuthUtil.getUser();
+        InspectionInfoDTO dto = new InspectionInfoDTO();
+        dto.setInspectionStatus(InspectionStatusEnum.STATUS_CLOSE_APPROVE.getCode());
+        dto.setOrgId(Func.toLong(user.getDeptId()));
+        List<InspectionInfoVO> list = inspectionService.todoInspectionList(dto);
+        for (InspectionInfoVO vo : list) {
+            InspectionWrapper.build().entityVO(vo);
+        }
+        return R.data(list);
+    }
+
+    @GetMapping("/approved/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "全部列表,不分页")
+    public R<List<InspectionInfoVO>> approvedList() {
+        BladeUser user = AuthUtil.getUser();
+        InspectionInfoDTO dto = new InspectionInfoDTO();
+        dto.setInspectionStatus(InspectionStatusEnum.STATUS_APPROVED.getCode());
+        dto.setOrgId(Func.toLong(user.getDeptId()));
+//		LambdaQueryWrapper<EquipmentInspectionInfoEntity> wrapper = Wrappers.<EquipmentInspectionInfoEntity>query().lambda();
+//		wrapper.eq(EquipmentInspectionInfoEntity::getInspectionStatus, InspectionStatusEnum.STATUS_TODO.getCode());
+//		wrapper.eq(EquipmentInspectionInfoEntity::getOrgId, Func.toLong(user.getDeptId()));
+        List<InspectionInfoVO> list = inspectionService.todoInspectionList(dto);
+        for (InspectionInfoVO vo : list) {
+            InspectionWrapper.build().entityVO(vo);
+        }
+        return R.data(list);
+    }
+
+    @GetMapping("/rain/page")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "rainSeasonKind", value = "汛期类型", paramType = "query", dataType = "int"),
+            @ApiImplicitParam(name = "servicePersonId", value = "运维人员", paramType = "query", dataType = "long"),
+            @ApiImplicitParam(name = "deptId", value = "部门ID", paramType = "query", dataType = "long")
+    })
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入 EquipmentInspectionInfoDTO 实体类")
+    public R<IPage<InspectionInfoVO>> rainpage(@ApiIgnore InspectionInfoDTO inspectionInfoDTO, Query query) {
+        BladeUser user = AuthUtil.getUser();
+        if (inspectionInfoDTO.getDeptId() != null) {
+            LambdaQueryWrapper<DeptRegionEntity> deptLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+            deptLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+            deptLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, inspectionInfoDTO.getDeptId());
+            DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptLambdaQueryWrapper);
+            inspectionInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+        } else {
+            if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+                if (inspectionInfoDTO.getAdCode() == null) {
+                    inspectionInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+                }
+            } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+                if (inspectionInfoDTO.getAdCode() == null) {
+                    LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+                    deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+                    deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+                    DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+                    inspectionInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+                }
+            }
+        }
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(new Date());
+        calendar.set(Calendar.MONTH, 0);
+        calendar.set(Calendar.DAY_OF_MONTH, 1);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+        calendar.add(Calendar.YEAR, 1);
+        inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+
+        if (inspectionInfoDTO.getRainSeasonKind() != null) {
+            if (inspectionInfoDTO.getRainSeasonKind() == 1) {
+                inspectionInfoDTO.setBeforeRainSeasonStatus(1);
+                inspectionInfoDTO.setBeforeRainSeasonReportUser(inspectionInfoDTO.getServicePersonId());
+            } else if (inspectionInfoDTO.getRainSeasonKind() == 2) {
+                inspectionInfoDTO.setRainSeasonFirstStatus(1);
+                inspectionInfoDTO.setRainSeasonFirstReportUser(inspectionInfoDTO.getServicePersonId());
+            } else if (inspectionInfoDTO.getRainSeasonKind() == 3) {
+                inspectionInfoDTO.setRainSeasonSecondStatus(1);
+                inspectionInfoDTO.setRainSeasonSecondReportUser(inspectionInfoDTO.getServicePersonId());
+            }
+        }
+
+        IPage<InspectionInfoVO> pages = inspectionService.selectPage(Condition.getPage(query), inspectionInfoDTO);
+        return R.data(pages);
+    }
+
+    @GetMapping("/rtu/page")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+    })
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "当前汛期待巡检设备", notes = "传入 EquipmentInspectionInfoDTO 实体类")
+    public R<IPage<InspectionInfoVO>> rtuPage(@ApiIgnore InspectionInfoDTO inspectionInfoDTO, Query query) {
+        BladeUser user = AuthUtil.getUser();
+        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+            if (inspectionInfoDTO.getAdCode() == null) {
+                inspectionInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+            }
+        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+            if (inspectionInfoDTO.getAdCode() == null) {
+                LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+                DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+                inspectionInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+            }
+        }
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(new Date());
+        calendar.set(Calendar.MONTH, 0);
+        calendar.set(Calendar.DAY_OF_MONTH, 1);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+        calendar.add(Calendar.YEAR, 1);
+        inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+        InspectionPlanInfoEntity planEntity = planService.getPlanInfo();
+        calendar.setTime(new Date());
+        Date dt = calendar.getTime();
+        if ((dt.getTime() / 1000 == planEntity.getBeforeRainSeasonEndTime().getTime() / 1000 || dt.after(planEntity.getBeforeRainSeasonStartTime())) && dt.before(planEntity.getBeforeRainSeasonEndTime())) {
+            inspectionInfoDTO.setBeforeRainSeasonStatus(1);
+        } else if ((dt.getTime() / 1000 == planEntity.getBeforeRainSeasonEndTime().getTime() / 1000 || dt.after(planEntity.getRainSeasonFirstStartTime())) && dt.before(planEntity.getRainSeasonFirstEndTime())) {
+            inspectionInfoDTO.setRainSeasonFirstStatus(1);
+        } else if ((dt.getTime() / 1000 == planEntity.getBeforeRainSeasonEndTime().getTime() / 1000 || dt.after(planEntity.getRainSeasonSecondStartTime())) && dt.before(planEntity.getRainSeasonSecondEndTime())) {
+            inspectionInfoDTO.setRainSeasonSecondStatus(1);
+        }
+        IPage<InspectionInfoVO> pages = inspectionService.selectRtuPage(Condition.getPage(query), inspectionInfoDTO);
+        List<InspectionInfoVO> list = pages.getRecords();
+        for (InspectionInfoVO vo : list) {
+            LambdaQueryWrapper<InspectionInfoEntity> wrapper = Wrappers.<InspectionInfoEntity>query().lambda();
+            wrapper.eq(InspectionInfoEntity::getIsDeleted, 0);
+            wrapper.ge(InspectionInfoEntity::getInspectionDate, inspectionInfoDTO.getInspectionYearStartDate());
+            wrapper.lt(InspectionInfoEntity::getInspectionDate, inspectionInfoDTO.getInspectionYearStartDate());
+
+        }
+        return R.data(pages);
+    }
+
+    /**
+     * 统计本年度巡检设备数量、各汛期巡检设备数量
+     *
+     * @param inspectionInfoDTO
+     * @return
+     */
+    @GetMapping("/count")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+    })
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "已巡检上报设备数量")
+    public R<Map<String, Object>> inspectionReportCount(@ApiIgnore InspectionInfoDTO inspectionInfoDTO) {
+        BladeUser user = AuthUtil.getUser();
+        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+            if (inspectionInfoDTO.getAdCode() == null) {
+                inspectionInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+            }
+        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+            if (inspectionInfoDTO.getAdCode() == null) {
+                LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+                DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+                inspectionInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+            }
+        }
+
+        Map<String, Object> data = new HashMap<>();
+
+        long count = rtuBaseInfoService.rtuCount(inspectionInfoDTO.getAdCode());
+        data.put("rtus", count);
+        long rtus = count;
+        int rainKind = 0;
+        long remaininspectionrtus = 0;
+        InspectionPlanInfoEntity planEntity = planService.getPlanInfo();
+
+        Date dt = new Date();
+        if (dt.after(planEntity.getBeforeRainSeasonStartTime()) && dt.before(planEntity.getBeforeRainSeasonEndTime())) {
+            rainKind = 1;
+        } else if (dt.after(planEntity.getRainSeasonFirstStartTime()) && dt.before(planEntity.getRainSeasonFirstEndTime())) {
+            rainKind = 2;
+        } else if (dt.after(planEntity.getRainSeasonSecondStartTime()) && dt.before(planEntity.getRainSeasonSecondEndTime())) {
+            rainKind = 3;
+        }
+        data.put("rainKind", rainKind);
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(new Date());
+        calendar.set(Calendar.MONTH, 0);
+        calendar.set(Calendar.DAY_OF_MONTH, 1);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+        calendar.add(Calendar.YEAR, 1);
+        inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+
+        count = inspectionService.inspectionCount(inspectionInfoDTO);
+        data.put("inspectionCount", count);
+
+        InspectionProcessRecordInfoDTO inspectionReportDTO = new InspectionProcessRecordInfoDTO();
+        calendar.setTime(new Date());
+        calendar.set(Calendar.MONTH, 0);
+        calendar.set(Calendar.DAY_OF_MONTH, 1);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+        calendar.add(Calendar.YEAR, 1);
+        inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+
+
+        inspectionReportDTO.setRainSeasonKind(1);
+        count = processService.equipmentInspectionReportCount(inspectionReportDTO);
+        data.put("beforeRainInspectionCount", count);
+        if (rainKind == 1) {
+            remaininspectionrtus = rtus - count;
+        }
+
+        inspectionReportDTO.setRainSeasonKind(2);
+        count = processService.equipmentInspectionReportCount(inspectionReportDTO);
+        data.put("firstRainInspectionCount", count);
+        if (rainKind == 2) {
+            remaininspectionrtus = rtus - count;
+        }
+        inspectionReportDTO.setRainSeasonKind(3);
+        count = processService.equipmentInspectionReportCount(inspectionReportDTO);
+        data.put("sencodRainInspectionCount", count);
+        if (rainKind == 3) {
+            remaininspectionrtus = rtus - count;
+        }
+        data.put("remaininspectionrtus", remaininspectionrtus);
+
+        return R.data(data);
+    }
+
+    /**
+     * 填报状态
+     */
+    @GetMapping("/reportStatus")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入实体类EquipmentInspectionInfoEntity")
+    public R<InspectionInfoVO> getReportStatus(InspectionInfoEntity equipmentInspectionInfoEntity) {
+        if (null == equipmentInspectionInfoEntity.getId()) {
+            return R.fail("参数错误");
+        }
+        InspectionInfoEntity detail = inspectionService.getById(equipmentInspectionInfoEntity.getId());
+        return R.data(InspectionWrapper.build().entityVO(detail));
+    }
+
+    /**
+     * 填报状态
+     */
+    @GetMapping("/rtu/reportStatus")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入实体类EquipmentInspectionInfoEntity")
+    public R<InspectionInfoVO> getRtuReportStatus(InspectionInfoEntity equipmentInspectionInfoEntity) {
+        if (null == equipmentInspectionInfoEntity.getRtuCode()) {
+            return R.fail("参数错误");
+        }
+        LambdaQueryWrapper<InspectionInfoEntity> wrapper = Wrappers.<InspectionInfoEntity>query().lambda();
+        wrapper.eq(InspectionInfoEntity::getIsDeleted, 0);
+        wrapper.eq(InspectionInfoEntity::getRtuCode, equipmentInspectionInfoEntity.getRtuCode());
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(new Date());
+        calendar.set(Calendar.MONTH, 0);
+        calendar.set(Calendar.DAY_OF_MONTH, 1);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        calendar.set(Calendar.MILLISECOND, 0);
+        wrapper.ge(InspectionInfoEntity::getInspectionDate, calendar.getTime());
+        calendar.add(Calendar.YEAR, 1);
+        wrapper.lt(InspectionInfoEntity::getInspectionDate, calendar.getTime());
+        InspectionInfoEntity detail = inspectionService.getOne(wrapper);
+        if (null == detail) {
+            detail = new InspectionInfoEntity();
+            detail.setBeforeRainSeasonStatus(0);
+            detail.setRainSeasonFirstStatus(0);
+            detail.setRainSeasonSecondStatus(0);
+        }
+        return R.data(InspectionWrapper.build().entityVO(detail));
+    }
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入实体类EquipmentInspectionInfoEntity")
+    public R<InspectionInfoVO> detail(InspectionInfoEntity equipmentInspectionInfoEntity) {
+        if (null == equipmentInspectionInfoEntity.getId()) {
+            return R.fail("参数错误");
+        }
+        InspectionInfoEntity detail = inspectionService.getOne(Condition.getQueryWrapper(equipmentInspectionInfoEntity));
+        return R.data(InspectionWrapper.build().entityVO(detail));
+    }
+
+    /**
+     * 新增
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入orderProcessInfoEntity")
+    public R save(@RequestBody InspectionInfoEntity equipmentInspectionInfoEntity) {
+        return R.status(inspectionService.save(equipmentInspectionInfoEntity));
+    }
+
+    /**
+     * 修改
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入orderProcessInfoEntity")
+    public R update(@RequestBody InspectionInfoEntity equipmentInspectionInfoEntity) {
+        return R.status(inspectionService.updateById(equipmentInspectionInfoEntity));
+    }
+
+    /**
+     * 新增或修改
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入orderProcessInfoEntity")
+    public R submit(@RequestBody InspectionInfoEntity equipmentInspectionInfoEntity) {
+        return R.status(inspectionService.saveOrUpdate(equipmentInspectionInfoEntity));
+    }
+
+    /**
+     * 删除
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入projectInfoEntity")
+    public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+        boolean temp = inspectionService.deleteLogic(Func.toLongList(ids));
+        return R.status(temp);
+    }
+
+    /**
+     * 巡检统计
+     *
+     * @return
+     */
+//    @GetMapping("/person/statistics")
+//    @ApiOperationSupport(order = 3)
+//    @ApiOperation(value = "统计表格")
+//    public R<List<EquipmentInspectionStatisticsVO>> inspectionStatistics() {
+//        BladeUser user = AuthUtil.getUser();
+//        LambdaQueryWrapper<User> userQueryWrapper = Wrappers.<User>query().lambda();
+//        userQueryWrapper.eq(User::getIsDeleted, 0);
+//        userQueryWrapper.eq(User::getDeptId, Func.toLong(user.getDeptId()));
+//        List<User> list = userService.list(userQueryWrapper);
+//        List<EquipmentInspectionStatisticsVO> countList = new LinkedList<>();
+//        for (User u : list) {
+//            EquipmentInspectionStatisticsVO vo = new EquipmentInspectionStatisticsVO();
+//            vo.setUserId(u.getId());
+//            vo.setServicePersonName(u.getRealName());
+//            EquipmentInspectionInfoDTO inspectionInfoDTO = new EquipmentInspectionInfoDTO();
+//            Calendar calendar = Calendar.getInstance();
+//            calendar.setTime(new Date());
+//            calendar.setTime(new Date());
+//            calendar.set(Calendar.MONTH, 0);
+//            calendar.set(Calendar.DAY_OF_MONTH, 1);
+//            calendar.set(Calendar.HOUR_OF_DAY, 0);
+//            calendar.set(Calendar.MINUTE, 0);
+//            calendar.set(Calendar.SECOND, 0);
+//            inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+//            calendar.add(Calendar.YEAR, 1);
+//            inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+//            inspectionInfoDTO.setBeforeRainSeasonReportUser(u.getId());
+//            long count = equipmentInspectionService.inspectionCount(inspectionInfoDTO);
+//            vo.setBeforeRainInspectionCount(count);
+//            inspectionInfoDTO.setBeforeRainSeasonReportUser(null);
+//            inspectionInfoDTO.setRainSeasonFirstReportUser(u.getId());
+//            count = equipmentInspectionService.inspectionCount(inspectionInfoDTO);
+//            vo.setFirstRainInspectionCount(count);
+//            inspectionInfoDTO.setRainSeasonFirstReportUser(null);
+//            inspectionInfoDTO.setRainSeasonSecondReportUser(u.getId());
+//            count = equipmentInspectionService.inspectionCount(inspectionInfoDTO);
+//            vo.setSencodRainInspectionCount(count);
+//            countList.add(vo);
+//        }
+//        return R.data(countList);
+//    }
+
+    /**
+     * 巡检统计
+     *
+     * @return
+     */
+//    @GetMapping("/org/statistics")
+//    @ApiOperationSupport(order = 3)
+//    @ApiOperation(value = "统计表格")
+//    public R<List<OrgEquipmentInspectionStatisticsVO>> orgInspectionStatistics() {
+//        BladeUser user = AuthUtil.getUser();
+//        List<Dept> root = new LinkedList<>();
+//        List<OrgEquipmentInspectionStatisticsVO> list = new LinkedList<>();
+//        if (BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+//            Dept dept = deptService.getById(Func.toLong(user.getDeptId()));
+//            root.add(dept);
+//        } else {
+//            LambdaQueryWrapper<Dept> wrapper = Wrappers.<Dept>query().lambda();
+//            wrapper.eq(Dept::getIsDeleted, 0);
+//            wrapper.eq(Dept::getParentId, Func.toLong(user.getDeptId()));
+//            root = this.deptService.list(wrapper);
+//        }
+//
+//        for (Dept dept : root) {
+//            OrgEquipmentInspectionStatisticsVO orgEquipmentInspectionStatisticsVO = new OrgEquipmentInspectionStatisticsVO();
+//            orgEquipmentInspectionStatisticsVO.setDeptId(dept.getId());
+//            orgEquipmentInspectionStatisticsVO.setOrgName(dept.getDeptName());
+//            LambdaQueryWrapper<DeptRegionEntity> deptLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+//            deptLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+//            deptLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, dept.getId());
+//            DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptLambdaQueryWrapper);
+//            Long count = rtuBaseInfoService.rtuCount(deptRegionEntity.getAdcd());
+//            orgEquipmentInspectionStatisticsVO.setRtuCount(count);
+//            EquipmentInspectionInfoDTO inspectionInfoDTO = new EquipmentInspectionInfoDTO();
+//            inspectionInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+//            Calendar calendar = Calendar.getInstance();
+//            calendar.setTime(new Date());
+//            calendar.set(Calendar.MONTH, 0);
+//            calendar.set(Calendar.DAY_OF_MONTH, 1);
+//            calendar.set(Calendar.HOUR_OF_DAY, 0);
+//            calendar.set(Calendar.MINUTE, 0);
+//            calendar.set(Calendar.SECOND, 0);
+//            inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+//            calendar.add(Calendar.YEAR, 1);
+//            inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+//            count = equipmentInspectionService.inspectionCount(inspectionInfoDTO);
+//            orgEquipmentInspectionStatisticsVO.setInspectionCount(count);
+//            EquipmentInspectionReportDTO inspectionReportDTO = new EquipmentInspectionReportDTO();
+//            inspectionReportDTO.setAdCode(deptRegionEntity.getAdcd());
+//            calendar.setTime(new Date());
+//            calendar.set(Calendar.MONTH, 0);
+//            calendar.set(Calendar.DAY_OF_MONTH, 1);
+//            calendar.set(Calendar.HOUR_OF_DAY, 0);
+//            calendar.set(Calendar.MINUTE, 0);
+//            calendar.set(Calendar.SECOND, 0);
+//            inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+//            calendar.add(Calendar.YEAR, 1);
+//            inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+//            inspectionReportDTO.setRainSeasonKind(1);
+//            count = inspectionReportService.equipmentInspectionReportCount(inspectionReportDTO);
+//            orgEquipmentInspectionStatisticsVO.setBeforeRainInspectionCount(count);
+//            inspectionReportDTO.setRainSeasonKind(2);
+//            count = inspectionReportService.equipmentInspectionReportCount(inspectionReportDTO);
+//            orgEquipmentInspectionStatisticsVO.setFirstRainInspectionCount(count);
+//            inspectionReportDTO.setRainSeasonKind(3);
+//            count = inspectionReportService.equipmentInspectionReportCount(inspectionReportDTO);
+//            orgEquipmentInspectionStatisticsVO.setSencodRainInspectionCount(count);
+//            list.add(orgEquipmentInspectionStatisticsVO);
+//        }
+//        return R.data(list);
+//    }
+
+    /**
+     * 未完成巡检设备清单信息列表,分页
+     */
+//    @GetMapping("/unfinished/page")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+//            @ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+//            @ApiImplicitParam(name = "inspectionYear", value = "巡检年度", paramType = "query", dataType = "string"),
+//            @ApiImplicitParam(name = "rainSeasonKind", value = "汛期类型", paramType = "query", dataType = "int"),
+//    })
+//    @ApiOperationSupport(order = 2)
+//    @ApiOperation(value = "未完成巡检设备清单信息列表")
+//    public R<IPage<EquipmentInspectionInfoVO>> unfinishedInspectionEquipmentPage(@ApiIgnore EquipmentInspectionInfoDTO inspectionInfoDTO, Query query) {
+//        BladeUser user = AuthUtil.getUser();
+//        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+//            inspectionInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+//        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+//            LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+//            deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+//            deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+//            DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+//            inspectionInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+//        }
+//        Date now = new Date();
+//        if (inspectionInfoDTO.getInspectionYear() != null) {
+//            Date year = Func.parseDate(inspectionInfoDTO.getInspectionYear(), "yyyy-MM-dd");
+//            Calendar calendar = Calendar.getInstance();
+//            calendar.setTime(year);
+//            calendar.set(Calendar.MONTH, 0);
+//            calendar.set(Calendar.DAY_OF_MONTH, 1);
+//            calendar.set(Calendar.HOUR_OF_DAY, 0);
+//            calendar.set(Calendar.MINUTE, 0);
+//            calendar.set(Calendar.SECOND, 0);
+//            inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+//            calendar.add(Calendar.YEAR, 1);
+//            inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+//        } else {
+//            Calendar calendar = Calendar.getInstance();
+//            calendar.setTime(new Date());
+//            calendar.set(Calendar.MONTH, 0);
+//            calendar.set(Calendar.DAY_OF_MONTH, 1);
+//            calendar.set(Calendar.HOUR_OF_DAY, 0);
+//            calendar.set(Calendar.MINUTE, 0);
+//            calendar.set(Calendar.SECOND, 0);
+//            inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+//            calendar.add(Calendar.YEAR, 1);
+//            inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+//            if (inspectionInfoDTO.getRainSeasonKind() == null) {
+//                //处理汛期类别
+//                LambdaQueryWrapper<EquipmentInspectionPlanEntity> wrapper = Wrappers.<EquipmentInspectionPlanEntity>query().lambda();
+//                wrapper.eq(EquipmentInspectionPlanEntity::getIsDeleted, 0);
+//                wrapper.orderByDesc(EquipmentInspectionPlanEntity::getCreateTime);
+//                List<EquipmentInspectionPlanEntity> list = planService.list(wrapper);
+//                if (null != list && list.size() > 0) {
+//                    EquipmentInspectionPlanEntity entity = list.get(0);
+//
+//                    Calendar dt = Calendar.getInstance();
+//                    Calendar calendarStart = Calendar.getInstance();
+//                    Calendar calendarEnd = Calendar.getInstance();
+//                    dt.setTime(now);
+//                    //汛前上报
+//                    calendarStart.setTime(entity.getBeforeRainSeasonStartTime());
+//                    calendarEnd.setTime(entity.getBeforeRainSeasonEndTime());
+//                    if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//                        inspectionInfoDTO.setRainSeasonKind(1);
+//                    }
+//                    //汛中第一次上报
+//                    calendarStart.setTime(entity.getRainSeasonFirstStartTime());
+//                    calendarEnd.setTime(entity.getRainSeasonFirstEndTime());
+//                    if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//                        inspectionInfoDTO.setRainSeasonKind(2);
+//                    }
+//                    //汛中第二次上报
+//                    calendarStart.setTime(entity.getRainSeasonSecondStartTime());
+//                    calendarEnd.setTime(entity.getRainSeasonSecondEndTime());
+//                    if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//                        inspectionInfoDTO.setRainSeasonKind(3);
+//                    }
+//                }
+//                //没在当年任意一个汛期,直接返回
+//                if (inspectionInfoDTO.getRainSeasonKind() == null) {
+//                    return R.data(null);
+//                }
+//            }
+//        }
+//        IPage<EquipmentInspectionInfoVO> pages = equipmentInspectionService.selectUnfinishedInspectionEquipmentPage(Condition.getPage(query), inspectionInfoDTO);
+//        List<EquipmentInspectionInfoVO> volist = pages.getRecords();
+//        for (EquipmentInspectionInfoVO vo : volist) {
+//            EquipmentInspectionWrapper.build().entityVO(vo);
+//        }
+//        return R.data(pages);
+//    }
+
+    /**
+     * 未完成巡检设备清单信息导出
+     *
+     * @return
+     */
+//    @GetMapping("/unfinished/export")
+//    @ApiOperationSupport(order = 3)
+//    @ApiOperation(value = "未完成巡检设备清单导出", notes = "")
+//    public R<Map<String, Object>> unfinishedInspectionEquipmentExport(@ApiIgnore EquipmentInspectionInfoDTO inspectionInfoDTO) {
+//        BladeUser user = AuthUtil.getUser();
+//        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+//            inspectionInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+//        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+//            LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+//            deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+//            deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+//            DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+//            inspectionInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+//        }
+//        //文件标题
+//        String title = "";
+//        //当前时间
+//        Date now = new Date();
+//        if (inspectionInfoDTO.getInspectionYear() != null) {
+//            Date year = Func.parseDate(inspectionInfoDTO.getInspectionYear(), "yyyy-MM-dd");
+//            Calendar calendar = Calendar.getInstance();
+//            calendar.setTime(year);
+//            calendar.set(Calendar.MONTH, 0);
+//            calendar.set(Calendar.DAY_OF_MONTH, 1);
+//            calendar.set(Calendar.HOUR_OF_DAY, 0);
+//            calendar.set(Calendar.MINUTE, 0);
+//            calendar.set(Calendar.SECOND, 0);
+//            inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+//            calendar.add(Calendar.YEAR, 1);
+//            inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+//            title += Func.formatDate(year) + "年";
+//
+//        } else {
+//            Calendar calendar = Calendar.getInstance();
+//            calendar.setTime(now);
+//            calendar.set(Calendar.MONTH, 0);
+//            calendar.set(Calendar.DAY_OF_MONTH, 1);
+//            calendar.set(Calendar.HOUR_OF_DAY, 0);
+//            calendar.set(Calendar.MINUTE, 0);
+//            calendar.set(Calendar.SECOND, 0);
+//            inspectionInfoDTO.setInspectionYearStartDate(calendar.getTime());
+//
+//            calendar.add(Calendar.YEAR, 1);
+//            inspectionInfoDTO.setInspectionYearEndDate(calendar.getTime());
+//
+//            title += Func.formatDate(now) + "年";
+//
+//            if (inspectionInfoDTO.getRainSeasonKind() == null) {
+//                //处理汛期类别
+//                LambdaQueryWrapper<EquipmentInspectionPlanEntity> wrapper = Wrappers.<EquipmentInspectionPlanEntity>query().lambda();
+//                wrapper.eq(EquipmentInspectionPlanEntity::getIsDeleted, 0);
+//                wrapper.orderByDesc(EquipmentInspectionPlanEntity::getCreateTime);
+//                List<EquipmentInspectionPlanEntity> list = planService.list(wrapper);
+//                if (null != list && list.size() > 0) {
+//                    EquipmentInspectionPlanEntity entity = list.get(0);
+//
+//                    Calendar dt = Calendar.getInstance();
+//                    Calendar calendarStart = Calendar.getInstance();
+//                    Calendar calendarEnd = Calendar.getInstance();
+//                    dt.setTime(now);
+//                    //汛前上报
+//                    calendarStart.setTime(entity.getBeforeRainSeasonStartTime());
+//                    calendarEnd.setTime(entity.getBeforeRainSeasonEndTime());
+//                    if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//                        inspectionInfoDTO.setRainSeasonKind(1);
+//                        title += "汛前";
+//                    }
+//                    //汛中第一次上报
+//                    calendarStart.setTime(entity.getRainSeasonFirstStartTime());
+//                    calendarEnd.setTime(entity.getRainSeasonFirstEndTime());
+//                    if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//                        inspectionInfoDTO.setRainSeasonKind(2);
+//                        title += "汛中第一次";
+//                    }
+//                    //汛中第二次上报
+//                    calendarStart.setTime(entity.getRainSeasonSecondStartTime());
+//                    calendarEnd.setTime(entity.getRainSeasonSecondEndTime());
+//                    if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//                        inspectionInfoDTO.setRainSeasonKind(3);
+//                        title += "汛中第二次";
+//                    }
+//                }
+//                //没在当年任意一个汛期,直接返回
+//                if (inspectionInfoDTO.getRainSeasonKind() == null) {
+//                    List<UnfinishedInspectionEquipmentExportEntity> unfinishedInspectionEquipmentExportEntities = new LinkedList<>();
+//                    Map<String, Object> data = this.exportUnfinishedInspectionEquipmentExcel(title, unfinishedInspectionEquipmentExportEntities);
+//                    return R.data(data);
+//                }
+//            }
+//        }
+//        if (inspectionInfoDTO.getRainSeasonKind() != null) {
+//            if (inspectionInfoDTO.getRainSeasonKind() == 1) {
+//                title += "汛前";
+//            } else if (inspectionInfoDTO.getRainSeasonKind() == 2) {
+//                title += "汛中第一次";
+//            } else if (inspectionInfoDTO.getRainSeasonKind() == 3) {
+//                title += "汛中第二次";
+//            }
+//        }
+//        List<EquipmentInspectionInfoVO> equipmentInspectionInfoVOList = equipmentInspectionService.selectUnfinishedInspectionEquipmentList(inspectionInfoDTO);
+//        //生成数据
+//        List<UnfinishedInspectionEquipmentExportEntity> unfinishedInspectionEquipmentExportEntities = new LinkedList<>();
+//        if (null != equipmentInspectionInfoVOList && equipmentInspectionInfoVOList.size() > 0) {
+//            int index = 1;
+//            for (EquipmentInspectionInfoVO entity : equipmentInspectionInfoVOList) {
+//                UnfinishedInspectionEquipmentExportEntity exportEntity = new UnfinishedInspectionEquipmentExportEntity();
+//                exportEntity.setIndex(index);
+//                if (entity.getAdCity() != null) {
+//                    exportEntity.setAdCity(entity.getAdCity());
+//                } else {
+//                    exportEntity.setAdCity("");
+//                }
+//                if (entity.getAdDist() != null) {
+//                    exportEntity.setAdDist(entity.getAdDist());
+//                } else {
+//                    exportEntity.setAdDist("");
+//                }
+//                if (entity.getRtuName() != null) {
+//                    exportEntity.setRtuName(entity.getRtuName());
+//                } else {
+//                    exportEntity.setRtuName("");
+//                }
+//                exportEntity.setRtuCode(entity.getRtuCode());
+//                String rtuKindDesc = "";
+//                if (entity.getIsRain() != null && entity.getIsRain() == 1) {
+//                    rtuKindDesc += "雨量站";
+//                }
+//                if ((entity.getIsRiver() != null && entity.getIsRiver() == 1) || (entity.getIsRes() != null && entity.getIsRes() == 1)) {
+//                    if (rtuKindDesc.length() > 0) {
+//                        rtuKindDesc += "/";
+//                    }
+//                    rtuKindDesc += "水位站";
+//                }
+//                if (entity.getIsGround() != null && entity.getIsGround() == 1) {
+//                    if (rtuKindDesc.length() > 0) {
+//                        rtuKindDesc += "/";
+//                    }
+//                    rtuKindDesc += "墒情站";
+//                }
+//                if (entity.getIsVideo() != null && entity.getIsVideo() == 1) {
+//                    if (rtuKindDesc.length() > 0) {
+//                        rtuKindDesc += "/";
+//                    }
+//                    rtuKindDesc += "视频站";
+//                }
+//                exportEntity.setRtuKindDesc(rtuKindDesc);
+//
+//                if (entity.getLng() != null) {
+//                    exportEntity.setLng(entity.getLng());
+//                } else {
+//                    exportEntity.setLng("");
+//                }
+//                if (entity.getLat() != null) {
+//                    exportEntity.setLat(entity.getLat());
+//                } else {
+//                    exportEntity.setLat("");
+//                }
+//                if (entity.getLocationDesc() != null) {
+//                    exportEntity.setLocationDesc(entity.getLocationDesc());
+//                } else {
+//                    exportEntity.setLocationDesc("");
+//                }
+//
+//                if (entity.getBeforeRainSeasonStatus() != null) {
+//                    if (entity.getBeforeRainSeasonStatus() == 0) {
+//                        exportEntity.setBeforeRainSeasonStatus("");
+//                    } else if (entity.getBeforeRainSeasonStatus() == 1) {
+//                        exportEntity.setBeforeRainSeasonStatus("已填报");
+//                    } else {
+//                        exportEntity.setBeforeRainSeasonStatus("");
+//                    }
+//                } else {
+//                    exportEntity.setBeforeRainSeasonStatus("");
+//                }
+//                if (entity.getRainSeasonFirstStatus() != null) {
+//                    if (entity.getRainSeasonFirstStatus() == 0) {
+//                        exportEntity.setRainSeasonFirstStatus("");
+//                    } else if (entity.getRainSeasonFirstStatus() == 1) {
+//                        exportEntity.setRainSeasonFirstStatus("已填报");
+//                    } else {
+//                        exportEntity.setRainSeasonFirstStatus("");
+//                    }
+//                } else {
+//                    exportEntity.setRainSeasonFirstStatus("");
+//                }
+//                if (entity.getRainSeasonSecondStatus() != null) {
+//                    if (entity.getRainSeasonSecondStatus() == 0) {
+//                        exportEntity.setRainSeasonSecondStatus("");
+//                    } else if (entity.getRainSeasonSecondStatus() == 1) {
+//                        exportEntity.setRainSeasonSecondStatus("已填报");
+//                    } else {
+//                        exportEntity.setRainSeasonSecondStatus("");
+//                    }
+//                } else {
+//                    exportEntity.setRainSeasonSecondStatus("");
+//                }
+//                unfinishedInspectionEquipmentExportEntities.add(exportEntity);
+//                index += 1;
+//            }
+//        }
+//        Map<String, Object> data = this.exportUnfinishedInspectionEquipmentExcel(title, unfinishedInspectionEquipmentExportEntities);
+//        return R.data(data);
+//    }
+
+//    private Map<String, Object> exportUnfinishedInspectionEquipmentExcel(String title, List<UnfinishedInspectionEquipmentExportEntity> list) {
+//        //当前时间
+//        //Calendar dt = Calendar.getInstance();
+//        //dt.setTime(new Date());
+//        Map<String, Object> data = new HashMap<>();
+//        data.put("status", 0);
+//        String templateFilePath = this.workDir + File.separator + this.inspectionUnfinishedTemplate;
+//        String outpath = this.workDir + File.separator + Func.formatDate(new Date());
+//        File dir = new File(outpath);
+//        if (!dir.exists()) {
+//            if (!dir.mkdir()) {
+//                data.put("error", "目录创建失败");
+//                return data;
+//            }
+//        }
+//        String outFileName = Func.randomUUID() + ".xlsx";
+//        outpath += File.separator + outFileName;
+//        ExcelWriter excelWriter = EasyExcel.write(outpath).withTemplate(templateFilePath).excelType(ExcelTypeEnum.XLSX).build();
+//        WriteSheet writeSheet = EasyExcel.writerSheet("信息统计表").build();
+//        excelWriter.write(list, writeSheet);
+//        excelWriter.finish();
+//        try {
+//            FileInputStream fileInputStream = new FileInputStream(new File(outpath));
+//            BladeFile bladeFile = ossBuilder.template().putFile(outFileName, fileInputStream);
+//            String ossPath = bladeFile.getName();
+//            //String p = bladeFile.getDomain();
+//            data.put("name", ossPath);
+//            data.put("url", ossPath);
+//            data.put("filename", "未完成巡检设备(" + title + ")统计清单表");
+//            data.put("status", 1);
+//
+//        } catch (FileNotFoundException e) {
+//            e.printStackTrace();
+//            data.put("error", "导出失败!");
+//        }
+//        return data;
+//    }
+
+    /**
+     * 工单关闭
+     *
+     * @param dto
+     * @return
+     */
+    @PostMapping("/close")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "工单关闭", notes = "传入实体类EquipmentInspectionInfoDTO")
+    public R orderClose(@ApiIgnore InspectionInfoDTO dto) {
+        if (Func.isNull(dto.getId())) {
+            return R.fail("参数错误");
+        }
+        InspectionProcessRecordInfoEntity reportEntity = new InspectionProcessRecordInfoEntity();
+        reportEntity.setInspectionId(dto.getId());
+        reportEntity.setInspectionDesc(dto.getApproveDesc());
+        processService.save(reportEntity);
+        dto.setInspectionStatus(InspectionStatusEnum.STATUS_APPROVED.getCode());
+        dto.setInspectionReportId(reportEntity.getId());
+        inspectionService.updateById(dto);
+        return R.success("工单关闭已操作成功!");
+    }
+}

+ 196 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/controller/InspectionPlanController.java

@@ -0,0 +1,196 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.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.springblade.core.boot.ctrl.BladeController;
+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.InspectionStatusEnum;
+
+import org.springblade.modules.business.xjgd.inspection.dto.InspectionPlanInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionPlanInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionPlanService;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionService;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionPlanInfoVO;
+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("galaxy-business/xjgd/inspection/plan")
+@AllArgsConstructor
+@Api(value = "设备巡检汛期管理模块", tags = "设备巡检汛期管理模块")
+public class InspectionPlanController extends BladeController {
+    private final IInspectionPlanService planService;
+    private final IInspectionService inspectionService;
+
+    @GetMapping("/page")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入 EquipmentInspectionPlanDTO 实体类")
+    public R<IPage<InspectionPlanInfoVO>> page(@ApiIgnore InspectionPlanInfoDTO dto, Query query) {
+        if (dto.getPlanTypeOption() == 1) {
+            dto.setPlanScheduledType(1);
+        } else if (dto.getPlanTypeOption() == 2) {
+            dto.setPlanScheduledType(2);
+        }
+        IPage<InspectionPlanInfoVO> pages = planService.selectPage(Condition.getPage(query), dto);
+        return R.data(pages);
+    }
+
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "")
+    public R<InspectionPlanInfoEntity> detail() {
+        BladeUser user = AuthUtil.getUser();
+        LambdaQueryWrapper<InspectionPlanInfoEntity> wrapper = Wrappers.<InspectionPlanInfoEntity>query().lambda();
+        wrapper.eq(InspectionPlanInfoEntity::getIsDeleted, 0);
+        wrapper.orderByDesc(InspectionPlanInfoEntity::getCreateTime);
+        List<InspectionPlanInfoEntity> list = planService.list(wrapper);
+        if (null != list && list.size() > 0) {
+            InspectionPlanInfoEntity entity = list.get(0);
+            return R.data(entity);
+        } else {
+            InspectionPlanInfoEntity entity = new InspectionPlanInfoEntity();
+            entity.setId(0L);
+            entity.setCreateDept(Func.toLong(user.getDeptId()));
+            entity.setCreateUser(user.getUserId());
+            entity.setCreateTime(new Date());
+            entity.setStatus(1);
+            entity.setIsDeleted(0);
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(new Date());
+            calendar.set(Calendar.MONTH, 4 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            entity.setBeforeRainSeasonStartTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 6 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            entity.setBeforeRainSeasonEndTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 6 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            entity.setRainSeasonFirstStartTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 8 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 15);
+            entity.setRainSeasonFirstEndTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 8 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 15);
+            entity.setRainSeasonSecondStartTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 10 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            entity.setRainSeasonSecondEndTime(calendar.getTime());
+            return R.data(entity);
+        }
+    }
+
+    /**
+     * 新增
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "")
+    public R save(@RequestBody InspectionPlanInfoEntity planEntity) {
+        BladeUser user = AuthUtil.getUser();
+        planEntity.setPlanStatus(1);
+        planEntity.setOrgId(Func.toLong(user.getDeptId()));
+        planService.save(planEntity);
+        if (planEntity.getPlanScheduledType() == 1) {
+            //执行周期为仅一次时,立即生成巡检任务
+            InspectionInfoEntity inspectionInfoEntity = new InspectionInfoEntity();
+            inspectionInfoEntity.setInspectionPlanId(planEntity.getId());
+            inspectionInfoEntity.setInspectionTitle(planEntity.getPlanTitle());
+            inspectionInfoEntity.setInspectionStatus(InspectionStatusEnum.STATUS_TODO.getCode());
+            inspectionInfoEntity.setOrgId(Func.toLong(user.getDeptId()));
+            inspectionService.save(inspectionInfoEntity);
+        }
+        return R.status(true);
+    }
+
+    /**
+     * 修改
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入planEntity")
+    public R update(@RequestBody InspectionPlanInfoEntity planEntity) {
+        return R.status(planService.updateById(planEntity));
+    }
+
+    /**
+     * 新增或修改
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入planEntity")
+    public R submit(@RequestBody InspectionPlanInfoEntity planEntity) {
+        if (planEntity.getId() <= 0L) {
+            planEntity.setId(null);
+        }
+        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);
+    }
+
+    @GetMapping("/count")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "统计表格")
+    public R<Map<String, Object>> planCount(@ApiIgnore InspectionPlanInfoDTO dto) {
+
+        BladeUser user = AuthUtil.getUser();
+        dto.setOrgId(Func.toLong(user.getDeptId()));
+        Long planCount = planService.planCount(dto);
+        dto.setPlanScheduledType(1);
+        Long onlyOneCount = planService.planCount(dto);
+        dto.setPlanScheduledType(2);
+        Long runCount = planService.planCount(dto);
+
+
+
+
+        Map<String, Object> data = new HashMap<>();
+        data.put("planCount", planCount);
+        data.put("onlyOnePlanCount", onlyOneCount);
+        data.put("runPlanCount", runCount);
+        data.put("planWarnCount", 0);
+
+
+        return R.data(data);
+    }
+}

+ 780 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/controller/InspectionProcessController.java

@@ -0,0 +1,780 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.controller;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.excel.write.metadata.WriteSheet;
+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.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.constant.BusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.log.annotation.ApiLog;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.oss.model.BladeFile;
+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.InspectionStatusEnum;
+import org.springblade.modules.baseinfo.org.entity.DeptRegionEntity;
+import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
+import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
+
+import org.springblade.modules.business.xjgd.inspection.dto.InspectionProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionPlanService;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionProcessService;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionService;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionProcessRecordInfoVO;
+import org.springblade.modules.business.xjgd.inspection.wrapper.InspectionProcessWrapper;
+import org.springblade.modules.resource.builder.oss.OssBuilder;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.*;
+
+/***
+ * Date:2022/8/23
+ * Title:设备巡检填报管理模块
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping("galaxy-business/xjgd/inspection/process")
+@RequiredArgsConstructor
+@Slf4j
+@Api(value = "设备巡检填报管理模块", tags = "设备巡检填报管理模块")
+public class InspectionProcessController extends BladeController {
+	private final IInspectionProcessService reportService;
+	private final IInspectionService inspectionService;
+	private final IInspectionPlanService planService;
+	private final IDeptRegionService deptRegionService;
+	private final IRtuBaseInfoService rtuBaseInfoService;
+
+	@Resource
+	private OssBuilder ossBuilder;
+
+	@Value("${export-config.workdir}")
+	private String workDir;
+
+	@Value("${export-config.inspection-remainingproblems-template}")
+	private String inspectionRemainingProblemsTemplate;
+
+
+	/**
+	 * 巡检填报信息
+	 */
+	@GetMapping("/list")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "inspectionYear", value = "巡检年度", paramType = "query", dataType = "string"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<List<InspectionProcessRecordInfoVO>> list(@ApiIgnore InspectionProcessRecordInfoDTO inspectionReportDTO) {
+//		if (inspectionReportDTO.getInspectionYear() != null) {
+//			Date year = Func.parseDate(inspectionReportDTO.getInspectionYear(), "yyyy-MM-dd");
+//			Calendar calendar = Calendar.getInstance();
+//			calendar.setTime(year);
+//			calendar.set(Calendar.MONTH, 0);
+//			calendar.set(Calendar.DAY_OF_MONTH, 1);
+//			calendar.set(Calendar.HOUR_OF_DAY, 0);
+//			calendar.set(Calendar.MINUTE, 0);
+//			calendar.set(Calendar.SECOND, 0);
+//			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+//			calendar.add(Calendar.YEAR, 1);
+//			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+//		} else {
+//			Calendar calendar = Calendar.getInstance();
+//			calendar.setTime(new Date());
+//			calendar.set(Calendar.MONTH, 0);
+//			calendar.set(Calendar.DAY_OF_MONTH, 1);
+//			calendar.set(Calendar.HOUR_OF_DAY, 0);
+//			calendar.set(Calendar.MINUTE, 0);
+//			calendar.set(Calendar.SECOND, 0);
+//			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+//			calendar.add(Calendar.YEAR, 1);
+//			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+//		}
+		List<InspectionProcessRecordInfoVO> list = reportService.selectList(inspectionReportDTO);
+		for (InspectionProcessRecordInfoVO vo : list) {
+			InspectionProcessWrapper.build().entityVO(vo);
+		}
+		return R.data(list);
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "inspectionYear", value = "巡检年度", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rainSeasonKind", value = "汛期类型", paramType = "query", dataType = "int"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<InspectionProcessRecordInfoVO>> page(@ApiIgnore InspectionProcessRecordInfoDTO inspectionReportDTO, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+			if (inspectionReportDTO.getAdCode() == null) {
+				inspectionReportDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+			}
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+			if (inspectionReportDTO.getAdCode() == null) {
+				LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+				deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+				deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+				DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+				inspectionReportDTO.setAdCode(deptRegionEntity.getAdcd());
+			}
+		}
+		if (inspectionReportDTO.getInspectionYear() != null) {
+			Date year = Func.parseDate(inspectionReportDTO.getInspectionYear(), "yyyy-MM-dd");
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(year);
+			calendar.set(Calendar.MONTH, 0);
+			calendar.set(Calendar.DAY_OF_MONTH, 1);
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+			calendar.add(Calendar.YEAR, 1);
+			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+		} else {
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(new Date());
+			calendar.set(Calendar.MONTH, 0);
+			calendar.set(Calendar.DAY_OF_MONTH, 1);
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+			calendar.add(Calendar.YEAR, 1);
+			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+		}
+		IPage<InspectionProcessRecordInfoVO> pages = reportService.selectPage(Condition.getPage(query), inspectionReportDTO);
+		List<InspectionProcessRecordInfoVO> list = pages.getRecords();
+		for (InspectionProcessRecordInfoVO vo : list) {
+			InspectionProcessWrapper.build().entityVO(vo);
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 查询我填报的巡检信息
+	 */
+	@GetMapping("/my/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页")
+	public R<IPage<InspectionProcessRecordInfoVO>> myPage(@ApiIgnore InspectionProcessRecordInfoDTO inspectionReportDTO, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		inspectionReportDTO.setCreateUser(user.getUserId());
+		IPage<InspectionProcessRecordInfoVO> pages = reportService.selectPage(Condition.getPage(query), inspectionReportDTO);
+		List<InspectionProcessRecordInfoVO> list = pages.getRecords();
+		for (InspectionProcessRecordInfoVO vo : list) {
+			InspectionProcessWrapper.build().entityVO(vo);
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "id", value = "ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入实体类EquipmentInspectionReportDTO")
+	public R<InspectionProcessRecordInfoVO> detail(InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		InspectionProcessRecordInfoEntity detail = reportService.getById(inspectionReportDTO.getId());
+		InspectionProcessRecordInfoVO vo = InspectionProcessWrapper.build().entityVO(detail);
+		return R.data(vo);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入实体类EquipmentInspectionReportEntity ")
+	public R save(@RequestBody InspectionProcessRecordInfoEntity inspectionReportEntity) {
+		if (Func.isNull(inspectionReportEntity.getInspectionId())){
+			return R.fail("参数错误");
+		}
+		BladeUser user = AuthUtil.getUser();
+		reportService.save(inspectionReportEntity);
+		InspectionInfoEntity inspectionInfoEntity = inspectionService.getById(inspectionReportEntity.getInspectionId());
+		inspectionInfoEntity.setInspectionStatus(InspectionStatusEnum.STATUS_CLOSE_APPROVE.getCode());
+		inspectionInfoEntity.setInspectionReportId(inspectionReportEntity.getId());
+		inspectionService.updateById(inspectionInfoEntity);
+//		Calendar dt = Calendar.getInstance();
+//		dt.setTime(new Date());
+//		Calendar calendarStart = Calendar.getInstance();
+//		Calendar calendarEnd = Calendar.getInstance();
+//		inspectionReportEntity.setRainSeasonKind(0);
+//		String rainSeasonText = "";
+//		//处理汛期类别
+//		LambdaQueryWrapper<EquipmentInspectionPlanEntity> wrapper = Wrappers.<EquipmentInspectionPlanEntity>query().lambda();
+//		wrapper.eq(EquipmentInspectionPlanEntity::getIsDeleted, 0);
+//		wrapper.orderByDesc(EquipmentInspectionPlanEntity::getCreateTime);
+//		List<EquipmentInspectionPlanEntity> list = planService.list(wrapper);
+//		if (null != list && list.size() > 0) {
+//			EquipmentInspectionPlanEntity entity = list.get(0);
+//			//汛前上报
+//			calendarStart.setTime(entity.getBeforeRainSeasonStartTime());
+//			calendarEnd.setTime(entity.getBeforeRainSeasonEndTime());
+//			rainSeasonText += "汛前巡检日期:" + Func.formatDate(calendarStart.getTime()) + "-" + Func.formatDate(calendarEnd.getTime());
+//			if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//				inspectionReportEntity.setRainSeasonKind(1);
+//			}
+//			//汛中第一次上报
+//			calendarStart.setTime(entity.getRainSeasonFirstStartTime());
+//			calendarEnd.setTime(entity.getRainSeasonFirstEndTime());
+//			rainSeasonText += ",汛中(一)巡检日期:" + Func.formatDate(calendarStart.getTime()) + "-" + Func.formatDate(calendarEnd.getTime());
+//			if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//				inspectionReportEntity.setRainSeasonKind(2);
+//			}
+//			//汛中第二次上报
+//			calendarStart.setTime(entity.getRainSeasonSecondStartTime());
+//			calendarEnd.setTime(entity.getRainSeasonSecondEndTime());
+//			rainSeasonText += ",汛中(二)巡检日期:" + Func.formatDate(calendarStart.getTime()) + "-" + Func.formatDate(calendarEnd.getTime());
+//			if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//				inspectionReportEntity.setRainSeasonKind(3);
+//			}
+//		} else {
+//			//汛前上报
+//			calendarStart.setTime(dt.getTime());
+//			calendarStart.set(Calendar.MONTH, 4 - 1);
+//			calendarStart.set(Calendar.DAY_OF_MONTH, 1);
+//			calendarStart.set(Calendar.HOUR_OF_DAY, 0);
+//			calendarStart.set(Calendar.MINUTE, 0);
+//			calendarStart.set(Calendar.SECOND, 0);
+//			calendarEnd.setTime(dt.getTime());
+//			calendarEnd.set(Calendar.MONTH, 6 - 1);
+//			calendarEnd.set(Calendar.DAY_OF_MONTH, 1);
+//			calendarEnd.set(Calendar.HOUR_OF_DAY, 0);
+//			calendarEnd.set(Calendar.MINUTE, 0);
+//			calendarEnd.set(Calendar.SECOND, 0);
+//			rainSeasonText += "汛前巡检日期:" + Func.formatDate(calendarStart.getTime()) + "-" + Func.formatDate(calendarEnd.getTime());
+//			if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//				inspectionReportEntity.setRainSeasonKind(1);
+//			}
+//			//汛中第一次上报
+//			calendarStart.setTime(dt.getTime());
+//			calendarStart.set(Calendar.MONTH, 6 - 1);
+//			calendarStart.set(Calendar.DAY_OF_MONTH, 1);
+//			calendarStart.set(Calendar.HOUR_OF_DAY, 0);
+//			calendarStart.set(Calendar.MINUTE, 0);
+//			calendarStart.set(Calendar.SECOND, 0);
+//			calendarEnd.setTime(dt.getTime());
+//			calendarEnd.set(Calendar.MONTH, 8 - 1);
+//			calendarEnd.set(Calendar.DAY_OF_MONTH, 15);
+//			calendarEnd.set(Calendar.HOUR_OF_DAY, 0);
+//			calendarEnd.set(Calendar.MINUTE, 0);
+//			calendarEnd.set(Calendar.SECOND, 0);
+//			rainSeasonText += ",汛中(一)巡检日期:" + Func.formatDate(calendarStart.getTime()) + "-" + Func.formatDate(calendarEnd.getTime());
+//			if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//				inspectionReportEntity.setRainSeasonKind(2);
+//			}
+//			//汛中第二次上报
+//			calendarStart.setTime(dt.getTime());
+//			calendarStart.set(Calendar.MONTH, 8 - 1);
+//			calendarStart.set(Calendar.DAY_OF_MONTH, 15);
+//			calendarStart.set(Calendar.HOUR_OF_DAY, 0);
+//			calendarStart.set(Calendar.MINUTE, 0);
+//			calendarStart.set(Calendar.SECOND, 0);
+//			calendarEnd.setTime(dt.getTime());
+//			calendarEnd.set(Calendar.MONTH, 10 - 1);
+//			calendarEnd.set(Calendar.DAY_OF_MONTH, 1);
+//			calendarEnd.set(Calendar.HOUR_OF_DAY, 0);
+//			calendarEnd.set(Calendar.MINUTE, 0);
+//			calendarEnd.set(Calendar.SECOND, 0);
+//			rainSeasonText += ",汛中(二)巡检日期:" + Func.formatDate(calendarStart.getTime()) + "-" + Func.formatDate(calendarEnd.getTime());
+//			if ((dt.getTime().getTime() / 1000 == calendarStart.getTime().getTime() / 1000 || dt.after(calendarStart)) && dt.before(calendarEnd)) {
+//				inspectionReportEntity.setRainSeasonKind(3);
+//			}
+//		}
+//		if (inspectionReportEntity.getRainSeasonKind() == 0) {
+//			Map<String, Object> d = new HashMap<>();
+//			d.put("code", 1);
+//			d.put("msg", "当前不在汛期填报期(" + rainSeasonText + "),请确认!");
+//			return R.data(d);
+//		}
+//		//处理遗留问题
+//		String remainQuestion = inspectionReportEntity.getRemainQuestion();
+//		if (remainQuestion != null && remainQuestion.length() > 0) {
+//			inspectionReportEntity.setRemainQuestionState(1);
+//		}
+//		EquipmentInspectionInfoEntity infoEntity = new EquipmentInspectionInfoEntity();
+//		infoEntity.setInspectionDate(new Date());
+//		//查找是否有主表记录
+//		calendarStart = Calendar.getInstance();
+//		calendarStart.setTime(dt.getTime());
+//		calendarEnd = Calendar.getInstance();
+//		calendarEnd.setTime(dt.getTime());
+//		calendarStart.set(Calendar.MONTH, 0);
+//		calendarStart.set(Calendar.DAY_OF_MONTH, 1);
+//		calendarEnd.add(Calendar.YEAR, 1);
+//		calendarEnd.set(Calendar.MONTH, 0);
+//		calendarEnd.set(Calendar.DAY_OF_MONTH, 1);
+//		LambdaQueryWrapper<EquipmentInspectionInfoEntity> infowrapper = Wrappers.<EquipmentInspectionInfoEntity>query().lambda();
+//		infowrapper.eq(EquipmentInspectionInfoEntity::getIsDeleted, 0);
+//		infowrapper.eq(EquipmentInspectionInfoEntity::getRtuCode, inspectionReportEntity.getRtuCode());
+//		infowrapper.ge(EquipmentInspectionInfoEntity::getInspectionDate, Func.formatDate(calendarStart.getTime()));
+//		infowrapper.lt(EquipmentInspectionInfoEntity::getInspectionDate, Func.formatDate(calendarEnd.getTime()));
+//		List<EquipmentInspectionInfoEntity> infoEntityList = inspectionService.list(infowrapper);
+//		if (null != infoEntityList && infoEntityList.size() == 1) {
+//			infoEntity = infoEntityList.get(0);
+//		} else {
+//			infoEntity.setRtuCode(inspectionReportEntity.getRtuCode());
+//		}
+//		infoEntity.setInspectionDate(dt.getTime());
+//		//写入填报子表,判断当前汛期是否已经填报
+//		if (1 == inspectionReportEntity.getRainSeasonKind()) {
+//			if (infoEntity.getBeforeRainSeasonStatus() != null && infoEntity.getBeforeRainSeasonStatus() == 1) {
+//				Map<String, Object> d = new HashMap<>();
+//				d.put("code", 1);
+//				d.put("msg", "汛前巡检已填报,请勿重复上报!");
+//				return R.data(d);
+//			}
+//		} else if (2 == inspectionReportEntity.getRainSeasonKind()) {
+//			if (infoEntity.getRainSeasonFirstStatus() != null && infoEntity.getRainSeasonFirstStatus() == 1) {
+//				Map<String, Object> d = new HashMap<>();
+//				d.put("code", 1);
+//				d.put("msg", "汛中(一)巡检已填报,请勿重复上报!");
+//				return R.data(d);
+//			}
+//		} else if (3 == inspectionReportEntity.getRainSeasonKind()) {
+//			if (infoEntity.getRainSeasonSecondStatus() != null && infoEntity.getRainSeasonSecondStatus() == 1) {
+//				Map<String, Object> d = new HashMap<>();
+//				d.put("code", 1);
+//				d.put("msg", "汛中(二)巡检已填报,请勿重复上报!");
+//				return R.data(d);
+//			}
+//		}
+//		reportService.save(inspectionReportEntity);
+//		if (1 == inspectionReportEntity.getRainSeasonKind()) {
+//			infoEntity.setBeforeRainSeasonReportId(inspectionReportEntity.getId());
+//			infoEntity.setBeforeRainSeasonStatus(1);
+//			infoEntity.setBeforeRainSeasonReportTime(infoEntity.getInspectionDate());
+//			infoEntity.setBeforeRainSeasonReportUser(user.getUserId());
+//		} else if (2 == inspectionReportEntity.getRainSeasonKind()) {
+//			infoEntity.setRainSeasonFirstReportId(inspectionReportEntity.getId());
+//			infoEntity.setRainSeasonFirstStatus(1);
+//			infoEntity.setRainSeasonFirstReportTime(infoEntity.getInspectionDate());
+//			infoEntity.setRainSeasonFirstReportUser(user.getUserId());
+//		} else if (3 == inspectionReportEntity.getRainSeasonKind()) {
+//			infoEntity.setRainSeasonSecondReportId(inspectionReportEntity.getId());
+//			infoEntity.setRainSeasonSecondStatus(1);
+//			infoEntity.setRainSeasonSecondReportTime(infoEntity.getInspectionDate());
+//			infoEntity.setRainSeasonSecondReportUser(user.getUserId());
+//		}
+//		inspectionService.saveOrUpdate(infoEntity);
+//
+//		EquipmentInspectionReportEntity reportEntity = reportService.getById(inspectionReportEntity.getId());
+//		reportEntity.setInspectionId(infoEntity.getId());
+//		reportService.updateById(reportEntity);
+//
+//		//更新更换信息
+//		LambdaQueryWrapper<RtuInfoEntity> rtuWrapper = Wrappers.<RtuInfoEntity>query().lambda();
+//		rtuWrapper.eq(RtuInfoEntity::getIsDeleted, 0);
+//		rtuWrapper.eq(RtuInfoEntity::getRtuCode, infoEntity.getRtuCode());
+//		RtuInfoEntity rtuInfoEntity = rtuBaseInfoService.getOne(rtuWrapper);
+//		if (inspectionReportEntity.getRtuReplace() != null && inspectionReportEntity.getRtuReplace() == 1) {
+//			rtuInfoEntity.setRtuReplaceDate(inspectionReportEntity.getCreateTime());
+//			rtuInfoEntity.setRtuModel(inspectionReportEntity.getRtuModelRemark());
+//		}
+//		if (inspectionReportEntity.getRainSensorReplace() != null && inspectionReportEntity.getRainSensorReplace() == 1) {
+//			rtuInfoEntity.setRainSensorReplaceDate(inspectionReportEntity.getCreateTime());
+//			rtuInfoEntity.setRainSensorModel(inspectionReportEntity.getRainSensorModelRemark());
+//		}
+//		if (inspectionReportEntity.getWaterSensorReplace() != null && inspectionReportEntity.getWaterSensorReplace() == 1) {
+//			rtuInfoEntity.setWaterSensorReplaceDate(inspectionReportEntity.getCreateTime());
+//			rtuInfoEntity.setWaterSensorModel(inspectionReportEntity.getWaterSensorModelRemark());
+//		}
+//		if (inspectionReportEntity.getGroundSensorReplace() != null && inspectionReportEntity.getGroundSensorReplace() == 1) {
+//			rtuInfoEntity.setGroundSensorReplaceDate(inspectionReportEntity.getCreateTime());
+//			rtuInfoEntity.setGroundSensorModel(inspectionReportEntity.getGroundSensorModelRemark());
+//		}
+//		if (inspectionReportEntity.getBatteryReplace() != null && inspectionReportEntity.getBatteryReplace() == 1) {
+//			rtuInfoEntity.setBatteryReplaceDate(inspectionReportEntity.getCreateTime());
+//			rtuInfoEntity.setBatteryModel(inspectionReportEntity.getBatteryModelRemark());
+//		}
+//
+//		rtuInfoEntity.setNetworkSimId(inspectionReportEntity.getNetworkSimId());
+//		rtuInfoEntity.setNetworkPayer(inspectionReportEntity.getNetworkPayer());
+//
+//		rtuBaseInfoService.updateById(rtuInfoEntity);
+//		Map<String, Object> d = new HashMap<>();
+//		d.put("code", 0);
+		return R.status(true);
+
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入reportEntity")
+	public R update(@RequestBody InspectionProcessRecordInfoEntity reportEntity) {
+		//处理遗留问题
+		String remainQuestion = reportEntity.getRemainQuestion();
+		if (remainQuestion != null && remainQuestion.length() > 0) {
+			reportEntity.setRemainQuestionState(1);
+		}
+		return R.status(reportService.updateById(reportEntity));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/nonetworksignal/photo/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入orderProcessInfoEntity")
+	public R nonetworksignalPhotoUpdate(@RequestBody InspectionProcessRecordInfoEntity reportEntity) {
+		InspectionProcessRecordInfoEntity entity = reportService.getById(reportEntity.getId());
+		entity.setSiteCheckPhotos(reportEntity.getSiteCheckPhotos());
+		entity.setRainSiteCheckPhotos(reportEntity.getRainSiteCheckPhotos());
+		entity.setWaterSiteCheckPhotos(reportEntity.getWaterSiteCheckPhotos());
+		entity.setGroundSiteCheckPhotos(reportEntity.getGroundSiteCheckPhotos());
+		entity.setOtherEquipmentCheckPhotos(reportEntity.getOtherEquipmentCheckPhotos());
+		entity.setRtuReplacePhotos(reportEntity.getRtuReplacePhotos());
+		entity.setRainSensorReplacePhotos(reportEntity.getRainSensorReplacePhotos());
+		entity.setWaterSensorReplacePhotos(reportEntity.getWaterSensorReplacePhotos());
+		entity.setGroundSensorReplacePhotos(reportEntity.getGroundSensorReplacePhotos());
+		entity.setBatteryReplacePhotos(reportEntity.getBatteryReplacePhotos());
+		entity.setBatteryControllerReplacePhotos(reportEntity.getBatteryControllerReplacePhotos());
+		entity.setOtherEquipmentReplacePhotos(reportEntity.getOtherEquipmentReplacePhotos());
+		entity.setSunPowerReplacePhotos(reportEntity.getSunPowerReplacePhotos());
+		entity.setInspectionWorkPhotos(reportEntity.getInspectionWorkPhotos());
+		return R.status(reportService.updateById(entity));
+	}
+
+	/**
+	 * 删除
+	 */
+	@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("/today/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "查询")
+	public R<List<InspectionProcessRecordInfoVO>> todayList(@ApiIgnore InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+			inspectionReportDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+			LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+			deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+			deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+			DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+			if (null != deptRegionEntity) {
+				inspectionReportDTO.setAdCode(deptRegionEntity.getAdcd());
+			}
+		}
+
+		Date date = new Date();
+		String dt = Func.formatDateTime(date);
+		inspectionReportDTO.setCreateTime(Func.parse(dt, ConcurrentDateFormat.of("yyyy-MM-dd")));
+		List<InspectionProcessRecordInfoVO> list = reportService.selectTodayReportList(inspectionReportDTO);
+		for (InspectionProcessRecordInfoVO vo : list) {
+			InspectionProcessWrapper.build().entityVO(vo);
+		}
+		return R.data(list);
+	}
+
+	/**
+	 * 查询当天的巡检填报信息
+	 */
+	@GetMapping("/today/page")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "查询")
+	public R<IPage<InspectionProcessRecordInfoVO>> todayPage(@ApiIgnore InspectionProcessRecordInfoDTO inspectionReportDTO, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+			inspectionReportDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+			LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+			deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+			deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+			DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+			inspectionReportDTO.setAdCode(deptRegionEntity.getAdcd());
+		}
+
+		Date date = new Date();
+		String dt = Func.formatDateTime(date);
+		inspectionReportDTO.setCreateTime(Func.parse(dt, ConcurrentDateFormat.of("yyyy-MM-dd")));
+		IPage<InspectionProcessRecordInfoVO> page = reportService.selectTodayReportPage(Condition.getPage(query),inspectionReportDTO);
+
+		List<InspectionProcessRecordInfoVO> list = page.getRecords();
+		for (InspectionProcessRecordInfoVO vo : list) {
+			InspectionProcessWrapper.build().entityVO(vo);
+		}
+		return R.data(page);
+	}
+
+
+	@GetMapping("/count")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "inspectionYear", value = "巡检年度", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rainSeasonKind", value = "汛期类型", paramType = "query", dataType = "int"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "已巡检上报设备数量")
+	public R<Map<String, Object>> inspectionReportCount(@ApiIgnore InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		if (inspectionReportDTO.getAdCode() == null) {
+			return R.status(false);
+		}
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+			if (inspectionReportDTO.getAdCode() == null) {
+				inspectionReportDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+			}
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+			if (inspectionReportDTO.getAdCode() == null) {
+				LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+				deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+				deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+				DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+				inspectionReportDTO.setAdCode(deptRegionEntity.getAdcd());
+			}
+		}
+		if (inspectionReportDTO.getInspectionYear() != null) {
+			Date year = Func.parseDate(inspectionReportDTO.getInspectionYear(), "yyyy-MM-dd");
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(year);
+			calendar.set(Calendar.MONTH, 0);
+			calendar.set(Calendar.DAY_OF_MONTH, 1);
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+			calendar.add(Calendar.YEAR, 1);
+			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+		} else {
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(new Date());
+			calendar.set(Calendar.MONTH, 0);
+			calendar.set(Calendar.DAY_OF_MONTH, 1);
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+			calendar.add(Calendar.YEAR, 1);
+			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+		}
+		Map<String, Object> data = new HashMap<>();
+		long count = reportService.equipmentInspectionReportCount(inspectionReportDTO);
+		data.put("inspectionCount", count);
+		return R.data(data);
+	}
+
+	/**
+	 * 遗留问题信息列表,分页
+	 */
+	@GetMapping("/remainingproblems/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "inspectionYear", value = "巡检年度", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rainSeasonKind", value = "汛期类型", paramType = "query", dataType = "int"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "遗留问题信息列表")
+	public R<IPage<InspectionProcessRecordInfoVO>> remainingproblemsPage(@ApiIgnore InspectionProcessRecordInfoDTO inspectionReportDTO, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+			inspectionReportDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+			LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+			deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+			deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+			DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+			inspectionReportDTO.setAdCode(deptRegionEntity.getAdcd());
+		}
+		if (inspectionReportDTO.getInspectionYear() != null) {
+			Date year = Func.parseDate(inspectionReportDTO.getInspectionYear(), "yyyy-MM-dd");
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(year);
+			calendar.set(Calendar.MONTH, 0);
+			calendar.set(Calendar.DAY_OF_MONTH, 1);
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+			calendar.add(Calendar.YEAR, 1);
+			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+		} else {
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(new Date());
+			calendar.set(Calendar.MONTH, 0);
+			calendar.set(Calendar.DAY_OF_MONTH, 1);
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+			calendar.add(Calendar.YEAR, 1);
+			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+		}
+		IPage<InspectionProcessRecordInfoVO> pages = reportService.selectRemainingproblemsPage(Condition.getPage(query), inspectionReportDTO);
+		return R.data(pages);
+	}
+
+
+	/**
+	 * 遗留问题关闭
+	 *
+	 * @param reportEntity
+	 * @return
+	 */
+	@PostMapping("/remainingproblems/close")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "id", value = "工单ID", paramType = "query", dataType = "long"),
+		@ApiImplicitParam(name = "remainQuestionResolution", value = "处理意见", paramType = "query", dataType = "string")
+	})
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "遗留问题关闭操作", notes = "传入实体类EquipmentInspectionReportEntity")
+	public R remainingProblemsClose(@RequestBody InspectionProcessRecordInfoEntity reportEntity) {
+		if (reportEntity.getId() == null) {
+			return R.fail("参数错误!");
+		}
+		InspectionProcessRecordInfoEntity entity = reportService.getById(reportEntity.getId());
+		if (null == entity) {
+			return R.status(false);
+		}
+		entity.setRemainQuestionState(2);
+		entity.setRemainQuestionResolution(reportEntity.getRemainQuestionResolution());
+		reportService.updateById(entity);
+		return R.success("操作成功!");
+	}
+
+
+
+
+	/**
+	 * 巡检上报-无信号上报信息列表,分页
+	 */
+	@GetMapping("/nonetworksignal/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "inspectionYear", value = "巡检年度", paramType = "query", dataType = "string"),
+		@ApiImplicitParam(name = "rainSeasonKind", value = "汛期类型", paramType = "query", dataType = "int"),
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "无信号上报信息列表")
+	public R<IPage<InspectionProcessRecordInfoVO>> nonetworksignalReportPage(@ApiIgnore InspectionProcessRecordInfoDTO inspectionReportDTO, Query query) {
+		BladeUser user = AuthUtil.getUser();
+		if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+			inspectionReportDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+		} else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+			LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+			deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+			deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+			DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+			inspectionReportDTO.setAdCode(deptRegionEntity.getAdcd());
+		}
+		if (inspectionReportDTO.getInspectionYear() != null) {
+			Date year = Func.parseDate(inspectionReportDTO.getInspectionYear(), "yyyy-MM-dd");
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(year);
+			calendar.set(Calendar.MONTH, 0);
+			calendar.set(Calendar.DAY_OF_MONTH, 1);
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+			calendar.add(Calendar.YEAR, 1);
+			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+		} else {
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(new Date());
+			calendar.set(Calendar.MONTH, 0);
+			calendar.set(Calendar.DAY_OF_MONTH, 1);
+			calendar.set(Calendar.HOUR_OF_DAY, 0);
+			calendar.set(Calendar.MINUTE, 0);
+			calendar.set(Calendar.SECOND, 0);
+			inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
+			calendar.add(Calendar.YEAR, 1);
+			inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
+		}
+		IPage<InspectionProcessRecordInfoVO> pages = reportService.selectNoNetworkSignalPage(Condition.getPage(query), inspectionReportDTO);
+		return R.data(pages);
+	}
+
+	/**
+	 * 巡检上报-无信号上报图片补交关闭
+	 *
+	 * @param reportEntity
+	 * @return
+	 */
+	@PostMapping("/nonetworksignal/close")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "id", value = "记录ID", paramType = "query", dataType = "long"),
+	})
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "图片补交关闭操作", notes = "传入实体类EquipmentInspectionReportEntity")
+	public R noNetworkSignalPhotoSubmitClose(@RequestBody InspectionProcessRecordInfoEntity reportEntity) {
+		if (reportEntity.getId() == null) {
+			return R.fail("参数错误!");
+		}
+		InspectionProcessRecordInfoEntity entity = reportService.getById(reportEntity.getId());
+		if (null == entity) {
+			return R.status(false);
+		}
+		entity.setPhotoSupplementSubmitStatus(1);
+
+		reportService.updateById(entity);
+		return R.success("操作成功!");
+	}
+
+	@ApiLog("图片提交")
+	@PostMapping(value = "/nonetworksignal/putPhoto")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "图片提交", notes = "")
+	public R putFile(MultipartFile file) {
+		BladeFile bladeFile = ossBuilder.template().putFile(file);
+		return R.data(bladeFile);
+	}
+
+}

+ 108 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/dto/InspectionInfoDTO.java

@@ -0,0 +1,108 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.dto;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity;
+
+import java.util.Date;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class InspectionInfoDTO extends InspectionInfoEntity {
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 计划ID
+	 */
+	@ApiModelProperty("计划ID")
+	private Long planId;
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty("测站名称")
+	private String  rtuName;
+
+	/**
+	 * 行政区划
+	 */
+	@ApiModelProperty("行政区划")
+	private String  adCode;
+
+	/**
+	 * 年度巡检日期区间-开始日期
+	 */
+	@ApiModelProperty("开始日期")
+	private Date inspectionYearStartDate;
+
+	/**
+	 * 年度巡检日期区间-结束日期,不包括
+	 */
+	@ApiModelProperty("结束日期")
+	private Date inspectionYearEndDate;
+
+	/**
+	 * 巡检年度
+	 */
+	@ApiModelProperty("巡检年度")
+	private String inspectionYear;
+
+	/**
+	 * 汛期类别
+	 */
+	@ApiModelProperty(value = "汛期类别")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer rainSeasonKind;
+
+	/**
+	 * 运维人员ID
+	 */
+	@ApiModelProperty(value = "运维人员ID")
+	private Long servicePersonId;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty(value = "机构ID")
+	private Long deptId;
+
+	/**
+	 * 审批意见
+	 */
+	@ApiModelProperty("审批意见")
+	private String  approveDesc;
+
+	/**
+	 * 工单评分
+	 */
+	@ApiModelProperty("工单评分")
+	private Integer orderRate;
+
+	/**
+	 * 巡检状态查询条件
+	 */
+	@ApiModelProperty("巡检状态查询条件")
+	private Integer inspectionStatusOption;
+
+}

+ 58 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/dto/InspectionPlanInfoDTO.java

@@ -0,0 +1,58 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/11
+ */
+package org.springblade.modules.business.xjgd.inspection.dto;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionPlanInfoEntity;
+
+/***
+ * Date:2022/9/11
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class InspectionPlanInfoDTO extends InspectionPlanInfoEntity {
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+
+	/**
+	 * 计划ID
+	 */
+	@ApiModelProperty("计划ID")
+	private Long planId;
+
+
+	/**
+	 * 行政区划编码
+	 */
+	@ApiModelProperty(value = "行政区划编码")
+	private String adCode;
+
+	/**
+	 * 按计划类型查询参数
+	 */
+	@ApiModelProperty(value = "计划类型查询参数")
+	private Integer planTypeOption;
+
+}

+ 61 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/dto/InspectionProcessRecordInfoDTO.java

@@ -0,0 +1,61 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/9/7
+ */
+package org.springblade.modules.business.xjgd.inspection.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+
+import java.util.Date;
+
+/***
+ * Date:2022/9/7
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class InspectionProcessRecordInfoDTO extends InspectionProcessRecordInfoEntity {
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty("测站名称")
+	private String rtuName;
+
+	/**
+	 * 行政区划编码
+	 */
+	@ApiModelProperty(value = "行政区划编码")
+	private String adCode;
+
+	/**
+	 * 巡检年度
+	 */
+	@ApiModelProperty("巡检年度")
+	private String inspectionYear;
+
+
+	/**
+	 * 年度巡检日期区间-开始日期
+	 */
+	@ApiModelProperty("开始日期")
+	private Date inspectionYearStartDate;
+
+	/**
+	 * 年度巡检日期区间-结束日期,不包括
+	 */
+	@ApiModelProperty("结束日期")
+	private Date inspectionYearEndDate;
+
+
+
+}

+ 193 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/entity/InspectionInfoEntity.java

@@ -0,0 +1,193 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+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")
+public class InspectionInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 巡检标题
+	 */
+	@ApiModelProperty("巡检标题")
+	private String inspectionTitle;
+
+	/**
+	 * 巡检计划ID
+	 */
+	@ApiModelProperty("巡检计划ID")
+	private Long inspectionPlanId;
+
+	/**
+	 * 巡检状态: 0 待巡检 ,1 已巡检 ,2 待完结审批 ,3 完结已审批,4 退回
+	 */
+	@ApiModelProperty("巡检状态")
+	private Integer inspectionStatus;
+
+	/**
+	 * 巡检日期
+	 */
+	@ApiModelProperty("巡检日期")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date inspectionDate;
+
+	/**
+	 * 巡检填报ID
+	 */
+	@ApiModelProperty("巡检填报ID")
+	private Long inspectionReportId;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long orgId;
+
+	/**
+	 * 测站编码
+	 */
+	@ApiModelProperty("测站编码")
+	private String rtuCode;
+
+	/**
+	 * 汛前巡检填报:0 未填报,1已填报
+	 */
+	@ApiModelProperty("汛前巡检填报")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer beforeRainSeasonStatus;
+
+	/**
+	 * 汛前巡检填报时间
+	 */
+	@ApiModelProperty("汛前巡检填报时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date beforeRainSeasonReportTime;
+
+	/**
+	 * 汛前巡检填报人
+	 */
+	@ApiModelProperty("汛前巡检填报人")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long beforeRainSeasonReportUser;
+
+	/**
+	 * 汛前巡检填报详情ID
+	 */
+	@ApiModelProperty("汛前巡检填报详情ID")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long beforeRainSeasonReportId;
+
+	/**
+	 * 第一次汛中巡检填报:0 未填报,1已填报
+	 */
+	@ApiModelProperty("第一次汛中巡检填报状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer rainSeasonFirstStatus;
+
+	/**
+	 * 第一次汛中巡检填报时间
+	 */
+	@ApiModelProperty("第一次汛中巡检填报时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rainSeasonFirstReportTime;
+
+	/**
+	 * 第一次汛中巡检填报人
+	 */
+	@ApiModelProperty("第一次汛中巡检填报人")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long rainSeasonFirstReportUser;
+
+	/**
+	 * 第一次汛中巡检填报详情ID
+	 */
+	@ApiModelProperty("第一次汛中巡检填报详情ID")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long rainSeasonFirstReportId;
+
+	/**
+	 * 第二次汛中巡检填报:0 未填报,1已填报
+	 */
+	@ApiModelProperty("第二次汛中巡检填报状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer rainSeasonSecondStatus;
+
+	/**
+	 * 第二次汛中巡检填报时间
+	 */
+	@ApiModelProperty("第二次汛中巡检填报时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rainSeasonSecondReportTime;
+
+	/**
+	 * 第二次汛中巡检填报人
+	 */
+	@ApiModelProperty("第二次汛中巡检填报人")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long rainSeasonSecondReportUser;
+
+	/**
+	 * 第二次汛中巡检填报详情ID
+	 */
+	@ApiModelProperty("第二次汛中巡检填报详情ID")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long rainSeasonSecondReportId;
+
+	/**
+	 * 工单评分
+	 */
+	@ApiModelProperty("工单评分")
+	private Integer orderRate;
+}

+ 208 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/entity/InspectionPlanInfoEntity.java

@@ -0,0 +1,208 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+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 InspectionPlanInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 批处理ID,防止重复上传
+	 */
+	@ApiModelProperty(value = "批处理ID")
+	private String batchId;
+
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 巡检年度索引ID
+	 */
+	@ApiModelProperty("巡检年度索引ID")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long inspectionId;
+
+	/**
+	 * 计划标题
+	 */
+	@ApiModelProperty("计划标题")
+	private String planTitle;
+
+	/**
+	 * 计划内容
+	 */
+	@ApiModelProperty("计划内容")
+	private String planDesc;
+
+	/**
+	 * 巡检计划状态:1 有效  0 无效
+	 */
+	@ApiModelProperty("巡检计划状态")
+	private Integer planStatus;
+
+	/**
+	 * 计划执行周期 1 仅一次 1 周期性
+	 */
+	@ApiModelProperty("计划执行周期")
+	private Integer planScheduledType;
+
+	/**
+	 * 时间周期类型 1 按天 2 按周 2 按月
+	 */
+	@ApiModelProperty("时间周期类型")
+	private Integer timeType;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long orgId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long projectId;
+
+	/**
+	 * 巡检完成时间
+	 */
+	@ApiModelProperty("巡检完成时间")
+	@DateTimeFormat(
+			pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+			pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date inspectionCompleteTime;
+
+	/**
+	 * 巡检开始时间
+	 */
+	@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("巡检开始时间")
+	@DateTimeFormat(
+			pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+			pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date beforeRainSeasonStartTime;
+
+	/**
+	 * 巡检结束时间
+	 */
+	@ApiModelProperty("巡检结束时间")
+	@DateTimeFormat(
+			pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+			pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date beforeRainSeasonEndTime;
+
+
+	/**
+	 * 第1次汛中巡检开始时间
+	 */
+	@ApiModelProperty("第1次汛中巡检开始时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rainSeasonFirstStartTime;
+
+	/**
+	 * 第1次汛中巡检结束时间
+	 */
+	@ApiModelProperty("第1次汛中巡检结束时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rainSeasonFirstEndTime;
+
+
+	/**
+	 * 第2次汛中巡检开始时间
+	 */
+	@ApiModelProperty("第2次汛中巡检开始时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rainSeasonSecondStartTime;
+
+	/**
+	 * 第2次汛中巡检结束时间
+	 */
+	@ApiModelProperty("第2次汛中巡检结束时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date rainSeasonSecondEndTime;
+
+}

+ 408 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/entity/InspectionProcessRecordInfoEntity.java

@@ -0,0 +1,408 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+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("equipment_inspection_report_info")
+public class InspectionProcessRecordInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 巡检主表ID
+	 */
+	@ApiModelProperty("巡检主表ID")
+	private Long inspectionId;
+
+	/**
+	 * 巡检内容
+	 */
+	@ApiModelProperty("巡检内容")
+	private String inspectionDesc;
+
+	/**
+	 * 测站编码
+	 */
+	@ApiModelProperty("测站编码")
+	private String rtuCode;
+
+	/**
+	 * 经度
+	 */
+	@ApiModelProperty("经度")
+	private String lng;
+
+	/**
+	 * 纬度
+	 */
+	@ApiModelProperty("纬度")
+	private String lat;
+
+	/**
+	 * 站点具体位置描述
+	 */
+	@ApiModelProperty("站点具体位置描述")
+	private String locationDesc;
+
+	/**
+	 * 站点检查项,0 水毁 , 1 丢失 , 2 损坏, 3 正常
+	 */
+	@ApiModelProperty("站点检查项")
+	private String siteCheckItem;
+
+	/**
+	 * 站点检查图片
+	 */
+	@ApiModelProperty("站点检查图片")
+	private String siteCheckPhotos;
+
+	/**
+	 * 站点检查补充说明
+	 */
+	@ApiModelProperty("站点检查补充说明")
+	private String siteCheckRemark;
+
+	/**
+	 * 雨量站检查项:0 故障排查, 1 清理堵塞,2 雨量计校核
+	 */
+	@ApiModelProperty("雨量站检查项")
+	private String rainSiteCheckItem;
+
+	/**
+	 * 雨量站检查图片
+	 */
+	@ApiModelProperty("雨量站检查图片")
+	private String rainSiteCheckPhotos;
+
+	/**
+	 * 雨量站检查补充说明
+	 */
+	@ApiModelProperty("雨量站检查补充说明")
+	private String rainSiteCheckRemark;
+
+	/**
+	 * 雨量站检查结果
+	 */
+	@ApiModelProperty("雨量站检查结果")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer rainSiteCheckResult;
+
+	/**
+	 * 水位站检查项
+	 */
+	@ApiModelProperty("水位站检查项")
+	private String waterSiteCheckItem;
+
+	/**
+	 * 水位站检查图片
+	 */
+	@ApiModelProperty("水位站检查图片")
+	private String waterSiteCheckPhotos;
+
+	/**
+	 * 水位站检查补充说明
+	 */
+	@ApiModelProperty("水位站检查补充说明")
+	private String waterSiteCheckRemark;
+
+	/**
+	 * 水位站检查结果
+	 */
+	@ApiModelProperty("水位站检查结果")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer waterSiteCheckResult;
+
+	/**
+	 * 墒情站检查项
+	 */
+	@ApiModelProperty("墒情站检查项")
+	private String groundSiteCheckItem;
+
+	/**
+	 * 墒情站检查图片
+	 */
+	@ApiModelProperty("墒情站检查图片")
+	private String groundSiteCheckPhotos;
+
+	/**
+	 * 墒情站检查补充说明
+	 */
+	@ApiModelProperty("墒情站检查补充说明")
+	private String groundSiteCheckRemark;
+
+	/**
+	 * 墒情站检查结果
+	 */
+	@ApiModelProperty("墒情站检查结果")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer groundSiteCheckResult;
+
+	/**
+	 * 其他设备检查项
+	 */
+	@ApiModelProperty(" 其他设备检查项")
+	private String otherEquipmentCheckItem;
+
+	/**
+	 * 其他设备检查图片
+	 */
+	@ApiModelProperty("其他设备检查图片")
+	private String otherEquipmentCheckPhotos;
+
+	/**
+	 * 其他设备检查补充说明
+	 */
+	@ApiModelProperty("其他设备检查补充说明")
+	private String otherEquipmentCheckRemark;
+
+	/**
+	 * 其他设备检查结果
+	 */
+	@ApiModelProperty("其他设备检查结果")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer otherEquipmentCheckResult;
+
+	/**
+	 * RTU设备更换
+	 */
+	@ApiModelProperty("RTU设备更换")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer rtuReplace;
+
+	/**
+	 * RTU设备更换说明
+	 */
+	@ApiModelProperty("RTU设备更换说明")
+	private String rtuModelRemark;
+
+	/**
+	 * RTU更换图片,以逗号分割
+	 */
+	@ApiModelProperty("RTU更换图片")
+	private String rtuReplacePhotos;
+
+	/**
+	 * 雨量计更换状态
+	 */
+	@ApiModelProperty("雨量计更换状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer rainSensorReplace;
+
+	/**
+	 * 雨量计更换说明
+	 */
+	@ApiModelProperty("雨量计更换说明")
+	private String rainSensorModelRemark;
+
+	/**
+	 * 雨量计更换图片,以逗号分割
+	 */
+	@ApiModelProperty("雨量计更换图片")
+	private String rainSensorReplacePhotos;
+
+	/**
+	 * 水位计更换状态
+	 */
+	@ApiModelProperty("水位计更换状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer waterSensorReplace;
+
+	/**
+	 * 水位计更换说明
+	 */
+	@ApiModelProperty("水位计更换说明")
+	private String waterSensorModelRemark;
+
+	/**
+	 * 水位计更换图片,以逗号分割
+	 */
+	@ApiModelProperty("水位计更换图片")
+	private String waterSensorReplacePhotos;
+
+	/**
+	 * 墒情计更换状态
+	 */
+	@ApiModelProperty("墒情计更换状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer groundSensorReplace;
+
+	/**
+	 * 墒情计更换说明
+	 */
+	@ApiModelProperty("墒情计更换说明")
+	private String groundSensorModelRemark;
+
+	/**
+	 * 墒情计更换图片,以逗号分割
+	 */
+	@ApiModelProperty("墒情计更换图片")
+	private String groundSensorReplacePhotos;
+
+	/**
+	 * 电池更换状态
+	 */
+	@ApiModelProperty("电池更换状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer batteryReplace;
+
+	/**
+	 * 电池更换说明
+	 */
+	@ApiModelProperty("电池更换说明")
+	private String batteryModelRemark;
+
+	/**
+	 * 电池更换图片,以逗号分割
+	 */
+	@ApiModelProperty("电池更换图片")
+	private String batteryReplacePhotos;
+
+	/**
+	 * 太阳能板更换状态
+	 */
+	@ApiModelProperty("太阳能板更换状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer sunPowerReplace;
+
+	/**
+	 * 太阳能板更换说明
+	 */
+	@ApiModelProperty("太阳能板更换说明")
+	private String sunPowerModelRemark;
+
+	/**
+	 * 太阳能板更换图片,以逗号分割
+	 */
+	@ApiModelProperty("太阳能板更换图片")
+	private String sunPowerReplacePhotos;
+
+	/**
+	 * 充电控制器更换状态
+	 */
+	@ApiModelProperty("充电控制器更换状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer batteryControllerReplace;
+
+	/**
+	 * 充电控制器说明
+	 */
+	@ApiModelProperty("充电控制器说明")
+	private String batteryControllerModelRemark;
+
+	/**
+	 * 充电控制器更换图片,以逗号分割
+	 */
+	@ApiModelProperty("充电控制器更换图片")
+	private String batteryControllerReplacePhotos;
+
+	/**
+	 * 其他设备更换状态
+	 */
+	@ApiModelProperty("其他设备更换状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer otherEquipmentReplace;
+
+	/**
+	 * 其他设备更换说明
+	 */
+	@ApiModelProperty("其他设备更换说明")
+	private String otherEquipmentModelRemark;
+
+	/**
+	 * 其他设备更换图片,以逗号分割
+	 */
+	@ApiModelProperty("其他设备更换图片")
+	private String otherEquipmentReplacePhotos;
+
+	/**
+	 * 遗留问题
+	 */
+	@ApiModelProperty("遗留问题")
+	private String remainQuestion;
+
+	/**
+	 * 遗留问题处理状态
+	 */
+	@ApiModelProperty("遗留问题处理状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer remainQuestionState;
+
+	/**
+	 * 遗留问题处理说明
+	 */
+	@ApiModelProperty("遗留问题处理说明")
+	private String remainQuestionResolution;
+
+	/**
+	 * 巡检工作留存照片
+	 */
+	@ApiModelProperty("巡检工作留存照片")
+	private String inspectionWorkPhotos;
+
+
+	/**
+	 * 汛期类别
+	 */
+	@ApiModelProperty(value = "汛期类别")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer rainSeasonKind;
+
+	/**
+	 * 现场网络讯号状态 0 正常  1无信号
+	 */
+	@ApiModelProperty(value = "现场网络讯号状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer networkSignalStatus;
+
+	/**
+	 * 无信号时,补交图片状态 0 补交中,1补交完成
+	 */
+	@ApiModelProperty(value = "补交图片状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer photoSupplementSubmitStatus;
+
+	/**
+	 * SIN卡号
+	 */
+	@ApiModelProperty(value = "SIN卡号")
+	private String networkSimId;
+
+	/**
+	 * 开卡单位
+	 */
+	@ApiModelProperty(value = "开卡单位")
+	private String networkPayer;
+
+	/**
+	 * 巡检视频
+	 */
+	@ApiModelProperty(value = "巡检视频")
+	private String inspectionVideos;
+
+}

+ 36 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionMapper.java

@@ -0,0 +1,36 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.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.xjgd.inspection.dto.InspectionInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionInfoVO;
+
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface InspectionMapper extends BaseMapper<InspectionInfoEntity> {
+//	List<EquipmentInspectionStatisticsVO> inspectionReportCount(@Param("inspectionInfoDTO") EquipmentInspectionInfoDTO inspectionInfoDTO);
+	Long inspectionCount(@Param("inspectionInfoDTO") InspectionInfoDTO inspectionInfoDTO);
+	List<InspectionInfoVO> selectPage(IPage page, @Param("inspectionInfoDTO") InspectionInfoDTO inspectionInfoDTO);
+	List<InspectionInfoVO> selectRtuPage(IPage page, @Param("inspectionInfoDTO") InspectionInfoDTO inspectionInfoDTO);
+	List<InspectionInfoVO> selectUnfinishedInspectionEquipmentPage(IPage page, @Param("inspectionInfoDTO") InspectionInfoDTO inspectionInfoDTO);
+	List<InspectionInfoVO> selectUnfinishedInspectionEquipmentList(@Param("inspectionInfoDTO") InspectionInfoDTO inspectionInfoDTO);
+	List<InspectionInfoVO> todoInspectionList(@Param("inspectionInfoDTO") InspectionInfoDTO inspectionInfoDTO);
+}

+ 325 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionMapper.xml

@@ -0,0 +1,325 @@
+<?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.xjgd.inspection.mapper.InspectionMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="equipmentInspectionInfoResultMap"
+               type="org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity">
+        <result column="inspection_title" property="inspectionTitle"/>
+        <result column="inspection_plan_id" property="inspectionPlanId"/>
+        <result column="inspection_status" property="inspectionStatus"/>
+        <result column="inspection_date" property="inspectionDate"/>
+        <result column="org_id" property="orgId"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="before_rain_season_status" property="beforeRainSeasonStatus"/>
+        <result column="before_rain_season_report_time" property="beforeRainSeasonReportTime"/>
+        <result column="before_rain_season_report_user" property="beforeRainSeasonReportUser"/>
+        <result column="before_rain_season_report_id" property="beforeRainSeasonReportId"/>
+        <result column="rain_season_first_status" property="rainSeasonFirstStatus"/>
+        <result column="rain_season_first_report_time" property="rainSeasonFirstReportTime"/>
+        <result column="rain_season_first_report_user" property="rainSeasonFirstReportUser"/>
+        <result column="rain_season_first_report_id" property="rainSeasonFirstReportId"/>
+        <result column="rain_season_second_status" property="rainSeasonSecondStatus"/>
+        <result column="rain_season_second_report_time" property="rainSeasonSecondReportTime"/>
+        <result column="rain_season_second_report_user" property="rainSeasonSecondReportUser"/>
+        <result column="rain_season_second_report_id" property="rainSeasonSecondReportId"/>
+
+        <result column="inspection_report_id" property="inspectionReportId"/>
+    </resultMap>
+
+    <resultMap id="equipmentInspectionInfoVOResultMap"
+               type="org.springblade.modules.business.xjgd.inspection.vo.InspectionInfoVO">
+        <result column="inspection_title" property="inspectionTitle"/>
+        <result column="inspection_plan_id" property="inspectionPlanId"/>
+        <result column="inspection_status" property="inspectionStatus"/>
+        <result column="inspection_date" property="inspectionDate"/>
+        <result column="org_id" property="orgId"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="before_rain_season_status" property="beforeRainSeasonStatus"/>
+        <result column="before_rain_season_report_time" property="beforeRainSeasonReportTime"/>
+        <result column="before_rain_season_report_user" property="beforeRainSeasonReportUser"/>
+        <result column="before_rain_season_report_id" property="beforeRainSeasonReportId"/>
+        <result column="rain_season_first_status" property="rainSeasonFirstStatus"/>
+        <result column="rain_season_first_report_time" property="rainSeasonFirstReportTime"/>
+        <result column="rain_season_first_report_user" property="rainSeasonFirstReportUser"/>
+        <result column="rain_season_first_report_id" property="rainSeasonFirstReportId"/>
+        <result column="rain_season_second_status" property="rainSeasonSecondStatus"/>
+        <result column="rain_season_second_report_time" property="rainSeasonSecondReportTime"/>
+        <result column="rain_season_second_report_user" property="rainSeasonSecondReportUser"/>
+        <result column="rain_season_second_report_id" property="rainSeasonSecondReportId"/>
+        <result column="rtu_name" property="rtuName"/>
+        <result column="before_rain_season_report_user_name" property="beforeRainSeasonReportUserName"/>
+        <result column="rain_season_first_report_user_name" property="rainSeasonFirstReportUserName"/>
+        <result column="rain_season_second_report_user_name" property="rainSeasonSecondReportUserName"/>
+
+        <result column="ad_city" property="adCity"/>
+        <result column="ad_dist" property="adDist"/>
+
+        <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_video" property="isVideo"/>
+        <result column="location_desc" property="locationDesc"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+
+        <result column="plan_scheduled_type" property="planScheduledType"/>
+        <result column="time_type" property="timeType"/>
+        <result column="inspection_complete_time" property="inspectionCompleteTime"/>
+
+        <result column="inspection_report_id" property="inspectionReportId"/>
+    </resultMap>
+
+
+    <resultMap id="equipmentInspectionStatisticsVOResultMap"
+               type="org.springblade.modules.business.equipment.inspection.base.vo.EquipmentInspectionStatisticsVO">
+        <result column="real_name" property="servicePersonName"/>
+        <result column="complete_count" property="completeCount"/>
+    </resultMap>
+
+
+    <select id="selectPage" resultMap="equipmentInspectionInfoVOResultMap">
+        SELECT
+        n.*,
+        r.rtu_name ,u.real_name AS before_rain_season_report_user_name,u2.real_name AS
+        rain_season_first_report_user_name,u3.real_name AS rain_season_second_report_user_name,r.ad_city,r.ad_dist
+        FROM
+        equipment_inspection n
+        LEFT JOIN rtu_info r ON r.rtu_code = n.rtu_code
+        LEFT JOIN data_ad_cd_b a ON a.adcd = r.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = n.before_rain_season_report_user and u.is_deleted=0
+        LEFT JOIN blade_user u2 ON u2.id = n.rain_season_first_report_user and u2.is_deleted=0
+        LEFT JOIN blade_user u3 ON u3.id = n.rain_season_second_report_user and u2.is_deleted=0
+        WHERE
+        n.is_deleted = 0
+        <if test="inspectionInfoDTO.inspectionPlanId!=null">
+            and n.inspection_plan_id =  #{inspectionInfoDTO.inspectionPlanId}
+        </if>
+        <if test="inspectionInfoDTO.inspectionStatus!=null">
+            and n.inspection_status =  #{inspectionInfoDTO.inspectionStatus}
+        </if>
+        <if test="inspectionInfoDTO.rtuCode!=null">
+            and n.rtu_code like concat(concat('%', #{inspectionInfoDTO.rtuCode}), '%')
+        </if>
+        <if test="inspectionInfoDTO.rtuName!=null">
+            and r.rtu_name like concat(concat('%', #{inspectionInfoDTO.rtuName}), '%')
+        </if>
+        <if test="inspectionInfoDTO.inspectionYearStartDate!=null">
+            and DATE_FORMAT(n.inspection_date,'%Y-%m-%d') &gt;=
+            DATE_FORMAT(#{inspectionInfoDTO.inspectionYearStartDate},'%Y-%m-%d')
+        </if>
+        <if test="inspectionInfoDTO.inspectionYearEndDate!=null">
+            and DATE_FORMAT(n.inspection_date,'%Y-%m-%d') &lt;
+            DATE_FORMAT(#{inspectionInfoDTO.inspectionYearEndDate},'%Y-%m-%d')
+        </if>
+        <if test="inspectionInfoDTO.beforeRainSeasonStatus!=null">
+            and  n.before_rain_season_status = #{inspectionInfoDTO.beforeRainSeasonStatus}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonFirstStatus!=null">
+            and  n.rain_season_first_status = #{inspectionInfoDTO.rainSeasonFirstStatus}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonSecondStatus!=null">
+            and  n.rain_season_second_status = #{inspectionInfoDTO.rainSeasonSecondStatus}
+        </if>
+        <if test="inspectionInfoDTO.beforeRainSeasonReportUser!=null">
+            and n.before_rain_season_report_user = #{inspectionInfoDTO.beforeRainSeasonReportUser}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonFirstReportUser!=null">
+            and n.rain_season_first_report_user = #{inspectionInfoDTO.rainSeasonFirstReportUser}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonSecondReportUser!=null">
+            and n.rain_season_second_report_user = #{inspectionInfoDTO.rainSeasonSecondReportUser}
+        </if>
+        <if test="inspectionInfoDTO.adCode!=null">
+            and (a.adcd =#{inspectionInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{inspectionInfoDTO.adCode}), '%')))
+        </if>
+        order by n.rtu_code
+    </select>
+
+
+    <select id="selectRtuPage" resultMap="equipmentInspectionInfoVOResultMap">
+        SELECT
+        r.rtu_name,r.rtu_code,r.ad_city,r.ad_dist,r.is_rain,r.is_river,r.is_res,r.is_ground,r.is_video,r.location_desc,r.lng,r.lat
+        FROM
+        rtu_info r
+        LEFT JOIN data_ad_cd_b a ON a.adcd = r.ad_code and a.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        <if test="inspectionInfoDTO.rtuCode!=null">
+            and r.rtu_code like concat(concat('%', #{inspectionInfoDTO.rtuCode}), '%')
+        </if>
+        <if test="inspectionInfoDTO.rtuName!=null">
+            and r.rtu_name like concat(concat('%', #{inspectionInfoDTO.rtuName}), '%')
+        </if>
+        <if test="inspectionInfoDTO.adCode!=null">
+            and (a.adcd =#{inspectionInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{inspectionInfoDTO.adCode}), '%')))
+        </if>
+        and r.rtu_code not in (select n.rtu_code from equipment_inspection n where
+        n.is_deleted = 0
+        <if test="inspectionInfoDTO.inspectionYearStartDate!=null">
+            and DATE_FORMAT(n.inspection_date,'%Y-%m-%d') &gt;= DATE_FORMAT(#{inspectionInfoDTO.inspectionYearStartDate},'%Y-%m-%d')
+        </if>
+        <if test="inspectionInfoDTO.inspectionYearEndDate!=null">
+            and DATE_FORMAT(n.inspection_date,'%Y-%m-%d') &lt; DATE_FORMAT(#{inspectionInfoDTO.inspectionYearEndDate},'%Y-%m-%d')
+        </if>
+        <if test="inspectionInfoDTO.beforeRainSeasonStatus!=null">
+            and n.before_rain_season_status = #{inspectionInfoDTO.beforeRainSeasonStatus}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonFirstStatus!=null">
+            and n.rain_season_first_status = #{inspectionInfoDTO.rainSeasonFirstStatus}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonSecondStatus!=null">
+            and n.rain_season_second_status= #{inspectionInfoDTO.rainSeasonSecondStatus}
+        </if>
+        )
+        order by r.rtu_code
+    </select>
+
+    <select id="inspectionReportCount" resultMap="equipmentInspectionStatisticsVOResultMap">
+        SELECT u.real_name,u.id,s.complete_count FROM blade_user u LEFT JOIN
+        (SELECT create_user,count(create_user) AS complete_count FROM equipment_inspection_report_info WHERE is_deleted
+        =0
+        <if test="inspectionInfoDTO.planId!=null">
+            AND plan_id= #{inspectionInfoDTO.planId}
+        </if>
+        GROUP BY create_user) s
+        on s.create_user = u.id
+        WHERE u.is_deleted=0
+        <if test="inspectionInfoDTO.orgId!=null">
+            AND u.dept_id = #{inspectionInfoDTO.orgId}
+        </if>
+    </select>
+
+    <select id="inspectionCount" resultType="java.lang.Long">
+        SELECT
+        count(*)
+        FROM
+        equipment_inspection n
+        LEFT JOIN rtu_info i ON n.rtu_code = i.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        WHERE
+        n.is_deleted = 0
+        <if test="inspectionInfoDTO.inspectionYearStartDate!=null">
+            and DATE_FORMAT(n.inspection_date,'%Y-%m-%d') &gt;=
+            DATE_FORMAT(#{inspectionInfoDTO.inspectionYearStartDate},'%Y-%m-%d')
+        </if>
+        <if test="inspectionInfoDTO.inspectionYearEndDate!=null">
+            and DATE_FORMAT(n.inspection_date,'%Y-%m-%d') &lt;
+            DATE_FORMAT(#{inspectionInfoDTO.inspectionYearEndDate},'%Y-%m-%d')
+        </if>
+        <if test="inspectionInfoDTO.beforeRainSeasonReportUser!=null">
+            and n.before_rain_season_report_user = #{inspectionInfoDTO.beforeRainSeasonReportUser}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonFirstReportUser!=null">
+            and n.rain_season_first_report_user = #{inspectionInfoDTO.rainSeasonFirstReportUser}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonSecondReportUser!=null">
+            and n.rain_season_second_report_user = #{inspectionInfoDTO.rainSeasonSecondReportUser}
+        </if>
+        <if test="inspectionInfoDTO.adCode!=null">
+            and (a.adcd =#{inspectionInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{inspectionInfoDTO.adCode}), '%')))
+        </if>
+    </select>
+
+
+    <select id="selectUnfinishedInspectionEquipmentPage" resultMap="equipmentInspectionInfoVOResultMap">
+        SELECT r1.rtu_code,r1.rtu_name,r1.ad_city,r1.ad_dist,r1.is_rain,r1.is_river,r1.is_res,r1.is_ground,r1.is_video,r1.location_desc,r1.lng,r1.lat,i1.before_rain_season_status,i1.rain_season_first_status ,i1.rain_season_second_status FROM rtu_info r1
+        INNER JOIN ( SELECT r.rtu_code
+        FROM rtu_info r
+        LEFT JOIN equipment_inspection i on i.rtu_code = r.rtu_code   and i.is_deleted =0
+        <if test="inspectionInfoDTO.inspectionYearStartDate!=null">
+            and i.create_time &gt;= #{inspectionInfoDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionInfoDTO.inspectionYearEndDate!=null">
+            and i.create_time &lt; #{inspectionInfoDTO.inspectionYearEndDate}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonKind!=null">
+            <if test="inspectionInfoDTO.rainSeasonKind == 1">
+                and (i.before_rain_season_status is not null  and i.before_rain_season_status = 1)
+            </if>
+            <if test="inspectionInfoDTO.rainSeasonKind == 2">
+                and (i.rain_season_first_status is not null  and i.rain_season_first_status = 1)
+            </if>
+            <if test="inspectionInfoDTO.rainSeasonKind == 3">
+                and (i.rain_season_second_status is not null  and i.rain_season_second_status = 1)
+            </if>
+        </if>
+        WHERE  r.is_deleted =0  and  i.rtu_code is null ) s1  on s1.rtu_code = r1.rtu_code
+        LEFT JOIN equipment_inspection i1 on i1.rtu_code = r1.rtu_code and i1.is_deleted=0
+        <if test="inspectionInfoDTO.inspectionYearStartDate!=null">
+            and i1.create_time &gt;= #{inspectionInfoDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionInfoDTO.inspectionYearEndDate!=null">
+            and i1.create_time &lt; #{inspectionInfoDTO.inspectionYearEndDate}
+        </if>
+        LEFT JOIN data_ad_cd_b a ON a.adcd = r1.ad_code and a.is_deleted=0
+        WHERE r1.is_deleted=0
+        <if test="inspectionInfoDTO.adCode!=null">
+            and (a.adcd =#{inspectionInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionInfoDTO.adCode}), '%')))
+        </if>
+        order by  i1.before_rain_season_status desc ,i1.rain_season_first_status  desc ,i1.rain_season_second_status desc , r1.rtu_code ASC
+    </select>
+
+    <select id="selectUnfinishedInspectionEquipmentList" resultMap="equipmentInspectionInfoVOResultMap">
+        SELECT r1.rtu_code,r1.rtu_name,r1.ad_city,r1.ad_dist,r1.is_rain,r1.is_river,r1.is_res,r1.is_ground,r1.is_video,r1.location_desc,r1.lng,r1.lat,i1.before_rain_season_status,i1.rain_season_first_status ,i1.rain_season_second_status FROM rtu_info r1
+        INNER JOIN ( SELECT r.rtu_code
+        FROM rtu_info r
+        LEFT JOIN equipment_inspection i on i.rtu_code = r.rtu_code   and i.is_deleted =0
+        <if test="inspectionInfoDTO.inspectionYearStartDate!=null">
+            and i.create_time &gt;= #{inspectionInfoDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionInfoDTO.inspectionYearEndDate!=null">
+            and i.create_time &lt; #{inspectionInfoDTO.inspectionYearEndDate}
+        </if>
+        <if test="inspectionInfoDTO.rainSeasonKind!=null">
+            <if test="inspectionInfoDTO.rainSeasonKind == 1">
+                and (i.before_rain_season_status is not null  and i.before_rain_season_status = 1)
+            </if>
+            <if test="inspectionInfoDTO.rainSeasonKind == 2">
+                and (i.rain_season_first_status is not null  and i.rain_season_first_status = 1)
+            </if>
+            <if test="inspectionInfoDTO.rainSeasonKind == 3">
+                and (i.rain_season_second_status is not null  and i.rain_season_second_status = 1)
+            </if>
+        </if>
+        WHERE  r.is_deleted =0  and  i.rtu_code is null ) s1  on s1.rtu_code = r1.rtu_code
+        LEFT JOIN equipment_inspection i1 on i1.rtu_code = r1.rtu_code and i1.is_deleted=0
+        <if test="inspectionInfoDTO.inspectionYearStartDate!=null">
+            and i1.create_time &gt;= #{inspectionInfoDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionInfoDTO.inspectionYearEndDate!=null">
+            and i1.create_time &lt; #{inspectionInfoDTO.inspectionYearEndDate}
+        </if>
+        LEFT JOIN data_ad_cd_b a ON a.adcd = r1.ad_code and a.is_deleted=0
+        WHERE r1.is_deleted=0
+        <if test="inspectionInfoDTO.adCode!=null">
+            and (a.adcd =#{inspectionInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionInfoDTO.adCode}), '%')))
+        </if>
+        order by  r1.ad_code, r1.rtu_code
+    </select>
+
+
+    <select id="todoInspectionList" resultMap="equipmentInspectionInfoVOResultMap">
+        SELECT
+        n.*,p.plan_scheduled_type,p.time_type,p.inspection_complete_time
+        FROM
+        equipment_inspection n
+        LEFT JOIN equipment_inspection_plan p ON p.id = n.inspection_plan_id
+        WHERE
+        n.is_deleted = 0
+        <if test="inspectionInfoDTO.inspectionStatus!=null">
+            and n.inspection_status = #{inspectionInfoDTO.inspectionStatus}
+        </if>
+        <if test="inspectionInfoDTO.orgId!=null">
+            and n.org_id = #{inspectionInfoDTO.orgId}
+        </if>
+    </select>
+</mapper>

+ 31 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionPlanMapper.java

@@ -0,0 +1,31 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.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.xjgd.inspection.dto.InspectionPlanInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionPlanInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionPlanInfoVO;
+
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface InspectionPlanMapper extends BaseMapper<InspectionPlanInfoEntity> {
+    List<InspectionPlanInfoVO> selectPage(IPage<InspectionPlanInfoVO> page, @Param("planDTO") InspectionPlanInfoDTO planDTO);
+
+    Long planCount(@Param("planDTO") InspectionPlanInfoDTO dto);
+}

+ 82 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionPlanMapper.xml

@@ -0,0 +1,82 @@
+<?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.xjgd.inspection.mapper.InspectionPlanMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="inspectionInfoResultMap"
+               type="org.springblade.modules.business.xjgd.inspection.entity.InspectionPlanInfoEntity">
+        <result column="inspection_id" property="inspectionId"/>
+        <result column="plan_title" property="planTitle"/>
+        <result column="plan_scheduled_type" property="planScheduledType"/>
+        <result column="time_type" property="timeType"/>
+        <result column="plan_status" property="planStatus"/>
+        <result column="org_id" property="orgId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="inspection_complete_time" property="inspectionCompleteTime"/>
+        <result column="inspection_start_time" property="beforeRainSeasonStartTime"/>
+        <result column="inspection_end_time" property="beforeRainSeasonEndTime"/>
+        <result column="before_rain_season_start_time" property="beforeRainSeasonStartTime"/>
+        <result column="before_rain_season_end_time" property="beforeRainSeasonEndTime"/>
+        <result column="rain_season_first_start_time" property="rainSeasonFirstStartTime"/>
+        <result column="rain_season_first_end_time" property="rainSeasonFirstEndTime"/>
+        <result column="rain_season_second_start_time" property="rainSeasonSecondStartTime"/>
+        <result column="rain_season_second_end_time" property="rainSeasonSecondEndTime"/>
+        <result column="plan_desc" property="planDesc"/>
+        <result column="batch_id" property="batchId"/>
+
+    </resultMap>
+
+
+    <resultMap id="inspectionInfoVOResultMap"
+               type="org.springblade.modules.business.xjgd.inspection.vo.InspectionPlanInfoVO">
+        <result column="inspection_id" property="inspectionId"/>
+        <result column="plan_title" property="planTitle"/>
+        <result column="plan_scheduled_type" property="planScheduledType"/>
+        <result column="time_type" property="timeType"/>
+        <result column="plan_status" property="planStatus"/>
+        <result column="org_id" property="orgId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="inspection_complete_time" property="inspectionCompleteTime"/>
+        <result column="inspection_start_time" property="beforeRainSeasonStartTime"/>
+        <result column="inspection_end_time" property="beforeRainSeasonEndTime"/>
+        <result column="before_rain_season_start_time" property="beforeRainSeasonStartTime"/>
+        <result column="before_rain_season_end_time" property="beforeRainSeasonEndTime"/>
+        <result column="rain_season_first_start_time" property="rainSeasonFirstStartTime"/>
+        <result column="rain_season_first_end_time" property="rainSeasonFirstEndTime"/>
+        <result column="rain_season_second_start_time" property="rainSeasonSecondStartTime"/>
+        <result column="rain_season_second_end_time" property="rainSeasonSecondEndTime"/>
+        <result column="plan_desc" property="planDesc"/>
+        <result column="batch_id" property="batchId"/>
+
+    </resultMap>
+
+    <select id="selectPage" resultMap="inspectionInfoVOResultMap">
+        SELECT
+        n.*
+        FROM
+        equipment_inspection_plan n
+        WHERE
+        n.is_deleted = 0
+        <if test="planDTO.planScheduledType!=null">
+            and n.plan_scheduled_type =  #{planDTO.planScheduledType}
+        </if>
+    </select>
+
+
+    <select id="planCount" resultType="java.lang.Long">
+        SELECT
+        count(*)
+        FROM
+        equipment_inspection_plan n
+        WHERE
+        n.is_deleted = 0
+        <if test="planDTO.orgId!=null">
+            and n.org_id = #{planDTO.orgId}
+        </if>
+        <if test="planDTO.planScheduledType!=null">
+            and n.plan_scheduled_type = #{planDTO.planScheduledType}
+        </if>
+
+    </select>
+
+</mapper>

+ 95 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionProcessMapper.java

@@ -0,0 +1,95 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.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.xjgd.inspection.dto.InspectionProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionProcessRecordInfoVO;
+
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface InspectionProcessMapper extends BaseMapper<InspectionProcessRecordInfoEntity> {
+	/**
+	 * 不分页列表
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectList(@Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+	/**
+	 * 自定义分页
+	 *
+	 * @param page   分页
+	 * @param inspectionReportDTO 实体
+	 * @return List<EquipmentInspectionReportVO>
+	 */
+	List<InspectionProcessRecordInfoVO> selectPage(IPage page, @Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 根据年度,汛期类型查询填报设备数量
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	Long equipmentInspectionReportCount(@Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 当天填报列表
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectTodayReportList(@Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	List<InspectionProcessRecordInfoVO> selectTodayReportPage(IPage page, @Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+
+	long todayReportCount(@Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 遗留问题列表,分页
+	 * @param page
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectRemainingproblemsPage(IPage page, @Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 查询当前汛期遗留问题列表
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectRainSeasonRemainingproblemsList(@Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+
+	/**
+	 * 查询当前汛期未关闭遗留问题列表
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectRainSeasonUncolseRemainingproblemsList(@Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+
+	/**
+	 * 查询巡检上报时无网络信号列表
+	 *
+	 * @param page
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectNoNetworkSignalPage(IPage page, @Param("inspectionReportDTO") InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+}

+ 457 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/mapper/InspectionProcessMapper.xml

@@ -0,0 +1,457 @@
+<?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.xjgd.inspection.mapper.InspectionProcessMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderProcessInfoResultMap"
+               type="org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity">
+
+
+        <result column="inspection_id" property="inspectionId"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="location_desc" property="locationDesc"/>
+        <result column="site_check_item" property="siteCheckItem"/>
+        <result column="site_check_photos" property="siteCheckPhotos"/>
+        <result column="site_check_remark" property="siteCheckRemark"/>
+
+        <result column="rain_site_check_item" property="rainSiteCheckItem"/>
+        <result column="rain_site_check_photos" property="rainSiteCheckPhotos"/>
+        <result column="rain_site_check_remark" property="rainSiteCheckRemark"/>
+        <result column="rain_site_check_result" property="rainSiteCheckResult"/>
+
+        <result column="water_site_check_item" property="waterSiteCheckItem"/>
+        <result column="water_site_check_photos" property="waterSiteCheckPhotos"/>
+        <result column="water_site_check_remark" property="waterSiteCheckRemark"/>
+        <result column="water_site_check_result" property="waterSiteCheckResult"/>
+
+        <result column="ground_site_check_item" property="groundSiteCheckItem"/>
+        <result column="ground_site_check_photos" property="groundSiteCheckPhotos"/>
+        <result column="ground_site_check_remark" property="groundSiteCheckRemark"/>
+        <result column="ground_site_check_result" property="groundSiteCheckResult"/>
+
+        <result column="other_equipment_check_item" property="otherEquipmentCheckItem"/>
+        <result column="other_equipment_check_photos" property="otherEquipmentCheckPhotos"/>
+        <result column="other_equipment_check_remark" property="otherEquipmentCheckRemark"/>
+        <result column="other_equipment_check_result" property="otherEquipmentCheckResult"/>
+
+        <result column="rtu_replace" property="rtuReplace"/>
+        <result column="rtu_model_remark" property="rtuModelRemark"/>
+        <result column="rtu_replace_photos" property="rtuReplacePhotos"/>
+        <result column="rain_sensor_replace" property="rainSensorReplace"/>
+        <result column="rain_sensor_model_remark" property="rainSensorModelRemark"/>
+        <result column="rain_sensor_replace_photos" property="rainSensorReplacePhotos"/>
+        <result column="water_sensor_replace" property="waterSensorReplace"/>
+        <result column="water_sensor_model_remark" property="waterSensorModelRemark"/>
+        <result column="water_sensor_replace_photos" property="waterSensorReplacePhotos"/>
+        <result column="ground_sensor_replace" property="groundSensorReplace"/>
+        <result column="ground_sensor_model_remark" property="groundSensorModelRemark"/>
+        <result column="ground_sensor_replace_photos" property="groundSensorReplacePhotos"/>
+        <result column="battery_replace" property="batteryReplace"/>
+        <result column="battery_model_remark" property="batteryModelRemark"/>
+        <result column="battery_replace_photos" property="batteryReplacePhotos"/>
+        <result column="sun_power_replace" property="sunPowerReplace"/>
+        <result column="sun_power_model_remark" property="sunPowerModelRemark"/>
+        <result column="sun_power_replace_photos" property="sunPowerReplacePhotos"/>
+        <result column="battery_controller_replace" property="batteryControllerReplace"/>
+        <result column="battery_controller_model_remark" property="batteryControllerModelRemark"/>
+        <result column="battery_controller_replace_photos" property="batteryControllerReplacePhotos"/>
+        <result column="other_equipment_replace" property="otherEquipmentReplace"/>
+        <result column="other_equipment_replace_remark" property="otherEquipmentCheckRemark"/>
+        <result column="other_equipment_replace_photos" property="otherEquipmentReplacePhotos"/>
+
+        <result column="remain_question" property="remainQuestion"/>
+        <result column="remain_question_state" property="remainQuestionState"/>
+        <result column="remain_question_resolution" property="remainQuestionResolution"/>
+        <result column="inspection_work_photos" property="inspectionWorkPhotos"/>
+
+        <result column="rain_season_kind" property="rainSeasonKind"/>
+
+        <result column="network_signal_status" property="networkSignalStatus"/>
+        <result column="photo_supplement_submit_status" property="photoSupplementSubmitStatus"/>
+
+        <result column="network_sim_id" property="networkSimId"/>
+        <result column="network_payer" property="networkPayer"/>
+
+        <result column="inspection_desc" property="inspectionDesc"/>
+
+        <result column="inspection_videos" property="inspectionVideos"/>
+    </resultMap>
+
+
+    <resultMap id="reportVOResultMap"
+               type="org.springblade.modules.business.xjgd.inspection.vo.InspectionProcessRecordInfoVO">
+
+        <result column="inspection_id" property="inspectionId"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="location_desc" property="locationDesc"/>
+        <result column="site_check_item" property="siteCheckItem"/>
+        <result column="site_check_photos" property="siteCheckPhotos"/>
+        <result column="site_check_remark" property="siteCheckRemark"/>
+
+        <result column="rain_site_check_item" property="rainSiteCheckItem"/>
+        <result column="rain_site_check_photos" property="rainSiteCheckPhotos"/>
+        <result column="rain_site_check_remark" property="rainSiteCheckRemark"/>
+        <result column="rain_site_check_result" property="rainSiteCheckResult"/>
+
+        <result column="water_site_check_item" property="waterSiteCheckItem"/>
+        <result column="water_site_check_photos" property="waterSiteCheckPhotos"/>
+        <result column="water_site_check_remark" property="waterSiteCheckRemark"/>
+        <result column="water_site_check_result" property="waterSiteCheckResult"/>
+
+        <result column="ground_site_check_item" property="groundSiteCheckItem"/>
+        <result column="ground_site_check_photos" property="groundSiteCheckPhotos"/>
+        <result column="ground_site_check_remark" property="groundSiteCheckRemark"/>
+        <result column="ground_site_check_result" property="groundSiteCheckResult"/>
+
+        <result column="other_equipment_check_item" property="otherEquipmentCheckItem"/>
+        <result column="other_equipment_check_photos" property="otherEquipmentCheckPhotos"/>
+        <result column="other_equipment_check_remark" property="otherEquipmentCheckRemark"/>
+        <result column="other_equipment_check_result" property="otherEquipmentCheckResult"/>
+
+        <result column="rtu_replace" property="rtuReplace"/>
+        <result column="rtu_model_remark" property="rtuModelRemark"/>
+        <result column="rtu_replace_photos" property="rtuReplacePhotos"/>
+        <result column="rain_sensor_replace" property="rainSensorReplace"/>
+        <result column="rain_sensor_model_remark" property="rainSensorModelRemark"/>
+        <result column="rain_sensor_replace_photos" property="rainSensorReplacePhotos"/>
+        <result column="water_sensor_replace" property="waterSensorReplace"/>
+        <result column="water_sensor_model_remark" property="waterSensorModelRemark"/>
+        <result column="water_sensor_replace_photos" property="waterSensorReplacePhotos"/>
+        <result column="ground_sensor_replace" property="groundSensorReplace"/>
+        <result column="ground_sensor_model_remark" property="groundSensorModelRemark"/>
+        <result column="ground_sensor_replace_photos" property="groundSensorReplacePhotos"/>
+        <result column="battery_replace" property="batteryReplace"/>
+        <result column="battery_model_remark" property="batteryModelRemark"/>
+        <result column="battery_replace_photos" property="batteryReplacePhotos"/>
+        <result column="sun_power_replace" property="sunPowerReplace"/>
+        <result column="sun_power_model_remark" property="sunPowerModelRemark"/>
+        <result column="sun_power_replace_photos" property="sunPowerReplacePhotos"/>
+        <result column="battery_controller_replace" property="batteryControllerReplace"/>
+        <result column="battery_controller_model_remark" property="batteryControllerModelRemark"/>
+        <result column="battery_controller_replace_photos" property="batteryControllerReplacePhotos"/>
+        <result column="other_equipment_replace" property="otherEquipmentReplace"/>
+        <result column="other_equipment_replace_remark" property="otherEquipmentCheckRemark"/>
+        <result column="other_equipment_replace_photos" property="otherEquipmentReplacePhotos"/>
+
+        <result column="remain_question" property="remainQuestion"/>
+        <result column="remain_question_state" property="remainQuestionState"/>
+        <result column="remain_question_resolution" property="remainQuestionResolution"/>
+        <result column="inspection_work_photos" property="inspectionWorkPhotos"/>
+
+        <result column="rain_season_kind" property="rainSeasonKind"/>
+
+
+        <result column="rtu_name" property="rtuName"/>
+        <result column="real_name" property="servicePersonName"/>
+        <result column="ad_city" property="adCity"/>
+        <result column="ad_dist" property="adDist"/>
+        <result column="is_rain" property="isRain"/>
+        <result column="isRiver" property="isRiver"/>
+        <result column="isRiver" property="isRes"/>
+        <result column="is_ground" property="isGround"/>
+        <result column="is_camera" property="isCamera"/>
+        <result column="ancestors" property="ancestors"/>
+        <result column="adcd" property="adCode"/>
+
+        <result column="network_signal_status" property="networkSignalStatus"/>
+        <result column="photo_supplement_submit_status" property="photoSupplementSubmitStatus"/>
+
+        <result column="network_sim_id" property="networkSimId"/>
+        <result column="network_payer" property="networkPayer"/>
+
+        <result column="inspection_desc" property="inspectionDesc"/>
+
+        <result column="inspection_videos" property="inspectionVideos"/>
+    </resultMap>
+
+    <select id="selectList" resultMap="reportVOResultMap">
+        SELECT
+        r.*,u.real_name
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info i ON i.rtu_code = r.rtu_code and i.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = r.create_user and u.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        <if test="inspectionReportDTO.inspectionId!=null">
+            and r.inspection_id = #{inspectionReportDTO.inspectionId}
+        </if>
+        <if test="inspectionReportDTO.rtuCode!=null">
+            and r.rtu_code = #{inspectionReportDTO.rtuCode}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearStartDate!=null">
+            and r.create_time &gt;= #{inspectionReportDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearEndDate!=null">
+            and r.create_time &lt; #{inspectionReportDTO.inspectionYearEndDate}
+        </if>
+        <if test="inspectionReportDTO.adCode!=null">
+            and (i.ad_code =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+        order by r.create_time
+    </select>
+
+    <select id="selectPage" resultMap="reportVOResultMap">
+        SELECT
+        r.*, rtu.rtu_name,u.real_name,rtu.ad_city,rtu.ad_dist,rtu.is_rain,rtu.is_river,rtu.is_res,rtu.is_ground,rtu.is_rain,rtu.is_river,rtu.is_res,rtu.is_ground
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info rtu ON rtu.rtu_code = r.rtu_code and rtu.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = r.create_user and u.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = rtu.ad_code and a.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        <if test="inspectionReportDTO.createUser!=null">
+            and r.create_user =#{inspectionReportDTO.createUser}
+        </if>
+        <if test="inspectionReportDTO.rtuName!=null">
+            and rtu.rtu_name like concat(concat('%', #{inspectionReportDTO.rtuName}), '%')
+        </if>
+        <if test="inspectionReportDTO.rtuCode!=null">
+            and r.rtu_code like concat(concat('%', #{inspectionReportDTO.rtuCode}), '%')
+        </if>
+        <if test="inspectionReportDTO.rainSeasonKind!=null">
+            and r.rain_season_kind = #{inspectionReportDTO.rainSeasonKind}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearStartDate!=null">
+            and r.create_time &gt;= #{inspectionReportDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearEndDate!=null">
+            and r.create_time &lt; #{inspectionReportDTO.inspectionYearEndDate}
+        </if>
+        <if test="inspectionReportDTO.adCode!=null">
+            and (a.adcd =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+        order by r.create_time DESC,rtu.rtu_code ASC
+    </select>
+
+    <select id="equipmentInspectionReportCount" resultType="java.lang.Long">
+        SELECT
+        count(*)
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info i ON r.rtu_code = i.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        <if test="inspectionReportDTO.rainSeasonKind!=null">
+            and r.rain_season_kind = #{inspectionReportDTO.rainSeasonKind}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearStartDate!=null">
+            and r.create_time &gt;= #{inspectionReportDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearEndDate!=null">
+            and r.create_time &lt; #{inspectionReportDTO.inspectionYearEndDate}
+        </if>
+        <if test="inspectionReportDTO.adCode!=null">
+            and (a.adcd =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+
+    </select>
+
+    <select id="selectTodayReportList" resultMap="reportVOResultMap">
+        SELECT
+        r.*, rtu.rtu_name,rtu.org_id,rtu.project_id,u.real_name,rtu.ad_city,rtu.ad_dist,a.adcd,a.ancestors,rtu.is_rain,rtu.is_river,rtu.is_res,rtu.is_ground
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info rtu ON rtu.rtu_code = r.rtu_code
+        LEFT JOIN data_ad_cd_b a ON a.adcd = rtu.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = r.create_user
+        WHERE
+        r.is_deleted = 0
+        <if test="inspectionReportDTO.createTime!=null ">
+            and DATE_FORMAT(r.create_time,'%Y-%m-%d') = DATE_FORMAT(#{inspectionReportDTO.createTime},'%Y-%m-%d')
+        </if>
+        <if test="inspectionReportDTO.rtuCode!=null">
+            and rtu.rtu_code like concat(concat('%', #{inspectionReportDTO.rtuCode}), '%')
+        </if>
+        <if test="inspectionReportDTO.rtuName!=null">
+            and rtu.rtu_name like concat(concat('%', #{inspectionReportDTO.rtuName}), '%')
+        </if>
+        <if test="inspectionReportDTO.adCode!=null">
+            and (a.adcd =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+        order by r.create_time desc
+    </select>
+
+    <select id="selectTodayReportPage" resultMap="reportVOResultMap">
+        SELECT
+        r.*, rtu.rtu_name,rtu.org_id,rtu.project_id,u.real_name,rtu.ad_city,rtu.ad_dist,a.adcd,a.ancestors,rtu.is_rain,rtu.is_river,rtu.is_res,rtu.is_ground
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info rtu ON rtu.rtu_code = r.rtu_code
+        LEFT JOIN data_ad_cd_b a ON a.adcd = rtu.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = r.create_user
+        WHERE
+        r.is_deleted = 0
+        <if test="inspectionReportDTO.createTime!=null ">
+            and DATE_FORMAT(r.create_time,'%Y-%m-%d') = DATE_FORMAT(#{inspectionReportDTO.createTime},'%Y-%m-%d')
+        </if>
+        <if test="inspectionReportDTO.rtuCode!=null">
+            and rtu.rtu_code like concat(concat('%', #{inspectionReportDTO.rtuCode}), '%')
+        </if>
+        <if test="inspectionReportDTO.rtuName!=null">
+            and rtu.rtu_name like concat(concat('%', #{inspectionReportDTO.rtuName}), '%')
+        </if>
+        <if test="inspectionReportDTO.adCode!=null">
+            and (a.adcd =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+        order by r.create_time desc
+    </select>
+
+
+    <select id="todayReportCount" resultType="java.lang.Long">
+        select count(*) from
+        ( SELECT
+        r.rtu_code
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info rtu ON rtu.rtu_code = r.rtu_code
+        LEFT JOIN data_ad_cd_b a ON a.adcd = rtu.ad_code and a.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        <if test="inspectionReportDTO.createTime!=null ">
+            and DATE_FORMAT(r.create_time,'%Y-%m-%d') = DATE_FORMAT(#{inspectionReportDTO.createTime},'%Y-%m-%d')
+        </if>
+
+        <if test="inspectionReportDTO.adCode!=null">
+            and (a.adcd =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+         group by r.rtu_code ) s
+
+    </select>
+
+    <select id="selectRemainingproblemsPage" resultMap="reportVOResultMap">
+        SELECT
+        r.*, rtu.rtu_name,u.real_name,rtu.ad_city,rtu.ad_dist,rtu.is_rain,rtu.is_river,rtu.is_res,rtu.is_ground
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info rtu ON rtu.rtu_code = r.rtu_code and rtu.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = rtu.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = r.create_user and u.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        and (r.remain_question_state = 1 or r.remain_question_state = 2)
+        <if test="inspectionReportDTO.rtuName!=null">
+            and rtu.rtu_name like concat(concat('%', #{inspectionReportDTO.rtuName}), '%')
+        </if>
+        <if test="inspectionReportDTO.rtuCode!=null">
+            and r.rtu_code like concat(concat('%', #{inspectionReportDTO.rtuCode}), '%')
+        </if>
+        <if test="inspectionReportDTO.rainSeasonKind!=null">
+            and r.rain_season_kind = #{inspectionReportDTO.rainSeasonKind}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearStartDate!=null">
+            and r.create_time &gt;= #{inspectionReportDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearEndDate!=null">
+            and r.create_time &lt; #{inspectionReportDTO.inspectionYearEndDate}
+        </if>
+        <if test="inspectionReportDTO.adCode!=null">
+            and (a.adcd =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+        order by r.remain_question_resolution , r.create_time DESC,rtu.rtu_code ASC
+    </select>
+
+    <select id="selectRainSeasonRemainingproblemsList" resultMap="reportVOResultMap">
+        SELECT
+        r.*, rtu.rtu_name,rtu.org_id,dept.dept_name AS org_name,u.real_name,rtu.ad_city,rtu.ad_dist,rtu.is_rain,rtu.is_river,rtu.is_res,rtu.is_ground
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info rtu ON rtu.rtu_code = r.rtu_code and rtu.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = r.create_user and u.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = rtu.ad_code and a.is_deleted=0
+        LEFT JOIN blade_dept dept ON dept.id = rtu.org_id and dept.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        and (r.remain_question_state = 1 or r.remain_question_state = 2)
+        <if test="inspectionReportDTO.rainSeasonKind!=null">
+            and r.rain_season_kind = #{inspectionReportDTO.rainSeasonKind}
+        </if>
+        <if test="inspectionReportDTO.adCode!=null">
+            and (a.adcd =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+        order by r.remain_question_state ASC,r.create_time DESC,rtu.rtu_code ASC
+    </select>
+
+    <select id="selectRainSeasonUncolseRemainingproblemsList" resultMap="reportVOResultMap">
+        SELECT
+        r.*, rtu.rtu_name,rtu.org_id,dept.dept_name AS org_name,u.real_name,rtu.ad_city,rtu.ad_dist,rtu.is_rain,rtu.is_river,rtu.is_res,rtu.is_ground
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info rtu ON rtu.rtu_code = r.rtu_code and rtu.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = r.create_user and u.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = rtu.ad_code and a.is_deleted=0
+        LEFT JOIN blade_dept dept ON dept.id = rtu.org_id and dept.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        and r.remain_question_state = 1
+
+        <if test="inspectionReportDTO.rainSeasonKind!=null">
+            and r.rain_season_kind = #{inspectionReportDTO.rainSeasonKind}
+        </if>
+
+        <if test="inspectionReportDTO.adCode!=null">
+            and (a.adcd =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+        order by r.remain_question_state ASC,r.create_time DESC,rtu.rtu_code ASC
+    </select>
+
+    <select id="selectNoNetworkSignalPage" resultMap="reportVOResultMap">
+
+        SELECT
+        r.*, rtu.rtu_name,u.real_name,rtu.ad_city,rtu.ad_dist,rtu.is_rain,rtu.is_river,rtu.is_res,rtu.is_ground
+        FROM
+        equipment_inspection_report_info r
+        LEFT JOIN rtu_info rtu ON rtu.rtu_code = r.rtu_code and rtu.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = r.create_user and u.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = rtu.ad_code and a.is_deleted=0
+        WHERE
+        r.is_deleted = 0
+        and r.network_signal_status = 1
+        <if test="inspectionReportDTO.rtuName!=null">
+            and rtu.rtu_name like concat(concat('%', #{inspectionReportDTO.rtuName}), '%')
+        </if>
+        <if test="inspectionReportDTO.rtuCode!=null">
+            and r.rtu_code like concat(concat('%', #{inspectionReportDTO.rtuCode}), '%')
+        </if>
+        <if test="inspectionReportDTO.rainSeasonKind!=null">
+            and r.rain_season_kind = #{inspectionReportDTO.rainSeasonKind}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearStartDate!=null">
+            and r.create_time &gt;= #{inspectionReportDTO.inspectionYearStartDate}
+        </if>
+        <if test="inspectionReportDTO.inspectionYearEndDate!=null">
+            and r.create_time &lt; #{inspectionReportDTO.inspectionYearEndDate}
+        </if>
+        <if test="inspectionReportDTO.adCode!=null">
+            and (rtu.ad_code =#{inspectionReportDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{inspectionReportDTO.adCode}), '%')))
+        </if>
+        order by  r.photo_supplement_submit_status ASC,r.create_time ASC,rtu.rtu_code ASC
+    </select>
+</mapper>

+ 33 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/service/IInspectionPlanService.java

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

+ 102 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/service/IInspectionProcessService.java

@@ -0,0 +1,102 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+
+import org.springblade.modules.business.xjgd.inspection.dto.InspectionProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionProcessRecordInfoVO;
+
+import java.util.List;
+
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IInspectionProcessService extends BaseService<InspectionProcessRecordInfoEntity> {
+	/**
+	 * 不分页列表
+	 *
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectList(InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param reportDTO
+	 * @return
+	 */
+	IPage<InspectionProcessRecordInfoVO> selectPage(IPage<InspectionProcessRecordInfoVO> page, InspectionProcessRecordInfoDTO reportDTO);
+
+	/**
+	 * 根据年度,汛期类型查询填报设备数量
+	 *
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	Long equipmentInspectionReportCount(InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 当前填报列表
+	 *
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectTodayReportList(InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+
+	IPage<InspectionProcessRecordInfoVO> selectTodayReportPage(IPage<InspectionProcessRecordInfoVO> page, InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+
+	long todayReportCount(InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 查询巡检上报中有遗留问题的巡检信息
+	 *
+	 * @param page
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	IPage<InspectionProcessRecordInfoVO> selectRemainingproblemsPage(IPage<InspectionProcessRecordInfoVO> page, InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 查询当前汛期遗留问题列表
+	 *
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectRainSeasonRemainingproblemsList(InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+	/**
+	 * 查询当前汛期未关闭遗留问题列表
+	 *
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	List<InspectionProcessRecordInfoVO> selectRainSeasonUncolseRemainingproblemsList(InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+
+	/**
+	 * 查询巡检上报时无网络信号列表
+	 *
+	 * @param page
+	 * @param inspectionReportDTO
+	 * @return
+	 */
+	IPage<InspectionProcessRecordInfoVO> selectNoNetworkSignalPage(IPage<InspectionProcessRecordInfoVO> page, InspectionProcessRecordInfoDTO inspectionReportDTO);
+
+}

+ 73 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/service/IInspectionService.java

@@ -0,0 +1,73 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+
+import org.springblade.modules.business.xjgd.inspection.dto.InspectionInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionInfoVO;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IInspectionService extends BaseService<InspectionInfoEntity> {
+
+	List<InspectionInfoVO> todoInspectionList(InspectionInfoDTO inspectionInfoDTO);
+
+//	List<EquipmentInspectionStatisticsVO> inspectionReportCount(EquipmentInspectionInfoDTO inspectionInfoDTO);
+
+	/**
+	 * 本年度巡检过的设备数量
+	 * @param inspectionInfoDTO
+	 * @return
+	 */
+	Long inspectionCount(InspectionInfoDTO inspectionInfoDTO);
+
+
+	/**
+	 * 按页查询
+	 * @param page
+	 * @param inspectionInfoDTO
+	 * @return
+	 */
+	IPage<InspectionInfoVO> selectPage(IPage<InspectionInfoVO> page, InspectionInfoDTO inspectionInfoDTO);
+
+	/**
+	 * 查询需要巡检的测站列表
+	 * @param page
+	 * @param inspectionInfoDTO
+	 * @return
+	 */
+	IPage<InspectionInfoVO> selectRtuPage(IPage<InspectionInfoVO> page, InspectionInfoDTO inspectionInfoDTO);
+
+
+	/**
+	 * 按页查询未完成巡检设备清单信息表
+	 * @param page
+	 * @param inspectionInfoDTO
+	 * @return
+	 */
+	IPage<InspectionInfoVO> selectUnfinishedInspectionEquipmentPage(IPage<InspectionInfoVO> page, InspectionInfoDTO inspectionInfoDTO);
+
+	/**
+	 * 查询所有未完成巡检设备清单信息表
+	 * @param inspectionInfoDTO
+	 * @return
+	 */
+	List<InspectionInfoVO> selectUnfinishedInspectionEquipmentList(InspectionInfoDTO inspectionInfoDTO);
+
+}

+ 89 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/service/impl/InspectionPlanServiceImpl.java

@@ -0,0 +1,89 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.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.xjgd.inspection.dto.InspectionPlanInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionPlanInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.mapper.InspectionPlanMapper;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionPlanService;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionPlanInfoVO;
+import org.springframework.stereotype.Service;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class InspectionPlanServiceImpl extends BaseServiceImpl<InspectionPlanMapper, InspectionPlanInfoEntity> implements IInspectionPlanService {
+
+
+    @Override
+    public IPage<InspectionPlanInfoVO> selectPage(IPage<InspectionPlanInfoVO> page, InspectionPlanInfoDTO dto) {
+        return page.setRecords(baseMapper.selectPage(page, dto));
+    }
+
+    @Override
+    public InspectionPlanInfoEntity yearPlan() {
+        LambdaQueryWrapper<InspectionPlanInfoEntity> wrapper = Wrappers.<InspectionPlanInfoEntity>query().lambda();
+        wrapper.eq(InspectionPlanInfoEntity::getIsDeleted, 0);
+        wrapper.orderByDesc(InspectionPlanInfoEntity::getCreateTime);
+        wrapper.last("limit 1");
+        return baseMapper.selectOne(wrapper);
+    }
+
+    @Override
+    public InspectionPlanInfoEntity getPlanInfo() {
+        LambdaQueryWrapper<InspectionPlanInfoEntity> wrapper = Wrappers.<InspectionPlanInfoEntity>query().lambda();
+        wrapper.eq(InspectionPlanInfoEntity::getIsDeleted, 0);
+        wrapper.orderByDesc(InspectionPlanInfoEntity::getCreateTime);
+        List<InspectionPlanInfoEntity> list = this.list(wrapper);
+        if (null != list && list.size() > 0) {
+            return list.get(0);
+        } else {
+            InspectionPlanInfoEntity entity = new InspectionPlanInfoEntity();
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(new Date());
+            calendar.set(Calendar.MONTH, 4 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            entity.setBeforeRainSeasonStartTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 6 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            entity.setBeforeRainSeasonEndTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 6 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            entity.setRainSeasonFirstStartTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 8 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 15);
+            entity.setRainSeasonFirstEndTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 8 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 15);
+            entity.setRainSeasonSecondStartTime(calendar.getTime());
+            calendar.set(Calendar.MONTH, 10 - 1);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            entity.setRainSeasonSecondEndTime(calendar.getTime());
+            return entity;
+        }
+    }
+
+    @Override
+    public Long planCount(InspectionPlanInfoDTO dto) {
+        return baseMapper.planCount(dto);
+    }
+}

+ 80 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/service/impl/InspectionProcessServiceImpl.java

@@ -0,0 +1,80 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+
+import org.springblade.modules.business.xjgd.inspection.dto.InspectionProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.mapper.InspectionProcessMapper;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionProcessService;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionProcessRecordInfoVO;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class InspectionProcessServiceImpl extends BaseServiceImpl<InspectionProcessMapper, InspectionProcessRecordInfoEntity> implements IInspectionProcessService {
+	@Override
+	public List<InspectionProcessRecordInfoVO> selectList(InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		return baseMapper.selectList(inspectionReportDTO);
+	}
+
+	@Override
+	public IPage<InspectionProcessRecordInfoVO> selectPage(IPage<InspectionProcessRecordInfoVO> page, InspectionProcessRecordInfoDTO reportDTO) {
+		return page.setRecords(baseMapper.selectPage(page, reportDTO));
+	}
+
+	@Override
+	public Long equipmentInspectionReportCount(InspectionProcessRecordInfoDTO reportDTO) {
+		return baseMapper.equipmentInspectionReportCount(reportDTO);
+	}
+
+	@Override
+	public List<InspectionProcessRecordInfoVO> selectTodayReportList(InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		return baseMapper.selectTodayReportList(inspectionReportDTO);
+	}
+
+	@Override
+	public IPage<InspectionProcessRecordInfoVO> selectTodayReportPage(IPage<InspectionProcessRecordInfoVO> page, InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		return page.setRecords(baseMapper.selectTodayReportPage(page, inspectionReportDTO));
+	}
+
+	@Override
+	public long todayReportCount(InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		return baseMapper.todayReportCount(inspectionReportDTO);
+	}
+
+	@Override
+	public IPage<InspectionProcessRecordInfoVO> selectRemainingproblemsPage(IPage<InspectionProcessRecordInfoVO> page, InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		return page.setRecords(baseMapper.selectRemainingproblemsPage(page, inspectionReportDTO));
+	}
+
+	@Override
+	public List<InspectionProcessRecordInfoVO> selectRainSeasonRemainingproblemsList(InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		return baseMapper.selectRainSeasonRemainingproblemsList(inspectionReportDTO);
+	}
+
+	@Override
+	public List<InspectionProcessRecordInfoVO> selectRainSeasonUncolseRemainingproblemsList(InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		return baseMapper.selectRainSeasonUncolseRemainingproblemsList(inspectionReportDTO);
+	}
+
+	@Override
+	public IPage<InspectionProcessRecordInfoVO> selectNoNetworkSignalPage(IPage<InspectionProcessRecordInfoVO> page, InspectionProcessRecordInfoDTO inspectionReportDTO) {
+		return page.setRecords(baseMapper.selectNoNetworkSignalPage(page, inspectionReportDTO));
+	}
+}

+ 69 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/service/impl/InspectionServiceImpl.java

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

+ 175 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/vo/InspectionInfoVO.java

@@ -0,0 +1,175 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class InspectionInfoVO extends InspectionInfoEntity {
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty(value = "测站名称")
+	private String rtuName;
+
+	/**
+	 * 汛前填报人名称
+	 */
+	@ApiModelProperty(value = "汛前填报人名称")
+	private String beforeRainSeasonReportUserName;
+
+	/**
+	 * 第一次汛中填报人名称
+	 */
+	@ApiModelProperty(value = "第一次汛中填报人名称")
+	private String rainSeasonFirstReportUserName;
+
+	/**
+	 * 第二次汛中填报人名称
+	 */
+	@ApiModelProperty(value = "第二次汛中填报人名称")
+	private String rainSeasonSecondReportUserName;
+
+	/**
+	 * 所属盟市
+	 */
+	@ApiModelProperty(value = "所属盟市")
+	private String adCity;
+
+	/**
+	 * 所属盟县旗区
+	 */
+	@ApiModelProperty(value = "所属盟县旗区")
+	private String adDist;
+
+	/**
+	 * 是否雨量站
+	 */
+	@ApiModelProperty(value = "是否雨量站")
+	private Integer isRain;
+
+	/**
+	 * 是否河道站
+	 */
+	@ApiModelProperty(value = "是否河道站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isRiver;
+
+	/**
+	 * 是否水库站
+	 */
+	@ApiModelProperty(value = "是否水库站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isRes;
+
+	/**
+	 * 是否墒情站
+	 */
+	@ApiModelProperty(value = "是否墒情站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isGround;
+
+	/**
+	 * 是否视频站
+	 */
+	@ApiModelProperty(value = "是否视频站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isVideo;
+
+	/**
+	 * 测站位置说明
+	 */
+	@ApiModelProperty(value = "测站位置说明")
+	private String locationDesc;
+
+	/**
+	 * 经度
+	 */
+	@ApiModelProperty(value = "经度")
+	private String lng;
+
+	/**
+	 * 纬度
+	 */
+	@ApiModelProperty(value = "纬度")
+	private String lat;
+
+	/**
+	 * 测站类型概要
+	 */
+	@ApiModelProperty(value = "测站类型概要")
+	private String rtuKindDesc;
+
+	/**
+	 * 计划执行周期 1 仅一次 1 周期性
+	 */
+	@ApiModelProperty("计划执行周期")
+	private Integer planScheduledType;
+
+	/**
+	 * 时间周期类型 1 按天 2 按周 2 按月
+	 */
+	@ApiModelProperty("时间周期类型")
+	private Integer timeType;
+
+	/**
+	 * 巡检完成时限
+	 */
+	@ApiModelProperty("巡检完成时限")
+	@DateTimeFormat(
+			pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+			pattern = "yyyy-MM-dd",timezone = "GMT+8"
+	)
+	private Date inspectionCompleteTime;
+
+
+	/**
+	 * 处理人
+	 */
+	@ApiModelProperty("处理人")
+	private String servicePersonName;
+
+	/**
+	 * 处理时间
+	 */
+	@ApiModelProperty("处理时间")
+	@DateTimeFormat(
+			pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+			pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8"
+	)
+	private Date inspectionReportTime;
+
+	/**
+	 * 填报列表
+	 */
+	private List<InspectionProcessRecordInfoVO> reportList;
+}

+ 27 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/vo/InspectionPlanInfoVO.java

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

+ 167 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/vo/InspectionProcessRecordInfoVO.java

@@ -0,0 +1,167 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+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)
+public class InspectionProcessRecordInfoVO extends InspectionProcessRecordInfoEntity {
+
+	/**
+	 * 是否雨量站
+	 */
+	@ApiModelProperty(value = "是否雨量站")
+	private Integer isRain;
+
+	/**
+	 * 是否河道站
+	 */
+	@ApiModelProperty(value = "是否河道站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isRiver;
+
+	/**
+	 * 是否水库站
+	 */
+	@ApiModelProperty(value = "是否水库站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isRes;
+
+	/**
+	 * 是否墒情站
+	 */
+	@ApiModelProperty(value = "是否墒情站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isGround;
+
+	/**
+	 * 视频站
+	 */
+	@ApiModelProperty("视频站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isCamera;
+
+	/**
+	 * 水位计型号
+	 */
+	@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;
+
+	/**
+	 * 处理人
+	 */
+	@ApiModelProperty("处理人")
+	private String servicePersonName;
+
+	/**
+	 * 处理时间
+	 */
+	@ApiModelProperty("处理时间")
+	@DateTimeFormat(
+			pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+			pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8"
+	)
+	private Date inspectionReportTime;
+
+	/**
+	 * 机构名称
+	 */
+	@ApiModelProperty(value = "机构名称")
+	private String orgName;
+
+	/**
+	 * 所属盟市
+	 */
+	@ApiModelProperty(value = "所属盟市")
+	private String adCity;
+
+	/**
+	 * 所属盟县旗区
+	 */
+	@ApiModelProperty(value = "所属盟县旗区")
+	private String adDist;
+
+	/**
+	 * 行政区
+	 */
+	@ApiModelProperty(value = "行政区")
+	private String areaName;
+
+	/**
+	 * 巡检年度
+	 */
+	@ApiModelProperty("巡检年度")
+	private String inspectionYear;
+
+	/**
+	 * 行政区划索引
+	 */
+	@ApiModelProperty(value = "行政区划索引")
+	private String ancestors;
+
+	/**
+	 * 行政区划编码
+	 */
+	@ApiModelProperty(value = "行政区划编码")
+	private String adCode;
+
+	/**
+	 * 运维单位
+	 */
+	@ApiModelProperty(value = "运维单位")
+	private String manageCompany;
+}

+ 35 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/wrapper/InspectionPlanWrapper.java

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

+ 148 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/wrapper/InspectionProcessWrapper.java

@@ -0,0 +1,148 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.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.core.tool.utils.SpringUtil;
+import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
+import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
+
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionProcessRecordInfoVO;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IDeptService;
+import org.springblade.modules.system.service.IUserService;
+
+import java.util.Objects;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+
+public class InspectionProcessWrapper extends BaseEntityWrapper<InspectionProcessRecordInfoEntity, InspectionProcessRecordInfoVO> {
+    public static InspectionProcessWrapper build() {
+        return new InspectionProcessWrapper();
+    }
+
+    private static IRtuBaseInfoService rtuBaseInfoService;
+
+    private static IRtuBaseInfoService getRtuBaseInfoService() {
+        if (rtuBaseInfoService == null) {
+            rtuBaseInfoService = SpringUtil.getBean(IRtuBaseInfoService.class);
+        }
+        return rtuBaseInfoService;
+    }
+
+    private static IDeptRegionService deptRegionService;
+
+    private static IDeptRegionService getDeptRegionService() {
+        if (deptRegionService == null) {
+            deptRegionService = SpringUtil.getBean(IDeptRegionService.class);
+        }
+        return deptRegionService;
+    }
+
+    private static IDeptService deptService;
+
+    private static IDeptService getDeptService() {
+        if (deptService == null) {
+            deptService = SpringUtil.getBean(IDeptService.class);
+        }
+        return deptService;
+    }
+
+    private static IUserService userService;
+
+    private static IUserService getUserService() {
+        if (userService == null) {
+            userService = SpringUtil.getBean(IUserService.class);
+        }
+        return userService;
+    }
+
+    @Override
+    public InspectionProcessRecordInfoVO entityVO(InspectionProcessRecordInfoEntity entity) {
+        InspectionProcessRecordInfoVO vo = Objects.requireNonNull(BeanUtil.copy(entity, InspectionProcessRecordInfoVO.class));
+        return entityVO(vo);
+    }
+
+    public InspectionProcessRecordInfoVO entityVO(InspectionProcessRecordInfoVO vo) {
+        if (Func.isNull(vo.getServicePersonName())) {
+            User user = getUserService().getById(vo.getCreateUser());
+            vo.setServicePersonName(user.getRealName());
+        }
+
+//		LambdaQueryWrapper<RtuInfoEntity> rtuwrapper = Wrappers.<RtuInfoEntity>query().lambda();
+//		rtuwrapper.eq(RtuInfoEntity::getIsDeleted, 0L);
+//		rtuwrapper.eq(RtuInfoEntity::getRtuCode, vo.getRtuCode());
+//		RtuInfoEntity rtuInfoEntity = getRtuBaseInfoService().getOne(rtuwrapper);
+//		vo.setRtuName(rtuInfoEntity.getRtuName());
+//		DictBiz biz = DictBizCache.getById(vo.getWaterSensorType());
+//		if (null != biz) {
+//			vo.setWaterSensorTypeText(biz.getDictValue());
+//		}
+//		biz = DictBizCache.getById(vo.getGroundSensorType());
+//		if (null != biz) {
+//			vo.setGroundSensorTypeText(biz.getDictValue());
+//		}
+//		biz = DictBizCache.getById(vo.getSatelliteModel());
+//		if (null != biz) {
+//			vo.setSatelliteModelText(biz.getDictValue());
+//		}
+//		LambdaQueryWrapper<RtuInfoEntity> rtuwrapper = Wrappers.<RtuInfoEntity>query().lambda();
+//		rtuwrapper.eq(RtuInfoEntity::getIsDeleted, 0);
+//		rtuwrapper.eq(RtuInfoEntity::getRtuCode, vo.getRtuCode());
+//		RtuInfoEntity rtuInfoEntity = getRtuBaseInfoService().getOne(rtuwrapper);
+//
+//		vo.setRtuName(rtuInfoEntity.getRtuName());
+//		vo.setIsRain(rtuInfoEntity.getIsRain());
+//		vo.setIsRes(rtuInfoEntity.getIsRes());
+//		vo.setIsRiver(rtuInfoEntity.getIsRiver());
+//		vo.setIsGround(rtuInfoEntity.getIsGround());
+//
+//		vo.setAdCity(rtuInfoEntity.getAdCity());
+//		vo.setAdDist(rtuInfoEntity.getAdDist());
+//
+//		String ancestors = vo.getAncestors();
+//		if (null != ancestors && ancestors.length() > 0) {
+//			String[] ancestorsList = ancestors.split(",");
+//			String adCode;
+//			if (ancestorsList.length >= 3) {
+//				adCode = ancestorsList[2];
+//			} else {
+//				adCode = vo.getAdCode();
+//			}
+//			if (null != adCode) {
+//				LambdaQueryWrapper<DeptRegionEntity> wrapper = Wrappers.<DeptRegionEntity>query().lambda();
+//				wrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+//				wrapper.eq(DeptRegionEntity::getAdcd, adCode);
+//				List<DeptRegionEntity> deptRegionEntities = getDeptRegionService().list(wrapper);
+//				if (null != deptRegionEntities && deptRegionEntities.size() > 0) {
+//					String manageCompany = "";
+//					for (DeptRegionEntity deptRegionEntity : deptRegionEntities) {
+//						Dept dept = getDeptService().getById(deptRegionEntity.getDeptId());
+//						if (null != dept) {
+//							if (manageCompany.length() > 0) {
+//								manageCompany += " / ";
+//							}
+//							manageCompany += dept.getDeptName();
+//						}
+//					}
+//					vo.setManageCompany(manageCompany);
+//				}
+//			}
+//		}
+        return vo;
+    }
+}

+ 131 - 0
src/main/java/org/springblade/modules/business/xjgd/inspection/wrapper/InspectionWrapper.java

@@ -0,0 +1,131 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/23
+ */
+package org.springblade.modules.business.xjgd.inspection.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.core.tool.utils.SpringUtil;
+
+import org.springblade.modules.business.xjgd.inspection.dto.InspectionProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionPlanInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.entity.InspectionProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionPlanService;
+import org.springblade.modules.business.xjgd.inspection.service.IInspectionProcessService;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionInfoVO;
+import org.springblade.modules.business.xjgd.inspection.vo.InspectionProcessRecordInfoVO;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IUserService;
+
+import java.util.List;
+import java.util.Objects;
+
+/***
+ * Date:2022/8/23
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+
+public class InspectionWrapper extends BaseEntityWrapper<InspectionInfoEntity, InspectionInfoVO> {
+    public static InspectionWrapper build() {
+        return new InspectionWrapper();
+    }
+
+    private static IUserService userService;
+
+    private static IUserService getUserService() {
+        if (userService == null) {
+            userService = SpringUtil.getBean(IUserService.class);
+        }
+        return userService;
+    }
+
+    private static IInspectionProcessService reportService;
+
+    private static IInspectionProcessService getReportService() {
+        if (reportService == null) {
+            reportService = SpringUtil.getBean(IInspectionProcessService.class);
+        }
+        return reportService;
+    }
+
+    private static IInspectionPlanService planService;
+
+    private static IInspectionPlanService getPlanService() {
+        if (planService == null) {
+            planService = SpringUtil.getBean(IInspectionPlanService.class);
+        }
+        return planService;
+    }
+
+    @Override
+    public InspectionInfoVO entityVO(InspectionInfoEntity entity) {
+        InspectionInfoVO equipmentInspectionInfoVO = Objects.requireNonNull(BeanUtil.copy(entity, InspectionInfoVO.class));
+        return entityVO(equipmentInspectionInfoVO);
+    }
+
+    public InspectionInfoVO entityVO(InspectionInfoVO entity) {
+
+        if (Func.notNull(entity.getInspectionReportId())) {
+            InspectionProcessRecordInfoEntity reportEntity = getReportService().getById(entity.getInspectionReportId());
+            if (Func.notNull(reportEntity)) {
+                User user = getUserService().getById(reportEntity.getCreateUser());
+                entity.setServicePersonName(user.getRealName());
+                entity.setInspectionReportTime(reportEntity.getCreateTime());
+            }
+        }
+
+        InspectionPlanInfoEntity planEntity = getPlanService().getById(entity.getInspectionPlanId());
+        entity.setInspectionCompleteTime(planEntity.getInspectionCompleteTime());
+        entity.setPlanScheduledType(planEntity.getPlanScheduledType());
+        entity.setTimeType(planEntity.getTimeType());
+
+        if (entity.getInspectionStatus() == 2 || entity.getInspectionStatus() == 3) {
+            InspectionProcessRecordInfoDTO dto = new InspectionProcessRecordInfoDTO();
+            dto.setInspectionId(entity.getId());
+            List<InspectionProcessRecordInfoVO> reportEntitys = getReportService().selectList(dto);
+            if (Func.notNull(reportEntitys)) {
+                entity.setReportList(reportEntitys);
+            }
+        }
+
+//		String rtuKindDesc = "";
+//		if (entity.getIsRain() != null && entity.getIsRain() == 1) {
+//			rtuKindDesc = "雨量站";
+//		}
+//		if (entity.getIsRes() != null && entity.getIsRes() == 1) {
+//			if (rtuKindDesc.length() > 0) {
+//				rtuKindDesc += "/";
+//			}
+//			rtuKindDesc += "水位站";
+//		} else if (entity.getIsRiver() != null && entity.getIsRiver() == 1) {
+//			if (rtuKindDesc.length() > 0) {
+//				rtuKindDesc += "/";
+//			}
+//			rtuKindDesc += "水位站";
+//		}
+//		if (entity.getIsGround() != null && entity.getIsGround() == 1) {
+//			if (rtuKindDesc.length() > 0) {
+//				rtuKindDesc += "/";
+//			}
+//			rtuKindDesc += "墒情站";
+//		}
+//		if (entity.getIsVideo() != null && entity.getIsVideo() == 1) {
+//			if (rtuKindDesc.length() > 0) {
+//				rtuKindDesc += "/";
+//			}
+//			rtuKindDesc += "视频站";
+//		}
+//		entity.setRtuKindDesc(rtuKindDesc);
+        return entity;
+    }
+}

+ 825 - 0
src/main/java/org/springblade/modules/business/xjgd/order/controller/OrderController.java

@@ -0,0 +1,825 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.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.RequiredArgsConstructor;
+import org.springblade.constant.BusinessConstant;
+import org.springblade.constant.DictBusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+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.*;
+import org.springblade.modules.baseinfo.dict.entity.DictInfoEntity;
+import org.springblade.modules.baseinfo.dict.service.IBaseInfoDictService;
+import org.springblade.modules.baseinfo.org.entity.DeptRegionEntity;
+import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
+import org.springblade.modules.business.xjgd.order.dto.OrderInfoDTO;
+import org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity;
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.order.service.IOrderProcessService;
+import org.springblade.modules.business.xjgd.order.service.IOrderService;
+import org.springblade.modules.business.xjgd.order.vo.OrderInfoVO;
+import org.springblade.modules.business.xjgd.order.wrapper.OrderWrapper;
+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.*;
+
+/***
+ * Date:2022/8/22
+ * Title:巡检工单系统
+ * Description:工单功能模块
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping("galaxy-business/xjgd/order")
+@RequiredArgsConstructor
+@Api(value = "工单管理模块", tags = "工单管理模块")
+public class OrderController extends BladeController {
+
+    private final IOrderService orderService;
+    private final IOrderProcessService orderProcessService;
+    private final IUserService userService;
+    private final IBaseInfoDictService baseInfoDictService;
+    private final IDeptRegionService deptRegionService;
+
+
+    /**
+     * 工单查询,分页
+     */
+    @GetMapping("/page")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "sortType", value = "排序", paramType = "query", dataType = "int"),
+            @ApiImplicitParam(name = "orderStatusCode", value = "工单状态", paramType = "query", dataType = "string")
+    })
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入实体类CheckOrderInfoDTO")
+    public R<IPage<OrderInfoVO>> page(@ApiIgnore OrderInfoDTO checkOrderInfoDTO, Query query) {
+//        if (Func.notNull(checkOrderInfoDTO.getOrderStatusOption())){
+//            String[] statusList = checkOrderInfoDTO.getOrderStatusOption().split(",");
+//            StringBuilder stringBuilder=new StringBuilder();
+//               for (String status:statusList){
+//                   if (OrderStatusEnum.STATUS_CREATE.getCode().equals(status)) {
+//                       DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CREATE.getCode());
+//                     //  checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//                       if (stringBuilder.length()>0){
+//                           stringBuilder.append(",");
+//                       }
+//                       stringBuilder.append(Func.toStr(dictInfoEntity.getId()));
+//                   } else if (OrderStatusEnum.STATUS_CONFIRM.getCode().equals(status)) {
+//                       DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CONFIRM.getCode());
+//                      // checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//                       if (stringBuilder.length()>0){
+//                           stringBuilder.append(",");
+//                       }
+//                       stringBuilder.append(Func.toStr(dictInfoEntity.getId()));
+//                   } else if (OrderStatusEnum.STATUS_COSTS_PENDING_APPROVE.getCode().equals(status)) {
+//                       DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_COSTS_PENDING_APPROVE.getCode());
+//                     //  checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//                       if (stringBuilder.length()>0){
+//                           stringBuilder.append(",");
+//                       }
+//                       stringBuilder.append(Func.toStr(dictInfoEntity.getId()));
+//                   } else if (OrderStatusEnum.STATUS_CLOSE_PENDING_APPROVE.getCode().equals(status)) {
+//                       DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE_PENDING_APPROVE.getCode());
+//                       //checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//                       if (stringBuilder.length()>0){
+//                           stringBuilder.append(",");
+//                       }
+//                       stringBuilder.append(Func.toStr(dictInfoEntity.getId()));
+//                   } else if (OrderStatusEnum.STATUS_CLOSE.getCode().equals(status)) {
+//                       DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE.getCode());
+//                     //  checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//                       if (stringBuilder.length()>0){
+//                           stringBuilder.append(",");
+//                       }
+//                       stringBuilder.append(Func.toStr(dictInfoEntity.getId()));
+//                   }
+//               }
+//            checkOrderInfoDTO.setOrderStatusOption(stringBuilder.toString());
+//
+//        }
+
+        BladeUser user = AuthUtil.getUser();
+        if (BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+            checkOrderInfoDTO.setOrderConfirmUser(user.getUserId());
+        }
+        IPage<OrderInfoVO> pages = orderService.selectPage(Condition.getPage(query), checkOrderInfoDTO);
+        List<OrderInfoVO> list = pages.getRecords();
+        for (OrderInfoVO v : list) {
+            OrderWrapper.build().entityVO(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<OrderInfoVO>> mypage(@ApiIgnore OrderInfoDTO checkOrderInfoDTO, Query query) {
+        BladeUser user = AuthUtil.getUser();
+        checkOrderInfoDTO.setContactUser(user.getUserId());
+        checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+        checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
+        IPage<OrderInfoVO> pages = orderService.selectMyPage(Condition.getPage(query), checkOrderInfoDTO);
+        List<OrderInfoVO> list = pages.getRecords();
+        for (OrderInfoVO v : list) {
+            OrderWrapper.build().entityVO(v);
+        }
+        return R.data(pages);
+    }
+
+    /**
+     * 新工单列表
+     *
+     * @param checkOrderInfoDTO
+     * @return
+     */
+    @GetMapping("/todo/confirm/list")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入实体类CheckOrderInfoDTO")
+    public R<List<OrderInfoVO>> todoConfirmList(@ApiIgnore OrderInfoDTO checkOrderInfoDTO) {
+        //DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CREATE.getCode());
+      //  checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+        List<OrderInfoVO> list = orderService.selectTodoList(checkOrderInfoDTO);
+        for (OrderInfoVO v : list) {
+            OrderWrapper.build().entityVO(v);
+        }
+        return R.data(list);
+    }
+
+    /**
+     * 新的工单
+     *
+     * @param checkOrderInfoDTO
+     * @return
+     */
+    @GetMapping("/todo/list")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入实体类CheckOrderInfoDTO")
+    public R<List<OrderInfoVO>> todoList(@ApiIgnore OrderInfoDTO checkOrderInfoDTO) {
+      //  DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CONFIRM.getCode());
+      //  checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+        List<OrderInfoVO> list = orderService.selectTodoList(checkOrderInfoDTO);
+        for (OrderInfoVO v : list) {
+            OrderWrapper.build().entityVO(v);
+        }
+        return R.data(list);
+    }
+
+    /**
+     * 费用审批工单
+     *
+     * @param checkOrderInfoDTO
+     * @return
+     */
+    @GetMapping("/todo/costsapprove/list")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入实体类CheckOrderInfoDTO")
+    public R<List<OrderInfoVO>> todoCostsApproveList(@ApiIgnore OrderInfoDTO checkOrderInfoDTO) {
+//        BladeUser user = AuthUtil.getUser();
+//        if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName())) {
+//            DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_COSTS_PENDING_APPROVE.getCode());
+//            checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//        } else if (BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+//            DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_COSTS_APPROVE.getCode());
+//            checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//        } else {
+//            return R.fail("权限错误");
+//        }
+        List<OrderInfoVO> list = orderService.selectTodoList(checkOrderInfoDTO);
+        for (OrderInfoVO v : list) {
+            OrderWrapper.build().entityVO(v);
+        }
+        return R.data(list);
+    }
+
+    /**
+     * 完结工单审批
+     *
+     * @param checkOrderInfoDTO
+     * @return
+     */
+    @GetMapping("/todo/closeapprove/list")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入实体类CheckOrderInfoDTO")
+    public R<List<OrderInfoVO>> todoCloseApproveList(@ApiIgnore OrderInfoDTO checkOrderInfoDTO) {
+       // DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE_PENDING_APPROVE.getCode());
+      //  checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+        List<OrderInfoVO> list = orderService.selectTodoList(checkOrderInfoDTO);
+        for (OrderInfoVO v : list) {
+            OrderWrapper.build().entityVO(v);
+        }
+        return R.data(list);
+    }
+
+
+    /**
+     * 未确认工单列表,不分页,最多返回10条数据
+     */
+    @GetMapping("/unconfirm/last/list")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+    })
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "不分页", notes = "传入实体类CheckOrderInfoDTO")
+    public R<List<OrderInfoVO>> unconfirmOrderList(@ApiIgnore OrderInfoDTO checkOrderInfoDTO) {
+        BladeUser user = AuthUtil.getUser();
+        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+            if (checkOrderInfoDTO.getAdCode() == null) {
+                checkOrderInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+            }
+        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+            if (checkOrderInfoDTO.getAdCode() == null) {
+                LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+                DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+                checkOrderInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+            }
+        }
+        List<OrderInfoVO> list = orderService.unconfirmOrderList(checkOrderInfoDTO);
+        for (OrderInfoVO v : list) {
+            OrderWrapper.build().entityVO(v);
+        }
+        return R.data(list);
+    }
+
+    @GetMapping("/confirm/delay/page")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+    })
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入实体类CheckOrderInfoDTO")
+    public R<IPage<OrderInfoVO>> unconfirmDelayPage(@ApiIgnore OrderInfoDTO checkOrderInfoDTO, Query query) {
+        BladeUser user = AuthUtil.getUser();
+        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+            if (checkOrderInfoDTO.getAdCode() == null) {
+                checkOrderInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+            }
+        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+            if (checkOrderInfoDTO.getAdCode() == null) {
+                LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+                deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+                DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+                checkOrderInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+            }
+        }
+//        CheckOrderSettingEntity vo = new CheckOrderSettingEntity();
+//        LambdaQueryWrapper<CheckOrderSettingEntity> wrapper = Wrappers.<CheckOrderSettingEntity>query().lambda();
+//        wrapper.eq(CheckOrderSettingEntity::getIsDeleted, 0);
+//        List<CheckOrderSettingEntity> settingEntityList = checkOrderSettingService.list(wrapper);
+//        if (null != settingEntityList && settingEntityList.size() > 0) {
+//            CheckOrderSettingEntity settingEntity = settingEntityList.get(0);
+//            checkOrderInfoDTO.setOrderComfireDelayTime(settingEntity.getOrderComfireDelayTime());
+//        } else {
+//            checkOrderInfoDTO.setOrderComfireDelayTime(120);
+//        }
+
+        IPage<OrderInfoVO> pages = orderService.selectConfirmDelayPage(Condition.getPage(query), checkOrderInfoDTO);
+        List<OrderInfoVO> list = pages.getRecords();
+        for (OrderInfoVO v : list) {
+            OrderWrapper.build().entityVO(v);
+        }
+        return R.data(pages);
+    }
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入实体类CheckOrderInfoEntity")
+    public R<OrderInfoVO> detail(OrderInfoEntity checkOrderInfoEntity) {
+        if (checkOrderInfoEntity.getId() == null) {
+            return R.fail("参数错误");
+        }
+        OrderInfoEntity detail = orderService.getById(checkOrderInfoEntity.getId());
+        OrderInfoVO vo = OrderWrapper.build().entityVO(detail);
+        return R.data(vo);
+    }
+
+    /**
+     * 详情
+     */
+//    @GetMapping("/setting/detail")
+//    @ApiOperationSupport(order = 1)
+//    @ApiOperation(value = "设置详情")
+//    public R<CheckOrderSettingEntity> settingDetail() {
+//        CheckOrderSettingEntity vo = new CheckOrderSettingEntity();
+//        LambdaQueryWrapper<CheckOrderSettingEntity> wrapper = Wrappers.<CheckOrderSettingEntity>query().lambda();
+//        wrapper.eq(CheckOrderSettingEntity::getIsDeleted, 0);
+//        List<CheckOrderSettingEntity> list = checkOrderSettingService.list(wrapper);
+//        if (null != list && list.size() > 0) {
+//            vo = list.get(0);
+//        } else {
+//            vo.setOrderComfireDelayTime(120);
+//        }
+//        return R.data(vo);
+//    }
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入实体类CheckOrderInfoEntity")
+    public R save(@RequestBody OrderInfoDTO checkOrderInfoEntity) {
+        BladeUser user = AuthUtil.getUser();
+        if (Func.isNull(checkOrderInfoEntity.getBatchId())) {
+            return R.fail("参数错误");
+        }
+        //添加工单
+        LambdaQueryWrapper<OrderInfoEntity> wrapper = Wrappers.<OrderInfoEntity>query().lambda();
+        wrapper.eq(OrderInfoEntity::getBatchId, checkOrderInfoEntity.getBatchId());
+        wrapper.last("limit 1");
+        long count = orderService.count(wrapper);
+        if (count == 0) {
+            if (Func.notNull(checkOrderInfoEntity.getTaskOwnerId())) {
+                checkOrderInfoEntity.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_CONFIRM.getCode()));
+                checkOrderInfoEntity.setOrderConfirmUser(checkOrderInfoEntity.getTaskOwnerId());
+                checkOrderInfoEntity.setOrderConfirm(1);
+                checkOrderInfoEntity.setOrderConfirmTime(new Date());
+                checkOrderInfoEntity.setContactUser(checkOrderInfoEntity.getTaskOwnerId());
+            } else {
+                checkOrderInfoEntity.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_CREATE.getCode()));
+            }
+            checkOrderInfoEntity.setOrderType(1);
+            checkOrderInfoEntity.setOrgId(Func.toLong(user.getDeptId()));
+            orderService.save(checkOrderInfoEntity);
+            //添加工单处理流程
+            OrderProcessRecordInfoEntity processInfoEntity = new OrderProcessRecordInfoEntity();
+            processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+            processInfoEntity.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_CREATE.getCode()));
+            processInfoEntity.setProcessDesc(checkOrderInfoEntity.getOrderDesc());
+            processInfoEntity.setFailureProcessPhotos(checkOrderInfoEntity.getOrderPhotos());
+            processInfoEntity.setFailureProcessVideos(checkOrderInfoEntity.getOrderVideos());
+            orderProcessService.save(processInfoEntity);
+            //更新工单主表,记录最新的流程
+            checkOrderInfoEntity.setOrderProcessId(processInfoEntity.getId());
+            orderService.updateById(checkOrderInfoEntity);
+        }
+        return R.status(true);
+    }
+
+    /**
+     * 修改
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入实体类CheckOrderInfoEntity")
+    public R update(@RequestBody OrderInfoEntity checkOrderInfoEntity) {
+        return R.status(orderService.updateById(checkOrderInfoEntity));
+    }
+
+    /**
+     * 新增或修改
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入实体类CheckOrderInfoEntity")
+    public R submit(@RequestBody OrderInfoEntity checkOrderInfoEntity) {
+        return R.status(orderService.saveOrUpdate(checkOrderInfoEntity));
+    }
+
+    /**
+     * 新增或修改
+     */
+//    @PostMapping("/setting/submit")
+//    @ApiOperationSupport(order = 6)
+//    @ApiOperation(value = "新增或修改", notes = "传入实体类CheckOrderInfoEntity")
+//    public R settingSubmit(@RequestBody CheckOrderSettingEntity checkOrderSettingEntity) {
+//        if (checkOrderSettingEntity.getId() <= 0L) {
+//            checkOrderSettingEntity.setId(null);
+//        }
+//        return R.status(checkOrderSettingService.saveOrUpdate(checkOrderSettingEntity));
+//    }
+
+    /**
+     * 删除
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入ID数组")
+    public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+        boolean temp = orderService.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 OrderInfoEntity checkOrderInfoEntity) {
+//        BladeUser user = AuthUtil.getUser();
+//        DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE.getCode());
+//        checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+//        OrderInfoEntity detail = this.orderService.getById(checkOrderInfoEntity.getId());
+//        if (null == detail || detail.getOrderClose() == OrderCloseEnum.ACTIVE_CLOSE.getCode()) {
+//            return R.status(false);
+//        }
+//        detail.setOrderStatusKey(checkOrderInfoEntity.getOrderStatusKey());
+//        detail.setOrderClose(OrderCloseEnum.ACTIVE_CLOSE.getCode());
+//        detail.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+//        detail.setUpdateTime(new Date());
+//        detail.setUpdateUser(user.getUserId());
+//        orderService.updateById(detail);
+//        OrderProcessRecordInfoEntity processInfoEntity = new OrderProcessRecordInfoEntity();
+//        processInfoEntity.setOrderId(detail.getId());
+//        processInfoEntity.setOrderStatusKey(detail.getOrderStatusKey());
+//        if (checkOrderInfoEntity.getOrderDesc() != null) {
+//            processInfoEntity.setProcessDesc("由用户[" + user.getNickName() + "]人工关闭维修任务,处理意见:" + checkOrderInfoEntity.getOrderDesc());
+//        } else {
+//            processInfoEntity.setProcessDesc("由用户[" + user.getNickName() + "]人工关闭维修任务");
+//        }
+//        processInfoEntity.setCreateUser(user.getUserId());
+//        processInfoEntity.setUpdateUser(user.getUserId());
+//        orderProcessService.save(processInfoEntity);
+//        if (null != detail.getWarnId()) {
+//            List<DictBiz> orderFromDict = dictBizService.getList("rtu_check_order_from");
+//            for (DictBiz biz : orderFromDict) {
+//                if (biz.getDictKey().equals(OrderFromEnum.FROM_WARNING.getCode())) {
+//                    RtuWarningInfoEntity warningInfoEntity = this.rtuWarningService.getById(detail.getWarnId());
+//                    if (null != warningInfoEntity) {
+//                        warningInfoEntity.setWarningRecoveryTime(new Date());
+//                        warningInfoEntity.setWarningStatus(WarningStatusEnum.STATUS_CLOSE.getCode());
+//                        warningInfoEntity.setUpdateTime(new Date());
+//                        warningInfoEntity.setUpdateUser(user.getUserId());
+//                        this.rtuWarningService.updateById(warningInfoEntity);
+//                    }
+//                    break;
+//                }
+//            }
+//        }
+//        RtuStatusEntity rtuStatusEntity = new RtuStatusEntity();
+//        rtuStatusEntity.setRunStatusId(EquipmentStatusEnum.STATUS_RUN.getCode());
+//        this.rtuManageService.updateRtuStatus(rtuStatusEntity);
+        return R.success("工单关闭已操作成功!");
+    }
+
+    /**
+     * 工单取消
+     *
+     * @param checkOrderInfoEntity
+     * @return
+     */
+    @PostMapping("/cancel")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "工单ID", paramType = "query", dataType = "long"),
+            @ApiImplicitParam(name = "orderDesc", value = "处理意见", paramType = "query", dataType = "string")
+    })
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "工单取消", notes = "")
+    public R orderCancel(@ApiIgnore OrderInfoEntity checkOrderInfoEntity) {
+        if (Func.isNull(checkOrderInfoEntity.getId())) {
+            return R.fail("参数错误");
+        }
+        // BladeUser user = AuthUtil.getUser();
+
+//        DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CANCEL.getCode());
+//        OrderProcessRecordInfoEntity processInfoEntity = new OrderProcessRecordInfoEntity();
+//        processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+//        processInfoEntity.setProcessDesc(checkOrderInfoEntity.getOrderDesc());
+//        processInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+//        orderProcessService.save(processInfoEntity);
+//
+//        OrderInfoEntity detail = orderService.getById(checkOrderInfoEntity.getId());
+//        dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CANCEL.getCode());
+//        detail.setOrderStatusKey(dictInfoEntity.getId());
+//        detail.setOrderClose(OrderCloseEnum.ACTIVE_CLOSE.getCode());
+//        detail.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+//        detail.setOrderProcessId(processInfoEntity.getId());
+//        orderService.updateById(detail);
+        return R.success("工单取消已操作成功!");
+
+
+//        CheckOrderInfoEntity detail = this.rtuCheckOrderService.getById(checkOrderInfoEntity.getId());
+//        if (null == detail || detail.getOrderClose() == OrderCloseEnum.ACTIVE_CLOSE.getCode()) {
+//            return R.status(false);
+//        }
+//        DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE.getCode());
+//        checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+//
+//        detail.setOrderStatusKey(checkOrderInfoEntity.getOrderStatusKey());
+//        detail.setOrderClose(OrderCloseEnum.ACTIVE_CLOSE.getCode());
+//        detail.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+//        detail.setUpdateTime(new Date());
+//        detail.setUpdateUser(user.getUserId());
+//        rtuCheckOrderService.updateById(detail);
+//        OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
+//        processInfoEntity.setOrderId(detail.getId());
+//        processInfoEntity.setOrderStatusKey(detail.getOrderStatusKey());
+//        if (checkOrderInfoEntity.getOrderDesc() != null) {
+//            processInfoEntity.setProcessDesc("由用户[" + user.getNickName() + "]人工关闭维修任务,处理意见:" + checkOrderInfoEntity.getOrderDesc());
+//        } else {
+//            processInfoEntity.setProcessDesc("由用户[" + user.getNickName() + "]人工关闭维修任务");
+//        }
+//        processInfoEntity.setCreateUser(user.getUserId());
+//        processInfoEntity.setUpdateUser(user.getUserId());
+//        rtuOrderProcessService.save(processInfoEntity);
+//        if (null != detail.getWarnId()) {
+//            List<DictBiz> orderFromDict = dictBizService.getList("rtu_check_order_from");
+//            for (DictBiz biz : orderFromDict) {
+//                if (biz.getDictKey().equals(OrderFromEnum.FROM_WARNING.getCode())) {
+//                    RtuWarningInfoEntity warningInfoEntity = this.rtuWarningService.getById(detail.getWarnId());
+//                    if (null != warningInfoEntity) {
+//                        warningInfoEntity.setWarningRecoveryTime(new Date());
+//                        warningInfoEntity.setWarningStatus(WarningStatusEnum.STATUS_CLOSE.getCode());
+//                        warningInfoEntity.setUpdateTime(new Date());
+//                        warningInfoEntity.setUpdateUser(user.getUserId());
+//                        this.rtuWarningService.updateById(warningInfoEntity);
+//                    }
+//                    break;
+//                }
+//            }
+//        }
+//        RtuStatusEntity rtuStatusEntity = new RtuStatusEntity();
+//        rtuStatusEntity.setRunStatusId(EquipmentStatusEnum.STATUS_RUN.getCode());
+//        this.rtuManageService.updateRtuStatus(rtuStatusEntity);
+//        return R.success("工单关闭已操作成功!");
+    }
+
+    /**
+     * 查询最新的数据
+     */
+    @GetMapping("/last/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "分页")
+    public R<List<OrderInfoVO>> lastList() {
+        LambdaQueryWrapper<OrderInfoEntity> wrapper = Wrappers.<OrderInfoEntity>query().lambda();
+        wrapper.orderByDesc(OrderInfoEntity::getUpdateTime);
+        wrapper.last("limit 1");
+        List<OrderInfoEntity> pages = orderService.list(wrapper);
+        return R.data(OrderWrapper.build().listVO(pages));
+    }
+
+    /**
+     * 工单确认
+     *
+     * @param checkOrderInfoEntity
+     * @return
+     */
+    @PostMapping("/confirm")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "工单确认", notes = "传入实体类CheckOrderInfoEntity")
+    public R orderConfirm(@RequestBody OrderInfoEntity checkOrderInfoEntity) {
+        if (Func.isNull(checkOrderInfoEntity.getId())){
+            R.fail("参数错误");
+        }
+       // DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CONFIRM.getCode());
+
+        OrderProcessRecordInfoEntity processInfoEntity = new OrderProcessRecordInfoEntity();
+        processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+        processInfoEntity.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_CONFIRM.getCode()));
+        //processInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+        //processInfoEntity.setProcessDesc("维修任务由[" + userInfo.getRealName() + "]确认");
+        orderProcessService.save(processInfoEntity);
+
+      //  checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+//        checkOrderInfoEntity.setOrderStatusCode(OrderStatusEnum.STATUS_CONFIRM.getCode());
+        BladeUser user = AuthUtil.getUser();
+        //User userInfo = userService.getById(user.getUserId());
+        OrderInfoEntity detail = this.orderService.getById(checkOrderInfoEntity.getId());
+       // if (Func.isNull(detail)) {
+         //   return R.status(false);
+       // }
+        detail.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+       // detail.setOrderStatusKey(dictInfoEntity.getId());
+        detail.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_CONFIRM.getCode()));
+        detail.setOrderConfirmUser(user.getUserId());
+        detail.setOrderConfirmTime(new Date());
+        detail.setOrderProcessId(processInfoEntity.getId());
+//        detail.setUpdateTime(new Date());
+//        detail.setContactUser(userInfo.getId());
+//        detail.setContactPhone(userInfo.getPhone());
+        orderService.updateById(detail);
+
+//        OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
+//        processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+//        processInfoEntity.setOrderStatusKey(checkOrderInfoEntity.getOrderStatusKey());
+//        processInfoEntity.setProcessDesc("维修任务由[" + userInfo.getRealName() + "]确认");
+        return R.data(true);
+    }
+
+    @PostMapping("/manually")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "人工生成工单", notes = "传入实体类CheckOrderInfoDTO")
+    public R manuallyOrder(@RequestBody OrderInfoDTO checkOrderInfoDTO) {
+        if (null == checkOrderInfoDTO.getRtuCode()) {
+            return R.status(false);
+        }
+        BladeUser user = AuthUtil.getUser();
+        LambdaQueryWrapper<OrderInfoEntity> wrapper = Wrappers.<OrderInfoEntity>query().lambda();
+        wrapper.eq(OrderInfoEntity::getIsDeleted, 0);
+        wrapper.eq(OrderInfoEntity::getOrderClose, 0);
+        wrapper.eq(OrderInfoEntity::getRtuCode, checkOrderInfoDTO.getRtuCode());
+        long orders = orderService.count(wrapper);
+        if (orders > 0) {
+            return R.fail("当前测站已经有维修任务");
+        }
+       // DictInfoEntity statusdict = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CREATE.getCode());
+//        DictInfoEntity fromdict = baseInfoDictService.getDict(DictBusinessConstant.ORDER_FROM_CODE, OrderFromEnum.FROM_MANUALLY.getCode());
+//        checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
+//        checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CREATE.getCode());
+//        checkOrderInfoDTO.setOrderFromKey(fromdict.getId());
+//        checkOrderInfoDTO.setOrderStatusKey(statusdict.getId());
+//        checkOrderInfoDTO.setStatus(1);
+//        checkOrderInfoDTO.setCreateTime(new Date());
+//        checkOrderInfoDTO.setCreateUser(user.getUserId());
+//        checkOrderInfoDTO.setCreateDept(Func.toLong(user.getDeptId()));
+//        orderService.save(checkOrderInfoDTO);
+//        //增加工单处理创建记录
+//        OrderProcessRecordInfoEntity processInfoEntity = new OrderProcessRecordInfoEntity();
+//        processInfoEntity.setOrderId(checkOrderInfoDTO.getId());
+//        processInfoEntity.setOrderStatusKey(statusdict.getId());
+//        processInfoEntity.setProcessDesc(checkOrderInfoDTO.getOrderDesc());
+//
+//        orderProcessService.save(processInfoEntity);
+        //更新测站状态
+//        RtuStatusEntity statusEntity = new RtuStatusEntity();
+//        statusEntity.setRtuCode(checkOrderInfoDTO.getRtuCode());
+//        statusEntity.setRunStatusId(EquipmentStatusEnum.STATUS_FAILURE.getCode());
+//        rtuManageService.updateRtuStatus(statusEntity);
+
+        return R.status(true);
+    }
+
+
+    @PostMapping("/change")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "任务指派", notes = "传入实体类CheckOrderInfoDTO")
+    public R orderChange(@RequestBody OrderInfoDTO checkOrderInfoDTO) {
+//        OrderInfoEntity detail = this.orderService.getById(checkOrderInfoDTO.getId());
+//        if (null == detail) {
+//            return R.status(false);
+//        }
+//        BladeUser user = AuthUtil.getUser();
+//        DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CONFIRM.getCode());
+//        if (detail.getOrderConfirm() != OrderConfirmEnum.ACTIVE_CONFIRM.getCode()) {
+//            detail.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+//            detail.setOrderStatusKey(dictInfoEntity.getId());
+//            detail.setOrderConfirmUser(user.getUserId());
+//            detail.setOrderConfirmTime(new Date());
+//        }
+//        User userInfo = userService.getById(checkOrderInfoDTO.getServicePersonId());
+//        OrderProcessRecordInfoEntity processInfoEntity = new OrderProcessRecordInfoEntity();
+//        processInfoEntity.setOrderId(detail.getId());
+//        processInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+//        processInfoEntity.setProcessDesc("维修任务指派给[" + userInfo.getRealName() + "]");
+//        orderProcessService.save(processInfoEntity);
+//        detail.setUpdateTime(new Date());
+//        detail.setContactUser(userInfo.getId());
+//        detail.setContactPhone(userInfo.getPhone());
+//        orderService.updateById(detail);
+//        return R.status(orderService.updateById(detail));
+        return R.success("ok");
+    }
+
+
+    /**
+     * 工单统计
+     *
+     * @return
+     */
+//    @GetMapping("/statistics")
+//    @ApiOperationSupport(order = 3)
+//    @ApiOperation(value = "统计表格")
+//    public R<List<CheckOrderCountVO>> orderStatistics() {
+//        BladeUser user = AuthUtil.getUser();
+//        List<CheckOrderCountVO> countList = new LinkedList<>();
+//        LambdaQueryWrapper<User> userQueryWrapper = Wrappers.<User>query().lambda();
+//        userQueryWrapper.eq(User::getIsDeleted, 0);
+//        userQueryWrapper.eq(User::getDeptId, Func.toLong(user.getDeptId()));
+//        List<User> list = userService.list(userQueryWrapper);
+//        for (User u : list) {
+//            CheckOrderCountVO vo = new CheckOrderCountVO();
+//            vo.setUserId(u.getId());
+//            vo.setServicePersonName(u.getRealName());
+//            LambdaQueryWrapper<CheckOrderInfoEntity> queryWrapper = Wrappers.<CheckOrderInfoEntity>query().lambda();
+//            queryWrapper.eq(CheckOrderInfoEntity::getIsDeleted, 0);
+//            queryWrapper.eq(CheckOrderInfoEntity::getOrderConfirm, OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+//            queryWrapper.eq(CheckOrderInfoEntity::getOrderConfirmUser, u.getId());
+//            long count = rtuCheckOrderService.count(queryWrapper);
+//            vo.setOrderCount(count);
+//            LambdaQueryWrapper<OrderProcessInfoEntity> reportQueryWrapper = Wrappers.<OrderProcessInfoEntity>query().lambda();
+//            reportQueryWrapper.eq(OrderProcessInfoEntity::getIsDeleted, 0);
+//            reportQueryWrapper.eq(OrderProcessInfoEntity::getCreateUser, u.getId());
+//            count = rtuOrderProcessService.count(reportQueryWrapper);
+//            vo.setProcessingOrderCount(count);
+//            countList.add(vo);
+//        }
+//        return R.data(countList);
+//
+//
+//    }
+
+    /**
+     * 按机构统计工单
+     *
+     * @return
+     */
+//    @GetMapping("/org/statistics")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "adCode", value = "行政区划编码", paramType = "query", dataType = "string"),
+//    })
+//    @ApiOperationSupport(order = 3)
+//    @ApiOperation(value = "统计表格")
+//    public R<List<OrgCheckOrderCountVO>> orgOrderStatistics() {
+//        BladeUser user = AuthUtil.getUser();
+//        List<OrgCheckOrderCountVO> list = new LinkedList<>();
+//        LambdaQueryWrapper<Dept> wrapper = Wrappers.<Dept>query().lambda();
+//        wrapper.eq(Dept::getIsDeleted, 0);
+//        wrapper.eq(Dept::getParentId, Func.toLong(user.getDeptId()));
+//        List<Dept> root = this.deptService.list(wrapper);
+//        for (Dept dept : root) {
+//            OrgCheckOrderCountVO orgCheckOrderCountVO = new OrgCheckOrderCountVO();
+//            orgCheckOrderCountVO.setDeptId(dept.getId());
+//            orgCheckOrderCountVO.setOrgName(dept.getDeptName());
+//            CheckOrderInfoDTO checkOrderInfoDTO = new CheckOrderInfoDTO();
+//            LambdaQueryWrapper<DeptRegionEntity> deptLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+//            deptLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+//            deptLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, dept.getId());
+//            DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptLambdaQueryWrapper);
+//            checkOrderInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+//            checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
+//            Long orderCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
+//            orgCheckOrderCountVO.setOrderCount(orderCount);
+//            checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+//            checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
+//            Long unCloseOrderCount = rtuCheckOrderService.unCloseOrderCount(checkOrderInfoDTO);
+//            orgCheckOrderCountVO.setProcessingOrderCount(unCloseOrderCount);
+//            checkOrderInfoDTO.setOrderConfirm(OrderConfirmEnum.ACTIVE_CREATE.getCode());
+//            checkOrderInfoDTO.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
+//            long count = rtuCheckOrderService.unconfirmOrderCount(checkOrderInfoDTO);
+//            orgCheckOrderCountVO.setUnconfirmOrderCount(count);
+//            list.add(orgCheckOrderCountVO);
+//        }
+//        return R.data(list);
+//    }
+
+//    @GetMapping("/count")
+//    @ApiOperationSupport(order = 3)
+//    @ApiOperation(value = "统计表格")
+//    public R<Map<String, Object>> orderCount(@ApiIgnore CheckOrderInfoDTO checkOrderInfoDTO) {
+//
+//        BladeUser user = AuthUtil.getUser();
+//        checkOrderInfoDTO.setOrgId(Func.toLong(user.getDeptId()));
+//        Long orderCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
+//
+//        DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CREATE.getCode());
+//        checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//        Long unConfirmOrderCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
+//        dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CONFIRM.getCode());
+//        checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//        Long processingCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
+//        dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE_PENDING_APPROVE.getCode());
+//        checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//        Long closeApproveCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
+//        dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE.getCode());
+//        checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
+//        Long closeCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
+//
+//
+//        Map<String, Object> data = new HashMap<>();
+//        data.put("orderCount", orderCount);
+//        data.put("orderUnconfirmCount", unConfirmOrderCount);
+//        data.put("orderProcessingCount", processingCount);
+//        data.put("closeApproveOrderCount", closeApproveCount);
+//        data.put("closeOrderCount", closeCount);
+//
+//        return R.data(data);
+//    }
+}

+ 447 - 0
src/main/java/org/springblade/modules/business/xjgd/order/controller/OrderProcessController.java

@@ -0,0 +1,447 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.controller;
+
+import cn.hutool.db.sql.Order;
+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.constant.DictBusinessConstant;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.log.annotation.ApiLog;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.oss.model.BladeFile;
+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.OrderCloseEnum;
+import org.springblade.enums.OrderConfirmEnum;
+import org.springblade.enums.OrderStatusEnum;
+import org.springblade.modules.baseinfo.dict.entity.DictInfoEntity;
+import org.springblade.modules.baseinfo.dict.service.IBaseInfoDictService;
+import org.springblade.modules.baseinfo.org.entity.DeptRegionEntity;
+import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
+
+import org.springblade.modules.business.xjgd.enums.XjgdOrderStatusEnum;
+import org.springblade.modules.business.xjgd.order.dto.OrderProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity;
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.order.service.IOrderProcessService;
+import org.springblade.modules.business.xjgd.order.service.IOrderService;
+import org.springblade.modules.business.xjgd.order.vo.OrderProcessRecordInfoVO;
+import org.springblade.modules.business.xjgd.order.wrapper.OrderProcessWrapper;
+import org.springblade.modules.resource.builder.oss.OssBuilder;
+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 org.springframework.web.multipart.MultipartFile;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title: 维修任务填报管理模块
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@RestController
+@RequestMapping("galaxy-business/xjgd/order/process")
+@AllArgsConstructor
+@Api(value = "工单处理管理模块", tags = "工单处理管理模块")
+public class OrderProcessController extends BladeController {
+    private final IOrderProcessService orderProcessService;
+    private final IOrderService orderService;
+    private final IUserService userService;
+    private final IBaseInfoDictService dictService;
+    private final IDeptRegionService deptRegionService;
+
+    @Resource
+    private OssBuilder ossBuilder;
+
+    /**
+     * 分页
+     */
+    @GetMapping("/list")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderId", value = "工单ID", paramType = "query", dataType = "long")
+    })
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "不分页", notes = "传入checkOrderInfoDTO")
+    public R<List<OrderProcessRecordInfoVO>> list(OrderProcessRecordInfoDTO dto) {
+        List<OrderProcessRecordInfoVO> list = orderProcessService.selectList(dto);
+        for (OrderProcessRecordInfoVO v : list) {
+            OrderProcessWrapper.build().entityVO(v);
+        }
+        return R.data(list);
+    }
+
+    /**
+     * 多表联合查询自定义分页
+     */
+    @GetMapping("/page")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderId", value = "工单ID", paramType = "query", dataType = "long")
+    })
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入checkOrderInfoDTO")
+    public R<IPage<OrderProcessRecordInfoVO>> page(@ApiIgnore OrderProcessRecordInfoDTO dto, Query query) {
+        IPage<OrderProcessRecordInfoVO> pages = orderProcessService.selectPage(Condition.getPage(query), dto);
+        List<OrderProcessRecordInfoVO> list = pages.getRecords();
+        for (OrderProcessRecordInfoVO v : list) {
+            OrderProcessWrapper.build().entityVO(v);
+        }
+        return R.data(pages);
+    }
+
+
+    /**
+     * 查询当天填报的工单信息
+     *
+     * @return
+     */
+    @GetMapping("/today/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "分页")
+    public R<List<OrderProcessRecordInfoVO>> todayList(@ApiIgnore OrderProcessRecordInfoDTO processInfoDTO) {
+        BladeUser user = AuthUtil.getUser();
+        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+            processInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+            LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+            deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+            deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+            DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+            if (null != deptRegionEntity) {
+                processInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+            }
+
+        }
+
+        Date date = new Date();
+        String dt = Func.formatDateTime(date);
+        processInfoDTO.setCreateTime(Func.parse(dt, ConcurrentDateFormat.of("yyyy-MM-dd")));
+        List<OrderProcessRecordInfoVO> list = orderProcessService.selectTodayProcessList(processInfoDTO);
+        for (OrderProcessRecordInfoVO vo : list) {
+            OrderProcessWrapper.build().entityVO(vo);
+        }
+        return R.data(list);
+    }
+
+
+    /**
+     * 多表联合查询自定义分页
+     */
+    @GetMapping("/today/page")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "工单ID", paramType = "query", dataType = "long")
+    })
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入checkOrderInfoDTO")
+    public R<IPage<OrderProcessRecordInfoVO>> todayPage(@ApiIgnore OrderProcessRecordInfoDTO orderProcessInfoDTO, Query query) {
+        BladeUser user = AuthUtil.getUser();
+        if (BusinessConstant.ROLE_SYS_ADMIN.equals(user.getRoleName())) {
+            orderProcessInfoDTO.setAdCode(BusinessConstant.REGION_NM_ADCODE);
+        } else if (BusinessConstant.ROLE_ORG_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_ADMIN.equals(user.getRoleName()) || BusinessConstant.ROLE_COMPANY_SERVICE_PERSON.equals(user.getRoleName())) {
+            LambdaQueryWrapper<DeptRegionEntity> deptRegionEntityLambdaQueryWrapper = Wrappers.<DeptRegionEntity>query().lambda();
+            deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+            deptRegionEntityLambdaQueryWrapper.eq(DeptRegionEntity::getDeptId, Func.toLong(user.getDeptId()));
+            DeptRegionEntity deptRegionEntity = deptRegionService.getOne(deptRegionEntityLambdaQueryWrapper);
+            orderProcessInfoDTO.setAdCode(deptRegionEntity.getAdcd());
+        }
+
+        Date date = new Date();
+        String dt = Func.formatDateTime(date);
+        orderProcessInfoDTO.setCreateTime(Func.parse(dt, ConcurrentDateFormat.of("yyyy-MM-dd")));
+
+        IPage<OrderProcessRecordInfoVO> pages = orderProcessService.selectTodayProcessPage(Condition.getPage(query), orderProcessInfoDTO);
+        List<OrderProcessRecordInfoVO> list = pages.getRecords();
+        for (OrderProcessRecordInfoVO v : list) {
+            OrderProcessWrapper.build().entityVO(v);
+        }
+        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<OrderProcessRecordInfoVO> detail(OrderProcessRecordInfoEntity orderProcessInfoEntity) {
+
+        OrderProcessRecordInfoEntity detail = orderProcessService.getById(orderProcessInfoEntity.getId());
+
+        OrderProcessRecordInfoVO vo = OrderProcessWrapper.build().entityVO(detail);
+        OrderInfoEntity checkOrderInfoEntity = orderService.getById(vo.getOrderId());
+        if (checkOrderInfoEntity.getOrderConfirmUser() != null) {
+            User user = userService.getById(checkOrderInfoEntity.getOrderConfirmUser());
+            vo.setOrderConfirmUserName(user.getRealName());
+        }
+        DictBiz biz = DictBizCache.getById(checkOrderInfoEntity.getOrderFromKey());
+        vo.setOrderFromText(biz.getDictValue());
+        return R.data(vo);
+    }
+
+    /**
+     * @param dto
+     * @return
+     */
+    @GetMapping("/last/report")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderId", value = "工单ID", paramType = "query", dataType = "long"),
+    })
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入orderProcessInfoEntity")
+    public R<OrderProcessRecordInfoVO> lastReport(OrderProcessRecordInfoDTO dto) {
+        if (Func.isNull(dto.getOrderId())){
+            return R.fail("参数错误");
+        }
+        //DictInfoEntity dictInfoEntity = dictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_PROCESS.getCode());
+      //  dto.setOrderStatusKey(dictInfoEntity.getId());
+        dto.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_PROCESS.getCode()));
+        OrderProcessRecordInfoVO vo = orderProcessService.selectLastReport(dto);
+        return R.data(OrderProcessWrapper.build().entityVO(vo));
+    }
+
+
+    /**
+     * 巡查保养工单系统
+     *
+     * @param orderProcessInfoEntity
+     * @return
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入orderProcessInfoEntity")
+    public R save(@RequestBody OrderProcessRecordInfoEntity orderProcessInfoEntity) {
+
+        if (Func.isNull(orderProcessInfoEntity.getOrderId())){
+            return R.fail("参数错误");
+        }
+
+      //  DictInfoEntity dictInfoEntity = dictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_PROCESS.getCode());
+        //orderProcessInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+        orderProcessInfoEntity.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_PROCESS.getCode()));
+        orderProcessService.save(orderProcessInfoEntity);
+
+        OrderInfoEntity checkOrderInfoEntity = orderService.getById(orderProcessInfoEntity.getOrderId());
+        checkOrderInfoEntity.setOrderProcessId(orderProcessInfoEntity.getId());
+
+        orderProcessInfoEntity.setCostsReport(1);
+        if (Func.notNull(orderProcessInfoEntity.getCostsReportDesc())) {
+            String costsDesc = orderProcessInfoEntity.getCostsReportDesc().trim();
+            if (costsDesc.length() > 0) {
+                orderProcessInfoEntity.setCostsReport(2);
+            }
+        }
+        if (orderProcessInfoEntity.getCostsReport() == 1) {
+            //dictInfoEntity = dictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE_PENDING_APPROVE.getCode());
+            checkOrderInfoEntity.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_CLOSE_PENDING_APPROVE.getCode()));
+        } else if (orderProcessInfoEntity.getCostsReport() == 2) {
+          //  dictInfoEntity = dictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_COSTS_PENDING_APPROVE.getCode());
+           // checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+            checkOrderInfoEntity.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_COSTS_PENDING_APPROVE.getCode()));
+        }
+        orderService.updateById(checkOrderInfoEntity);
+        return R.status(true);
+    }
+
+    /**
+     * 修改
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入orderProcessInfoEntity")
+    public R update(@RequestBody OrderProcessRecordInfoEntity orderProcessInfoEntity) {
+        return R.status(orderProcessService.updateById(orderProcessInfoEntity));
+    }
+
+    /**
+     * 新增或修改
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入orderProcessInfoEntity")
+    public R submit(@RequestBody OrderProcessRecordInfoEntity orderProcessInfoEntity) {
+        return R.status(orderProcessService.saveOrUpdate(orderProcessInfoEntity));
+    }
+
+    /**
+     * 删除
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入projectInfoEntity")
+    public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+        boolean temp = orderProcessService.deleteLogic(Func.toLongList(ids));
+        return R.status(temp);
+    }
+
+
+    /**
+     * 维修任务-无信号上报信息列表,分页
+     */
+//    @GetMapping("/nonetworksignal/page")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "rtuName", value = "测站名称", paramType = "query", dataType = "string"),
+//            @ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+//    })
+//    @ApiOperationSupport(order = 3)
+//    @ApiOperation(value = "分页", notes = "传入OrderProcessInfoDTO")
+//    public R<IPage<OrderProcessInfoVO>> page(OrderProcessInfoDTO orderProcessInfoDTO, Query query) {
+//        IPage<OrderProcessInfoVO> pages = rtuOrderProcessService.selectNoNetworkSignalPage(Condition.getPage(query), orderProcessInfoDTO);
+//        List<OrderProcessInfoVO> list = pages.getRecords();
+//        for (OrderProcessInfoVO v : list) {
+//            RtuOrderProcessWrapper.build().entityVO(v);
+//        }
+//        return R.data(pages);
+//    }
+
+    /**
+     * 维修任务上报-无信号上报图片补交关闭
+     *
+     * @param orderProcessInfoEntity
+     * @return
+     */
+    @PostMapping("/nonetworksignal/close")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "记录ID", paramType = "query", dataType = "long"),
+    })
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "图片补交关闭操作", notes = "传入实体类OrderProcessInfoEntity")
+    public R noNetworkSignalPhotoSubmitClose(@RequestBody OrderProcessRecordInfoEntity orderProcessInfoEntity) {
+        if (orderProcessInfoEntity.getId() == null) {
+            return R.fail("参数错误!");
+        }
+        OrderProcessRecordInfoEntity entity = orderProcessService.getById(orderProcessInfoEntity.getId());
+        if (null == entity) {
+            return R.status(false);
+        }
+        entity.setPhotoSupplementSubmitStatus(1);
+
+        orderProcessService.updateById(entity);
+        return R.success("操作成功!");
+    }
+
+    @ApiLog("图片提交")
+    @PostMapping(value = "/nonetworksignal/putPhoto")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "图片提交", notes = "")
+    public R putFile(MultipartFile file) {
+        BladeFile bladeFile = ossBuilder.template().putFile(file);
+        return R.data(bladeFile);
+    }
+
+    /**
+     * 修改
+     */
+    @PostMapping("/nonetworksignal/photo/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入OrderProcessInfoEntity")
+    public R nonetworksignalPhotoUpdate(@RequestBody OrderProcessRecordInfoEntity orderProcessInfoEntity) {
+        OrderProcessRecordInfoEntity entity = orderProcessService.getById(orderProcessInfoEntity.getId());
+        entity.setBaseBeforePhoto1Take(orderProcessInfoEntity.getBaseBeforePhoto1Take());
+        entity.setBaseBeforePhoto1Url(orderProcessInfoEntity.getBaseBeforePhoto1Url());
+        entity.setBaseBeforePhoto2Take(orderProcessInfoEntity.getBaseBeforePhoto2Take());
+        entity.setBaseBeforePhoto2Url(orderProcessInfoEntity.getBaseBeforePhoto2Url());
+        entity.setBaseAfterPhoto1Take(orderProcessInfoEntity.getBaseAfterPhoto1Take());
+        entity.setBaseAfterPhoto1Url(orderProcessInfoEntity.getBaseAfterPhoto1Url());
+        entity.setBaseAfterPhoto2Take(orderProcessInfoEntity.getBaseAfterPhoto2Take());
+        entity.setBaseAfterPhoto2Url(orderProcessInfoEntity.getBaseAfterPhoto2Url());
+        entity.setRtuPhotoTake(orderProcessInfoEntity.getRtuPhotoTake());
+        entity.setRtuPhotoUrl(orderProcessInfoEntity.getRtuPhotoUrl());
+        entity.setRainSensorPhotoTake(orderProcessInfoEntity.getRainSensorPhotoTake());
+        entity.setRainSensorPhotoUrl(orderProcessInfoEntity.getRainSensorPhotoUrl());
+        entity.setWaterSensorPhotoTake(orderProcessInfoEntity.getWaterSensorPhotoTake());
+        entity.setWaterSensorPhotoUrl(orderProcessInfoEntity.getWaterSensorPhotoUrl());
+        entity.setGroundSensorPhotoTake(orderProcessInfoEntity.getGroundSensorPhotoTake());
+        entity.setGroundSensorPhotoUrl(orderProcessInfoEntity.getGroundSensorPhotoUrl());
+        entity.setBatteryPhotoTake(orderProcessInfoEntity.getBatteryPhotoTake());
+        entity.setBatteryPhotoUrl(orderProcessInfoEntity.getBatteryPhotoUrl());
+        entity.setSunPhotoTake(orderProcessInfoEntity.getSunPhotoTake());
+        entity.setSunPhotoUrl(orderProcessInfoEntity.getSunPhotoUrl());
+        return R.status(orderProcessService.updateById(entity));
+    }
+
+    /**
+     * 工单关闭
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/closeapprove")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "工单关闭", notes = "传入实体类CheckOrderInfoEntity")
+    public R orderClose(@ApiIgnore OrderProcessRecordInfoDTO entity) {
+        if (Func.isNull(entity.getOrderId())) {
+            return R.fail("参数错误");
+        }
+        if (entity.getCostsApproveType() == 1) {
+            //通过
+        } else if (entity.getCostsApproveType() == 2) {
+            //退回
+        }
+
+       // DictInfoEntity dictInfoEntity = dictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE_APPROVE.getCode());
+        entity.setOrderStatusCode(Func.toStr(XjgdOrderStatusEnum.STATUS_CLOSE_APPROVE.getCode()));
+        orderProcessService.save(entity);
+
+        OrderInfoEntity detail = orderService.getById(entity.getOrderId());
+       // dictInfoEntity = dictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE.getCode());
+        //detail.setOrderStatusKey(dictInfoEntity.getId());
+        detail.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_CLOSE.getCode()));
+       // detail.setOrderClose(OrderCloseEnum.ACTIVE_CLOSE.getCode());
+      // detail.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+        detail.setOrderProcessId(entity.getId());
+        detail.setOrderRate(entity.getOrderRate());
+        orderService.updateById(detail);
+        return R.success("工单关闭已操作成功!");
+    }
+
+    @PostMapping("/costsapprove")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "费用审批", notes = "传入实体类CheckOrderInfoEntity")
+    public R orderCostsapprove(@ApiIgnore OrderProcessRecordInfoDTO entity) {
+        if (Func.isNull(entity.getOrderId())) {
+            return R.fail("参数错误");
+        }
+        if (entity.getCostsApproveType() == 1) {
+            //通过
+        } else if (entity.getCostsApproveType() == 2) {
+            //退回
+        }
+        //DictInfoEntity dictInfoEntity = dictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_COSTS_APPROVE.getCode());
+        entity.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_COSTS_APPROVE.getCode()));
+        orderProcessService.save(entity);
+
+        OrderInfoEntity detail = orderService.getById(entity.getOrderId());
+        //dictInfoEntity = dictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_COSTS_APPROVE.getCode());
+        detail.setOrderStatusCode(Func.toStr(OrderStatusEnum.STATUS_PROCESS.getCode()));
+        detail.setOrderProcessId(entity.getId());
+        orderService.updateById(detail);
+
+        return R.success("工单关闭已操作成功!");
+    }
+}

+ 103 - 0
src/main/java/org/springblade/modules/business/xjgd/order/dto/OrderInfoDTO.java

@@ -0,0 +1,103 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrderInfoDTO extends OrderInfoEntity {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty("测站名称")
+	private String rtuName;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 项目ID
+	 */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+
+	/**
+	 * 行政区划编码
+	 */
+	@ApiModelProperty(value = "行政区划编码")
+	private String adCode;
+
+	/**
+	 * 运维人员ID
+	 */
+	@ApiModelProperty(value = "运维人员ID")
+	private Long servicePersonId;
+
+
+	/**
+	 * 维修任务确认超时设置
+	 */
+	@ApiModelProperty(value = "维修任务确认超时设置")
+	private Integer orderComfireDelayTime;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty(value = "机构ID")
+	private Long deptId;
+
+	/**
+	 * 异常类型
+	 */
+	@ApiModelProperty(value = "异常类型")
+	private Integer warnKind;
+
+
+	/**
+	 * 指定任务负责人ID
+	 */
+	@ApiModelProperty(value = "指定任务负责人ID")
+	private Long taskOwnerId;
+
+	/**
+	 * 指定任务负责人名称
+	 */
+	@ApiModelProperty(value = "指定任务负责人名称")
+	private String taskOwnerName;
+
+	/**
+	 * 工单发起人名称
+	 */
+	@ApiModelProperty(value = "工单发起人名称")
+	private String createOrderPersonName;
+
+
+	/**
+	 * 按创建时间排序 0 倒序,1 正序
+	 */
+	@ApiModelProperty(value = "排序")
+	private Integer createTimeSort;
+
+}

+ 63 - 0
src/main/java/org/springblade/modules/business/xjgd/order/dto/OrderProcessRecordInfoDTO.java

@@ -0,0 +1,63 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrderProcessRecordInfoDTO extends OrderProcessRecordInfoEntity {
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	private Long orgId;
+
+	/**
+	 * 行政区划
+	 */
+	@ApiModelProperty("行政区划")
+	private String adCode;
+
+	/**
+	 * 测站编码
+	 */
+	@ApiModelProperty("测站编码")
+	private String rtuCode;
+
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty("测站名称")
+	private String rtuName;
+
+	/**
+	 * 审批操作
+	 */
+	@ApiModelProperty("审批操作")
+	private Integer costsApproveType;
+
+	/**
+	 * 工单评分
+	 */
+	@ApiModelProperty("工单评分")
+	private Integer orderRate;
+
+}

+ 183 - 0
src/main/java/org/springblade/modules/business/xjgd/order/entity/OrderInfoEntity.java

@@ -0,0 +1,183 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+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")
+public class OrderInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 机构ID
+	 */
+	@ApiModelProperty("机构ID")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Long orgId;
+
+
+	/**
+	 * 测站编码
+	 */
+	@ApiModelProperty("测站编码")
+	private String rtuCode;
+
+	/**
+	 * 工单类型
+	 */
+	@ApiModelProperty("工单类型")
+	private Integer orderType;
+
+	/**
+	 * 工单来源,字典
+	 */
+	@ApiModelProperty("工单来源")
+	private Long orderFromKey;
+
+	/**
+	 * 工单状态,字典
+	 */
+	@ApiModelProperty("工单状态")
+	private Long orderStatusKey;
+
+	/**
+	 * 工单状态,自定义
+	 */
+	@ApiModelProperty("工单状态")
+	private String orderStatusCode;
+
+	/**
+	 * 工单说明
+	 */
+	@ApiModelProperty(value = "工单说明")
+	private String orderDesc;
+
+	/**
+	 * 工单确认人
+	 */
+	@ApiModelProperty(value = "工单确认人")
+	private Long orderConfirmUser;
+
+	/**
+	 * 预警ID
+	 */
+	@ApiModelProperty(value = "预警ID")
+	private Long warnId;
+
+	/**
+	 * 工单关闭
+	 */
+	@ApiModelProperty(value = "工单关闭")
+	private Integer orderClose;
+
+	/**
+	 * 工单确认
+	 */
+	@ApiModelProperty(value = "工单确认")
+	private Integer orderConfirm;
+
+	/**
+	 * 工单确认时间
+	 */
+	@ApiModelProperty(value = "工单确认时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss",
+		timezone = "GMT+8"
+	)
+	private Date orderConfirmTime;
+
+	/**
+	 * 联系电话
+	 */
+	@ApiModelProperty(value = "联系电话")
+	private String contactPhone;
+
+	/**
+	 * 负责人
+	 */
+	@ApiModelProperty(value = "负责人")
+	private Long contactUser;
+
+	/**
+	 * 工单处理ID
+	 */
+	@ApiModelProperty(value = "工单处理ID")
+	private Long orderProcessId;
+
+	/**
+	 * 工单照片
+	 */
+	@ApiModelProperty(value = "工单照片")
+	private String orderPhotos;
+
+	/**
+	 * 工单视频
+	 */
+	@ApiModelProperty(value = "工单视频")
+	private String orderVideos;
+
+	/**
+	 * 批处理ID,防止重复上传
+	 */
+	@ApiModelProperty(value = "批处理ID")
+	private String batchId;
+
+	/**
+	 * 工单评分
+	 */
+	@ApiModelProperty("工单评分")
+	private Integer orderRate;
+
+	@ApiModelProperty(value = "工单完成时限时间")
+	@DateTimeFormat(
+			pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+			pattern = "yyyy-MM-dd",
+			timezone = "GMT+8"
+	)
+	private Date orderCompleteTime;
+
+
+	@ApiModelProperty(value = "经度")
+	private String longitude;
+
+	@ApiModelProperty(value = "纬度")
+	private String latitude;
+
+	@ApiModelProperty(value = "地址")
+	private String address;
+
+}

+ 426 - 0
src/main/java/org/springblade/modules/business/xjgd/order/entity/OrderProcessRecordInfoEntity.java

@@ -0,0 +1,426 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+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_process")
+public class OrderProcessRecordInfoEntity extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 租户ID
+	 */
+	@ApiModelProperty("租户ID")
+	private String tenantId;
+
+	/**
+	 * 工单ID
+	 */
+	@ApiModelProperty("工单ID")
+	private Long orderId;
+
+	/**
+	 * 工单状态,自定义
+	 */
+	@ApiModelProperty("工单状态")
+	private String orderStatusCode;
+
+
+	/**
+	 * 处理说明
+	 */
+	@ApiModelProperty("处理说明")
+	private String processDesc;
+
+	/**
+	 * 维修前图片一是否拍摄
+	 */
+	@ApiModelProperty("维修前图片一是否拍摄")
+	private Integer baseBeforePhoto1Take;
+
+	/**
+	 * 维修前图片一路径
+	 */
+	@ApiModelProperty("维修前图片一路径")
+	private String baseBeforePhoto1Url;
+
+	/**
+	 * 维修前图片二是否拍摄
+	 */
+	@ApiModelProperty("维修前图片二是否拍摄")
+	private Integer baseBeforePhoto2Take;
+
+	/**
+	 * 维修前图片二路径
+	 */
+	@ApiModelProperty("维修前图片二路径")
+	private String baseBeforePhoto2Url;
+
+	/**
+	 * 维修后图片一是否拍摄
+	 */
+	@ApiModelProperty("维修后图片一是否拍摄")
+	private Integer baseAfterPhoto1Take;
+
+	/**
+	 * 维修后图片一路径
+	 */
+	@ApiModelProperty("维修后图片一路径")
+	private String baseAfterPhoto1Url;
+
+	/**
+	 * 维修后图片二是否拍摄
+	 */
+	@ApiModelProperty("维修后图片二是否拍摄")
+	private Integer baseAfterPhoto2Take;
+
+	/**
+	 * 维修后图片二路径
+	 */
+	@ApiModelProperty("维修后图片二路径")
+	private String baseAfterPhoto2Url;
+
+	/**
+	 * 工单状态,字典
+	 */
+	@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;
+
+	/**
+	 * RTU品牌
+	 */
+	@ApiModelProperty("RTU品牌")
+	private String rtuBrand;
+
+	/**
+	 * RTU型号
+	 */
+	@ApiModelProperty("RTU型号")
+	private String rtuModel;
+
+	/**
+	 * 翻斗式雨量计是否更换: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;
+
+	/**
+	 * 翻斗式雨量计品牌
+	 */
+	@ApiModelProperty("翻斗式雨量计品牌")
+	private String rainSensorBrand;
+
+	/**
+	 * 翻斗式雨量计型号
+	 */
+	@ApiModelProperty("翻斗式雨量计型号")
+	private String rainSensorModel;
+
+	/**
+	 * 水位计是否更换: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;
+
+	/**
+	 * 水位计品牌
+	 */
+	@ApiModelProperty("水位计品牌")
+	private String waterSensorBrand;
+
+	/**
+	 * 水位计型号
+	 */
+	@ApiModelProperty("水位计型号")
+	private String waterSensorModel;
+
+	/**
+	 * 墒情传感器是否更换: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;
+
+	/**
+	 * 墒情传感器品牌
+	 */
+	@ApiModelProperty("墒情传感器品牌")
+	private String groundSensorBrand;
+
+	/**
+	 * 墒情传感器型号
+	 */
+	@ApiModelProperty("墒情传感器型号")
+	private String groundSensorModel;
+
+	/**
+	 *  蓄电池是否更换: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;
+
+
+	/**
+	 * 现场网络讯号状态 0 正常  1无信号
+	 */
+	@ApiModelProperty(value = "现场网络讯号状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer networkSignalStatus;
+
+	/**
+	 * 无信号时,补交图片状态 0 补交中,1补交完成
+	 */
+	@ApiModelProperty(value = "补交图片状态")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer photoSupplementSubmitStatus;
+
+
+	@ApiModelProperty("故障现象描述")
+	private String failureCheckDesc;
+
+	@ApiModelProperty("解决方案描述")
+	private String failureSolutionDesc;
+
+	/**
+	 * 1 不申请  2 申请
+	 */
+	@ApiModelProperty("费用申报")
+	private Integer costsReport;
+
+	@ApiModelProperty("费用说明")
+	private String costsReportDesc;
+
+	@ApiModelProperty("设备部件更换说明")
+	private String equipmentComponentsDesc;
+
+	@ApiModelProperty("处理图片")
+	private String failureProcessPhotos;
+
+	@ApiModelProperty("处理视频")
+	private String failureProcessVideos;
+
+}

+ 114 - 0
src/main/java/org/springblade/modules/business/xjgd/order/mapper/OrderMapper.java

@@ -0,0 +1,114 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.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.xjgd.order.dto.OrderInfoDTO;
+import org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity;
+import org.springblade.modules.business.xjgd.order.vo.OrderInfoVO;
+
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface OrderMapper extends BaseMapper<OrderInfoEntity> {
+
+	/**
+	 * 列表,不分页
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> allOrders(@Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page   分页
+	 * @param checkOrderInfoDTO 实体
+	 * @return List<RtuInfoVO>
+	 */
+	List<OrderInfoVO> selectPage(IPage page, @Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 分页,按异常类型查询
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> selectWarnPage(IPage page, @Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+
+	/**
+	 * 我的任务
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> selectMyPage(IPage page, @Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+
+	/**
+	 * 待办任务
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> selectTodoList(@Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 查询确认超时维修任务
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> selectConfirmDelayPage(IPage page, @Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 未确认任务列表
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> unconfirmOrderList(@Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 未确认任务数量
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	Long unconfirmOrderCount(@Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 已经反馈任务数量
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+//	List<CheckOrderCountVO> orderReportCount(@Param("checkOrderInfoDTO") CheckOrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 任务数量
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	Long orderCount(@Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 未完成任务数量
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	Long unCloseOrderCount(@Param("checkOrderInfoDTO") OrderInfoDTO checkOrderInfoDTO);
+
+}

+ 413 - 0
src/main/java/org/springblade/modules/business/xjgd/order/mapper/OrderMapper.xml

@@ -0,0 +1,413 @@
+<?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.xjgd.order.mapper.OrderMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="checkOrderInfoResultMap"
+               type="org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity">
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="order_desc" property="orderDesc"/>
+        <result column="order_type" property="orderType"/>
+        <result column="order_from_key" property="orderFromKey"/>
+        <result column="order_status_key" property="orderStatusKey"/>
+        <result column="order_status_code" property="orderStatusCode"/>
+        <result column="order_confirm_user" property="orderConfirmUser"/>
+        <result column="warn_id" property="warnId"/>
+        <result column="order_close" property="orderClose"/>
+        <result column="order_confirm" property="orderConfirm"/>
+        <result column="order_confirm_time" property="orderConfirmTime"/>
+        <result column="contact_user" property="contactUser"/>
+        <result column="contact_phone" property="contactPhone"/>
+        <result column="order_process_id" property="orderProcessId"/>
+        <result column="order_photos" property="orderPhotos"/>
+        <result column="order_videos" property="orderVideos"/>
+        <result column="batch_id" property="batchId"/>
+        <result column="order_rate" property="orderRate"/>
+        <result column="order_complete_time" property="orderCompleteTime"/>
+        <result column="longitude" property="longitude"/>
+        <result column="latitude" property="latitude"/>
+        <result column="address" property="address"/>
+        <result column="org_id" property="orgId"/>
+    </resultMap>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="checkOrderInfoVOResultMap" type="org.springblade.modules.business.xjgd.order.vo.OrderInfoVO">
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="order_desc" property="orderDesc"/>
+        <result column="order_type" property="orderType"/>
+        <result column="order_from_key" property="orderFromKey"/>
+        <result column="order_status_key" property="orderStatusKey"/>
+        <result column="order_status_code" property="orderStatusCode"/>
+        <result column="order_confirm_user" property="orderConfirmUser"/>
+        <result column="warn_id" property="warnId"/>
+        <result column="order_close" property="orderClose"/>
+        <result column="order_confirm" property="orderConfirm"/>
+        <result column="order_confirm_time" property="orderConfirmTime"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="location_desc" property="locationDesc"/>
+        <result column="rtu_name" property="rtuName"/>
+        <result column="real_name" property="processorName"/>
+        <result column="ad_city" property="adCity"/>
+        <result column="ad_dist" property="adDist"/>
+        <result column="contact_user" property="contactUser"/>
+        <result column="contact_phone" property="contactPhone"/>
+        <result column="contact_user_name" property="contactUserName"/>
+        <result column="ancestors" property="ancestors"/>
+        <result column="adcd" property="adCode"/>
+        <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_video" property="isVideo"/>
+        <result column="create_order_person_name" property="createOrderPersonName"/>
+        <result column="order_process_id" property="orderProcessId"/>
+        <result column="order_photos" property="orderPhotos"/>
+        <result column="order_videos" property="orderVideos"/>
+        <result column="batch_id" property="batchId"/>
+        <result column="order_rate" property="orderRate"/>
+        <result column="order_complete_time" property="orderCompleteTime"/>
+        <result column="longitude" property="longitude"/>
+        <result column="latitude" property="latitude"/>
+        <result column="address" property="address"/>
+        <result column="org_id" property="orgId"/>
+    </resultMap>
+
+    <resultMap id="checkOrderCountVOResultMap" type="org.springblade.modules.business.check.order.vo.CheckOrderCountVO">
+        <result column="real_name" property="servicePersonName"/>
+        <result column="order_count" property="orderCount"/>
+        <result column="processing_order_count" property="processingOrderCount"/>
+    </resultMap>
+
+    <select id="allOrders" resultMap="checkOrderInfoVOResultMap">
+        SELECT
+        o.*,u.real_name,u3.phone AS contact_phone,i.rtu_name,i.lng,i.lat,i.location_desc,i.ad_city,i.ad_dist,u2.real_name AS contact_user_name ,u3.real_name create_order_person_name
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = o.update_user and u.is_deleted=0
+        LEFT JOIN blade_user u2 ON u2.id = o.contact_user and u2.is_deleted=0
+        LEFT JOIN blade_user u3 ON u3.id = o.create_user and u3.is_deleted=0
+        WHERE
+        o.is_deleted = 0
+        <if test="checkOrderInfoDTO.orgId!=null">
+            and o.org_id = #{checkOrderInfoDTO.orgId}
+        </if>
+        <if test="checkOrderInfoDTO.rtuCode!=null">
+            and o.rtu_code like concat(concat('%', #{checkOrderInfoDTO.rtuCode}), '%')
+        </if>
+        <if test="checkOrderInfoDTO.createOrderPersonName!=null">
+            and  u3.real_name like concat(concat('%', #{checkOrderInfoDTO.createOrderPersonName}), '%')
+        </if>
+        <if test="checkOrderInfoDTO.rtuName!=null">
+            and i.rtu_name like concat(concat('%', #{checkOrderInfoDTO.rtuName}), '%')
+        </if>
+        <if test="checkOrderInfoDTO.contactUser!=null">
+            and o.contact_user = #{checkOrderInfoDTO.contactUser}
+        </if>
+        <if test="checkOrderInfoDTO.orderConfirm!=null">
+            and o.order_confirm = #{checkOrderInfoDTO.orderConfirm}
+        </if>
+        <if test="checkOrderInfoDTO.orderClose!=null">
+            and o.order_close = #{checkOrderInfoDTO.orderClose}
+        </if>
+        <if test="checkOrderInfoDTO.adCode!=null">
+            and (a.adcd =#{checkOrderInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{checkOrderInfoDTO.adCode}), '%')))
+        </if>
+        order by o.create_time ,o.order_confirm ,o.order_close
+    </select>
+
+    <select id="selectPage" resultMap="checkOrderInfoVOResultMap">
+        SELECT
+        o.*,u.real_name,i.rtu_name,i.is_rain,i.is_river,i.is_res,i.is_ground,i.is_video,i.lng,i.lat,i.location_desc,i.ad_city,i.ad_dist,u2.real_name AS contact_user_name,a.adcd,a.ancestors,u2.real_name create_order_persion_name,u2.phone AS contact_phone
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN data_warning_info w ON w.rtu_code = o.rtu_code and w.is_deleted = 0 and w.warning_kind=1
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = o.update_user and u.is_deleted=0
+        LEFT JOIN blade_user u2 ON u2.id = o.create_user and u2.is_deleted=0
+        LEFT JOIN blade_dict_biz b ON b.id = o.order_status_key and b.is_deleted=0
+        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.contactUser!=null">
+            and o.contact_user = #{checkOrderInfoDTO.contactUser}
+        </if>
+        <if test="checkOrderInfoDTO.orderConfirm!=null">
+            and o.order_confirm = #{checkOrderInfoDTO.orderConfirm}
+        </if>
+        <if test="checkOrderInfoDTO.orderClose!=null">
+            and o.order_close = #{checkOrderInfoDTO.orderClose}
+        </if>
+
+        <if test="checkOrderInfoDTO.createOrderPersonName!=null">
+            and  u2.real_name like concat(concat('%', #{checkOrderInfoDTO.createOrderPersonName}), '%')
+        </if>
+
+        <if test="checkOrderInfoDTO.orderStatusCode!=null">
+            and FIND_IN_SET(o.order_status_code,#{checkOrderInfoDTO.orderStatusCode}) > 0
+        </if>
+        <if test="checkOrderInfoDTO.orderConfirmUser!=null">
+            and (o.order_confirm_user = #{checkOrderInfoDTO.orderConfirmUser} or o.order_status_code='1')
+        </if>
+
+        <choose>
+            <when test="checkOrderInfoDTO.createTimeSort!=null and checkOrderInfoDTO.createTimeSort==0">
+                order by o.create_time desc
+            </when>
+            <when test="checkOrderInfoDTO.createTimeSort!=null and checkOrderInfoDTO.createTimeSort==1">
+                order by o.create_time
+            </when>
+            <otherwise>
+                order by o.create_time desc
+            </otherwise>
+        </choose>
+
+    </select>
+
+    <select id="selectWarnPage" resultMap="checkOrderInfoVOResultMap">
+        SELECT
+        o.*,u.real_name,i.rtu_name,i.is_rain,i.is_river,i.is_res,i.is_ground,i.is_video,i.lng,i.lat,i.location_desc,i.ad_city,i.ad_dist,u2.real_name AS contact_user_name,a.adcd,a.ancestors
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN data_warning_info w ON w.rtu_code = o.rtu_code and w.is_deleted = 0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = o.update_user and u.is_deleted=0
+        LEFT JOIN blade_user u2 ON u2.id = o.contact_user and u2.is_deleted=0
+        WHERE
+        o.is_deleted = 0
+        and w.warning_kind = #{checkOrderInfoDTO.warnKind}
+        <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.contactUser!=null">
+            and o.contact_user = #{checkOrderInfoDTO.contactUser}
+        </if>
+        <if test="checkOrderInfoDTO.orderConfirm!=null">
+            and o.order_confirm = #{checkOrderInfoDTO.orderConfirm}
+        </if>
+        <if test="checkOrderInfoDTO.orderClose!=null">
+            and o.order_close = #{checkOrderInfoDTO.orderClose}
+        </if>
+        <if test="checkOrderInfoDTO.adCode!=null">
+            and (a.adcd =#{checkOrderInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{checkOrderInfoDTO.adCode}), '%')))
+        </if>
+        <choose>
+            <when test="checkOrderInfoDTO.createTimeSort!=null and checkOrderInfoDTO.createTimeSort==0">
+                order by o.create_time desc
+            </when>
+            <when test="checkOrderInfoDTO.createTimeSort!=null and checkOrderInfoDTO.createTimeSort==1">
+                order by o.create_time
+            </when>
+            <otherwise>
+                order by o.create_time desc
+            </otherwise>
+        </choose>
+    </select>
+
+    <select id="selectMyPage" resultMap="checkOrderInfoVOResultMap">
+        SELECT
+        o.*,u.real_name,i.rtu_name,i.lng,i.lat,i.location_desc,i.ad_city,i.ad_dist,u2.real_name AS contact_user_name,a.adcd,a.ancestors
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = o.update_user and u.is_deleted=0
+        LEFT JOIN blade_user u2 ON u2.id = o.contact_user and u2.is_deleted=0
+        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.contactUser!=null">
+            and o.contact_user = #{checkOrderInfoDTO.contactUser}
+        </if>
+        <if test="checkOrderInfoDTO.orderConfirm!=null">
+            and o.order_confirm = #{checkOrderInfoDTO.orderConfirm}
+        </if>
+        <if test="checkOrderInfoDTO.orderClose!=null">
+            and o.order_close = #{checkOrderInfoDTO.orderClose}
+        </if>
+        <if test="checkOrderInfoDTO.adCode!=null">
+            and (a.adcd =#{checkOrderInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{checkOrderInfoDTO.adCode}), '%')))
+        </if>
+        order by o.order_confirm_time  desc
+    </select>
+
+    <select id="selectTodoList" resultMap="checkOrderInfoVOResultMap">
+        SELECT
+        o.*,u.real_name create_order_persion_name,i.rtu_name,i.lng,i.lat,i.location_desc,i.ad_city,i.ad_dist
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = o.update_user and u.is_deleted=0
+        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.contactUser!=null">
+            and o.contact_user = #{checkOrderInfoDTO.contactUser}
+        </if>
+        <if test="checkOrderInfoDTO.orderStatusKey!=null">
+            and o.order_status_key = #{checkOrderInfoDTO.orderStatusKey}
+        </if>
+
+        order by o.create_time  desc
+    </select>
+
+
+    <select id="selectConfirmDelayPage" resultMap="checkOrderInfoVOResultMap">
+        SELECT
+        o.*,u.real_name,i.rtu_name,i.lng,i.lat,i.location_desc,i.ad_city,i.ad_dist,u2.real_name AS contact_user_name,a.adcd,a.ancestors
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = o.update_user and u.is_deleted=0
+        LEFT JOIN blade_user u2 ON u2.id = o.contact_user and u2.is_deleted=0
+        WHERE
+        o.is_deleted = 0
+        and o.order_confirm = 0
+        and (now() > date_add(o.create_time ,interval #{checkOrderInfoDTO.orderComfireDelayTime} minute))
+        <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.adCode!=null">
+            and (a.adcd =#{checkOrderInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{checkOrderInfoDTO.adCode}), '%')))
+        </if>
+        order by o.create_time
+    </select>
+
+    <select id="orderCount" resultType="java.lang.Long">
+        SELECT
+        count(*)
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON o.rtu_code = i.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        WHERE
+        o.is_deleted = 0
+        <if test="checkOrderInfoDTO.orgId!=null">
+            and o.org_id = #{checkOrderInfoDTO.orgId}
+        </if>
+        <if test="checkOrderInfoDTO.orderStatusKey!=null">
+            and o.order_status_key = #{checkOrderInfoDTO.orderStatusKey}
+        </if>
+        <if test="checkOrderInfoDTO.orderClose!=null">
+            and o.order_close = #{checkOrderInfoDTO.orderClose}
+        </if>
+        <if test="checkOrderInfoDTO.orderConfirm!=null">
+            and o.order_confirm = #{checkOrderInfoDTO.orderConfirm}
+        </if>
+        <if test="checkOrderInfoDTO.contactUser!=null">
+            and o.contact_user = #{checkOrderInfoDTO.contactUser}
+        </if>
+        <if test="checkOrderInfoDTO.adCode!=null">
+            and (a.adcd =#{checkOrderInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{checkOrderInfoDTO.adCode}), '%')))
+        </if>
+    </select>
+
+    <select id="unCloseOrderCount" resultType="java.lang.Long">
+        SELECT
+        count(*)
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        WHERE
+        o.is_deleted = 0
+        and o.order_close =0
+        and o.order_confirm=1
+        <if test="checkOrderInfoDTO.adCode!=null">
+            and (a.adcd =#{checkOrderInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{checkOrderInfoDTO.adCode}), '%')))
+        </if>
+        order by o.create_time asc
+    </select>
+
+    <select id="unconfirmOrderList" resultMap="checkOrderInfoVOResultMap">
+        SELECT
+        o.*,u.real_name,i.rtu_name,i.lng,i.lat,i.location_desc,i.ad_city,i.ad_dist,u3.real_name create_order_persion_name
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id = o.update_user and u.is_deleted=0
+        LEFT JOIN blade_user u3 ON u3.id = o.create_user and u3.is_deleted=0
+        WHERE
+        o.is_deleted = 0
+        and o.order_confirm = 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.adCode!=null">
+            and (a.adcd =#{checkOrderInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{checkOrderInfoDTO.adCode}), '%')))
+        </if>
+        order by o.create_time asc limit 10
+    </select>
+
+
+    <select id="unconfirmOrderCount" resultType="java.lang.Long">
+        SELECT
+        count(*)
+        FROM
+        rtu_failure_check_order o
+        LEFT JOIN rtu_info i ON i.rtu_code = o.rtu_code and i.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = i.ad_code and a.is_deleted=0
+        WHERE
+        o.is_deleted = 0
+        and o.order_confirm = 0
+        <if test="checkOrderInfoDTO.adCode!=null">
+            and (a.adcd =#{checkOrderInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors like concat(concat('%', #{checkOrderInfoDTO.adCode}), '%')))
+        </if>
+    </select>
+
+    <!--<select id="orderReportCount" resultMap="checkOrderCountVOResultMap">-->
+        <!--SELECT u.real_name,u.id,o.order_count,o2.processing_order_count FROM blade_user u LEFT JOIN-->
+        <!--(SELECT order_confirm_user,count(id) as order_count FROM rtu_failure_check_order WHERE is_deleted=0 AND-->
+        <!--order_confirm_user is not null AND order_confirm =1 GROUP BY order_confirm_user) o-->
+        <!--on u.id = o.order_confirm_user-->
+        <!--LEFT JOIN-->
+        <!--(SELECT order_confirm_user,count(id) as processing_order_count FROM rtu_failure_check_order WHERE is_deleted=0-->
+        <!--AND-->
+        <!--order_confirm_user is not null AND order_confirm =1 AND order_close=0 GROUP BY order_confirm_user) o2-->
+        <!--on u.id = o2.order_confirm_user-->
+        <!--WHERE u.is_deleted =0-->
+        <!--<if test="checkOrderInfoDTO.orgId!=null">-->
+            <!--AND u.dept_id = #{checkOrderInfoDTO.orgId}-->
+        <!--</if>-->
+    <!--</select>-->
+
+
+</mapper>

+ 60 - 0
src/main/java/org/springblade/modules/business/xjgd/order/mapper/OrderProcessMapper.java

@@ -0,0 +1,60 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.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.xjgd.order.dto.OrderProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.order.vo.OrderProcessRecordInfoVO;
+
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface OrderProcessMapper extends BaseMapper<OrderProcessRecordInfoEntity> {
+	List<OrderProcessRecordInfoVO> selectList(@Param("dto") OrderProcessRecordInfoDTO dto);
+
+	OrderProcessRecordInfoVO selectLastReport(@Param("dto") OrderProcessRecordInfoDTO dto);
+
+	List<OrderProcessRecordInfoVO> selectPage(IPage page, @Param("dto") OrderProcessRecordInfoDTO dto);
+	/**
+	 * 查询当天提交的工单填报信息
+	 * @param processInfoDTO
+	 * @return
+	 */
+	List<OrderProcessRecordInfoVO> selectTodayProcessList(@Param("processInfoDTO") OrderProcessRecordInfoDTO processInfoDTO);
+
+
+	/**
+	 * 分页,查询当天提交的工单填报信息
+	 * @param page
+	 * @param processInfoDTO
+	 * @return
+	 */
+	List<OrderProcessRecordInfoVO> selectTodayProcessPage(IPage page, @Param("processInfoDTO") OrderProcessRecordInfoDTO processInfoDTO);
+
+	/**
+	 * 查询维修任务上报时无网络信号列表
+	 *
+	 * @param page
+	 * @param processInfoDTO
+	 * @return
+	 */
+	List<OrderProcessRecordInfoVO> selectNoNetworkSignalPage(IPage page, @Param("processInfoDTO") OrderProcessRecordInfoDTO processInfoDTO);
+
+
+	long todayProcessCount(@Param("processInfoDTO") OrderProcessRecordInfoDTO processInfoDTO);
+}

+ 325 - 0
src/main/java/org/springblade/modules/business/xjgd/order/mapper/OrderProcessMapper.xml

@@ -0,0 +1,325 @@
+<?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.xjgd.order.mapper.OrderProcessMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderProcessInfoResultMap"
+               type="org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity">
+
+
+        <result column="order_id" property="orderId"/>
+        <result column="process_desc" property="processDesc"/>
+        <result column="order_status_key" property="orderStatusKey"/>
+        <result column="order_status_code" property="orderStatusCode"/>
+        <result column="rtu_replace" property="rtuReplace"/>
+        <result column="rtu_desc" property="rtuDesc"/>
+        <result column="rtu_status" property="rtuStatus"/>
+        <result column="rtu_brand" property="rtuBrand"/>
+        <result column="rtu_model" property="rtuModel"/>
+        <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="rain_sensor_brand" property="rainSensorBrand"/>
+        <result column="rain_sensor_model" property="rainSensorModel"/>
+        <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="water_sensor_brand" property="waterSensorBrand"/>
+        <result column="water_sensor_model" property="waterSensorModel"/>
+        <result column="ground_sensor_replace" 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="ground_sensor_brand" property="groundSensorBrand"/>
+        <result column="ground_sensor_model" property="groundSensorModel"/>
+        <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_before_photo1_take" property="baseBeforePhoto1Take"/>
+        <result column="base_before_photo1_url" property="baseBeforePhoto1Url"/>
+        <result column="base_before_photo2_take" property="baseBeforePhoto2Take"/>
+        <result column="base_before_photo2_url" property="baseBeforePhoto2Url"/>
+        <result column="base_after_photo1_take" property="baseAfterPhoto1Take"/>
+        <result column="base_after_photo1_url" property="baseAfterPhoto1Url"/>
+        <result column="base_after_photo2_take" property="baseAfterPhoto2Take"/>
+        <result column="base_after_photo2_url" property="baseAfterPhoto2Url"/>
+
+        <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="network_signal_status" property="networkSignalStatus"/>
+        <result column="photo_supplement_submit_status" property="photoSupplementSubmitStatus"/>
+
+        <result column="failure_check_desc" property="failureCheckDesc"/>
+        <result column="failure_solution_desc" property="failureSolutionDesc"/>
+        <result column="costs_report" property="costsReport"/>
+        <result column="costs_report_desc" property="costsReportDesc"/>
+        <result column="failure_process_photos" property="failureProcessPhotos"/>
+        <result column="equipment_components_desc" property="equipmentComponentsDesc"/>
+
+    </resultMap>
+
+    <resultMap id="orderProcessInfoVOResultMap"
+               type="org.springblade.modules.business.xjgd.order.vo.OrderProcessRecordInfoVO">
+
+        <result column="order_id" property="orderId"/>
+        <result column="process_desc" property="processDesc"/>
+        <result column="order_status_key" property="orderStatusKey"/>
+        <result column="order_status_code" property="orderStatusCode"/>
+        <result column="rtu_replace" property="rtuReplace"/>
+        <result column="rtu_desc" property="rtuDesc"/>
+        <result column="rtu_status" property="rtuStatus"/>
+        <result column="rtu_brand" property="rtuBrand"/>
+        <result column="rtu_model" property="rtuModel"/>
+        <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="rain_sensor_brand" property="rainSensorBrand"/>
+        <result column="rain_sensor_model" property="rainSensorModel"/>
+        <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="water_sensor_brand" property="waterSensorBrand"/>
+        <result column="water_sensor_model" property="waterSensorModel"/>
+        <result column="ground_sensor_replace" 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="ground_sensor_brand" property="groundSensorBrand"/>
+        <result column="ground_sensor_model" property="groundSensorModel"/>
+        <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_before_photo1_take" property="baseBeforePhoto1Take"/>
+        <result column="base_before_photo1_url" property="baseBeforePhoto1Url"/>
+        <result column="base_before_photo2_take" property="baseBeforePhoto2Take"/>
+        <result column="base_before_photo2_url" property="baseBeforePhoto2Url"/>
+        <result column="base_after_photo1_take" property="baseAfterPhoto1Take"/>
+        <result column="base_after_photo1_url" property="baseAfterPhoto1Url"/>
+        <result column="base_after_photo2_take" property="baseAfterPhoto2Take"/>
+        <result column="base_after_photo2_url" property="baseAfterPhoto2Url"/>
+        <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="rtu_name" property="rtuName"/>
+        <result column="rtu_code" property="rtuCode"/>
+        <result column="real_name" property="orderProcessUserName"/>
+        <result column="dict_value" property="orderStatusName"/>
+        <result column="order_confirm_user" property="orderConfirmUser"/>
+        <result column="network_signal_status" property="networkSignalStatus"/>
+        <result column="photo_supplement_submit_status" property="photoSupplementSubmitStatus"/>
+        <result column="ad_city" property="adCity"/>
+        <result column="ad_dist" property="adDist"/>
+
+        <result column="failure_check_desc" property="failureCheckDesc"/>
+        <result column="failure_solution_desc" property="failureSolutionDesc"/>
+        <result column="costs_report" property="costsReport"/>
+        <result column="costs_report_desc" property="costsReportDesc"/>
+        <result column="failure_process_photos" property="failureProcessPhotos"/>
+        <result column="failure_process_videos" property="failureProcessVideos"/>
+
+        <result column="equipment_components_desc" property="equipmentComponentsDesc"/>
+
+    </resultMap>
+
+    <select id="selectList" resultMap="orderProcessInfoVOResultMap">
+        SELECT
+        p.*,u.real_name,o.order_confirm_user
+        FROM
+        rtu_failure_check_order_process p
+        LEFT JOIN blade_user u ON u.id = p.update_user and u.is_deleted=0
+        LEFT JOIN rtu_failure_check_order o ON o.id = p.order_id and o.is_deleted=0
+        WHERE
+        p.is_deleted = 0
+        <if test="dto.orderId!=null">
+            and p.order_id =#{dto.orderId}
+        </if>
+        order by p.create_time
+    </select>
+
+    <select id="selectPage" resultMap="orderProcessInfoVOResultMap">
+        SELECT
+        p.*,u.real_name,o.order_confirm_user
+        FROM
+        rtu_failure_check_order_process p
+        LEFT JOIN blade_user u ON u.id = p.update_user and u.is_deleted=0
+        LEFT JOIN rtu_failure_check_order o ON o.id = p.order_id and o.is_deleted=0
+        WHERE
+        p.is_deleted = 0
+        <if test="dto.orderId!=null">
+            and p.order_id =#{dto.orderId}
+        </if>
+        order by p.create_time
+    </select>
+
+    <select id="selectLastReport" resultMap="orderProcessInfoVOResultMap">
+        SELECT
+        p.*,u.real_name
+        FROM
+        rtu_failure_check_order_process p
+        LEFT JOIN blade_user u ON u.id = p.update_user and u.is_deleted=0
+        WHERE
+        p.is_deleted = 0
+        <if test="dto.orderId!=null">
+            and p.order_id =#{dto.orderId}
+        </if>
+        <if test="dto.orderStatusKey!=null">
+            and p.order_status_key =#{dto.orderStatusKey}
+        </if>
+        order by p.create_time desc
+        limit 1
+    </select>
+
+    <select id="selectTodayProcessList" resultMap="orderProcessInfoVOResultMap">
+        SELECT
+        p.*,r.rtu_code,r.rtu_name,u.real_name,d.dict_value,r.ad_city,r.ad_dist,a.adcd,a.ancestors
+        FROM
+        rtu_failure_check_order_process p
+        LEFT JOIN rtu_failure_check_order o ON o.id=p.order_id
+        LEFT JOIN rtu_info r ON r.rtu_code = o.rtu_code
+        LEFT JOIN data_ad_cd_b a ON a.adcd = r.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id=p.create_user
+        LEFT JOIN blade_dict_biz d ON p.order_status_key=d.id
+        WHERE
+        p.is_deleted = 0
+        <if test="processInfoDTO.createTime!=null">
+            and   DATE_FORMAT(p.create_time,'%Y-%m-%d') = DATE_FORMAT(#{processInfoDTO.createTime},'%Y-%m-%d')
+        </if>
+        <if test="processInfoDTO.rtuCode!=null">
+            and r.rtu_code like concat(concat('%', #{processInfoDTO.rtuCode}), '%')
+        </if>
+        <if test="processInfoDTO.rtuName!=null">
+            and r.rtu_name like concat(concat('%', #{processInfoDTO.rtuName}), '%')
+        </if>
+        <if test="processInfoDTO.adCode!=null">
+            and (a.adcd =#{processInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE ancestors  like concat(concat('%', #{processInfoDTO.adCode}), '%')))
+        </if>
+        order by p.create_time desc
+        limit 10
+    </select>
+
+
+    <select id="selectTodayProcessPage" resultMap="orderProcessInfoVOResultMap">
+        SELECT
+        p.*,r.rtu_code,r.rtu_name,u.real_name,d.dict_value,r.ad_city,r.ad_dist,a.adcd,a.ancestors
+        FROM
+        rtu_failure_check_order_process p
+        LEFT JOIN rtu_failure_check_order o ON o.id=p.order_id
+        LEFT JOIN rtu_info r ON r.rtu_code = o.rtu_code
+        LEFT JOIN data_ad_cd_b a ON a.adcd = r.ad_code and a.is_deleted=0
+        LEFT JOIN blade_user u ON u.id=p.create_user
+        LEFT JOIN blade_dict_biz d ON p.order_status_key=d.id
+        WHERE
+        p.is_deleted = 0
+        <if test="processInfoDTO.createTime!=null">
+            and   DATE_FORMAT(p.create_time,'%Y-%m-%d') = DATE_FORMAT(#{processInfoDTO.createTime},'%Y-%m-%d')
+        </if>
+        <if test="processInfoDTO.rtuCode!=null">
+            and r.rtu_code like concat(concat('%', #{processInfoDTO.rtuCode}), '%')
+        </if>
+        <if test="processInfoDTO.rtuName!=null">
+            and r.rtu_name like concat(concat('%', #{processInfoDTO.rtuName}), '%')
+        </if>
+        <if test="processInfoDTO.adCode!=null">
+            and (a.adcd =#{processInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE ancestors  like concat(concat('%', #{processInfoDTO.adCode}), '%')))
+        </if>
+        order by p.create_time desc
+    </select>
+
+
+    <select id="todayProcessCount" resultType="java.lang.Long">
+        select  count(*) from
+        ( SELECT
+        o.rtu_code
+        FROM
+        rtu_failure_check_order_process p
+        LEFT JOIN rtu_failure_check_order o ON o.id=p.order_id
+        LEFT JOIN rtu_info r ON r.rtu_code = o.rtu_code and r.is_deleted=0
+        LEFT JOIN data_ad_cd_b a ON a.adcd = r.ad_code and a.is_deleted=0
+
+        WHERE
+        p.is_deleted = 0
+        <if test="processInfoDTO.createTime!=null">
+            and   DATE_FORMAT(p.create_time,'%Y-%m-%d') = DATE_FORMAT(#{processInfoDTO.createTime},'%Y-%m-%d')
+        </if>
+
+        <if test="processInfoDTO.adCode!=null">
+            and (a.adcd =#{processInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE ancestors  like concat(concat('%', #{processInfoDTO.adCode}), '%')))
+        </if>
+        group by o.rtu_code ) s
+
+    </select>
+
+
+
+
+    <select id="selectNoNetworkSignalPage" resultMap="orderProcessInfoVOResultMap">
+        SELECT
+        p.*,u.real_name,o.rtu_code,r.rtu_name,r.ad_city,r.ad_dist
+        FROM
+        rtu_failure_check_order_process p
+        LEFT JOIN blade_user u ON u.id = p.update_user and u.is_deleted=0
+        LEFT JOIN rtu_failure_check_order o ON o.id=p.order_id
+        LEFT JOIN rtu_info r ON r.rtu_code = o.rtu_code
+        LEFT JOIN data_ad_cd_b a ON a.adcd = r.ad_code and a.is_deleted=0
+        WHERE
+        p.is_deleted = 0
+        and p.network_signal_status = 1
+        <if test="processInfoDTO.rtuName!=null">
+            and r.rtu_name like concat(concat('%', #{processInfoDTO.rtuName}), '%')
+        </if>
+        <if test="processInfoDTO.rtuCode!=null">
+            and r.rtu_code like concat(concat('%', #{processInfoDTO.rtuCode}), '%')
+        </if>
+        <if test="processInfoDTO.adCode!=null">
+            and (r.ad_code =#{processInfoDTO.adCode} or a.ancestors in (SELECT ancestors FROM data_ad_cd_b WHERE
+            ancestors
+            like concat(concat('%', #{processInfoDTO.adCode}), '%')))
+        </if>
+        order by  p.photo_supplement_submit_status ASC,p.create_time ASC,o.rtu_code ASC
+
+    </select>
+
+</mapper>

+ 66 - 0
src/main/java/org/springblade/modules/business/xjgd/order/service/IOrderProcessService.java

@@ -0,0 +1,66 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+
+import org.springblade.modules.business.xjgd.order.dto.OrderProcessRecordInfoDTO;
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.order.vo.OrderProcessRecordInfoVO;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IOrderProcessService extends BaseService<OrderProcessRecordInfoEntity> {
+
+	List<OrderProcessRecordInfoVO> selectList(OrderProcessRecordInfoDTO dto);
+
+
+	OrderProcessRecordInfoVO selectLastReport(OrderProcessRecordInfoDTO dto);
+
+	/**
+	 * 按工单ID查找填报处理记录
+	 * @param page
+	 * @param dto
+	 * @return
+	 */
+	IPage<OrderProcessRecordInfoVO> selectPage(IPage<OrderProcessRecordInfoVO> page, OrderProcessRecordInfoDTO dto);
+
+	/**
+	 * 查询当天提交的工单填报信息
+	 * @param processInfoDTO
+	 * @return
+	 */
+	List<OrderProcessRecordInfoVO> selectTodayProcessList(OrderProcessRecordInfoDTO processInfoDTO);
+
+	long todayProcessCount(OrderProcessRecordInfoDTO processInfoDTO);
+
+	/**
+	 * 查询当天提交的工单填报信息 分页
+	 * @param processInfoDTO
+	 * @return
+	 */
+	IPage<OrderProcessRecordInfoVO> selectTodayProcessPage(IPage<OrderProcessRecordInfoVO> page, OrderProcessRecordInfoDTO processInfoDTO);
+
+
+	/**
+	 * 查询维修上报时无网络信号列表
+	 *
+	 * @param page
+	 * @param processInfoDTO
+	 * @return
+	 */
+	IPage<OrderProcessRecordInfoVO> selectNoNetworkSignalPage(IPage<OrderProcessRecordInfoVO> page, OrderProcessRecordInfoDTO processInfoDTO);
+}

+ 131 - 0
src/main/java/org/springblade/modules/business/xjgd/order/service/IOrderService.java

@@ -0,0 +1,131 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+
+import org.springblade.modules.business.warning.entity.RtuWarningInfoEntity;
+import org.springblade.modules.business.xjgd.order.dto.OrderInfoDTO;
+import org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity;
+import org.springblade.modules.business.xjgd.order.vo.OrderInfoVO;
+
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public interface IOrderService extends BaseService<OrderInfoEntity> {
+	/**
+	 * 列表,不分页
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> allOrders(OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 自定义分页
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	IPage<OrderInfoVO> selectPage(IPage<OrderInfoVO> page, OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 分页,按异常类型查询
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	IPage<OrderInfoVO> selectWarnPage(IPage<OrderInfoVO> page, OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 我的任务
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	IPage<OrderInfoVO> selectMyPage(IPage<OrderInfoVO> page, OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 待办任务
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> selectTodoList(OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 查询确认超时维修任务
+	 * @param page
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	IPage<OrderInfoVO> selectConfirmDelayPage(IPage<OrderInfoVO> page, OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 未确认任务数量
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	Long unconfirmOrderCount(OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 未确认任务列表
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	List<OrderInfoVO> unconfirmOrderList(OrderInfoDTO checkOrderInfoDTO);
+
+
+	/**
+	 * 更新工单状态
+	 * @param orderInfoEntity
+	 * @return
+	 */
+	boolean updateOrderStatus(OrderInfoEntity orderInfoEntity);
+
+	/**
+	 *
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+//	List<CheckOrderCountVO> orderReportCount(CheckOrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 任务总数
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	Long orderCount(OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 未关闭任务总数
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	Long unCloseOrderCount(OrderInfoDTO checkOrderInfoDTO);
+
+
+	/**
+	 * 关闭维修任务
+	 * @param checkOrderInfoDTO
+	 * @return
+	 */
+	boolean closeOrder(OrderInfoDTO checkOrderInfoDTO);
+
+	/**
+	 * 创建或更新维修任务
+	 * @param rtuWarningInfoEntity
+	 * @return
+	 */
+	boolean createOrUpdateOrder(RtuWarningInfoEntity rtuWarningInfoEntity);
+}

+ 69 - 0
src/main/java/org/springblade/modules/business/xjgd/order/service/impl/OrderProcessServiceImpl.java

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

+ 270 - 0
src/main/java/org/springblade/modules/business/xjgd/order/service/impl/OrderServiceImpl.java

@@ -0,0 +1,270 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.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.constant.BusinessConstant;
+import org.springblade.constant.DictBusinessConstant;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.enums.OrderCloseEnum;
+import org.springblade.enums.OrderConfirmEnum;
+import org.springblade.enums.OrderFromEnum;
+import org.springblade.enums.OrderStatusEnum;
+import org.springblade.modules.baseinfo.dict.entity.DictInfoEntity;
+import org.springblade.modules.baseinfo.dict.service.IBaseInfoDictService;
+import org.springblade.modules.baseinfo.org.entity.DeptRegionEntity;
+import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
+import org.springblade.modules.baseinfo.region.entity.RegionInfoEntity;
+import org.springblade.modules.baseinfo.region.service.IBaseRegionService;
+import org.springblade.modules.baseinfo.rtu.entity.RtuInfoEntity;
+import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
+import org.springblade.modules.business.warning.entity.RtuWarningInfoEntity;
+import org.springblade.modules.business.xjgd.order.dto.OrderInfoDTO;
+import org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity;
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.order.mapper.OrderMapper;
+import org.springblade.modules.business.xjgd.order.service.IOrderProcessService;
+import org.springblade.modules.business.xjgd.order.service.IOrderService;
+import org.springblade.modules.business.xjgd.order.vo.OrderInfoVO;
+import org.springblade.modules.system.entity.Dept;
+import org.springblade.modules.system.entity.Role;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IDeptService;
+import org.springblade.modules.system.service.IRoleService;
+import org.springblade.modules.system.service.IUserService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Service
+public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, OrderInfoEntity> implements IOrderService {
+	@Resource
+	private IBaseInfoDictService baseInfoDictService;
+
+	@Resource
+	private IRtuBaseInfoService rtuBaseInfoService;
+
+	@Resource
+	private IUserService userService;
+
+	@Resource
+	private IOrderProcessService orderProcessService;
+
+	@Resource
+	private IBaseRegionService baseInfoRegionService;
+
+	@Resource
+	private IDeptRegionService deptRegionService;
+
+	@Resource
+	private IDeptService deptService;
+
+	@Resource
+	private IRoleService roleService;
+
+	@Override
+	public List<OrderInfoVO> allOrders(OrderInfoDTO checkOrderInfoDTO) {
+		return baseMapper.allOrders(checkOrderInfoDTO);
+	}
+
+	@Override
+	public IPage<OrderInfoVO> selectPage(IPage<OrderInfoVO> page, OrderInfoDTO checkOrderInfoDTO) {
+		return page.setRecords(baseMapper.selectPage(page, checkOrderInfoDTO));
+	}
+
+	@Override
+	public IPage<OrderInfoVO> selectWarnPage(IPage<OrderInfoVO> page, OrderInfoDTO checkOrderInfoDTO) {
+		return page.setRecords(baseMapper.selectWarnPage(page, checkOrderInfoDTO));
+	}
+
+	@Override
+	public IPage<OrderInfoVO> selectMyPage(IPage<OrderInfoVO> page, OrderInfoDTO checkOrderInfoDTO) {
+		return page.setRecords(baseMapper.selectMyPage(page, checkOrderInfoDTO));
+	}
+
+	@Override
+	public List<OrderInfoVO> selectTodoList(OrderInfoDTO checkOrderInfoDTO) {
+		return baseMapper.selectTodoList(checkOrderInfoDTO);
+	}
+
+	@Override
+	public IPage<OrderInfoVO> selectConfirmDelayPage(IPage<OrderInfoVO> page, OrderInfoDTO checkOrderInfoDTO) {
+		return page.setRecords(baseMapper.selectConfirmDelayPage(page, checkOrderInfoDTO));
+	}
+
+	@Override
+	public Long unconfirmOrderCount(OrderInfoDTO checkOrderInfoDTO) {
+		return baseMapper.unconfirmOrderCount(checkOrderInfoDTO);
+	}
+
+	@Override
+	public List<OrderInfoVO> unconfirmOrderList(OrderInfoDTO checkOrderInfoDTO) {
+
+		return baseMapper.unconfirmOrderList(checkOrderInfoDTO);
+	}
+
+	@Override
+	public boolean updateOrderStatus(OrderInfoEntity orderInfoEntity) {
+
+		LambdaUpdateWrapper<OrderInfoEntity> updateWrapper = Wrappers.<OrderInfoEntity>update().lambda();
+		updateWrapper.eq(OrderInfoEntity::getId, orderInfoEntity.getId());
+		updateWrapper.set(OrderInfoEntity::getOrderStatusKey, orderInfoEntity.getOrderStatusKey());
+		updateWrapper.set(OrderInfoEntity::getOrderDesc, orderInfoEntity.getOrderDesc());
+		updateWrapper.set(OrderInfoEntity::getUpdateTime, new Date());
+		this.update(updateWrapper);
+
+		return false;
+	}
+
+//	@Override
+//	public List<OrderInfoVO> orderReportCount(OrderInfoDTO checkOrderInfoDTO) {
+//		return baseMapper.orderReportCount(checkOrderInfoDTO);
+//	}
+
+	@Override
+	public Long orderCount(OrderInfoDTO checkOrderInfoDTO) {
+		return baseMapper.orderCount(checkOrderInfoDTO);
+	}
+
+	@Override
+	public Long unCloseOrderCount(OrderInfoDTO checkOrderInfoDTO) {
+		return baseMapper.unCloseOrderCount(checkOrderInfoDTO);
+	}
+
+	@Override
+	public boolean closeOrder(OrderInfoDTO checkOrderInfoDTO) {
+		LambdaQueryWrapper<OrderInfoEntity> wrapper = Wrappers.<OrderInfoEntity>query().lambda();
+		wrapper.eq(OrderInfoEntity::getIsDeleted, 0);
+		wrapper.eq(OrderInfoEntity::getRtuCode, checkOrderInfoDTO.getRtuCode());
+		wrapper.eq(OrderInfoEntity::getOrderClose, OrderCloseEnum.ACTIVE_OPEN.getCode());
+		OrderInfoEntity checkOrderInfoEntity = this.getOne(wrapper);
+		if (null != checkOrderInfoEntity) {
+			//DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE.getCode());
+			//更新工单状态
+		//	checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+			checkOrderInfoEntity.setOrderClose(OrderCloseEnum.ACTIVE_CLOSE.getCode());
+			checkOrderInfoEntity.setOrderConfirm(OrderConfirmEnum.ACTIVE_CONFIRM.getCode());
+			checkOrderInfoEntity.setUpdateUser(BusinessConstant.SYS_ADMIN_ID);
+			checkOrderInfoEntity.setUpdateTime(new Date());
+			this.updateById(checkOrderInfoEntity);
+			//增加工单处理关闭记
+			OrderProcessRecordInfoEntity processInfoEntity = new OrderProcessRecordInfoEntity();
+			processInfoEntity.setProcessDesc("由系统自动关闭维修任务");
+			processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+		//	processInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+			processInfoEntity.setCreateUser(BusinessConstant.SYS_ADMIN_ID);
+			processInfoEntity.setUpdateUser(BusinessConstant.SYS_ADMIN_ID);
+			processInfoEntity.setUpdateTime(new Date());
+			processInfoEntity.setCreateTime(new Date());
+			orderProcessService.save(processInfoEntity);
+		}
+		return true;
+	}
+
+	@Override
+	public boolean createOrUpdateOrder(RtuWarningInfoEntity rtuWarningInfoEntity) {
+		//DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CREATE.getCode());
+		DictInfoEntity fromdict = baseInfoDictService.getDict(DictBusinessConstant.ORDER_FROM_CODE, OrderFromEnum.FROM_WARNING.getCode());
+		//查询是否已经创建工单
+		LambdaQueryWrapper<OrderInfoEntity> wrapper = Wrappers.<OrderInfoEntity>query().lambda();
+		wrapper.eq(OrderInfoEntity::getIsDeleted, 0);
+		wrapper.eq(OrderInfoEntity::getRtuCode, rtuWarningInfoEntity.getRtuCode());
+		wrapper.eq(OrderInfoEntity::getOrderClose, OrderCloseEnum.ACTIVE_OPEN.getCode());
+		List<OrderInfoEntity> checkOrderInfoList = this.list(wrapper);
+		if (null == checkOrderInfoList || checkOrderInfoList.size() == 0) {
+			//创建工单
+			OrderInfoEntity checkOrderInfoEntity = new OrderInfoEntity();
+			//checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+			checkOrderInfoEntity.setOrderFromKey(fromdict.getId());
+			checkOrderInfoEntity.setOrderDesc(rtuWarningInfoEntity.getWarningDesc());
+			checkOrderInfoEntity.setWarnId(rtuWarningInfoEntity.getId());
+			checkOrderInfoEntity.setRtuCode(rtuWarningInfoEntity.getRtuCode());
+			checkOrderInfoEntity.setOrderClose(OrderCloseEnum.ACTIVE_OPEN.getCode());
+			checkOrderInfoEntity.setOrderConfirm(OrderConfirmEnum.ACTIVE_CREATE.getCode());
+			LambdaQueryWrapper<RtuInfoEntity> rtuwrapper = Wrappers.<RtuInfoEntity>query().lambda();
+			rtuwrapper.eq(RtuInfoEntity::getIsDeleted, 0);
+			rtuwrapper.eq(RtuInfoEntity::getRtuCode, rtuWarningInfoEntity.getRtuCode());
+			RtuInfoEntity rtuInfoEntity = rtuBaseInfoService.getOne(rtuwrapper);
+			LambdaQueryWrapper<RegionInfoEntity> regionWrapper = Wrappers.<RegionInfoEntity>query().lambda();
+			regionWrapper.eq(RegionInfoEntity::getIsDeleted, 0);
+			regionWrapper.eq(RegionInfoEntity::getAdcd, rtuInfoEntity.getAdCode());
+			RegionInfoEntity regionInfoEntity = baseInfoRegionService.getOne(regionWrapper);
+			if (regionInfoEntity != null) {
+				String ancestors = regionInfoEntity.getAncestors();
+				if (null != ancestors && ancestors.length() > 0) {
+					String[] ancestorsList = ancestors.split(",");
+					String adCode;
+					if (ancestorsList.length >= 3) {
+						adCode = ancestorsList[2];
+					} else {
+						adCode = regionInfoEntity.getAdcd();
+					}
+					if (null != adCode) {
+						LambdaQueryWrapper<DeptRegionEntity> drwrapper = Wrappers.<DeptRegionEntity>query().lambda();
+						drwrapper.eq(DeptRegionEntity::getIsDeleted, 0);
+						drwrapper.eq(DeptRegionEntity::getAdcd, adCode);
+						List<DeptRegionEntity> deptRegionEntities = deptRegionService.list(drwrapper);
+						if (null != deptRegionEntities && deptRegionEntities.size() > 0) {
+							String manageCompany = "";
+							for (DeptRegionEntity deptRegionEntity : deptRegionEntities) {
+								Dept dept = deptService.getById(deptRegionEntity.getDeptId());
+								if (null != dept) {
+									if (manageCompany.length() > 0) {
+										manageCompany += " / ";
+									}
+									manageCompany += dept.getDeptName();
+									//查找运维公司负责人
+									LambdaQueryWrapper<User> userLambdaQueryWrapper = Wrappers.<User>query().lambda();
+									userLambdaQueryWrapper.eq(User::getIsDeleted, 0);
+									userLambdaQueryWrapper.eq(User::getDeptId, dept.getId());
+									List<User> userList = userService.list(userLambdaQueryWrapper);
+									for (User u : userList) {
+										Role role = roleService.getById(u.getRoleId());
+										if (BusinessConstant.ROLE_COMPANY_ADMIN.equals(role.getRoleAlias())) {
+											checkOrderInfoEntity.setContactPhone(u.getPhone());
+											checkOrderInfoEntity.setContactUser(u.getId());
+											break;
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+			checkOrderInfoEntity.setUpdateUser(BusinessConstant.SYS_ADMIN_ID);
+			checkOrderInfoEntity.setCreateUser(BusinessConstant.SYS_ADMIN_ID);
+			checkOrderInfoEntity.setUpdateTime(new Date());
+			checkOrderInfoEntity.setCreateTime(new Date());
+			this.save(checkOrderInfoEntity);
+			//增加工单处理创建记录
+			OrderProcessRecordInfoEntity processInfoEntity = new OrderProcessRecordInfoEntity();
+			processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
+			//processInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
+			processInfoEntity.setProcessDesc(checkOrderInfoEntity.getOrderDesc());
+			processInfoEntity.setUpdateUser(BusinessConstant.SYS_ADMIN_ID);
+			processInfoEntity.setCreateUser(BusinessConstant.SYS_ADMIN_ID);
+			processInfoEntity.setUpdateTime(new Date());
+			processInfoEntity.setCreateTime(new Date());
+			orderProcessService.save(processInfoEntity);
+		}
+		return true;
+	}
+}

+ 294 - 0
src/main/java/org/springblade/modules/business/xjgd/order/vo/OrderInfoVO.java

@@ -0,0 +1,294 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrderInfoVO extends OrderInfoEntity {
+
+	/**
+	 * 测站名称
+	 */
+	@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 createOrderPersonName;
+
+	/**
+	 * 工单确认人名称
+	 */
+	@ApiModelProperty(value = "工单确认人名称")
+	private String orderConfirmName;
+
+	/**
+	 * 处理人名称
+	 */
+	@ApiModelProperty(value = "处理人")
+	private String processorName;
+
+	/**
+	 * 工单处理时间
+	 */
+	@ApiModelProperty(value = "工单处理时间")
+	@DateTimeFormat(
+			pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+			pattern = "yyyy-MM-dd HH:mm:ss",
+			timezone = "GMT+8"
+	)
+	private Date orderProcessTime;
+
+
+	/**
+	 * 负责人名称
+	 */
+	@ApiModelProperty(value = "负责人名称")
+	private String contactUserName;
+
+	/**
+	 * 是否确认
+	 */
+	@ApiModelProperty(value = "是否确认")
+	private Integer isConfirm;
+
+	/**
+	 * 所属盟市
+	 */
+	@ApiModelProperty(value = "所属盟市")
+	private String adCity;
+
+	/**
+	 * 所属盟县旗区
+	 */
+	@ApiModelProperty(value = "所属盟县旗区")
+	private String adDist;
+
+	/**
+	 * 行政区
+	 */
+	@ApiModelProperty(value = "行政区")
+	private String areaName;
+
+	/**
+	 * 预警类别信息
+	 */
+	@ApiModelProperty(value = "预警类别")
+	private String warnKindInfo;
+
+	/**
+	 * 是否雨量站
+	 */
+	@ApiModelProperty(value = "是否雨量站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isRain;
+
+	/**
+	 * 是否河道站
+	 */
+	@ApiModelProperty(value = "是否河道站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isRiver;
+
+	/**
+	 * 是否水库站
+	 */
+	@ApiModelProperty(value = "是否水库站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isRes;
+
+	/**
+	 * 是否墒情站
+	 */
+	@ApiModelProperty(value = "是否墒情站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isGround;
+
+	/**
+	 * 是否视频站
+	 */
+	@ApiModelProperty(value = "是否视频站")
+	@JsonSerialize(nullsUsing = NullSerializer.class)
+	private Integer isVideo;
+
+	/**
+	 * 降水
+	 */
+	@ApiModelProperty(value = "降水")
+	private Double drp;
+
+	/**
+	 * 河道站水位
+	 */
+	@ApiModelProperty(value = "河道站水位")
+	private Double z;
+
+	/**
+	 * 水库站水位
+	 */
+	@ApiModelProperty(value = "水库站水位")
+	private Double rz;
+
+	/**
+	 * 最后上报时间
+	 */
+	@ApiModelProperty(value = "最后上报时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8"
+	)
+	private Date lastUpTime;
+
+	/**
+	 * 预警时长
+	 */
+	@ApiModelProperty(value = "预警时长")
+	private String warningTime;
+
+	/**
+	 * 维护状态
+	 */
+	@ApiModelProperty(value = "维护状态")
+	private Integer orderStatus;
+
+	/**
+	 * 行政区划索引
+	 */
+	@ApiModelProperty(value = "行政区划索引")
+	private String ancestors;
+
+	/**
+	 * 行政区划编码
+	 */
+	@ApiModelProperty(value = "行政区划编码")
+	private String adCode;
+
+	/**
+	 * 运维单位
+	 */
+	@ApiModelProperty(value = "运维单位")
+	private String manageCompany;
+
+	/**
+	 * 任务创建时长
+	 */
+	@ApiModelProperty(value = "任务创建时长")
+	private String taskCreateDuration;
+
+	/**
+	 * 任务维修时长
+	 */
+	@ApiModelProperty(value = "维修时长")
+	private String taskProcessDuration;
+
+	/**
+	 * SIN卡号
+	 */
+	@ApiModelProperty(value = "SIN卡号")
+	private String networkSimId;
+
+	/**
+	 * 开卡单位
+	 */
+	@ApiModelProperty(value = "开卡单位")
+	private String networkPayer;
+
+	/**
+	 * 费用说明
+	 */
+	@ApiModelProperty("费用说明")
+	private String costsReportDesc;
+
+	/**
+	 * 处理说明
+	 */
+	@ApiModelProperty("处理说明")
+	private String processDesc;
+
+	/**
+	 * 处理图片
+	 */
+	@ApiModelProperty("处理图片")
+	private List<String> orderPhotoList;
+
+	/**
+	 * 视频
+	 */
+	@ApiModelProperty("视频")
+	private List<String> orderVideoList;
+
+
+}

+ 143 - 0
src/main/java/org/springblade/modules/business/xjgd/order/vo/OrderProcessRecordInfoVO.java

@@ -0,0 +1,143 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrderProcessRecordInfoVO extends OrderProcessRecordInfoEntity {
+
+	/**
+	 * 工单状态名称
+	 */
+	@ApiModelProperty("工单状态")
+	private String orderStatusName;
+
+	/**
+	 * 工单确认人
+	 */
+	@ApiModelProperty(value = "工单确认人")
+	private Long orderConfirmUser;
+
+	/**
+	 * 工单确认人名称
+	 */
+	@ApiModelProperty("工单确认人名称")
+	private String orderConfirmUserName;
+
+	/**
+	 * 工单来源
+	 */
+	@ApiModelProperty("工单来源")
+	private String orderFromText;
+
+	/**
+	 * 工单填报人名称
+	 */
+	@ApiModelProperty("工单填报人名称")
+	private String orderProcessUserName;
+
+	/**
+	 * 测站编码
+	 */
+	@ApiModelProperty("测站编码")
+	private String rtuCode;
+
+	/**
+	 * 测站名称
+	 */
+	@ApiModelProperty("测站名称")
+	private String rtuName;
+
+	/**
+	 * 维修时长
+	 */
+	@ApiModelProperty(value = "维修时长")
+	private String taskDuration;
+
+	/**
+	 * 任务创建时间
+	 */
+	@ApiModelProperty(value = "任务创建时间")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8"
+	)
+	private Date taskCreateTime;
+
+
+	/**
+	 * 所属盟市
+	 */
+	@ApiModelProperty(value = "所属盟市")
+	private String adCity;
+
+	/**
+	 * 所属盟县旗区
+	 */
+	@ApiModelProperty(value = "所属盟县旗区")
+	private String adDist;
+
+
+	/**
+	 * 行政区划索引
+	 */
+	@ApiModelProperty(value = "行政区划索引")
+	private String ancestors;
+
+	/**
+	 * 行政区划编码
+	 */
+	@ApiModelProperty(value = "行政区划编码")
+	private String adCode;
+
+	/**
+	 * 运维单位
+	 */
+	@ApiModelProperty(value = "运维单位")
+	private String manageCompany;
+
+
+
+	/**
+	 * 图片列表
+	 */
+	@ApiModelProperty("处理图片")
+	private List<String> failureProcessPhotoList;
+
+	/**
+	 * 视频列表
+	 */
+	@ApiModelProperty("处理视频")
+	private List<String> failureProcessVideoList;
+
+	/**
+	 * 工单评分
+	 */
+	@ApiModelProperty("工单评分")
+	private Integer orderRate;
+}

+ 65 - 0
src/main/java/org/springblade/modules/business/xjgd/order/wrapper/OrderProcessWrapper.java

@@ -0,0 +1,65 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.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.core.tool.utils.Func;
+
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.order.vo.OrderProcessRecordInfoVO;
+import org.springblade.modules.system.entity.DictBiz;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public class OrderProcessWrapper extends BaseEntityWrapper<OrderProcessRecordInfoEntity, OrderProcessRecordInfoVO> {
+    public static OrderProcessWrapper build() {
+        return new OrderProcessWrapper();
+    }
+
+    @Override
+    public OrderProcessRecordInfoVO entityVO(OrderProcessRecordInfoEntity entity) {
+        OrderProcessRecordInfoVO orderProcessInfoVO = Objects.requireNonNull(BeanUtil.copy(entity, OrderProcessRecordInfoVO.class));
+        return this.entityVO(orderProcessInfoVO);
+    }
+
+    public OrderProcessRecordInfoVO entityVO(OrderProcessRecordInfoVO orderProcessInfoVO) {
+//        if (Func.notNull(orderProcessInfoVO.getOrderStatusKey())) {
+//            DictBiz biz = DictBizCache.getById(orderProcessInfoVO.getOrderStatusKey());
+//            orderProcessInfoVO.setOrderStatusCode(biz.getDictKey());
+//            orderProcessInfoVO.setOrderStatusName(biz.getDictValue());
+//        }
+        if (Func.notNull(orderProcessInfoVO.getFailureProcessPhotos())) {
+            String[] photos = orderProcessInfoVO.getFailureProcessPhotos().split(",");
+            List<String> photoList = new ArrayList<>();
+            for (String p : photos) {
+                photoList.add(p);
+            }
+            orderProcessInfoVO.setFailureProcessPhotoList(photoList);
+        }
+        if (Func.notNull(orderProcessInfoVO.getFailureProcessVideos())) {
+            String[] videos = orderProcessInfoVO.getFailureProcessVideos().split(",");
+            List<String> videoList = new ArrayList<>();
+            for (String p : videos) {
+                videoList.add(p);
+            }
+            orderProcessInfoVO.setFailureProcessVideoList(videoList);
+        }
+        return orderProcessInfoVO;
+    }
+}

+ 163 - 0
src/main/java/org/springblade/modules/business/xjgd/order/wrapper/OrderWrapper.java

@@ -0,0 +1,163 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2022/8/22
+ */
+package org.springblade.modules.business.xjgd.order.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.core.tool.utils.SpringUtil;
+import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
+
+
+
+import org.springblade.modules.business.warning.service.IRtuWarningService;
+import org.springblade.modules.business.xjgd.order.entity.OrderInfoEntity;
+import org.springblade.modules.business.xjgd.order.entity.OrderProcessRecordInfoEntity;
+import org.springblade.modules.business.xjgd.order.service.IOrderProcessService;
+import org.springblade.modules.business.xjgd.order.vo.OrderInfoVO;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IDeptService;
+import org.springblade.modules.system.service.IDictBizService;
+import org.springblade.modules.system.service.IRoleService;
+import org.springblade.modules.system.service.IUserService;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/***
+ * Date:2022/8/22
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+public class OrderWrapper extends BaseEntityWrapper<OrderInfoEntity, OrderInfoVO> {
+    public static OrderWrapper build() {
+        return new OrderWrapper();
+    }
+
+    private static IDictBizService dictBizService;
+
+    private static IDictBizService getDictBizService() {
+        if (dictBizService == null) {
+            dictBizService = SpringUtil.getBean(IDictBizService.class);
+        }
+        return dictBizService;
+    }
+
+    private static IDeptRegionService deptRegionService;
+
+    private static IDeptRegionService getDeptRegionService() {
+        if (deptRegionService == null) {
+            deptRegionService = SpringUtil.getBean(IDeptRegionService.class);
+        }
+        return deptRegionService;
+    }
+
+    private static IDeptService deptService;
+
+    private static IDeptService getDeptService() {
+        if (deptService == null) {
+            deptService = SpringUtil.getBean(IDeptService.class);
+        }
+        return deptService;
+    }
+
+    private static IUserService userService;
+
+    private static IUserService getUserService() {
+        if (userService == null) {
+            userService = SpringUtil.getBean(IUserService.class);
+        }
+        return userService;
+    }
+
+    private static IRoleService roleService;
+
+    private static IRoleService getRoleService() {
+        if (roleService == null) {
+            roleService = SpringUtil.getBean(IRoleService.class);
+        }
+        return roleService;
+    }
+
+    private static IRtuWarningService rtuWarningService;
+
+    private static IRtuWarningService getRtuWarningService() {
+        if (rtuWarningService == null) {
+            rtuWarningService = SpringUtil.getBean(IRtuWarningService.class);
+        }
+        return rtuWarningService;
+    }
+
+
+    private static IOrderProcessService rtuOrderProcessService;
+
+    private static IOrderProcessService getRtuOrderProcessService() {
+        if (rtuOrderProcessService == null) {
+            rtuOrderProcessService = SpringUtil.getBean(IOrderProcessService.class);
+        }
+        return rtuOrderProcessService;
+    }
+
+    @Override
+    public OrderInfoVO entityVO(OrderInfoEntity entity) {
+        OrderInfoVO checkOrderInfoVO = Objects.requireNonNull(BeanUtil.copy(entity, OrderInfoVO.class));
+        return this.entityVO(checkOrderInfoVO);
+    }
+
+    public OrderInfoVO entityVO(OrderInfoVO vo) {
+        if (Func.notNull(vo.getOrderProcessId())) {
+            OrderProcessRecordInfoEntity orderProcessInfoEntity = getRtuOrderProcessService().getById(vo.getOrderProcessId());
+            User user = getUserService().getById(orderProcessInfoEntity.getCreateUser());
+            vo.setProcessorName(user.getRealName());
+            vo.setOrderProcessTime(orderProcessInfoEntity.getCreateTime());
+            vo.setProcessDesc(orderProcessInfoEntity.getProcessDesc());
+            vo.setCostsReportDesc(orderProcessInfoEntity.getCostsReportDesc());
+        }
+        if (Func.isNull(vo.getCreateOrderPersonName())) {
+            User user = getUserService().getById(vo.getCreateUser());
+            vo.setCreateOrderPersonName(user.getRealName());
+        }
+
+//        DictBiz dictBiz = getDictBizService().getById(vo.getOrderStatusKey());
+//        if (Func.notNull(dictBiz)) {
+//            vo.setOrderStatusName(dictBiz.getDictValue());
+//
+//            vo.setOrderStatusOption(dictBiz.getDictKey());
+//        }
+
+        if (Func.notNull(vo.getOrderPhotos())) {
+            String[] photos = vo.getOrderPhotos().split(",");
+            List<String> photoList = new ArrayList<>();
+            for (String p : photos) {
+                photoList.add(p);
+            }
+            vo.setOrderPhotoList(photoList);
+        }
+
+        if (Func.notNull(vo.getOrderVideos())) {
+            String[] videos = vo.getOrderVideos().split(",");
+            List<String> videoList = new ArrayList<>();
+            for (String p : videos) {
+                videoList.add(p);
+            }
+            vo.setOrderVideoList(videoList);
+        }
+
+        if (Func.notNull(vo.getOrderConfirmUser())){
+            User user = getUserService().getById(vo.getOrderConfirmUser());
+            vo.setOrderConfirmName(user.getRealName());
+        }
+
+        return vo;
+    }
+
+}

+ 212 - 0
src/main/java/org/springblade/modules/datagram/controller/DatagramController.java

@@ -0,0 +1,212 @@
+/**
+ * Copyright
+ * All right reserved.
+ * 项目名称:
+ * 创建日期:2022-03-04
+ */
+package org.springblade.modules.datagram.controller;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.read.builder.ExcelReaderBuilder;
+import com.alibaba.excel.read.builder.ExcelReaderSheetBuilder;
+import com.alibaba.fastjson.JSONObject;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.hadoop.hbase.CompareOperator;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.filter.RegexStringComparator;
+import org.apache.hadoop.hbase.filter.RowFilter;
+import org.springblade.core.excel.listener.DataListener;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.jackson.JsonUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.hbase.HBaseService;
+import org.springblade.modules.baseinfo.rtu.dto.RtuInfoDTO;
+import org.springblade.modules.datagram.controller.dto.DatagramInfoDTO;
+import org.springblade.modules.demo.entity.SiteDataEntity;
+import org.springblade.props.GalaxyProperties;
+import org.springblade.utils.BytesHelp;
+import org.springframework.kafka.core.KafkaTemplate;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.annotation.Resource;
+import java.io.*;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/***
+ * Date:2022-03-04
+ * Title:参数配置
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author Blade
+ * @mender:(文件的修改者,文件创建者之外的人)
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Slf4j
+@RestController
+@AllArgsConstructor
+@RequestMapping("/galaxy-hbase")
+@Api(value = "多数据源接口", tags = "多数据源")
+public class DatagramController {
+
+    @Resource
+    private HBaseService hBaseService;
+
+    @Resource
+    private KafkaTemplate<String, String> kafkaTemplate;
+
+    @GetMapping("/datagram/test")
+    public R datagramTest() {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("agreement", "SW2014");
+        jsonObject.put("rtuCode", "5202010308");
+        jsonObject.put("datagram", "7E7E01520201030800002F00080216E124040110434903A194");
+        jsonObject.put("datagramPickTime", "20240401104456");
+        jsonObject.put("afc", "2F");
+
+
+
+            String agreement = jsonObject.getString("agreement");
+            String rtuCode = jsonObject.getString("rtuCode");
+            String datagram = jsonObject.getString("datagram");
+            String datagramPickTime = jsonObject.getString("datagramPickTime");
+            String afc = jsonObject.getString("afc");
+
+            List<String> columnFamily = new ArrayList<>(1);
+            columnFamily.add("datagram");
+            String tableName = "test_"+agreement + "_" + "datagram";
+            hBaseService.createTable(tableName.toUpperCase(), columnFamily);
+
+            String rowKey = BytesHelp.getMd5Digest(rtuCode) + datagramPickTime + String.valueOf(Long.MAX_VALUE - System.currentTimeMillis());
+
+            List<String> columns = new ArrayList<>();
+            List<String> values = new ArrayList<>();
+
+            columns.add("rtuCode");
+            values.add(rtuCode);
+
+            columns.add("datagramPickTime");
+            values.add(datagramPickTime);
+
+            columns.add("datagram");
+            values.add(agreement);
+
+            columns.add("datagram");
+            values.add(datagram);
+
+
+                columns.add("afc");
+                values.add(afc);
+
+
+            hBaseService.putData(tableName.toUpperCase(), rowKey, "datagram", columns, values);
+
+
+//        String datagramText = jsonObject.toJSONString();
+//        String topic = "topic-tsywxt-hbase";
+//        kafkaTemplate.send(topic, datagramText);
+        return R.success("OK");
+    }
+
+
+    @GetMapping("/datagram/import")
+    public R datagramImport() {
+        String path = "C:\\Users\\dylan\\Desktop\\log\\p";
+        File file = new File(path);
+        File[] logs = file.listFiles();
+        assert logs != null;
+        for (File logFile : logs) {
+            try {
+                FileInputStream fileInputStream = new FileInputStream(logFile);
+                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));
+                String line;
+                while (true) {
+                    try {
+                        if ((line = bufferedReader.readLine()) != null) {
+                            if (line.contains("kafka queue-waiting-process-datagram")) {
+                                int startOffest = line.indexOf("{");
+                                if (startOffest >= 0) {
+                                    String datagramText = line.substring(startOffest).trim();
+                                    if (datagramText.contains("}")) {
+                                        log.info("datagram:{}", datagramText);
+
+                                        String topic = "topic-tsywxt-hbase";
+                                        kafkaTemplate.send(topic, datagramText);
+                                    }
+                                }
+                            }
+                        } else {
+                            break;
+                        }
+                    } catch (IOException e) {
+                        e.printStackTrace();
+
+                    }
+
+                }
+                bufferedReader.close();
+                fileInputStream.close();
+
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+
+        }
+        return R.success("OK");
+    }
+
+    @GetMapping("/datagram/list")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "rtuCode", value = "测站编码", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "agreement", value = "规约", paramType = "query", dataType = "string"),
+            @ApiImplicitParam(name = "dt", value = "时间", paramType = "query", dataType = "string"),
+    })
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "获取配置项", notes = "获取配置项")
+    public R<List<Map<String, Object>>> getDatagramList(@ApiIgnore DatagramInfoDTO dto) {
+
+        if (Func.isNull(dto.getRtuCode()) || Func.isNull(dto.getAgreement())) {
+            return R.fail("参数错误");
+        }
+        LocalDate today = LocalDate.now();
+        String dateKey = today.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
+        if (Func.notNull(dto.getDt())) {
+            //   LocalDate daydate = LocalDate.parse(dto.getDt(), DateTimeFormatter.ofPattern("yyyyMMdd"));
+            // dateKey = daydate.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
+            dateKey = dto.getDt();
+        }
+        String tableName = dto.getAgreement() + "_" + "datagram";
+        String rowkey = BytesHelp.getMd5Digest(dto.getRtuCode()) + dateKey;
+        Scan scan = new Scan();
+        RowFilter rowFilter = new RowFilter(CompareOperator.EQUAL, new RegexStringComparator(rowkey));
+        scan.setFilter(rowFilter);
+        scan.setBatch(1000);
+
+        List<Map<String, Object>> list = hBaseService.getData(tableName.toUpperCase(), scan);
+        List<Map<String, Object>> datas = new ArrayList<>();
+        for (Map<String, Object> d : list) {
+            Map<String, Object> json = new HashMap<>();
+            json.put("rtuCode", (String) d.get("datagram:rtuCode"));
+            json.put("datagramPickTime", (String) d.get("datagram:datagramPickTime"));
+            json.put("datagram", (String) d.get("datagram:datagram"));
+            json.put("row", (String) d.get("row"));
+            json.put("agreement", dto.getAgreement());
+            datas.add(json);
+        }
+        return R.data(datas);
+    }
+}

+ 26 - 0
src/main/java/org/springblade/modules/datagram/controller/dto/DatagramInfoDTO.java

@@ -0,0 +1,26 @@
+/**
+ * Copyright 2019 DH
+ * All right reserved.
+ * 项目名称: 大恒泰山系统
+ * 创建日期:2024/4/7
+ */
+package org.springblade.modules.datagram.controller.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/***
+ * Date:2024/4/7
+ * Title:文件所属模块(必须填写)
+ * Description:对本文件的详细描述,原则上不能少于30字
+ * @author dylan
+ * @version 1.0
+ * Remark:认为有必要的其他信息
+ */
+@Data
+@EqualsAndHashCode
+public class DatagramInfoDTO {
+    private String rtuCode;
+    private String agreement;
+    private String dt;
+}

+ 1 - 1
src/main/java/org/springblade/modules/manage/advertisement/controller/AdvertisementManageController.java

@@ -42,7 +42,7 @@ import java.util.Map;
  * Remark:认为有必要的其他信息
  */
 @RestController
-@RequestMapping("galaxy-business/ads/manage")
+@RequestMapping("galaxy-business/manage/ads")
 @AllArgsConstructor
 @Api(value = "广告管理模块", tags = "广告管理模块")
 public class AdvertisementManageController extends BladeController {

+ 1 - 1
src/main/java/org/springblade/mq/kafka/handler/MessageHandler.java

@@ -81,7 +81,7 @@ public class MessageHandler {
 	private String topicYwxtRtuStatus;
 
 
-	@KafkaListener(groupId = "${spring.kafka.consumer.group-id}", topics = "dcs.power01.test.1", containerFactory = "ackContainerFactory")
+//	@KafkaListener(groupId = "${spring.kafka.consumer.group-id}", topics = "dcs.power01.test.1", containerFactory = "ackContainerFactory")
 	public void dcs(ConsumerRecord record, Acknowledgment acknowledgment) {
 		try {
 			String message = (String) record.value();

+ 1 - 1
src/main/java/org/springblade/task/TaskManager.java

@@ -75,7 +75,7 @@ public class TaskManager {
 		}
 	}
 
-	@Scheduled(cron = "0 0/5 * * * * ")
+//	@Scheduled(cron = "0 0/5 * * * * ")
 	public void inspectionPlanCheckTask() {
 		try {
 			InspectionPlanCheckTask task = new InspectionPlanCheckTask(planService,inspectionService, LocalDateTime.now());

+ 54 - 4
src/main/java/org/springblade/test/TestController.java

@@ -9,22 +9,29 @@ package org.springblade.test;
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.read.builder.ExcelReaderBuilder;
 import com.alibaba.excel.read.builder.ExcelReaderSheetBuilder;
+import com.alibaba.fastjson.JSONObject;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
+import org.apache.hadoop.hbase.CompareOperator;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.filter.RegexStringComparator;
+import org.apache.hadoop.hbase.filter.RowFilter;
 import org.springblade.core.excel.listener.DataListener;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.hbase.HBaseService;
 import org.springblade.modules.demo.entity.SiteDataEntity;
 import org.springblade.props.GalaxyProperties;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springblade.utils.BytesHelp;
+import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
+import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 
 /***
@@ -44,6 +51,9 @@ public class TestController {
 
 	private GalaxyProperties galaxyProperties;
 
+	@Resource
+	private HBaseService hBaseService;
+
 	/**
 	 * 1、获取配置项
 	 * http://localhost:8000/galaxy-server/demo/config/getConfig
@@ -71,6 +81,46 @@ public class TestController {
 	}
 
 
+	@GetMapping("/hbase/test/{date}")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "HBASE测试", notes = "HBASE测试")
+	public R<List<JSONObject>> hbaseTest(@PathVariable(name="date") String date) {
+		//JSONObject data = new JSONObject();
+		String tableName = "SW2014" + "_" + "datagram";
+
+		Scan scan = new Scan();
+	//	Long s = Timestamp.valueOf("2024-04-07 10:00:00").getTime();
+
+
+		//  RowFilter rowFilter= new RowFilter();
+		//  Filter filter = new PrefixFilter(Bytes.toBytes("0000000004"));
+		//Long time=(Long.MAX_VALUE-s)/(1000*60*60);
+
+	//	String date ="2024040710";
+
+		RowFilter rowFilter = new RowFilter(CompareOperator.EQUAL, new RegexStringComparator(BytesHelp.getMd5Digest("0000000004")+date));
+	//	scan.setBatch(10);
+		//scan.setLimit(1);
+
+		scan.setFilter(rowFilter);
+
+		List<Map<String, Object>> list = hBaseService.getData(tableName.toUpperCase(), scan);
+		List <JSONObject> datas = new ArrayList<>(list.size());
+        for (Map<String, Object> d :list){
+			JSONObject json = new JSONObject();
+			 json.put("rtuCode",(String)d.get("datagram:rtuCode"));
+			json.put("datagramPickTime",(String)d.get("datagram:datagramPickTime"));
+			json.put("datagram",(String)d.get("datagram:datagram"));
+			json.put("row",(String)d.get("row"));
+			datas.add(json);
+		}
+	//	data.put("data", list);
+	//	data.put("code", 1);
+		return R.data(datas);
+	}
+
+
+
 	private String getLng(String lngText) {
 		ArrayList<String> textArr = new ArrayList<>();
 		textArr.add("");

+ 11 - 1
src/main/resources/application-dev.yml

@@ -35,7 +35,7 @@ spring:
   #    password: ZGXXXT2022
 
   kafka:
-    bootstrap-servers: 172.31.1.154:9092
+    bootstrap-servers: 172.31.1.228:9092
     producer:
       retries: 0
       batch-size: 16384
@@ -97,6 +97,16 @@ rockdb-config:
 warn-config:
   missout: 5
 
+hbase:
+  enable: true
+  zookeeper:
+    quorum: hadoop131,hadoop132,hadoop133
+    property:
+      clientPort: 2181
+    znode:
+      parent: /hbase
+
+
 #第三方登陆
 social:
   enabled: false

+ 21 - 9
src/main/resources/application-test.yml

@@ -2,10 +2,10 @@
 spring:
   redis:
     ##redis 单机环境配置
-    host: 172.31.1.228
+    host: 172.31.1.154
     port: 6379
     password:  Dh@82828800
-    database: 2
+    database: 1
     ssl: false
     ##redis 集群环境配置
     #cluster:
@@ -13,9 +13,9 @@ spring:
     #  commandTimeout: 5000
   datasource:
     # MySql
-    url: jdbc:mysql://172.31.1.233:3306/tsdb_cloud?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+    url: jdbc:mysql://172.31.1.154:3306/tsdb_cloud?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
     username: root
-    password: Dh@82828800
+    password: 1QAZ!2wsx@
 
     # PostgreSQL
     #url: jdbc:postgresql://127.0.0.1:5432/bladex_boot
@@ -43,7 +43,7 @@ spring:
       key-serializer: org.apache.kafka.common.serialization.StringSerializer
       value-serializer: org.apache.kafka.common.serialization.StringSerializer
     consumer:
-      group-id: kafka-tsywxt-cloud
+      group-id: kafka-tsywxt-cloud-dev
       # 手动提交
       enable-auto-commit: false
       auto-offset-reset: latest
@@ -51,6 +51,8 @@ spring:
       value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
       properties:
         session.timeout.ms: 60000
+        allow.auto.create.topics: false
+
     listener:
       log-container-config: false
       concurrency: 5
@@ -67,15 +69,16 @@ spring:
     topic-etl-promptly-collect:  topic-etl-promptly-collect
   apk:
     url: http://111.204.228.227:20002/app/apk
-    save-path: /home/tsywxt-cloud/apk
+    save-path: /home/tmp
   task-config:
     etl-task: false
     warning-check-task: false
     dept-update-task: false
   warn-config:
     delay-time: 120
+
 export-config:
-  workdir: /home/tsywxt-cloud/export
+  workdir: /home/export
   equipment-info-template: equipment-template.xlsx
   inspection-remainingproblems-template: inspection-remainingproblems-template.xlsx
   inspection-unfinished-template: inspection-unfinished-template.xlsx
@@ -85,7 +88,7 @@ ftp-config:
   port: 2221
   username: admin
   password: admin
-  workdir: /home/tsywxt-cloud/ftp
+  workdir: /home/ftp
   targetdir: ANALYSIS/CLDAS
 
 rockdb-config:
@@ -94,10 +97,19 @@ rockdb-config:
 warn-config:
   missout: 5
 
+hbase:
+  enable: true
+  zookeeper:
+    quorum: 172.9.0.190
+    property:
+      clientPort: 2181
+    znode:
+      parent: /hbase
+
 
 #第三方登陆
 social:
-  enabled: true
+  enabled: false
   domain: http://127.0.0.1:1888
 
 #blade配置

+ 3 - 2
src/main/resources/application.yml

@@ -202,7 +202,8 @@ blade:
       - /galaxy-business/open/user/reg
       - /galaxy-business/data/manage/video
       - /galaxy-business/rtu/data/**
-      - /galaxy-business/ads/manage/show/list
+      - /galaxy-business/manage/ads/show/list
+      - /galaxy-hbase/datagram/**
     #授权认证配置
     auth:
       - method: ALL
@@ -248,9 +249,9 @@ blade:
     #排除多租户逻辑
     exclude-tables:
       - blade_user
-      - blade_dict_biz
       - blade_dept
       - blade_role
       - blade_post
       - blade_dict
       - blade_dept_att
+      - public_advertisement_setting_info