Browse Source

Merge remote-tracking branch 'origin/master'

15044148858 4 days ago
parent
commit
3febb8192b
39 changed files with 700 additions and 385 deletions
  1. 5 2
      construction-ui/src/views/construction/bridge/bridge_task/event_index.vue
  2. 6 3
      construction-ui/src/views/construction/drainage/drainage_task/event_index.vue
  3. 5 2
      construction-ui/src/views/construction/gas_task/event_index.vue
  4. 111 99
      construction-ui/src/views/construction/heating_task/event_index.vue
  5. 5 2
      construction-ui/src/views/construction/utilityTunnel/inspectionTask/event_index.vue
  6. 5 2
      construction-ui/src/views/construction/water/waterTask/event_index.vue
  7. 1 0
      src/main/java/com/sooka/sponest/construction/bridge/domain/BridgeInspectionTaskRecord.java
  8. 2 0
      src/main/java/com/sooka/sponest/construction/bridge/mapper/BridgeInspectionTaskRecordMapper.java
  9. 2 0
      src/main/java/com/sooka/sponest/construction/bridge/service/IBridgeInspectionTaskRecordService.java
  10. 48 41
      src/main/java/com/sooka/sponest/construction/bridge/service/impl/BridgeInspectionTaskEventServiceImpl.java
  11. 4 0
      src/main/java/com/sooka/sponest/construction/bridge/service/impl/BridgeInspectionTaskRecordServiceImpl.java
  12. 1 0
      src/main/java/com/sooka/sponest/construction/drainage/domain/DrainageInspectionTaskRecord.java
  13. 2 0
      src/main/java/com/sooka/sponest/construction/drainage/mapper/DrainageInspectionTaskRecordMapper.java
  14. 2 0
      src/main/java/com/sooka/sponest/construction/drainage/service/IDrainageInspectionTaskRecordService.java
  15. 46 40
      src/main/java/com/sooka/sponest/construction/drainage/service/impl/DrainageInspectionTaskEventServiceImpl.java
  16. 4 0
      src/main/java/com/sooka/sponest/construction/drainage/service/impl/DrainageInspectionTaskRecordServiceImpl.java
  17. 1 0
      src/main/java/com/sooka/sponest/construction/gas/domain/GasInspectionTaskRecord.java
  18. 2 0
      src/main/java/com/sooka/sponest/construction/gas/mapper/GasInspectionTaskRecordMapper.java
  19. 2 0
      src/main/java/com/sooka/sponest/construction/gas/service/IGasInspectionTaskRecordService.java
  20. 46 39
      src/main/java/com/sooka/sponest/construction/gas/service/impl/GasInspectionTaskEventServiceImpl.java
  21. 4 0
      src/main/java/com/sooka/sponest/construction/gas/service/impl/GasInspectionTaskRecordServiceImpl.java
  22. 42 16
      src/main/java/com/sooka/sponest/construction/heating/controller/HeatingViewController.java
  23. 46 40
      src/main/java/com/sooka/sponest/construction/heating/service/impl/HeatingInspectionTaskEventServiceImpl.java
  24. 62 0
      src/main/java/com/sooka/sponest/construction/utilityTunnel/controller/UtilityTunnelViewController.java
  25. 46 39
      src/main/java/com/sooka/sponest/construction/utilityTunnel/service/impl/UtilityTunnelInspectionTaskEventServiceImpl.java
  26. 2 9
      src/main/java/com/sooka/sponest/construction/view/plan/service/ScheduledTasks.java
  27. 1 0
      src/main/java/com/sooka/sponest/construction/waterSupply/domain/WaterInspectionTaskRecord.java
  28. 2 0
      src/main/java/com/sooka/sponest/construction/waterSupply/mapper/WaterInspectionTaskRecordMapper.java
  29. 2 0
      src/main/java/com/sooka/sponest/construction/waterSupply/service/IWaterInspectionTaskRecordService.java
  30. 46 39
      src/main/java/com/sooka/sponest/construction/waterSupply/service/impl/WaterInspectionTaskEventServiceImpl.java
  31. 4 0
      src/main/java/com/sooka/sponest/construction/waterSupply/service/impl/WaterInspectionTaskRecordServiceImpl.java
  32. 35 2
      src/main/resources/mapper/construction/bridge/BridgeInspectionTaskRecordMapper.xml
  33. 33 0
      src/main/resources/mapper/construction/drainage/DrainageInspectionTaskRecordMapper.xml
  34. 1 0
      src/main/resources/mapper/construction/drainage/DrainagePipeInspectionTaskMapper.xml
  35. 33 0
      src/main/resources/mapper/construction/gas/GasInspectionTaskRecordMapper.xml
  36. 1 3
      src/main/resources/mapper/construction/gas/GasPipeMapper.xml
  37. 1 1
      src/main/resources/mapper/construction/heating/HeatingInspectionTaskRecordMapper.xml
  38. 6 6
      src/main/resources/mapper/construction/utilityTunnel/UtilityTunnelInspectionTaskRecordMapper.xml
  39. 33 0
      src/main/resources/mapper/construction/waterSupply/WaterInspectionTaskRecordMapper.xml

+ 5 - 2
construction-ui/src/views/construction/bridge/bridge_task/event_index.vue

@@ -280,7 +280,7 @@
         </div>
       </el-dialog>
       <div v-if="form.rectified==='0' && form.status ==='0'" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleConfirm">确认事件</el-button>
+        <el-button type="primary" @click="handleConfirm">上报事件</el-button>
         <el-button type="danger" @click="submitForm(2)">无异常</el-button>
       </div>
     </el-dialog>
@@ -380,10 +380,13 @@ export default {
         label: 'label'  // 节点显示文本字段名(例如接口返回的是name,则改为name)
       },
       eventStatusOptions: [
-        {value: '0', label: '上报'},
+        {value: '0', label: '待处置'},
         {value: '1', label: '确认'},
         {value: '2', label: '无异常'},
         {value: '3', label: '办结'},
+        {value: 'event_report', label: '上报'},
+        {value: 'event_completion', label: '办结'},
+        {value: 'event_archiving', label: '归档'},
       ],
       // 表单校验
       rules: {}

+ 6 - 3
construction-ui/src/views/construction/drainage/drainage_task/event_index.vue

@@ -288,7 +288,7 @@
         </div>
       </el-dialog>
       <div v-if="form.rectified==='0' && form.status ==='0'" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleConfirm">确认事件</el-button>
+        <el-button type="primary" @click="handleConfirm">上报事件</el-button>
         <el-button type="danger" @click="submitForm(2)">无异常</el-button>
       </div>
     </el-dialog>
@@ -389,10 +389,13 @@ export default {
         label: 'label'  // 节点显示文本字段名(例如接口返回的是name,则改为name)
       },
       eventStatusOptions: [
-        {value: '0', label: '上报'},
+        {value: '0', label: '待处置'},
         {value: '1', label: '确认'},
         {value: '2', label: '无异常'},
-        {value: '3', label: '办结'}
+        {value: '3', label: '办结'},
+        {value: 'event_report', label: '上报'},
+        {value: 'event_completion', label: '办结'},
+        {value: 'event_archiving', label: '归档'},
       ],
       // 表单校验
       rules: {}

+ 5 - 2
construction-ui/src/views/construction/gas_task/event_index.vue

@@ -188,7 +188,7 @@
         </el-row>
       </el-form>
       <div v-if="form.rectified==='0' && form.status ==='0'" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm(1)">确认事件</el-button>
+        <el-button type="primary" @click="submitForm(1)">上报事件</el-button>
         <el-button type="danger" @click="submitForm(2)">无异常</el-button>
       </div>
     </el-dialog>
@@ -284,10 +284,13 @@ export default {
         label: 'label'  // 节点显示文本字段名(例如接口返回的是name,则改为name)
       },
       eventStatusOptions: [
-        {value: '0', label: '上报'},
+        {value: '0', label: '待处置'},
         {value: '1', label: '确认'},
         {value: '2', label: '无异常'},
         {value: '3', label: '办结'},
+        {value: 'event_report', label: '上报'},
+        {value: 'event_completion', label: '办结'},
+        {value: 'event_archiving', label: '归档'},
       ],
       // 表单校验
       rules: {}

+ 111 - 99
construction-ui/src/views/construction/heating_task/event_index.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="app-container">
     <el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="68px"
-             @submit.native.prevent>
+             @submit.native.prevent
+    >
       <el-form-item label="标题" prop="title">
         <el-input
           v-model="queryParams.title"
@@ -40,7 +41,8 @@
         <template #default="scope">
           <span v-if="scope.row.rectified === '0'" class="el-tag el-tag--info el-tag--medium el-tag--light">否</span>
           <span v-if="scope.row.rectified === '1'" class="el-tag el-tag--primary el-tag--medium el-tag--light"
-                type="warning">是</span>
+                type="warning"
+          >是</span>
         </template>
       </el-table-column>
       <el-table-column align="center" label="事件状态" prop="status">
@@ -110,7 +112,8 @@
                               readonly
                               size="small"
                               type="date"
-                              value-format="yyyy-MM-dd">
+                              value-format="yyyy-MM-dd"
+              >
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -183,14 +186,16 @@
             <el-form-item label="整改前图片" prop="attachPaths">
               <ImageUpload v-if="form.attachPaths!=='' && form.attachPaths!==null" ref="ImageUpload"
                            :fileType="['png', 'jpg', 'jpeg']"
-                           :isShowTip="false" :value="form.attachPaths"></ImageUpload>
+                           :isShowTip="false" :value="form.attachPaths"
+              ></ImageUpload>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="整改后图片" prop="rectificationUrl">
               <ImageUpload v-if="form.rectificationUrl!=='' && form.rectificationUrl!==null" ref="ImageUpload"
                            :fileType="['png', 'jpg', 'jpeg']"
-                           :isShowTip="false" :value="form.rectificationUrl"></ImageUpload>
+                           :isShowTip="false" :value="form.rectificationUrl"
+              ></ImageUpload>
             </el-form-item>
           </el-col>
           <el-form-item label="整改信息" prop="rectificationData">
@@ -234,7 +239,8 @@
         :visible.sync="innerVisible"
         append-to-body
         title="处置"
-        width="30%">
+        width="30%"
+      >
         <el-form ref="sendForm" :model="sendForm" label-width="130px">
           <el-row>
             <el-col :span="24">
@@ -269,7 +275,8 @@
             <el-col :span="24">
               <el-form-item label="现场照片" prop="scenePicture">
                 <ImageUpload ref="ImageUploads" :fileType="['png', 'jpg', 'jpeg']"
-                             :isShowTip="false" :limit="1" :value="sendForm.scenePicture" @input="getUrl"></ImageUpload>
+                             :isShowTip="false" :limit="1" :value="sendForm.scenePicture" @input="getUrl"
+                ></ImageUpload>
               </el-form-item>
             </el-col>
           </el-row>
@@ -279,7 +286,7 @@
         </div>
       </el-dialog>
       <div v-if="form.rectified==='0' && form.status ==='0'" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleConfirm">确认事件</el-button>
+        <el-button type="primary" @click="handleConfirm">上报事件</el-button>
         <el-button type="danger" @click="submitForm(2)">无异常</el-button>
       </div>
     </el-dialog>
@@ -292,7 +299,8 @@
             <el-timeline-item
               v-for="(activity, index) in eventLog"
               :key="index"
-              :timestamp="activity.createTime" placement="top">
+              :timestamp="activity.createTime" placement="top"
+            >
               <div>
                 <span>{{ activity.createName }}</span>
                 <br>
@@ -318,13 +326,13 @@ import {
   listEvent,
   updateEvent,
   userDeptSelectIncludeChildren
-} from "@/api/construction/heating/event";
-import Treeselect from "@riophae/vue-treeselect";
+} from '@/api/construction/heating/event'
+import Treeselect from '@riophae/vue-treeselect'
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 
 export default {
-  name: "Event",
-  components: {Treeselect},
+  name: 'Event',
+  components: { Treeselect },
   data() {
     return {
       // 遮罩层
@@ -343,8 +351,8 @@ export default {
       eventList: [],
       deptOptions: undefined,
       // 弹出层标题
-      title: "",
-      title1: "",
+      title: '',
+      title1: '',
       // 是否显示弹出层
       open: false,
       innerVisible: false,
@@ -379,73 +387,76 @@ export default {
         label: 'label'  // 节点显示文本字段名(例如接口返回的是name,则改为name)
       },
       eventStatusOptions: [
-        {value: '0', label: '上报'},
-        {value: '1', label: '确认'},
-        {value: '2', label: '无异常'},
-        {value: '3', label: '办结'},
+        { value: '0', label: '待处置' },
+        { value: '1', label: '确认' },
+        { value: '2', label: '无异常' },
+        { value: '3', label: '办结' },
+        { value: 'event_report', label: '上报' },
+        { value: 'event_completion', label: '办结' },
+        { value: 'event_archiving', label: '归档' }
       ],
       // 表单校验
-      rules: {},
-    };
+      rules: {}
+    }
   },
   created() {
-    this.getList();
+    this.getList()
     this.findParentId()
   },
   watch: {
     filterText(val) {
-      this.$refs.deptTree.filter(val);
+      this.$refs.deptTree.filter(val)
     }
   },
   computed: {
     eventStatusText() {
-      const targetOption = this.eventStatusOptions.find(option => option.value === this.form.status);
-      return targetOption ? targetOption.label : this.form.status;
+      const targetOption = this.eventStatusOptions.find(option => option.value === this.form.status)
+      return targetOption ? targetOption.label : this.form.status
     },
     formattedRectified() {
       return this.form.rectified === '0' ? '否' :
         this.form.rectified === '1' ? '是' :
-          '未知状态'; // 处理异常值
+          '未知状态' // 处理异常值
     }
   },
   methods: {
     handleConfirm() {
       if (this.form.deptLists == null || this.form.deptLists.length === 0) {
-        this.$modal.msgError("请选择指派部门");
+        this.$modal.msgError('请选择指派部门')
         return
       }
-      this.innerVisible = true;
+      this.innerVisible = true
       this.resetFrom()
     },
     /** 查询巡检任务事件列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       findParentId(this.$store.state.user.dept.deptId).then(response => {
-        this.queryParams.deptId = response.data[0];
+        this.queryParams.deptId = response.data[0]
         listEvent(this.queryParams).then(response => {
-          this.eventList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      });
+          this.eventList = response.rows
+          this.total = response.total
+          this.loading = false
+        })
+      })
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.open1 = false;
-      this.reset();
+      this.open = false
+      this.open1 = false
+      this.reset()
     },
     findParentId() {
       findParentId(this.$store.state.user.dept.deptId).then(response => {
-        const parentId = response.data[0];
-        userDeptSelectIncludeChildren({deptId: parentId}).then(response => {
+        const parentId = response.data[0]
+        userDeptSelectIncludeChildren({ deptId: parentId }).then(response => {
           this.deptOptions = response.data
         })
-      });
+      })
     },
     getStatusLabel(status) {
-      const option = this.eventStatusOptions.find(option => option.value === status);
-      return option ? option.label : status;
+      const option = this.eventStatusOptions.find(option => option.value === status)
+      return option ? option.label : status
     },
     getStatusType(status) {
       const typeMap = {
@@ -453,44 +464,44 @@ export default {
         '1': 'primary',
         '2': 'success',
         '3': 'warning'
-      };
-      return typeMap[status] || 'info';
+      }
+      return typeMap[status] || 'info'
     },
     handleDeptSelect(selectedNode, id) {
       this.$nextTick(() => {
-        this.updateDeptLists();
-      });
+        this.updateDeptLists()
+      })
     },
     handleDeptDeselect(deselectedNode, id) {
       this.$nextTick(() => {
-        this.updateDeptLists();
-      });
+        this.updateDeptLists()
+      })
     },
     updateDeptLists() {
       if (!this.form.deptId || this.form.deptId.length === 0) {
-        this.form.deptLists = [];
+        this.form.deptLists = []
       }
 
       // 根据选中的部门ID构建部门列表
       this.form.deptLists = this.form.deptId.map(deptId => {
-        const dept = this.findDeptById(deptId, this.deptOptions);
+        const dept = this.findDeptById(deptId, this.deptOptions)
         return {
           mapDeptId: deptId,
           mapDeptName: dept ? dept.label : '未知部门'
-        };
-      });
+        }
+      })
     },
     findDeptById(id, nodes) {
       for (const node of nodes) {
         if (node.id === id) {
-          return node;
+          return node
         }
         if (node.children && node.children.length > 0) {
-          const found = this.findDeptById(id, node.children);
-          if (found) return found;
+          const found = this.findDeptById(id, node.children)
+          if (found) return found
         }
       }
-      return null;
+      return null
     },
     // 表单重置
     reset() {
@@ -509,9 +520,9 @@ export default {
         rectified: null,
         deptId: [],
         deptLists: []
-      };
+      }
       if (this.$refs.deptTree) {
-        this.$refs.deptTree.setCheckedKeys([]);
+        this.$refs.deptTree.setCheckedKeys([])
       }
       this.sendForm = {
         casualty: null,
@@ -519,10 +530,10 @@ export default {
         solvingTime: null,
         handlingPerson: null,
         handlingPersonPhone: null,
-        scenePicture: null,
+        scenePicture: null
       }
-      this.resetForm("form");
-      this.resetForm("sendForm");
+      this.resetForm('form')
+      this.resetForm('sendForm')
     },
     resetFrom() {
       this.sendForm = {
@@ -531,19 +542,19 @@ export default {
         solvingTime: null,
         handlingPerson: null,
         handlingPersonPhone: null,
-        scenePicture: null,
+        scenePicture: null
       }
-      this.resetForm("sendForm");
+      this.resetForm('sendForm')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -553,44 +564,45 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加巡检任务事件";
+      this.reset()
+      this.open = true
+      this.title = '添加巡检任务事件'
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       const id = row.id || this.ids
       getEvent(id).then(response => {
         this.form = response.data
-        this.open = true;
+        this.form.deptId = undefined
+        this.open = true
         if (row.rectified === '0' && row.status === '0') {
-          this.title = "事件处置";
+          this.title = '事件处置'
         } else {
-          this.title = "事件详情";
+          this.title = '事件详情'
         }
-      });
+      })
     },
     getUrl(url) {
-      console.log("getUrl", url)
+      console.log('getUrl', url)
       this.sendForm.scenePicture = url
     },
     //处置记录
     getEventLog(row) {
       getEventLogByEventId(row.eventId).then(response => {
-        this.open1 = true;
-        this.title1 = "处置记录";
+        this.open1 = true
+        this.title1 = '处置记录'
         this.eventLog = response.data
-      });
+      })
     },
     /** 提交按钮 */
     submitForm(status) {
       this.form.deptList = this.form.deptLists
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (status === 1) {
             if (this.form.deptLists == null || this.form.deptLists.length === 0) {
-              this.$modal.msgError("请选择指派部门");
+              this.$modal.msgError('请选择指派部门')
               return
             }
             this.form.deptId = null
@@ -602,33 +614,33 @@ export default {
             this.form.handlingPersonPhone = this.sendForm.handlingPersonPhone
             this.form.scenePicture = this.sendForm.scenePicture
             updateEvent(this.form).then(response => {
-              this.$modal.msgSuccess("事件确认");
-              this.open = false;
-              this.innerVisible = false;
-              this.getList();
-            });
+              this.$modal.msgSuccess('事件确认')
+              this.open = false
+              this.innerVisible = false
+              this.getList()
+            })
           } else {
             this.form.deptId = null
             this.form.status = 2
             updateEvent(this.form).then(response => {
-              this.$modal.msgSuccess("事件无异常");
-              this.open = false;
-              this.getList();
-            });
+              this.$modal.msgSuccess('事件无异常')
+              this.open = false
+              this.getList()
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除巡检任务事件编号为"' + ids + '"的数据项?').then(function () {
-        return delEvent(ids);
+      const ids = row.id || this.ids
+      this.$modal.confirm('是否确认删除巡检任务事件编号为"' + ids + '"的数据项?').then(function() {
+        return delEvent(ids)
       }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.getList()
+        this.$modal.msgSuccess('删除成功')
       }).catch(() => {
-      });
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -637,5 +649,5 @@ export default {
       }, `event_${new Date().getTime()}.xlsx`)
     }
   }
-};
+}
 </script>

+ 5 - 2
construction-ui/src/views/construction/utilityTunnel/inspectionTask/event_index.vue

@@ -282,7 +282,7 @@
       </el-dialog>
 
       <div v-if="form.rectified==='0' && form.status ==='0'" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleConfirm">确认事件</el-button>
+        <el-button type="primary" @click="handleConfirm">上报事件</el-button>
         <el-button type="danger" @click="submitForm(2)">无异常</el-button>
       </div>
     </el-dialog>
@@ -380,10 +380,13 @@ export default {
         label: 'label'  // 节点显示文本字段名(例如接口返回的是name,则改为name)
       },
       eventStatusOptions: [
-        {value: '0', label: '上报'},
+        {value: '0', label: '待处置'},
         {value: '1', label: '确认'},
         {value: '2', label: '无异常'},
         {value: '3', label: '办结'},
+        {value: 'event_report', label: '上报'},
+        {value: 'event_completion', label: '办结'},
+        {value: 'event_archiving', label: '归档'},
       ],
       // 表单校验
       rules: {}

+ 5 - 2
construction-ui/src/views/construction/water/waterTask/event_index.vue

@@ -269,7 +269,7 @@
         </div>
       </el-dialog>
       <div v-if="form.rectified==='0' && form.status ==='0'" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleConfirm">确认事件</el-button>
+        <el-button type="primary" @click="handleConfirm">上报事件</el-button>
         <el-button type="danger" @click="submitForm(2)">无异常</el-button>
       </div>
     </el-dialog>
@@ -367,10 +367,13 @@ export default {
         label: 'label'  // 节点显示文本字段名(例如接口返回的是name,则改为name)
       },
       eventStatusOptions: [
-        {value: '0', label: '上报'},
+        {value: '0', label: '待处置'},
         {value: '1', label: '确认'},
         {value: '2', label: '无异常'},
         {value: '3', label: '办结'},
+        {value: 'event_report', label: '上报'},
+        {value: 'event_completion', label: '办结'},
+        {value: 'event_archiving', label: '归档'},
       ],
       // 表单校验
       rules: {},

+ 1 - 0
src/main/java/com/sooka/sponest/construction/bridge/domain/BridgeInspectionTaskRecord.java

@@ -62,6 +62,7 @@ public class BridgeInspectionTaskRecord extends BaseEntity {
      */
     @Excel(name = "巡查状态", readConverterExp = "0=:进行中;1已结束")
     private String status;
+    private String statusName;
 
     @ApiModelProperty(value = "任务轨迹", required = false)
     private String taskTrajectory;

+ 2 - 0
src/main/java/com/sooka/sponest/construction/bridge/mapper/BridgeInspectionTaskRecordMapper.java

@@ -88,4 +88,6 @@ public interface BridgeInspectionTaskRecordMapper {
 
     // 计算本次巡检距离
     public BigDecimal getDistance(Long recordId);
+
+    List<BridgeInspectionTaskRecord> selectPatrolInspectionDataList(BridgeInspectionTaskRecord bridgeInspectionTaskRecord);
 }

+ 2 - 0
src/main/java/com/sooka/sponest/construction/bridge/service/IBridgeInspectionTaskRecordService.java

@@ -76,4 +76,6 @@ public interface IBridgeInspectionTaskRecordService {
      * @date 2025/9/12 上午11:14
      */
     public List<BridgeTaskPipe> getBridgePipeByTaskIds(BridgeInspectionTaskRecord bridgeInspectionTaskRecord);
+
+    List<BridgeInspectionTaskRecord> selectPatrolInspectionDataList(BridgeInspectionTaskRecord bridgeInspectionTaskRecord);
 }

+ 48 - 41
src/main/java/com/sooka/sponest/construction/bridge/service/impl/BridgeInspectionTaskEventServiceImpl.java

@@ -13,16 +13,23 @@ import com.sooka.sponest.construction.bridge.mapper.BridgeInspectionTaskAttachMa
 import com.sooka.sponest.construction.bridge.mapper.BridgeInspectionTaskEventMapper;
 import com.sooka.sponest.construction.bridge.service.IBridgeInspectionTaskEventService;
 import com.sooka.sponest.construction.event.domain.EventAttach;
+import com.sooka.sponest.construction.event.domain.EventDept;
 import com.sooka.sponest.construction.event.domain.EventType;
 import com.sooka.sponest.construction.event.domain.VO.EventSubjectVO;
 import com.sooka.sponest.construction.event.service.EventSubjectService;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventAttach;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventDept;
+import com.sooka.sponest.construction.lifeLine.event.domain.vo.LifeLineEventSubjectVo;
+import com.sooka.sponest.construction.lifeLine.event.service.ILifeLineEventViewService;
+import com.sooka.sponest.construction.view.plan.domain.AnnualPlanProgress;
 import com.sooka.sponest.remoteapi.service.system.RemoteSystemBaseService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 import static com.sooka.sponest.construction.event.domain.constant.EventConstant.EVENT_SOURCE_ARTIFICIAL;
 
@@ -40,8 +47,8 @@ public class BridgeInspectionTaskEventServiceImpl extends BaseServiceImpl implem
     private BridgeInspectionTaskEventMapper bridgeInspectionTaskEventMapper;
     @Autowired
     private BridgeInspectionTaskAttachMapper bridgeInspectionTaskAttachMapper;
-    @Autowired
-    private EventSubjectService eventSubjectService;
+    @Resource
+    private ILifeLineEventViewService eventViewService;
 
     /**
      * 查询巡检任务事件
@@ -131,49 +138,49 @@ public class BridgeInspectionTaskEventServiceImpl extends BaseServiceImpl implem
     /**
      * 修改巡检任务事件
      *
-     * @param BridgeInspectionTaskEvent 巡检任务事件
+     * @param inspectionTaskEvent 巡检任务事件
      * @return 结果
      */
     @Override
-    public AjaxResult updateBridgeInspectionTaskEvent(BridgeInspectionTaskEvent BridgeInspectionTaskEvent) {
+    public AjaxResult updateBridgeInspectionTaskEvent(BridgeInspectionTaskEvent inspectionTaskEvent) {
         //当状态为确认等于1时,需要走事件流程
-        if (BridgeInspectionTaskEvent.getRectified().equals("0") && BridgeInspectionTaskEvent.getStatus().equals("1")) {
-            EventSubjectVO eventSubjectVO = new EventSubjectVO();
-            eventSubjectVO.setEventTitle(BridgeInspectionTaskEvent.getTitle());
-            eventSubjectVO.setEventDescription(BridgeInspectionTaskEvent.getDescription());
-            eventSubjectVO.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getUserId().toString());
-            eventSubjectVO.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
-            eventSubjectVO.setLongitude(BridgeInspectionTaskEvent.getLongitude());
-            eventSubjectVO.setLatitude(BridgeInspectionTaskEvent.getLatitude());
-            eventSubjectVO.setEventStatus("event_confirmation");
-            eventSubjectVO.setEventSource(EVENT_SOURCE_ARTIFICIAL);
-            EventType eventType = new EventType();
-            eventType.setEventTypeCode("3");
-            eventSubjectVO.setEventType(eventType);
-            //增加附件
-            if (StringUtils.isNotEmpty(BridgeInspectionTaskEvent.getAttachPaths())) {
-                List<String> eventAttaches = attachUpload(BridgeInspectionTaskEvent.getAttachPaths());
-                List<EventAttach> attachList = new ArrayList<>();
-                for (String attach : eventAttaches) {
-                    EventAttach eventAttach = new EventAttach();
-                    eventAttach.setAttachPath(attach);
-                    attachList.add(eventAttach);
-                }
-                eventSubjectVO.setAttachList(attachList);
+        if (inspectionTaskEvent.getRectified().equals("0") && inspectionTaskEvent.getStatus().equals("1")) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            LifeLineEventSubjectVo event = new LifeLineEventSubjectVo();
+            event.setEventTitle(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + "-日常监管(桥梁)事件");
+            event.setEventDescription(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + ",桥梁事件,请及时处理!"); // 事件描述
+            event.setEventTypeXl("200"); // 事件小类
+            event.setEventSource("bridge_inspection_task_event"); // 事件来源(行业数据表名)
+            event.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserId())); // 创建人Id
+            event.setCreateName(SecurityUtils.getLoginUser().getUsername()); // 创建人姓名
+            event.setLongitude(inspectionTaskEvent.getLongitude()); // 经度
+            event.setLatitude(inspectionTaskEvent.getLatitude()); // 纬度
+            event.setBusId(String.valueOf(inspectionTaskEvent.getId())); // 业务id(行业数据表的数据id)
+            event.setIndustry("3"); // 行业类型 1热力,2排水,3桥梁,4燃气,5管廊,6供水
+            //事件上报时, 长传的附件图片
+            LifeLineEventAttach attach = new LifeLineEventAttach();
+            attach.setAttachPath(inspectionTaskEvent.getScenePicture()); // 附件路径
+            event.setAttachList(Collections.singletonList(attach));
+            ArrayList<LifeLineEventDept> arrayList = new ArrayList();
+            // 接收部门的信息
+            for (EventDept dept : inspectionTaskEvent.getDeptList()) {
+                LifeLineEventDept eventDept = new LifeLineEventDept();
+                eventDept.setMapDeptId(dept.getMapDeptId()); // 部门Id
+                eventDept.setMapDeptName(dept.getMapDeptName()); // 部门名称
+                eventDept.setDeptHandleType("sys_dept_type_32"); // 部门类型(sys_dept_type_32: 企业; sys_dept_type_31: 住建)
+                arrayList.add(eventDept);
             }
-            //增加部门
-            eventSubjectVO.setDeptList(BridgeInspectionTaskEvent.getDeptList());
-            logger.info("调用事件流程参数+++++++++++++++++++++++{}", eventSubjectVO);
-            AjaxResult ajaxResult = eventSubjectService.eventReportTransfer(eventSubjectVO);
-            logger.info("调用事件流程返回+++++++++++++++++++++++{}", ajaxResult);
-            if (!ajaxResult.get("code").equals(200)) {
-                return AjaxResult.error(ajaxResult.get("msg").toString());
-            } else {
-                Map<String, Object> resultMap = (Map<String, Object>) ajaxResult.get("data");
-                BridgeInspectionTaskEvent.setEventId(resultMap.get("eventId").toString());
+            event.setDeptList(arrayList);
+            AjaxResult result = eventViewService.reportLifeLineEvent(event);
+            if (result.isSuccess()) {
+                Map<String, String> json = (Map<String, String>) result.get("data");
+                String eventId = json.get("eventId");
+                String string = json.get("eventStatus");
+                inspectionTaskEvent.setStatus(string);
+                inspectionTaskEvent.setEventId(eventId);
             }
         }
-        return AjaxResult.success(bridgeInspectionTaskEventMapper.updateBridgeInspectionTaskEvent(BridgeInspectionTaskEvent));
+        return AjaxResult.success(bridgeInspectionTaskEventMapper.updateBridgeInspectionTaskEvent(inspectionTaskEvent));
     }
 
     public List<String> attachUpload(String newAttachPaths) {

+ 4 - 0
src/main/java/com/sooka/sponest/construction/bridge/service/impl/BridgeInspectionTaskRecordServiceImpl.java

@@ -42,6 +42,10 @@ public class BridgeInspectionTaskRecordServiceImpl implements IBridgeInspectionT
     public List<BridgeInspectionTaskRecord> selectBridgeInspectionTaskRecordList(BridgeInspectionTaskRecord BridgeInspectionTaskRecord) {
         return bridgeInspectionTaskRecordMapper.selectBridgeInspectionTaskRecordList(BridgeInspectionTaskRecord);
     }
+    @Override
+    public List<BridgeInspectionTaskRecord> selectPatrolInspectionDataList(BridgeInspectionTaskRecord BridgeInspectionTaskRecord) {
+        return bridgeInspectionTaskRecordMapper.selectPatrolInspectionDataList(BridgeInspectionTaskRecord);
+    }
 
     /**
      * 新增巡检任务记录

+ 1 - 0
src/main/java/com/sooka/sponest/construction/drainage/domain/DrainageInspectionTaskRecord.java

@@ -62,6 +62,7 @@ public class DrainageInspectionTaskRecord extends BaseEntity {
      */
     @Excel(name = "巡查状态", readConverterExp = "0=:进行中;1已结束")
     private String status;
+    private String statusName;
 
     @ApiModelProperty(value = "任务轨迹", required = false)
     private String taskTrajectory;

+ 2 - 0
src/main/java/com/sooka/sponest/construction/drainage/mapper/DrainageInspectionTaskRecordMapper.java

@@ -87,4 +87,6 @@ public interface DrainageInspectionTaskRecordMapper {
     public List<DrainageTaskPipe> getDrainagePipeByTaskIds(String taskIdList);
     // 计算本次巡检距离
     public BigDecimal getDistance(Long recordId);
+
+    List<DrainageInspectionTaskRecord> selectPatrolInspectionDataList(DrainageInspectionTaskRecord drainageInspectionTaskRecord);
 }

+ 2 - 0
src/main/java/com/sooka/sponest/construction/drainage/service/IDrainageInspectionTaskRecordService.java

@@ -76,4 +76,6 @@ public interface IDrainageInspectionTaskRecordService {
      * @date 2025/9/12 上午11:14
      */
     public List<DrainageTaskPipe> getDrainagePipeByTaskIds(DrainageInspectionTaskRecord drainageInspectionTaskRecord);
+
+    List<DrainageInspectionTaskRecord> selectPatrolInspectionDataList(DrainageInspectionTaskRecord drainageInspectionTaskRecord);
 }

+ 46 - 40
src/main/java/com/sooka/sponest/construction/drainage/service/impl/DrainageInspectionTaskEventServiceImpl.java

@@ -13,17 +13,21 @@ import com.sooka.sponest.construction.drainage.mapper.DrainageInspectionTaskAtta
 import com.sooka.sponest.construction.drainage.mapper.DrainageInspectionTaskEventMapper;
 import com.sooka.sponest.construction.drainage.service.IDrainageInspectionTaskEventService;
 import com.sooka.sponest.construction.event.domain.EventAttach;
+import com.sooka.sponest.construction.event.domain.EventDept;
 import com.sooka.sponest.construction.event.domain.EventType;
 import com.sooka.sponest.construction.event.domain.VO.EventSubjectVO;
 import com.sooka.sponest.construction.event.service.EventSubjectService;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventAttach;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventDept;
+import com.sooka.sponest.construction.lifeLine.event.domain.vo.LifeLineEventSubjectVo;
+import com.sooka.sponest.construction.lifeLine.event.service.ILifeLineEventViewService;
 import com.sooka.sponest.remoteapi.service.system.RemoteSystemBaseService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.util.stream.Collectors;
 
 import static com.sooka.sponest.construction.event.domain.constant.EventConstant.EVENT_SOURCE_ARTIFICIAL;
@@ -152,52 +156,54 @@ public class DrainageInspectionTaskEventServiceImpl extends BaseServiceImpl impl
         return drainageInspectionTaskEventMapper.insertDrainageInspectionTaskEvent(DrainageInspectionTaskEvent);
     }
 
+    @Resource
+    private ILifeLineEventViewService eventViewService;
     /**
      * 修改巡检任务事件
      *
-     * @param DrainageInspectionTaskEvent 巡检任务事件
+     * @param inspectionTaskEvent 巡检任务事件
      * @return 结果
      */
     @Override
-    public AjaxResult updateDrainageInspectionTaskEvent(DrainageInspectionTaskEvent DrainageInspectionTaskEvent) {
+    public AjaxResult updateDrainageInspectionTaskEvent(DrainageInspectionTaskEvent inspectionTaskEvent) {
         //当状态为确认等于1时,需要走事件流程
-        if (DrainageInspectionTaskEvent.getRectified().equals("0") && DrainageInspectionTaskEvent.getStatus().equals("1")) {
-            EventSubjectVO eventSubjectVO = new EventSubjectVO();
-            eventSubjectVO.setEventTitle(DrainageInspectionTaskEvent.getTitle());
-            eventSubjectVO.setEventDescription(DrainageInspectionTaskEvent.getDescription());
-            eventSubjectVO.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getUserId().toString());
-            eventSubjectVO.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
-            eventSubjectVO.setLongitude(DrainageInspectionTaskEvent.getLongitude());
-            eventSubjectVO.setLatitude(DrainageInspectionTaskEvent.getLatitude());
-            eventSubjectVO.setEventStatus("event_confirmation");
-            eventSubjectVO.setEventSource(EVENT_SOURCE_ARTIFICIAL);
-            EventType eventType = new EventType();
-            eventType.setEventTypeCode("3");
-            eventSubjectVO.setEventType(eventType);
-            //增加附件
-            if (StringUtils.isNotEmpty(DrainageInspectionTaskEvent.getAttachPaths())) {
-                List<String> eventAttaches = attachUpload(DrainageInspectionTaskEvent.getAttachPaths());
-                List<EventAttach> attachList = new ArrayList<>();
-                for (String attach : eventAttaches) {
-                    EventAttach eventAttach = new EventAttach();
-                    eventAttach.setAttachPath(attach);
-                    attachList.add(eventAttach);
-                }
-                eventSubjectVO.setAttachList(attachList);
+        if (inspectionTaskEvent.getRectified().equals("0") && inspectionTaskEvent.getStatus().equals("1")) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            LifeLineEventSubjectVo event = new LifeLineEventSubjectVo();
+            event.setEventTitle(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + "-日常监管(排水)事件");
+            event.setEventDescription(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + ",排水事件,请及时处理!"); // 事件描述
+            event.setEventTypeXl("200"); // 事件小类
+            event.setEventSource("drainage_inspection_task_event"); // 事件来源(行业数据表名)
+            event.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserId())); // 创建人Id
+            event.setCreateName(SecurityUtils.getLoginUser().getUsername()); // 创建人姓名
+            event.setLongitude(inspectionTaskEvent.getLongitude()); // 经度
+            event.setLatitude(inspectionTaskEvent.getLatitude()); // 纬度
+            event.setBusId(String.valueOf(inspectionTaskEvent.getId())); // 业务id(行业数据表的数据id)
+            event.setIndustry("1"); // 行业类型 1热力,2排水,3桥梁,4燃气,5管廊,6供水
+            //事件上报时, 长传的附件图片
+            LifeLineEventAttach attach = new LifeLineEventAttach();
+            attach.setAttachPath(inspectionTaskEvent.getScenePicture()); // 附件路径
+            event.setAttachList(Collections.singletonList(attach));
+            ArrayList<LifeLineEventDept> arrayList = new ArrayList();
+            // 接收部门的信息
+            for (EventDept dept : inspectionTaskEvent.getDeptList()) {
+                LifeLineEventDept eventDept = new LifeLineEventDept();
+                eventDept.setMapDeptId(dept.getMapDeptId()); // 部门Id
+                eventDept.setMapDeptName(dept.getMapDeptName()); // 部门名称
+                eventDept.setDeptHandleType("sys_dept_type_32"); // 部门类型(sys_dept_type_32: 企业; sys_dept_type_31: 住建)
+                arrayList.add(eventDept);
             }
-            //增加部门
-            eventSubjectVO.setDeptList(DrainageInspectionTaskEvent.getDeptList());
-            logger.info("调用事件流程参数+++++++++++++++++++++++{}", eventSubjectVO);
-            AjaxResult ajaxResult = eventSubjectService.eventReportTransfer(eventSubjectVO);
-            logger.info("调用事件流程返回+++++++++++++++++++++++{}", ajaxResult);
-            if (!ajaxResult.get("code").equals(200)) {
-                return AjaxResult.error(ajaxResult.get("msg").toString());
-            } else {
-                Map<String, Object> resultMap = (Map<String, Object>) ajaxResult.get("data");
-                DrainageInspectionTaskEvent.setEventId(resultMap.get("eventId").toString());
+            event.setDeptList(arrayList);
+            AjaxResult result = eventViewService.reportLifeLineEvent(event);
+            if (result.isSuccess()) {
+                Map<String, String> json = (Map<String, String>) result.get("data");
+                String eventId = json.get("eventId");
+                String string = json.get("eventStatus");
+                inspectionTaskEvent.setStatus(string);
+                inspectionTaskEvent.setEventId(eventId);
             }
         }
-        return AjaxResult.success(drainageInspectionTaskEventMapper.updateDrainageInspectionTaskEvent(DrainageInspectionTaskEvent));
+        return AjaxResult.success(drainageInspectionTaskEventMapper.updateDrainageInspectionTaskEvent(inspectionTaskEvent));
     }
 
     public List<String> attachUpload(String newAttachPaths) {

+ 4 - 0
src/main/java/com/sooka/sponest/construction/drainage/service/impl/DrainageInspectionTaskRecordServiceImpl.java

@@ -42,6 +42,10 @@ public class DrainageInspectionTaskRecordServiceImpl implements IDrainageInspect
     public List<DrainageInspectionTaskRecord> selectDrainageInspectionTaskRecordList(DrainageInspectionTaskRecord DrainageInspectionTaskRecord) {
         return drainageInspectionTaskRecordMapper.selectDrainageInspectionTaskRecordList(DrainageInspectionTaskRecord);
     }
+    @Override
+    public List<DrainageInspectionTaskRecord> selectPatrolInspectionDataList(DrainageInspectionTaskRecord DrainageInspectionTaskRecord) {
+        return drainageInspectionTaskRecordMapper.selectPatrolInspectionDataList(DrainageInspectionTaskRecord);
+    }
 
     /**
      * 新增巡检任务记录

+ 1 - 0
src/main/java/com/sooka/sponest/construction/gas/domain/GasInspectionTaskRecord.java

@@ -62,6 +62,7 @@ public class GasInspectionTaskRecord extends BaseEntity {
      */
     @Excel(name = "巡查状态", readConverterExp = "0=:进行中;1已结束")
     private String status;
+    private String statusName;
 
     @ApiModelProperty(value = "任务轨迹", required = false)
     private String taskTrajectory;

+ 2 - 0
src/main/java/com/sooka/sponest/construction/gas/mapper/GasInspectionTaskRecordMapper.java

@@ -87,4 +87,6 @@ public interface GasInspectionTaskRecordMapper {
     public List<GasTaskPipe> getGasPipeByTaskIds(String taskIdList);
     // 计算本次巡检距离
     public BigDecimal getDistance(Long recordId);
+
+    List<GasInspectionTaskRecord> selectPatrolInspectionDataList(GasInspectionTaskRecord gasInspectionTaskRecord);
 }

+ 2 - 0
src/main/java/com/sooka/sponest/construction/gas/service/IGasInspectionTaskRecordService.java

@@ -76,4 +76,6 @@ public interface IGasInspectionTaskRecordService {
      * @date 2025/9/12 上午11:14
      */
     public List<GasTaskPipe> getGasPipeByTaskIds(GasInspectionTaskRecord gasInspectionTaskRecord);
+
+    List<?> selectPatrolInspectionDataList(GasInspectionTaskRecord gasInspectionTaskRecord);
 }

+ 46 - 39
src/main/java/com/sooka/sponest/construction/gas/service/impl/GasInspectionTaskEventServiceImpl.java

@@ -9,6 +9,7 @@ import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteConfigService;
 import com.sooka.sponest.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.construction.event.domain.EventAttach;
+import com.sooka.sponest.construction.event.domain.EventDept;
 import com.sooka.sponest.construction.event.domain.EventType;
 import com.sooka.sponest.construction.event.domain.VO.EventSubjectVO;
 import com.sooka.sponest.construction.event.service.EventSubjectService;
@@ -17,12 +18,16 @@ import com.sooka.sponest.construction.gas.domain.GasInspectionTaskEvent;
 import com.sooka.sponest.construction.gas.mapper.GasInspectionTaskAttachMapper;
 import com.sooka.sponest.construction.gas.mapper.GasInspectionTaskEventMapper;
 import com.sooka.sponest.construction.gas.service.IGasInspectionTaskEventService;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventAttach;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventDept;
+import com.sooka.sponest.construction.lifeLine.event.domain.vo.LifeLineEventSubjectVo;
+import com.sooka.sponest.construction.lifeLine.event.service.ILifeLineEventViewService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 import static com.sooka.sponest.construction.event.domain.constant.EventConstant.EVENT_SOURCE_ARTIFICIAL;
 
@@ -116,52 +121,54 @@ public class GasInspectionTaskEventServiceImpl extends BaseServiceImpl implement
         return gasInspectionTaskEventMapper.insertGasInspectionTaskEvent(gasInspectionTaskEvent);
     }
 
+    @Resource
+    private ILifeLineEventViewService eventViewService;
     /**
      * 修改巡检任务事件
      *
-     * @param gasInspectionTaskEvent 巡检任务事件
+     * @param inspectionTaskEvent 巡检任务事件
      * @return 结果
      */
     @Override
-    public AjaxResult updateGasInspectionTaskEvent(GasInspectionTaskEvent gasInspectionTaskEvent) {
+    public AjaxResult updateGasInspectionTaskEvent(GasInspectionTaskEvent inspectionTaskEvent) {
         //当状态为确认等于1时,需要走事件流程
-        if (gasInspectionTaskEvent.getRectified().equals("0") && gasInspectionTaskEvent.getStatus().equals("1")) {
-            EventSubjectVO eventSubjectVO = new EventSubjectVO();
-            eventSubjectVO.setEventTitle(gasInspectionTaskEvent.getTitle());
-            eventSubjectVO.setEventDescription(gasInspectionTaskEvent.getDescription());
-            eventSubjectVO.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getUserId().toString());
-            eventSubjectVO.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
-            eventSubjectVO.setLongitude(gasInspectionTaskEvent.getLongitude());
-            eventSubjectVO.setLatitude(gasInspectionTaskEvent.getLatitude());
-            eventSubjectVO.setEventStatus("event_confirmation");
-            eventSubjectVO.setEventSource(EVENT_SOURCE_ARTIFICIAL);
-            EventType eventType = new EventType();
-            eventType.setEventTypeCode("3");
-            eventSubjectVO.setEventType(eventType);
-            //增加附件
-            if (StringUtils.isNotEmpty(gasInspectionTaskEvent.getAttachPaths())) {
-                List<String> eventAttaches = attachUpload(gasInspectionTaskEvent.getAttachPaths());
-                List<EventAttach> attachList = new ArrayList<>();
-                for (String attach : eventAttaches) {
-                    EventAttach eventAttach = new EventAttach();
-                    eventAttach.setAttachPath(attach);
-                    attachList.add(eventAttach);
-                }
-                eventSubjectVO.setAttachList(attachList);
+        if (inspectionTaskEvent.getRectified().equals("0") && inspectionTaskEvent.getStatus().equals("1")) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            LifeLineEventSubjectVo event = new LifeLineEventSubjectVo();
+            event.setEventTitle(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + "-日常监管(燃气)事件");
+            event.setEventDescription(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + ",燃气事件,请及时处理!"); // 事件描述
+            event.setEventTypeXl("200"); // 事件小类
+            event.setEventSource("gas_inspection_task_event"); // 事件来源(行业数据表名)
+            event.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserId())); // 创建人Id
+            event.setCreateName(SecurityUtils.getLoginUser().getUsername()); // 创建人姓名
+            event.setLongitude(inspectionTaskEvent.getLongitude()); // 经度
+            event.setLatitude(inspectionTaskEvent.getLatitude()); // 纬度
+            event.setBusId(String.valueOf(inspectionTaskEvent.getId())); // 业务id(行业数据表的数据id)
+            event.setIndustry("4"); // 行业类型 1热力,2排水,3桥梁,4燃气,5管廊,6供水
+            //事件上报时, 长传的附件图片
+            LifeLineEventAttach attach = new LifeLineEventAttach();
+            attach.setAttachPath(""); // 附件路径
+            event.setAttachList(Collections.singletonList(attach));
+            ArrayList<LifeLineEventDept> arrayList = new ArrayList();
+            // 接收部门的信息
+            for (EventDept dept : inspectionTaskEvent.getDeptList()) {
+                LifeLineEventDept eventDept = new LifeLineEventDept();
+                eventDept.setMapDeptId(dept.getMapDeptId()); // 部门Id
+                eventDept.setMapDeptName(dept.getMapDeptName()); // 部门名称
+                eventDept.setDeptHandleType("sys_dept_type_32"); // 部门类型(sys_dept_type_32: 企业; sys_dept_type_31: 住建)
+                arrayList.add(eventDept);
             }
-            //增加部门
-            eventSubjectVO.setDeptList(gasInspectionTaskEvent.getDeptList());
-            logger.info("调用事件流程参数+++++++++++++++++++++++{}", eventSubjectVO);
-            AjaxResult ajaxResult = eventSubjectService.eventReportTransfer(eventSubjectVO);
-            logger.info("调用事件流程返回+++++++++++++++++++++++{}", ajaxResult);
-            if (!ajaxResult.get("code").equals(200)) {
-                return AjaxResult.error(ajaxResult.get("msg").toString());
-            } else {
-                Map<String, Object> resultMap = (Map<String, Object>) ajaxResult.get("data");
-                gasInspectionTaskEvent.setEventId(resultMap.get("eventId").toString());
+            event.setDeptList(arrayList);
+            AjaxResult result = eventViewService.reportLifeLineEvent(event);
+            if (result.isSuccess()) {
+                Map<String, String> json = (Map<String, String>) result.get("data");
+                String eventId = json.get("eventId");
+                String string = json.get("eventStatus");
+                inspectionTaskEvent.setStatus(string);
+                inspectionTaskEvent.setEventId(eventId);
             }
         }
-        return AjaxResult.success(gasInspectionTaskEventMapper.updateGasInspectionTaskEvent(gasInspectionTaskEvent));
+        return AjaxResult.success(gasInspectionTaskEventMapper.updateGasInspectionTaskEvent(inspectionTaskEvent));
     }
 
     public List<String> attachUpload(String newAttachPaths) {

+ 4 - 0
src/main/java/com/sooka/sponest/construction/gas/service/impl/GasInspectionTaskRecordServiceImpl.java

@@ -43,6 +43,10 @@ public class GasInspectionTaskRecordServiceImpl implements IGasInspectionTaskRec
     public List<GasInspectionTaskRecord> selectGasInspectionTaskRecordList(GasInspectionTaskRecord gasInspectionTaskRecord) {
         return gasInspectionTaskRecordMapper.selectGasInspectionTaskRecordList(gasInspectionTaskRecord);
     }
+    @Override
+    public List<GasInspectionTaskRecord> selectPatrolInspectionDataList(GasInspectionTaskRecord gasInspectionTaskRecord) {
+        return gasInspectionTaskRecordMapper.selectPatrolInspectionDataList(gasInspectionTaskRecord);
+    }
 
     /**
      * 新增巡检任务记录

+ 42 - 16
src/main/java/com/sooka/sponest/construction/heating/controller/HeatingViewController.java

@@ -30,10 +30,7 @@ import com.sooka.sponest.construction.schedule.domain.DutySchedule;
 import com.sooka.sponest.construction.schedule.service.IDutyScheduleService;
 import com.sooka.sponest.construction.task.domain.Tasks;
 import com.sooka.sponest.construction.task.service.ITasksService;
-import com.sooka.sponest.construction.utilityTunnel.domain.UtilityTunnelBodyInformation;
-import com.sooka.sponest.construction.utilityTunnel.domain.UtilityTunnelHiddendanger;
-import com.sooka.sponest.construction.utilityTunnel.domain.UtilityTunnelMaintenancerepair;
-import com.sooka.sponest.construction.utilityTunnel.domain.UtilityTunnelManhole;
+import com.sooka.sponest.construction.utilityTunnel.domain.*;
 import com.sooka.sponest.construction.utilityTunnel.service.*;
 import com.sooka.sponest.construction.waterSupply.domain.*;
 import com.sooka.sponest.construction.waterSupply.service.*;
@@ -401,18 +398,47 @@ public class HeatingViewController extends BaseController {
     @GetMapping("/selectHeatingPipeInspectionTaskList")
     public TableDataInfo selectHeatingPipeInspectionTaskList(HeatingPipeInspectionTask heatingPipeInspectionTask) {
         startPage();
-        List<HeatingPipeInspectionTask> list = new ArrayList<>();
-        switch (heatingPipeInspectionTask.getType()){
-            case "1":
-                List<HeatingPipeInspectionTask> heatingPipeInspectionTasks = heatingInspectionTaskService.selectHeatingPipeInspectionTaskList(heatingPipeInspectionTask);
-                break;
-            case "2":
-                DrainagePipeInspectionTask drainagePipeInspectionTask = new DrainagePipeInspectionTask();
-                List<DrainagePipeInspectionTask> drainagePipeInspectionTasks = drainagePipeInspectionTaskService.selectDrainagePipeInspectionTaskList(drainagePipeInspectionTask);
-                break;
-            case "3":
-                BridgePipeInspectionTask bridgePipeInspectionTask = new BridgePipeInspectionTask();
-                List<BridgePipeInspectionTask> bridgePipeInspectionTasks = bridgePipeInspectionTaskService.selectBridgePipeInspectionTaskList(bridgePipeInspectionTask);
+        List list = new ArrayList<>();
+        String type = heatingPipeInspectionTask.getType();
+        if (type != null) {
+            switch (type){
+                case "1":
+                    list = heatingInspectionTaskService.selectHeatingPipeInspectionTaskList(heatingPipeInspectionTask);
+                    break;
+                case "2":
+                    DrainagePipeInspectionTask drainagePipeInspectionTask = new DrainagePipeInspectionTask();
+                    // 复制通用属性
+                    drainagePipeInspectionTask.setTaskName(heatingPipeInspectionTask.getTaskName());
+                    list = drainagePipeInspectionTaskService.selectDrainagePipeInspectionTaskList(drainagePipeInspectionTask);
+                    break;
+                case "3":
+                    BridgePipeInspectionTask bridgePipeInspectionTask = new BridgePipeInspectionTask();
+                    // 复制通用属性
+                    bridgePipeInspectionTask.setTaskName(heatingPipeInspectionTask.getTaskName());
+                    list = bridgePipeInspectionTaskService.selectBridgePipeInspectionTaskList(bridgePipeInspectionTask);
+                    break;
+                case "4":
+                    GasPipeInspectionTask gasPipeInspectionTask = new GasPipeInspectionTask();
+                    // 复制通用属性
+                    gasPipeInspectionTask.setTaskName(heatingPipeInspectionTask.getTaskName());
+                    list = gasPipeInspectionTaskService.selectGasPipeInspectionTaskList(gasPipeInspectionTask);
+                    break;
+                case "5":
+                    UtilityTunnelPipeInspectionTask utilityTunnelPipeInspectionTask = new UtilityTunnelPipeInspectionTask();
+                    // 复制通用属性
+                    utilityTunnelPipeInspectionTask.setTaskName(heatingPipeInspectionTask.getTaskName());
+                    list = utilityTunnelPipeInspectionTaskService.selectUtilityTunnelPipeInspectionTaskList(utilityTunnelPipeInspectionTask);
+                    break;
+                case "6":
+                    WaterSupplyPipeInspectionTask waterSupplyPipeInspectionTask = new WaterSupplyPipeInspectionTask();
+                    // 复制通用属性
+                    waterSupplyPipeInspectionTask.setTaskName(heatingPipeInspectionTask.getTaskName());
+                    list = waterSupplyPipeInspectionTaskService.selectWaterSupplyPipeInspectionTaskList(waterSupplyPipeInspectionTask);
+                    break;
+                default:
+                    // 默认情况,返回空列表
+                    break;
+            }
         }
         return getDataTable(list);
     }

+ 46 - 40
src/main/java/com/sooka/sponest/construction/heating/service/impl/HeatingInspectionTaskEventServiceImpl.java

@@ -8,6 +8,7 @@ import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteConfigService;
 import com.sooka.sponest.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.construction.event.domain.EventAttach;
+import com.sooka.sponest.construction.event.domain.EventDept;
 import com.sooka.sponest.construction.event.domain.EventType;
 import com.sooka.sponest.construction.event.domain.VO.EventSubjectVO;
 import com.sooka.sponest.construction.event.service.EventSubjectService;
@@ -16,14 +17,17 @@ import com.sooka.sponest.construction.heating.domain.HeatingInspectionTaskEvent;
 import com.sooka.sponest.construction.heating.mapper.HeatingInspectionTaskAttachMapper;
 import com.sooka.sponest.construction.heating.mapper.HeatingInspectionTaskEventMapper;
 import com.sooka.sponest.construction.heating.service.IHeatingInspectionTaskEventService;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventAttach;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventDept;
+import com.sooka.sponest.construction.lifeLine.event.domain.vo.LifeLineEventSubjectVo;
+import com.sooka.sponest.construction.lifeLine.event.service.ILifeLineEventViewService;
 import com.sooka.sponest.remoteapi.service.system.RemoteSystemBaseService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.util.stream.Collectors;
 
 import static com.sooka.sponest.construction.event.domain.constant.EventConstant.EVENT_SOURCE_ARTIFICIAL;
@@ -153,52 +157,54 @@ public class HeatingInspectionTaskEventServiceImpl extends BaseServiceImpl imple
         return heatingInspectionTaskEventMapper.insertHeatingInspectionTaskEvent(HeatingInspectionTaskEvent);
     }
 
+    @Resource
+    private ILifeLineEventViewService eventViewService;
     /**
      * 修改巡检任务事件
      *
-     * @param HeatingInspectionTaskEvent 巡检任务事件
+     * @param inspectionTaskEvent 巡检任务事件
      * @return 结果
      */
     @Override
-    public AjaxResult updateHeatingInspectionTaskEvent(HeatingInspectionTaskEvent HeatingInspectionTaskEvent) {
+    public AjaxResult updateHeatingInspectionTaskEvent(HeatingInspectionTaskEvent inspectionTaskEvent) {
         //当状态为确认等于1时,需要走事件流程
-        if (HeatingInspectionTaskEvent.getRectified().equals("0") && HeatingInspectionTaskEvent.getStatus().equals("1")) {
-            EventSubjectVO eventSubjectVO = new EventSubjectVO();
-            eventSubjectVO.setEventTitle(HeatingInspectionTaskEvent.getTitle());
-            eventSubjectVO.setEventDescription(HeatingInspectionTaskEvent.getDescription());
-            eventSubjectVO.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getUserId().toString());
-            eventSubjectVO.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
-            eventSubjectVO.setLongitude(HeatingInspectionTaskEvent.getLongitude());
-            eventSubjectVO.setLatitude(HeatingInspectionTaskEvent.getLatitude());
-            eventSubjectVO.setEventStatus("event_confirmation");
-            eventSubjectVO.setEventSource(EVENT_SOURCE_ARTIFICIAL);
-            EventType eventType = new EventType();
-            eventType.setEventTypeCode("3");
-            eventSubjectVO.setEventType(eventType);
-            //增加附件
-            if (StringUtils.isNotEmpty(HeatingInspectionTaskEvent.getAttachPaths())) {
-                List<String> eventAttaches = attachUpload(HeatingInspectionTaskEvent.getAttachPaths());
-                List<EventAttach> attachList = new ArrayList<>();
-                for (String attach : eventAttaches) {
-                    EventAttach eventAttach = new EventAttach();
-                    eventAttach.setAttachPath(attach);
-                    attachList.add(eventAttach);
-                }
-                eventSubjectVO.setAttachList(attachList);
+        if (inspectionTaskEvent.getRectified().equals("0") && inspectionTaskEvent.getStatus().equals("1")) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            LifeLineEventSubjectVo event = new LifeLineEventSubjectVo();
+            event.setEventTitle(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + "-日常监管(供热)事件");
+            event.setEventDescription(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + ",供热事件,请及时处理!"); // 事件描述
+            event.setEventTypeXl("200"); // 事件小类
+            event.setEventSource("heating_inspection_task_event"); // 事件来源(行业数据表名)
+            event.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserId())); // 创建人Id
+            event.setCreateName(SecurityUtils.getLoginUser().getUsername()); // 创建人姓名
+            event.setLongitude(inspectionTaskEvent.getLongitude()); // 经度
+            event.setLatitude(inspectionTaskEvent.getLatitude()); // 纬度
+            event.setBusId(String.valueOf(inspectionTaskEvent.getId())); // 业务id(行业数据表的数据id)
+            event.setIndustry("1"); // 行业类型 1热力,2排水,3桥梁,4燃气,5管廊,6供水
+            //事件上报时, 长传的附件图片
+            LifeLineEventAttach attach = new LifeLineEventAttach();
+            attach.setAttachPath(inspectionTaskEvent.getScenePicture()); // 附件路径
+            event.setAttachList(Collections.singletonList(attach));
+            ArrayList<LifeLineEventDept> arrayList = new ArrayList();
+            // 接收部门的信息
+            for (EventDept dept : inspectionTaskEvent.getDeptList()) {
+                LifeLineEventDept eventDept = new LifeLineEventDept();
+                eventDept.setMapDeptId(dept.getMapDeptId()); // 部门Id
+                eventDept.setMapDeptName(dept.getMapDeptName()); // 部门名称
+                eventDept.setDeptHandleType("sys_dept_type_32"); // 部门类型(sys_dept_type_32: 企业; sys_dept_type_31: 住建)
+                arrayList.add(eventDept);
             }
-            //增加部门
-            eventSubjectVO.setDeptList(HeatingInspectionTaskEvent.getDeptList());
-            logger.info("调用事件流程参数+++++++++++++++++++++++{}", eventSubjectVO);
-            AjaxResult ajaxResult = eventSubjectService.eventReportTransfer(eventSubjectVO);
-            logger.info("调用事件流程返回+++++++++++++++++++++++{}", ajaxResult);
-            if (!ajaxResult.get("code").equals(200)) {
-                return AjaxResult.error(ajaxResult.get("msg").toString());
-            } else {
-                Map<String, Object> resultMap = (Map<String, Object>) ajaxResult.get("data");
-                HeatingInspectionTaskEvent.setEventId(resultMap.get("eventId").toString());
+            event.setDeptList(arrayList);
+            AjaxResult result = eventViewService.reportLifeLineEvent(event);
+            if (result.isSuccess()) {
+                Map<String, String> json = (Map<String, String>) result.get("data");
+                String eventId = json.get("eventId");
+                String string = json.get("eventStatus");
+                inspectionTaskEvent.setStatus(string);
+                inspectionTaskEvent.setEventId(eventId);
             }
         }
-        return AjaxResult.success(heatingInspectionTaskEventMapper.updateHeatingInspectionTaskEvent(HeatingInspectionTaskEvent));
+        return AjaxResult.success(heatingInspectionTaskEventMapper.updateHeatingInspectionTaskEvent(inspectionTaskEvent));
     }
 
     public List<String> attachUpload(String newAttachPaths) {

+ 62 - 0
src/main/java/com/sooka/sponest/construction/utilityTunnel/controller/UtilityTunnelViewController.java

@@ -13,6 +13,15 @@ import com.sooka.sponest.construction.heating.domain.HeatingPipe;
 import com.sooka.sponest.construction.utilityTunnel.domain.*;
 import com.sooka.sponest.construction.utilityTunnel.domain.vo.*;
 import com.sooka.sponest.construction.utilityTunnel.service.*;
+import com.sooka.sponest.construction.heating.service.IHeatingInspectionTaskRecordService;
+import com.sooka.sponest.construction.drainage.domain.DrainageInspectionTaskRecord;
+import com.sooka.sponest.construction.drainage.service.IDrainageInspectionTaskRecordService;
+import com.sooka.sponest.construction.bridge.domain.BridgeInspectionTaskRecord;
+import com.sooka.sponest.construction.bridge.service.IBridgeInspectionTaskRecordService;
+import com.sooka.sponest.construction.gas.domain.GasInspectionTaskRecord;
+import com.sooka.sponest.construction.gas.service.IGasInspectionTaskRecordService;
+import com.sooka.sponest.construction.waterSupply.domain.WaterInspectionTaskRecord;
+import com.sooka.sponest.construction.waterSupply.service.IWaterInspectionTaskRecordService;
 import com.sooka.sponest.remoteapi.service.system.RemoteSystemBaseService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -51,6 +60,16 @@ public class UtilityTunnelViewController extends BaseController {
     @Autowired
     private IUtilityTunnelPipeInspectionTaskService utilityTunnelPipeInspectionTaskService;
     @Autowired
+    private IHeatingInspectionTaskRecordService heatingInspectionTaskRecordService;
+    @Autowired
+    private IDrainageInspectionTaskRecordService drainageInspectionTaskRecordService;
+    @Autowired
+    private IBridgeInspectionTaskRecordService bridgeInspectionTaskRecordService;
+    @Autowired
+    private IGasInspectionTaskRecordService gasInspectionTaskRecordService;
+    @Autowired
+    private IWaterInspectionTaskRecordService waterInspectionTaskRecordService;
+    @Autowired
     private RemoteSystemBaseService remoteSystemBaseService;
     @Autowired
     private IUtilityTunnelDeviceMonitoringService utilityTunnelDeviceMonitoringService;
@@ -239,6 +258,49 @@ public class UtilityTunnelViewController extends BaseController {
     }
 
     /**
+     * 巡查巡检数据列表(数据) - 公共接口
+     *
+     * @param type 行业类型 1-热力,2-排水,3-桥梁,4-燃气,5-管廊,6-供水
+     */
+    @GetMapping("/selectPatrolInspectionDataList")
+    public TableDataInfo selectPatrolInspectionDataList(
+            @RequestParam(value = "type", required = true) Integer type,
+            UtilityTunnelInspectionTaskRecord utilityTunnelInspectionTaskRecord,
+            HeatingInspectionTaskRecord heatingInspectionTaskRecord,
+            DrainageInspectionTaskRecord drainageInspectionTaskRecord,
+            BridgeInspectionTaskRecord bridgeInspectionTaskRecord,
+            GasInspectionTaskRecord gasInspectionTaskRecord,
+            WaterInspectionTaskRecord waterInspectionTaskRecord) {
+        startPage();
+        List<?> list = new ArrayList<>();
+
+        switch (type) {
+            case 1: // 热力
+                list = heatingInspectionTaskRecordService.selectPatrolInspectionDataList(heatingInspectionTaskRecord);
+                break;
+            case 2: // 排水
+                list = drainageInspectionTaskRecordService.selectPatrolInspectionDataList(drainageInspectionTaskRecord);
+                break;
+            case 3: // 桥梁
+                list = bridgeInspectionTaskRecordService.selectPatrolInspectionDataList(bridgeInspectionTaskRecord);
+                break;
+            case 4: // 燃气
+                list = gasInspectionTaskRecordService.selectPatrolInspectionDataList(gasInspectionTaskRecord);
+                break;
+            case 5: // 管廊
+                list = utilityTunnelPipeInspectionTaskService.selectPatrolInspectionDataList(utilityTunnelInspectionTaskRecord);
+                break;
+            case 6: // 供水
+                list = waterInspectionTaskRecordService.selectPatrolInspectionDataList(waterInspectionTaskRecord);
+                break;
+            default:
+                return getDataTable(new ArrayList<>());
+        }
+
+        return getDataTable(list);
+    }
+
+    /**
      * 隐患上报整改统计
      */
     @GetMapping("/hiddenDangerCount")

+ 46 - 39
src/main/java/com/sooka/sponest/construction/utilityTunnel/service/impl/UtilityTunnelInspectionTaskEventServiceImpl.java

@@ -8,9 +8,14 @@ import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteConfigService;
 import com.sooka.sponest.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.construction.event.domain.EventAttach;
+import com.sooka.sponest.construction.event.domain.EventDept;
 import com.sooka.sponest.construction.event.domain.EventType;
 import com.sooka.sponest.construction.event.domain.VO.EventSubjectVO;
 import com.sooka.sponest.construction.event.service.EventSubjectService;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventAttach;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventDept;
+import com.sooka.sponest.construction.lifeLine.event.domain.vo.LifeLineEventSubjectVo;
+import com.sooka.sponest.construction.lifeLine.event.service.ILifeLineEventViewService;
 import com.sooka.sponest.construction.utilityTunnel.domain.UtilityTunnelInspectionTaskAttach;
 import com.sooka.sponest.construction.utilityTunnel.domain.UtilityTunnelInspectionTaskEvent;
 import com.sooka.sponest.construction.utilityTunnel.mapper.UtilityTunnelInspectionTaskAttachMapper;
@@ -20,9 +25,9 @@ import com.sooka.sponest.remoteapi.service.system.RemoteSystemBaseService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 import static com.sooka.sponest.construction.event.domain.constant.EventConstant.EVENT_SOURCE_ARTIFICIAL;
 
@@ -128,52 +133,54 @@ public class UtilityTunnelInspectionTaskEventServiceImpl extends BaseServiceImpl
         return utilityTunnelInspectionTaskEventMapper.insertUtilityTunnelInspectionTaskEvent(UtilityTunnelInspectionTaskEvent);
     }
 
+    @Resource
+    private ILifeLineEventViewService eventViewService;
     /**
      * 修改巡检任务事件
      *
-     * @param UtilityTunnelInspectionTaskEvent 巡检任务事件
+     * @param inspectionTaskEvent 巡检任务事件
      * @return 结果
      */
     @Override
-    public AjaxResult updateUtilityTunnelInspectionTaskEvent(UtilityTunnelInspectionTaskEvent UtilityTunnelInspectionTaskEvent) {
+    public AjaxResult updateUtilityTunnelInspectionTaskEvent(UtilityTunnelInspectionTaskEvent inspectionTaskEvent) {
         //当状态为确认等于1时,需要走事件流程
-        if (UtilityTunnelInspectionTaskEvent.getRectified().equals("0") && UtilityTunnelInspectionTaskEvent.getStatus().equals("1")) {
-            EventSubjectVO eventSubjectVO = new EventSubjectVO();
-            eventSubjectVO.setEventTitle(UtilityTunnelInspectionTaskEvent.getTitle());
-            eventSubjectVO.setEventDescription(UtilityTunnelInspectionTaskEvent.getDescription());
-            eventSubjectVO.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getUserId().toString());
-            eventSubjectVO.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
-            eventSubjectVO.setLongitude(UtilityTunnelInspectionTaskEvent.getLongitude());
-            eventSubjectVO.setLatitude(UtilityTunnelInspectionTaskEvent.getLatitude());
-            eventSubjectVO.setEventStatus("event_confirmation");
-            eventSubjectVO.setEventSource(EVENT_SOURCE_ARTIFICIAL);
-            EventType eventType = new EventType();
-            eventType.setEventTypeCode("3");
-            eventSubjectVO.setEventType(eventType);
-            //增加附件
-            if (StringUtils.isNotEmpty(UtilityTunnelInspectionTaskEvent.getAttachPaths())) {
-                List<String> eventAttaches = attachUpload(UtilityTunnelInspectionTaskEvent.getAttachPaths());
-                List<EventAttach> attachList = new ArrayList<>();
-                for (String attach : eventAttaches) {
-                    EventAttach eventAttach = new EventAttach();
-                    eventAttach.setAttachPath(attach);
-                    attachList.add(eventAttach);
-                }
-                eventSubjectVO.setAttachList(attachList);
+        if (inspectionTaskEvent.getRectified().equals("0") && inspectionTaskEvent.getStatus().equals("1")) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            LifeLineEventSubjectVo event = new LifeLineEventSubjectVo();
+            event.setEventTitle(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + "-日常监管(管廊)事件");
+            event.setEventDescription(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + ",管廊事件,请及时处理!"); // 事件描述
+            event.setEventTypeXl("200"); // 事件小类
+            event.setEventSource("utility_tunnel_inspection_task_event"); // 事件来源(行业数据表名)
+            event.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserId())); // 创建人Id
+            event.setCreateName(SecurityUtils.getLoginUser().getUsername()); // 创建人姓名
+            event.setLongitude(inspectionTaskEvent.getLongitude()); // 经度
+            event.setLatitude(inspectionTaskEvent.getLatitude()); // 纬度
+            event.setBusId(String.valueOf(inspectionTaskEvent.getId())); // 业务id(行业数据表的数据id)
+            event.setIndustry("5"); // 行业类型 1热力,2排水,3桥梁,4燃气,5管廊,6供水
+            //事件上报时, 长传的附件图片
+            LifeLineEventAttach attach = new LifeLineEventAttach();
+            attach.setAttachPath(inspectionTaskEvent.getScenePicture()); // 附件路径
+            event.setAttachList(Collections.singletonList(attach));
+            ArrayList<LifeLineEventDept> arrayList = new ArrayList();
+            // 接收部门的信息
+            for (EventDept dept : inspectionTaskEvent.getDeptList()) {
+                LifeLineEventDept eventDept = new LifeLineEventDept();
+                eventDept.setMapDeptId(dept.getMapDeptId()); // 部门Id
+                eventDept.setMapDeptName(dept.getMapDeptName()); // 部门名称
+                eventDept.setDeptHandleType("sys_dept_type_32"); // 部门类型(sys_dept_type_32: 企业; sys_dept_type_31: 住建)
+                arrayList.add(eventDept);
             }
-            //增加部门
-            eventSubjectVO.setDeptList(UtilityTunnelInspectionTaskEvent.getDeptList());
-            logger.info("调用事件流程参数+++++++++++++++++++++++{}", eventSubjectVO);
-            AjaxResult ajaxResult = eventSubjectService.eventReportTransfer(eventSubjectVO);
-            logger.info("调用事件流程返回+++++++++++++++++++++++{}", ajaxResult);
-            if (!ajaxResult.get("code").equals(200)) {
-                return AjaxResult.error(ajaxResult.get("msg").toString());
-            } else {
-                Map<String, Object> resultMap = (Map<String, Object>) ajaxResult.get("data");
-                UtilityTunnelInspectionTaskEvent.setEventId(resultMap.get("eventId").toString());
+            event.setDeptList(arrayList);
+            AjaxResult result = eventViewService.reportLifeLineEvent(event);
+            if (result.isSuccess()) {
+                Map<String, String> json = (Map<String, String>) result.get("data");
+                String eventId = json.get("eventId");
+                String string = json.get("eventStatus");
+                inspectionTaskEvent.setStatus(string);
+                inspectionTaskEvent.setEventId(eventId);
             }
         }
-        return AjaxResult.success(utilityTunnelInspectionTaskEventMapper.updateUtilityTunnelInspectionTaskEvent(UtilityTunnelInspectionTaskEvent));
+        return AjaxResult.success(utilityTunnelInspectionTaskEventMapper.updateUtilityTunnelInspectionTaskEvent(inspectionTaskEvent));
     }
 
     public List<String> attachUpload(String newAttachPaths) {

+ 2 - 9
src/main/java/com/sooka/sponest/construction/view/plan/service/ScheduledTasks.java

@@ -1,4 +1,4 @@
-package com.sooka.sponest.construction.view.plan.service;
+package com.sooka.sponest.construction.view.plan.task;
 
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventAttach;
@@ -31,14 +31,7 @@ public class ScheduledTasks {
     // 行业类型 1热力,2排水,3桥梁,4管廊,5燃气,6供水
     private static final List<String> INDUSTRY_TYPE_LIST = Arrays.asList("heating_pipe", "drainage_pipe", "bridge_info",
             "utility_tunnel_body_information", "gas_pipe", "water_supply_pipe");
-    private static final List<List<String>> INDUSTRY_STR_LIST = Arrays.asList(
-            Arrays.asList("longitude","latitude"),
-            Arrays.asList("longitude","latitude"),
-            Arrays.asList("longitude","latitude"),
-            Arrays.asList("longitude","latitude"),
-            Arrays.asList("longitude","latitude"),
-            Arrays.asList("lng","lat")
-    );
+
     /**
      * 查询年度计划进度
      */

+ 1 - 0
src/main/java/com/sooka/sponest/construction/waterSupply/domain/WaterInspectionTaskRecord.java

@@ -63,6 +63,7 @@ public class WaterInspectionTaskRecord extends BaseEntity {
      */
     @Excel(name = "巡查状态", readConverterExp = "0=:进行中;1已结束")
     private String status;
+    private String statusName;
 
     //巡检距离
     private BigDecimal distance;

+ 2 - 0
src/main/java/com/sooka/sponest/construction/waterSupply/mapper/WaterInspectionTaskRecordMapper.java

@@ -95,4 +95,6 @@ public interface WaterInspectionTaskRecordMapper {
     public int insertWaterInspectionTaskAttach(WaterInspectionTaskAttach waterInspectionTaskAttach);
     // 计算本次巡检距离
     public BigDecimal getDistance(Long recordId);
+
+    List<WaterInspectionTaskRecord> selectPatrolInspectionDataList(WaterInspectionTaskRecord waterInspectionTaskRecord);
 }

+ 2 - 0
src/main/java/com/sooka/sponest/construction/waterSupply/service/IWaterInspectionTaskRecordService.java

@@ -67,4 +67,6 @@ public interface IWaterInspectionTaskRecordService {
      * @date 2025/9/4 下午1:49
      */
     public List<WaterInspectionTaskRecord> listRecordByTaskId(WaterInspectionTaskRecord waterInspectionTaskRecord);
+
+    List<?> selectPatrolInspectionDataList(WaterInspectionTaskRecord waterInspectionTaskRecord);
 }

+ 46 - 39
src/main/java/com/sooka/sponest/construction/waterSupply/service/impl/WaterInspectionTaskEventServiceImpl.java

@@ -7,9 +7,14 @@ import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteConfigService;
 import com.sooka.sponest.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.construction.event.domain.EventAttach;
+import com.sooka.sponest.construction.event.domain.EventDept;
 import com.sooka.sponest.construction.event.domain.EventType;
 import com.sooka.sponest.construction.event.domain.VO.EventSubjectVO;
 import com.sooka.sponest.construction.event.service.EventSubjectService;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventAttach;
+import com.sooka.sponest.construction.lifeLine.event.domain.LifeLineEventDept;
+import com.sooka.sponest.construction.lifeLine.event.domain.vo.LifeLineEventSubjectVo;
+import com.sooka.sponest.construction.lifeLine.event.service.ILifeLineEventViewService;
 import com.sooka.sponest.construction.waterSupply.domain.WaterInspectionTaskAttach;
 import com.sooka.sponest.construction.waterSupply.domain.WaterInspectionTaskEvent;
 import com.sooka.sponest.construction.waterSupply.mapper.WaterInspectionTaskEventMapper;
@@ -17,9 +22,9 @@ import com.sooka.sponest.construction.waterSupply.service.IWaterInspectionTaskEv
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 import static com.sooka.sponest.construction.event.domain.constant.EventConstant.EVENT_SOURCE_ARTIFICIAL;
 
@@ -107,52 +112,54 @@ public class WaterInspectionTaskEventServiceImpl extends BaseServiceImpl impleme
         return waterInspectionTaskEventMapper.insertWaterInspectionTaskEvent(waterInspectionTaskEvent);
     }
 
+    @Resource
+    private ILifeLineEventViewService eventViewService;
     /**
      * 修改巡检任务整改记录
      *
-     * @param waterInspectionTaskEvent 巡检任务整改记录
+     * @param inspectionTaskEvent 巡检任务整改记录
      * @return 结果
      */
     @Override
-    public AjaxResult updateWaterInspectionTaskEvent(WaterInspectionTaskEvent waterInspectionTaskEvent) {
+    public AjaxResult updateWaterInspectionTaskEvent(WaterInspectionTaskEvent inspectionTaskEvent) {
         //当状态为确认等于1时,需要走事件流程
-        if (waterInspectionTaskEvent.getRectified().equals("0") && waterInspectionTaskEvent.getStatus().equals("1")) {
-            EventSubjectVO eventSubjectVO = new EventSubjectVO();
-            eventSubjectVO.setEventTitle(waterInspectionTaskEvent.getTitle());
-            eventSubjectVO.setEventDescription(waterInspectionTaskEvent.getDescription());
-            eventSubjectVO.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getUserId().toString());
-            eventSubjectVO.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
-            eventSubjectVO.setLongitude(waterInspectionTaskEvent.getLongitude());
-            eventSubjectVO.setLatitude(waterInspectionTaskEvent.getLatitude());
-            eventSubjectVO.setEventStatus("event_confirmation");
-            eventSubjectVO.setEventSource(EVENT_SOURCE_ARTIFICIAL);
-            EventType eventType = new EventType();
-            eventType.setEventTypeCode("3");
-            eventSubjectVO.setEventType(eventType);
-            //增加附件
-            if (StringUtils.isNotEmpty(waterInspectionTaskEvent.getAttachPaths())) {
-                List<String> eventAttaches = attachUpload(waterInspectionTaskEvent.getAttachPaths());
-                List<EventAttach> attachList = new ArrayList<>();
-                for (String attach : eventAttaches) {
-                    EventAttach eventAttach = new EventAttach();
-                    eventAttach.setAttachPath(attach);
-                    attachList.add(eventAttach);
-                }
-                eventSubjectVO.setAttachList(attachList);
+        if (inspectionTaskEvent.getRectified().equals("0") && inspectionTaskEvent.getStatus().equals("1")) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            LifeLineEventSubjectVo event = new LifeLineEventSubjectVo();
+            event.setEventTitle(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + "-日常监管(供水)事件");
+            event.setEventDescription(sdf.format(new Date()) + inspectionTaskEvent.getTitle() + ",供水事件,请及时处理!"); // 事件描述
+            event.setEventTypeXl("200"); // 事件小类
+            event.setEventSource("water_inspection_task_event"); // 事件来源(行业数据表名)
+            event.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserId())); // 创建人Id
+            event.setCreateName(SecurityUtils.getLoginUser().getUsername()); // 创建人姓名
+            event.setLongitude(inspectionTaskEvent.getLongitude()); // 经度
+            event.setLatitude(inspectionTaskEvent.getLatitude()); // 纬度
+            event.setBusId(String.valueOf(inspectionTaskEvent.getId())); // 业务id(行业数据表的数据id)
+            event.setIndustry("6"); // 行业类型 1热力,2排水,3桥梁,4燃气,5管廊,6供水
+            //事件上报时, 长传的附件图片
+            LifeLineEventAttach attach = new LifeLineEventAttach();
+            attach.setAttachPath(inspectionTaskEvent.getScenePicture()); // 附件路径
+            event.setAttachList(Collections.singletonList(attach));
+            ArrayList<LifeLineEventDept> arrayList = new ArrayList();
+            // 接收部门的信息
+            for (EventDept dept : inspectionTaskEvent.getDeptList()) {
+                LifeLineEventDept eventDept = new LifeLineEventDept();
+                eventDept.setMapDeptId(dept.getMapDeptId()); // 部门Id
+                eventDept.setMapDeptName(dept.getMapDeptName()); // 部门名称
+                eventDept.setDeptHandleType("sys_dept_type_32"); // 部门类型(sys_dept_type_32: 企业; sys_dept_type_31: 住建)
+                arrayList.add(eventDept);
             }
-            //增加部门
-            eventSubjectVO.setDeptList(waterInspectionTaskEvent.getDeptList());
-            logger.info("调用事件流程参数+++++++++++++++++++++++{}", eventSubjectVO);
-            AjaxResult ajaxResult = eventSubjectService.eventReportTransfer(eventSubjectVO);
-            logger.info("调用事件流程返回+++++++++++++++++++++++{}", ajaxResult);
-            if (!ajaxResult.get("code").equals(200)) {
-                return AjaxResult.error(ajaxResult.get("msg").toString());
-            } else {
-                Map<String, Object> resultMap = (Map<String, Object>) ajaxResult.get("data");
-                waterInspectionTaskEvent.setEventId(resultMap.get("eventId").toString());
+            event.setDeptList(arrayList);
+            AjaxResult result = eventViewService.reportLifeLineEvent(event);
+            if (result.isSuccess()) {
+                Map<String, String> json = (Map<String, String>) result.get("data");
+                String eventId = json.get("eventId");
+                String string = json.get("eventStatus");
+                inspectionTaskEvent.setStatus(string);
+                inspectionTaskEvent.setEventId(eventId);
             }
         }
-        return AjaxResult.success(waterInspectionTaskEventMapper.updateWaterInspectionTaskEvent(waterInspectionTaskEvent));
+        return AjaxResult.success(waterInspectionTaskEventMapper.updateWaterInspectionTaskEvent(inspectionTaskEvent));
     }
 
     public List<String> attachUpload(String newAttachPaths) {

+ 4 - 0
src/main/java/com/sooka/sponest/construction/waterSupply/service/impl/WaterInspectionTaskRecordServiceImpl.java

@@ -40,6 +40,10 @@ public class WaterInspectionTaskRecordServiceImpl implements IWaterInspectionTas
     public List<WaterInspectionTaskRecord> selectWaterInspectionTaskRecordList(WaterInspectionTaskRecord waterInspectionTaskRecord) {
         return waterInspectionTaskRecordMapper.selectWaterInspectionTaskRecordList(waterInspectionTaskRecord);
     }
+    @Override
+    public List<WaterInspectionTaskRecord> selectPatrolInspectionDataList(WaterInspectionTaskRecord waterInspectionTaskRecord) {
+        return waterInspectionTaskRecordMapper.selectPatrolInspectionDataList(waterInspectionTaskRecord);
+    }
 
     /**
      * 新增巡检任务记录

+ 35 - 2
src/main/resources/mapper/construction/bridge/BridgeInspectionTaskRecordMapper.xml

@@ -13,6 +13,8 @@
         <result property="userName" column="user_name"/>
         <result property="status" column="status"/>
         <result property="distance" column="distance"/>
+        <result property="statusName" column="statusName"/>
+        <result property="taskName" column="task_name"/>
     </resultMap>
 
     <sql id="selectBridgeInspectionTaskRecordVo">
@@ -117,6 +119,37 @@
         ORDER BY a.start_time DESC
     </select>
 
+    <select id="selectPatrolInspectionDataList" parameterType="BridgeInspectionTaskRecord"
+            resultMap="BridgeInspectionTaskRecordResult">
+        SELECT a.id,
+        a.task_id,
+        a.start_time,
+        a.end_time,
+        a.user_id,
+        a.user_name,
+        a.status,
+        CASE
+        WHEN a.status = 0 THEN
+        '进行中'
+        WHEN a.status = 1 THEN
+        '已结束'
+        ELSE a.status
+        END AS statusName,
+        b.task_name
+        FROM bridge_inspection_task_record a
+        LEFT JOIN bridge_pipe_inspection_task b ON a.task_id = b.id
+        <where>
+            <if test="taskId != null ">and a.task_id = #{taskId}</if>
+            <if test="startTime != null ">and a.start_time = #{startTime}</if>
+            <if test="endTime != null ">and a.end_time = #{endTime}</if>
+            <if test="userId != null ">and a.user_id = #{userId}</if>
+            <if test="userName != null  and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>
+            <if test="taskName != null  and taskName != ''">and b.task_name like concat('%', #{taskName}, '%')</if>
+            <if test="status != null  and status != ''">and a.status = #{status}</if>
+        </where>
+        order by a.start_time desc
+    </select>
+
     <select id="getBridgePipeByTaskIds" parameterType="BridgeInspectionTaskRecord"
             resultType="com.sooka.sponest.construction.bridge.domain.BridgeTaskPipe">
         SELECT DISTINCT pipe_id   pipeId,
@@ -136,7 +169,7 @@
         FROM (
                  SELECT *,
                         @row_number := @row_number + 1 AS rn
-                 FROM heating_inspection_task_record_track,
+                 FROM bridge_inspection_task_record_track,
                      (SELECT @row_number := 0) r
                  WHERE record_id = #{recordId}
                  ORDER BY create_time
@@ -144,7 +177,7 @@
                  JOIN (
             SELECT *,
                    @row_number2 := @row_number2 + 1 AS rn
-            FROM heating_inspection_task_record_track,
+            FROM bridge_inspection_task_record_track,
                 (SELECT @row_number2 := 0) r
             WHERE record_id = #{recordId}
             ORDER BY create_time

+ 33 - 0
src/main/resources/mapper/construction/drainage/DrainageInspectionTaskRecordMapper.xml

@@ -13,6 +13,8 @@
         <result property="userName" column="user_name"/>
         <result property="status" column="status"/>
         <result property="distance" column="distance"/>
+        <result property="statusName" column="statusName"/>
+        <result property="taskName" column="task_name"/>
     </resultMap>
 
     <sql id="selectDrainageInspectionTaskRecordVo">
@@ -117,6 +119,37 @@
         ORDER BY a.start_time DESC
     </select>
 
+    <select id="selectPatrolInspectionDataList" parameterType="DrainageInspectionTaskRecord"
+            resultMap="DrainageInspectionTaskRecordResult">
+        SELECT a.id,
+        a.task_id,
+        a.start_time,
+        a.end_time,
+        a.user_id,
+        a.user_name,
+        a.status,
+        CASE
+        WHEN a.status = 0 THEN
+        '进行中'
+        WHEN a.status = 1 THEN
+        '已结束'
+        ELSE a.status
+        END AS statusName,
+        b.task_name
+        FROM drainage_inspection_task_record a
+        LEFT JOIN drainage_pipe_inspection_task b ON a.task_id = b.id
+        <where>
+            <if test="taskId != null ">and a.task_id = #{taskId}</if>
+            <if test="startTime != null ">and a.start_time = #{startTime}</if>
+            <if test="endTime != null ">and a.end_time = #{endTime}</if>
+            <if test="userId != null ">and a.user_id = #{userId}</if>
+            <if test="userName != null  and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>
+            <if test="taskName != null  and taskName != ''">and b.task_name like concat('%', #{taskName}, '%')</if>
+            <if test="status != null  and status != ''">and a.status = #{status}</if>
+        </where>
+        order by a.start_time desc
+    </select>
+
     <select id="getDrainagePipeByTaskIds" parameterType="DrainageInspectionTaskRecord"
             resultType="com.sooka.sponest.construction.drainage.domain.DrainageTaskPipe">
         SELECT DISTINCT pipe_id   pipeId,

+ 1 - 0
src/main/resources/mapper/construction/drainage/DrainagePipeInspectionTaskMapper.xml

@@ -58,6 +58,7 @@
             </if>
             <if test="deptId != null ">and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )</if>
             <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            ${params.dataScope}
         </where>
         order by a.start_time desc,a.create_time desc
     </select>

+ 33 - 0
src/main/resources/mapper/construction/gas/GasInspectionTaskRecordMapper.xml

@@ -13,6 +13,8 @@
         <result property="userName" column="user_name"/>
         <result property="status" column="status"/>
         <result property="distance" column="distance"/>
+        <result property="statusName" column="statusName"/>
+        <result property="taskName" column="task_name"/>
     </resultMap>
 
     <sql id="selectGasInspectionTaskRecordVo">
@@ -116,6 +118,37 @@
         ORDER BY a.start_time DESC
     </select>
 
+    <select id="selectPatrolInspectionDataList" parameterType="GasInspectionTaskRecord"
+            resultMap="GasInspectionTaskRecordResult">
+        SELECT a.id,
+        a.task_id,
+        a.start_time,
+        a.end_time,
+        a.user_id,
+        a.user_name,
+        a.status,
+        CASE
+        WHEN a.status = 0 THEN
+        '进行中'
+        WHEN a.status = 1 THEN
+        '已结束'
+        ELSE a.status
+        END AS statusName,
+        b.task_name
+        FROM gas_inspection_task_record a
+        LEFT JOIN gas_pipe_inspection_task b ON a.task_id = b.id
+        <where>
+            <if test="taskId != null ">and a.task_id = #{taskId}</if>
+            <if test="startTime != null ">and a.start_time = #{startTime}</if>
+            <if test="endTime != null ">and a.end_time = #{endTime}</if>
+            <if test="userId != null ">and a.user_id = #{userId}</if>
+            <if test="userName != null  and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>
+            <if test="taskName != null  and taskName != ''">and b.task_name like concat('%', #{taskName}, '%')</if>
+            <if test="status != null  and status != ''">and a.status = #{status}</if>
+        </where>
+        order by a.start_time desc
+    </select>
+
     <select id="getGasPipeByTaskIds" parameterType="GasInspectionTaskRecord"
             resultType="com.sooka.sponest.construction.gas.domain.GasTaskPipe">
         SELECT DISTINCT pipe_id   pipeId,

+ 1 - 3
src/main/resources/mapper/construction/gas/GasPipeMapper.xml

@@ -361,9 +361,6 @@
         from gas_pipe a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptId != null and deptId != ''">
-                and FIND_IN_SET(#{deptId}, CONCAT(d.ancestors, ',', d.dept_id))
-            </if>
             <if test="cityCode != null and cityCode != ''">
                 and a.city_code = #{cityCode}
             </if>
@@ -371,6 +368,7 @@
                 and a.district_name like concat('%', #{districtName}, '%')
             </if>
         </where>
+        ${params.dataScope}
     </select>
 
     <select id="getDeptPipeLengthByPressure"

+ 1 - 1
src/main/resources/mapper/construction/heating/HeatingInspectionTaskRecordMapper.xml

@@ -57,7 +57,7 @@
         LEFT JOIN heating_pipe_inspection_task b ON a.task_id = b.id
         <where>
             <if test="taskId != null ">and a.task_id = #{taskId}</if>
-            <if test="startTime != null ">and sa.tart_time = #{startTime}</if>
+            <if test="startTime != null ">and a.start_time = #{startTime}</if>
             <if test="endTime != null ">and a.end_time = #{endTime}</if>
             <if test="userId != null ">and a.user_id = #{userId}</if>
             <if test="userName != null  and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>

+ 6 - 6
src/main/resources/mapper/construction/utilityTunnel/UtilityTunnelInspectionTaskRecordMapper.xml

@@ -52,17 +52,17 @@
         '已结束'
         ELSE a.status
         END AS statusName,
-        b.task_name
+        b.task_name as task_name
         FROM utility_tunnel_inspection_task_record a
         LEFT JOIN utility_tunnel_inspection_task b ON a.task_id = b.id
         <where>
-            <if test="taskId != null ">and a.task_id like concat('%', #{taskId}, '%')</if>
-            <if test="startTime != null ">and a.start_time like concat('%', #{startTime}, '%')</if>
-            <if test="endTime != null ">and a.end_time like concat('%', #{endTime}, '%')</if>
-            <if test="userId != null ">and a.user_id like concat('%', #{userId}, '%')</if>
+            <if test="taskId != null ">and a.task_id = #{taskId}</if>
+            <if test="startTime != null ">and a.start_time = #{startTime}</if>
+            <if test="endTime != null ">and a.end_time = #{endTime}</if>
+            <if test="userId != null ">and a.user_id = #{userId}</if>
             <if test="userName != null  and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>
             <if test="taskName != null  and taskName != ''">and b.task_name like concat('%', #{taskName}, '%')</if>
-            <if test="status != null  and status != ''">and a.status like concat('%', #{status}, '%')</if>
+            <if test="status != null  and status != ''">and a.status = #{status}</if>
         </where>
         order by start_time desc
     </select>

+ 33 - 0
src/main/resources/mapper/construction/waterSupply/WaterInspectionTaskRecordMapper.xml

@@ -13,6 +13,8 @@
         <result property="userName" column="user_name"/>
         <result property="status" column="status"/>
         <result property="distance" column="distance"/>
+        <result property="statusName" column="statusName"/>
+        <result property="taskName" column="task_name"/>
     </resultMap>
 
     <sql id="selectWaterInspectionTaskRecordVo">
@@ -101,6 +103,37 @@
         ORDER BY a.start_time DESC
     </select>
 
+    <select id="selectPatrolInspectionDataList" parameterType="WaterInspectionTaskRecord"
+            resultMap="WaterInspectionTaskRecordResult">
+        SELECT a.id,
+        a.task_id,
+        a.start_time,
+        a.end_time,
+        a.user_id,
+        a.user_name,
+        a.status,
+        CASE
+        WHEN a.status = 0 THEN
+        '进行中'
+        WHEN a.status = 1 THEN
+        '已结束'
+        ELSE a.status
+        END AS statusName,
+        b.task_name as task_name
+        FROM water_supply_inspection_task_record a
+        LEFT JOIN water_supply_pipe_inspection_task b ON a.task_id = b.id
+        <where>
+            <if test="taskId != null ">and a.task_id = #{taskId}</if>
+            <if test="startTime != null ">and a.start_time = #{startTime}</if>
+            <if test="endTime != null ">and a.end_time = #{endTime}</if>
+            <if test="userId != null ">and a.user_id = #{userId}</if>
+            <if test="userName != null  and userName != ''">and a.user_name like concat('%', #{userName}, '%')</if>
+            <if test="taskName != null  and taskName != ''">and b.task_name like concat('%', #{taskName}, '%')</if>
+            <if test="status != null  and status != ''">and a.status = #{status}</if>
+        </where>
+        order by a.start_time desc
+    </select>
+
     <update id="updateWaterInspectionTaskRecordByUserIdAndTaskId" parameterType="WaterInspectionTaskRecord">
         update water_supply_inspection_task_record
         <trim prefix="SET" suffixOverrides=",">