ソースを参照

.巡更告警、整改档案

JX.Li 1 日 前
コミット
eddddd448b

+ 1 - 1
data-ui/package.json

@@ -46,7 +46,7 @@
     "element-ui": "2.15.6",
     "file-saver": "2.0.5",
     "fuse.js": "6.4.3",
-    "highcharts": "^11.1.0",
+    "highcharts": "^7.2.2",
     "highlight.js": "9.18.5",
     "js-beautify": "1.13.0",
     "js-cookie": "3.0.1",

+ 44 - 0
data-ui/src/api/centerdata_emergency/patroAlert/tEmergencyPatrolAlert.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询巡更告警列表
+export function listpatrolAlert(query) {
+  return request({
+    url: '/sooka-sponest-center-data/patrolAlert/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询巡更告警详细
+export function getpatrolAlert(id) {
+  return request({
+    url: '/sooka-sponest-center-data/patrolAlert/' + id,
+    method: 'get'
+  })
+}
+
+// 新增巡更告警
+export function addpatrolAlert(data) {
+  return request({
+    url: '/sooka-sponest-center-data/patrolAlert',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改巡更告警
+export function updatepatrolAlert(data) {
+  return request({
+    url: '/sooka-sponest-center-data/patrolAlert',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除巡更告警
+export function delpatrolAlert(id) {
+  return request({
+    url: '/sooka-sponest-center-data/patrolAlert/' + id,
+    method: 'delete'
+  })
+}

+ 294 - 0
data-ui/src/views/centerdata_emergency/patroAlert/index.vue

@@ -0,0 +1,294 @@
+<template>
+  <div class="app-container">
+    <el-card>
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+        <el-form-item label="标题" prop="title">
+          <el-input
+            v-model="queryParams.title"
+            placeholder="请输入标题"
+            clearable
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="primary"
+            plain
+            icon="el-icon-plus"
+            size="mini"
+            @click="handleAdd"
+            v-hasPermi="['system:patrolalert:add']"
+          >新增
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="success"
+            plain
+            icon="el-icon-edit"
+            size="mini"
+            :disabled="single"
+            @click="handleUpdate"
+            v-hasPermi="['system:patrolalert:edit']"
+          >修改
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="danger"
+            plain
+            icon="el-icon-delete"
+            size="mini"
+            :disabled="multiple"
+            @click="handleDelete"
+            v-hasPermi="['system:patrolalert:remove']"
+          >删除
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExport"
+            v-hasPermi="['system:patrolalert:export']"
+          >导出
+          </el-button>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      </el-row>
+
+      <el-table v-loading="loading" :data="tEmergencyPatrolAlertList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"/>
+        <el-table-column label="主键" align="center" prop="id" v-if="false"/>
+        <el-table-column label="标题" align="center" prop="title"/>
+        <el-table-column label="内容" align="center" prop="content"/>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['system:patrolalert:edit']"
+            >修改
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['system:patrolalert:remove']"
+            >删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+
+      <!-- 添加或修改巡更告警对话框 -->
+      <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+          <el-form-item label="标题" prop="title">
+            <el-input v-model="form.title" placeholder="请输入标题"/>
+          </el-form-item>
+          <el-form-item label="内容" prop="content">
+            <el-input type="textarea" v-model="form.content" placeholder="请输入内容" maxlength="1000"/>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </el-dialog>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import {
+  listpatrolAlert,
+  getpatrolAlert,
+  updatepatrolAlert,
+  addpatrolAlert,
+  delpatrolAlert
+} from '@/api/centerdata_emergency/patroAlert/tEmergencyPatrolAlert'
+
+export default {
+  name: 'TEmergencyPatrolAlert',
+  data() {
+    return {
+      // 按钮loading
+      buttonLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 巡更告警表格数据
+      tEmergencyPatrolAlertList: [],
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        title: undefined,
+        content: undefined,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        id: [
+          { required: true, message: '主键不能为空', trigger: 'blur' }
+        ],
+        title: [
+          { required: true, message: '标题不能为空', trigger: 'blur' }
+        ],
+        content: [
+          { required: true, message: '内容不能为空', trigger: 'blur' }
+        ],
+      }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    /** 查询巡更告警列表 */
+    getList() {
+      this.loading = true
+      listpatrolAlert(this.queryParams).then(response => {
+        this.tEmergencyPatrolAlertList = response.rows
+        this.total = response.total
+        this.loading = false
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false
+      this.reset()
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: undefined,
+        title: undefined,
+        content: undefined,
+        createBy: undefined,
+        createName: undefined,
+        createTime: undefined,
+        updateBy: undefined,
+        updateName: undefined,
+        updateTime: undefined
+      }
+      this.resetForm('form')
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm')
+      this.handleQuery()
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset()
+      this.open = true
+      this.title = '添加巡更告警'
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.loading = true
+      this.reset()
+      const id = row.id || this.ids
+      getpatrolAlert(id).then(response => {
+        this.loading = false
+        this.form = response.data
+        this.open = true
+        this.title = '修改巡更告警'
+      })
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          this.buttonLoading = true
+          if (this.form.id != null) {
+            updatepatrolAlert(this.form).then(response => {
+              this.$modal.msgSuccess('修改成功')
+              this.open = false
+              this.getList()
+            }).finally(() => {
+              this.buttonLoading = false
+            })
+          } else {
+            addpatrolAlert(this.form).then(response => {
+              this.$modal.msgSuccess('新增成功')
+              this.open = false
+              this.getList()
+            }).finally(() => {
+              this.buttonLoading = false
+            })
+          }
+        }
+      })
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids
+      this.$modal.confirm('是否确认删除选中数据项?').then(() => {
+        this.loading = true
+        return delpatrolAlert(ids)
+      }).then(() => {
+        this.loading = false
+        this.getList()
+        this.$modal.msgSuccess('删除成功')
+      }).catch(() => {
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('/sooka-sponest-center-data/patrolAlert/export', {
+        ...this.queryParams
+      }, `tEmergencyPatrolAlert_${new Date().getTime()}.xlsx`)
+    }
+  }
+}
+</script>

+ 635 - 0
data-ui/src/views/data/digitalemergency1/inspection/rectificationlog.vue

@@ -0,0 +1,635 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="整改期限" prop="timeLimit">
+        <el-input
+          v-model="queryParams.timeLimit"
+          placeholder="请输入整改期限"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="最后时间" prop="latTime">
+        <el-date-picker clearable
+                        v-model="queryParams.latTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="请选择最后整改时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="合格" prop="isPass">
+
+        <el-select v-model="queryParams.isPass" placeholder="是否合格" clearable>
+          <el-option
+            v-for="dict in dict.type.sys_yes_no"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!--<el-col :span="1.5">-->
+        <!--<el-button-->
+          <!--type="warning"-->
+          <!--plain-->
+          <!--icon="el-icon-download"-->
+          <!--size="mini"-->
+          <!--@click="handleExport"-->
+          <!--v-hasPermi="['system:inspection:export']"-->
+        <!--&gt;导出-->
+        <!--</el-button>-->
+      <!--</el-col>-->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="inspectionList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="巡检项名称" align="center" prop="busItemsName"/>
+      <el-table-column label="隐患类型" align="center" prop="itemsType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.items_type" :value="scope.row.itemsType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="整改期限" align="center" prop="timeLimit"/>
+      <el-table-column label="最后整改时间" align="center" prop="latTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.latTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="合格" align="center" prop="isPass">
+        <template slot-scope="scope">
+          <div v-if="scope.row.isPass=='Y' && (scope.row.riskStatus=='risk_status_2' || scope.row.riskStatus=='risk_status_3') && scope.row.itemsType ==null ">
+            <dict-tag :options="dict.type.sys_yes_no" value="Y"/>
+          </div>
+          <div v-if="scope.row.itemsType !=null ">
+            <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isPass"/>
+          </div>
+
+        </template>
+      </el-table-column>
+      <el-table-column label="巡检项名" align="center" prop="busItemsName"/>
+      <el-table-column label="巡检时间" align="center" prop="createTime">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="当前状态" align="center" prop="riskStatus">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.risk_status" :value="scope.row.riskStatus"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            :disabled="scope.row.itemsType == null || scope.row.itemsType == 'items_type_0'"
+            size="mini"
+            type="text"
+            icon="list-icon-sj iconfont icon-chakan2"
+            @click="detail(scope.row)"
+            v-hasPermi="['system:inspection:remove']"
+          >查看
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改巡检项记录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <!--<el-form-item label="巡检ID" prop="busInspectionId">-->
+        <!--<el-input v-model="form.busInspectionId" placeholder="请输入巡检ID"/>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item label="日志ID" prop="busLogId">-->
+        <!--<el-input v-model="form.busLogId" placeholder="请输入日志ID"/>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item label="巡检项ID" prop="busItemsId">-->
+        <!--<el-input v-model="form.busItemsId" placeholder="请输入巡检项ID"/>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item label="整改期限" prop="timeLimit">-->
+        <!--<el-input v-model="form.timeLimit" placeholder="请输入整改期限"/>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item label="最后整改时间" prop="latTime">-->
+        <!--<el-date-picker clearable-->
+        <!--v-model="form.latTime"-->
+        <!--type="date"-->
+        <!--value-format="yyyy-MM-dd"-->
+        <!--placeholder="请选择最后整改时间">-->
+        <!--</el-date-picker>-->
+        <!--</el-form-item>-->
+        <el-form-item label="合格" prop="isPass">
+          <el-select v-model="form.isPass">
+            <el-option label="否" value="N"></el-option>
+            <el-option label="是" value="Y"></el-option>
+          </el-select>
+        </el-form-item>
+        <!--<el-form-item label="巡检项名" prop="busItemsName">-->
+        <!--<el-input v-model="form.busItemsName" placeholder="请输入巡检项名"/>-->
+        <!--</el-form-item>-->
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :visible.sync="isShowDetail" title="巡检详情">
+      <div class="con">
+        <div class="con_left">
+          <div class="list_img">
+            <el-image :src="item" style="background: #000;" v-for="(item,index) in detail_pictures" :key="index">
+            </el-image>
+          </div>
+          <div class="left_btn" v-show="false">
+            <el-button
+              :disabled="is_have_gzs != true"
+              size="small"
+              type="primary"
+              plain
+              @click="show_gz_fc('gzs')"
+            >告知
+            </el-button>
+            <el-button
+              :disabled="is_have_fcs != true"
+              size="small"
+              type="warning"
+              plain
+              @click="show_gz_fc('fcs')"
+            >复查
+            </el-button>
+          </div>
+        </div>
+        <div class="con_right">
+          <div class="bz_lc">
+            <div class="bz_line" v-for="(item) in detail_tracks_list">
+              <i></i>
+              <h5>{{item.busTrackContent}}</h5>
+<!--              <p>内容:{{item.busTrackContent}}</p>-->
+              <p>操作人:{{item.nickName}}</p>
+              <p>时间:{{item.createTime}}</p>
+              <p>状态:<b class="color1">[{{item.riskStatusStr}}]</b></p>
+            </div>
+          </div>
+        </div>
+        <div class="con_right2">
+          <div v-if="is_show_gzs">
+            <div class="gzs table_div">
+              <h5>编号:{{detail_gzs[0].code}}</h5>
+              <h4>隐患限期整改告知书</h4>
+              <p>经查,你单位存在下列问题: </p>
+              <p v-for="(item,index) in detail_gzs_items">
+                {{index+1}}、{{item.itemContent}}
+              </p>
+              <p>现告知你单位对上述问题于<i>{{detail_gzs[0].lastTime}}</i>,前整改完毕,达到有关法律法规规章和标准规定的要求。由此造成事故的,依法追究有关人员的责任。整改期间,你单位应当采取措施,确保安全生产。
+                逾期未整改或在整改过程中存在安全生产违法行为的,我单位将提报相关执法部门进行依法查处。 如果对本告知内容有异议,可向
+                {{detail_gzs[0].askCom}}咨询或说明情况,也可通过12350安全生产举报电话进行反映。在没有新书面告知前,本告知要求不停止执行,法律另有规定的除外。</p>
+              <p>检查人员:{{detail_gzs[0].checker1Sign}}</p>
+              <p>检查人员编号:{{detail_gzs[0].checker1Code}}</p>
+              <p>监督人员(签名):
+                <el-image  :src="pictureBasePath+'/'+detail_gzs[0].checker2Sign"></el-image>
+              </p>
+              <p>监督人员编号:{{detail_gzs[0].checker2Code}}</p>
+              <p>被复查单位负责人(签名):
+                <el-image  :src="pictureBasePath+'/'+detail_gzs[0].becheckerSign"></el-image>
+              </p>
+              <!--<p>部门:XXX</p>-->
+              <h6>{{detail_gzs[0].checkTime}}</h6>
+            </div>
+          </div>
+          <div v-if="is_show_fcs">
+            <div class="fcs table_div">
+              <h5>编号:{{detail_fcs[0].code}}</h5>
+              <h4>复查意见告知书</h4>
+              <p>本机关于<i>{{detail_fcs[0].checkTime}}</i>,对你单位做出了隐患限期整改告知书(编号:<i>{{detail_gzs[0].code}}</i>,经对你单位整改情况进行复查,提出如下意见: </p>
+              <p>现告知你单位对上述问题于<i>{{detail_fcs[0].lasttime}}</i>,前整改完毕,达到有关法律法规规章和标准规定的要求。由此造成事故的,依法追究有关人员的责任。整改期间,你单位应当采取措施,确保安全生产。
+                逾期未整改或在整改过程中存在安全生产违法行为的,我单位将提报相关执法部门进行依法查处。 如果对本告知内容有异议,可向
+                {{detail_fcs[0].askCom}}咨询或说明情况,也可通过12350安全生产举报电话进行反映。在没有新书面告知前,本告知要求不停止执行,法律另有规定的除外。</p>
+              <p>检查人员:{{detail_fcs[0].checker1Sign}}</p>
+              <p>检查人员编号:{{detail_fcs[0].checker1Code}}</p>
+              <p>监督人员(签名):<el-image  :src="pictureBasePath+'/'+detail_fcs[0].checker2Sign"></el-image>
+              </p>
+              <p>监督人员编号:{{detail_fcs[0].checker2Code}}</p>
+              <p>被复查单位负责人(签名):
+                <el-image  :src="pictureBasePath+'/'+detail_gzs[0].becheckerSign"></el-image>
+              </p>
+
+              <h6>{{detail_fcs[0].checkTime}}</h6>
+            </div>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+
+</template>
+
+<script>
+  import {
+    detail,
+    listInspection,
+    getInspection,
+    delInspection,
+    addInspection,
+    updateInspection
+  } from "@/api/centerdata_emergency1/inspection";
+
+  export default {
+    name: "Inspection",
+    dicts: ['items_type', 'risk_status', 'sys_yes_no'],
+    data() {
+      return {
+        pictureBasePath: null,
+        isShowDetail: false,
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 巡检项记录表格数据
+        inspectionList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          busInspectionId: null,
+          busLogId: null,
+          busItemsId: null,
+          itemsType: null,
+          timeLimit: null,
+          latTime: null,
+          isPass: null,
+          busItemsName: null,
+          riskStatus: null
+        },
+
+        detail_busInspection: null,
+        detail_pictures: [],
+        detail_tracks_list: [],
+        detail_gzs: null,
+        detail_gzs_items: [],
+        detail_fcs: null,
+        //
+        is_show_gzs: false,
+        is_show_fcs: false,
+        is_have_gzs: false,
+        is_have_fcs: false,
+
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {}
+      };
+    },
+    watch:{
+      '$route.query.log_id': {
+        handler: function (newValue, oldValue) {
+          if(newValue != undefined){
+            this.queryParams.busLogId = newValue
+          }
+          if(oldValue != undefined){
+            this.queryParams.busLogId = oldValue
+          }
+          this.getList();
+        },
+      },
+      '$route.query.busInspectionId': {
+        handler: function (newValue, oldValue) {
+          if(newValue != undefined){
+            this.queryParams.busInspectionId = newValue
+          }
+          if(oldValue != undefined){
+            this.queryParams.busInspectionId = oldValue
+          }
+          this.getList();
+        },
+      },
+    },
+    created() {
+      this.queryParams.busLogId = this.$route.query.log_id
+      this.queryParams.busInspectionId = this.$route.query.busInspectionId
+      this.getList();
+    },
+    methods: {
+      show_gz_fc(a) {
+        if (a == 'gzs') {
+          this.is_show_gzs = true
+          this.is_show_fcs = false
+        } else if (a == 'fcs') {
+          this.is_show_gzs = false
+          this.is_show_fcs = true
+        }
+      },
+
+      detail(row) {
+        let that = this
+        this.isShowDetail = true;
+        this.detail_busInspection = row
+        let query = {busInspectionId: row.busInspectionId}
+        detail(query).then(resp => {
+          that.pictureBasePath = resp.pictureBasePath
+          that.detail_pictures = resp.pictures
+          that.detail_tracks_list = resp.tracks_list
+
+          that.detail_gzs = resp.gzs;
+          if (that.detail_gzs != null && that.detail_gzs.length > 0) {
+            that.is_have_gzs = true
+          }else{
+            that.is_show_gzs = false
+          }
+          that.detail_gzs_items = resp.gzs_items;
+          that.detail_fcs = resp.fcs;
+
+
+          if (that.detail_fcs != null && that.detail_fcs.length > 0) {
+            that.is_have_fcs = true
+          }else{
+            that.is_show_fcs = false
+          }
+
+
+        })
+      },
+      /** 查询巡检项记录列表 */
+      getList() {
+        this.loading = true;
+        listInspection(this.queryParams).then(response => {
+          this.inspectionList = response.rows;
+          console.log("$$$",this.inspectionList)
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          busInspectionId: null,
+          busLogId: null,
+          busItemsId: null,
+          itemsType: null,
+          timeLimit: null,
+          latTime: null,
+          isPass: null,
+          busItemsName: null,
+          riskStatus: "0"
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.busInspectionId)
+        this.single = selection.length !== 1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.title = "添加巡检项记录";
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        const busInspectionId = row.busInspectionId || this.ids
+        getInspection(busInspectionId).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改巡检项记录";
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.busInspectionId != null) {
+              updateInspection(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addInspection(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const busInspectionIds = row.busInspectionId || this.ids;
+        this.$modal.confirm('是否确认删除巡检项记录编号为"' + row.busItemsName + '"的数据项?').then(function () {
+          return delInspection(busInspectionIds);
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {
+        });
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        this.download('system/inspection/export', {
+          ...this.queryParams
+        }, `inspection_${new Date().getTime()}.xlsx`)
+      }
+    }
+  };
+</script>
+<style>
+  .con {
+    display: flex;
+    flex-direction: row;
+
+  }
+
+  .con_left {
+    width: 225px;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    background: #f4f9ff;
+    padding: 20px 0px;
+    margin-right: 20px;
+  }
+
+  .con_left .list_img {
+    display: flex;
+    flex-direction: column;
+    margin-bottom: 20px;
+    height: 400px;
+    overflow-y: scroll;
+  }
+
+  .con_left .list_img::-webkit-scrollbar {
+    width: 3px;
+    height: 8px;
+  }
+
+  .con_left .list_img .el-image {
+    width: 190px;
+    height: 130px;
+    margin-bottom: 10px;
+    display: block;
+    border: 1px solid #ccc;
+    overflow: visible;
+  }
+
+  .con_right {
+    height: 488px;
+    overflow-y: scroll;
+    padding-left: 20px;
+    width: 340px;
+    margin-right: 20px;
+  }
+
+  .con_right::-webkit-scrollbar, .con_right2::-webkit-scrollbar {
+    width: 3px;
+    height: 8px;
+  }
+
+  .bz_lc {
+    border-left: 2px solid #ededed;
+    padding-left: 30px;
+    min-height: 491px;
+  }
+
+  .bz_lc .bz_line {
+    position: relative;
+    padding-bottom: 20px;
+    padding-top: 10px;
+  }
+
+  .bz_lc .bz_line i {
+    display: block;
+    width: 24px;
+    height: 24px;
+    background: #2078ff;
+    border-radius: 50%;
+    border: 5px solid #eef5ff;
+    position: absolute;
+    left: -43px;
+    top: 8px;
+  }
+
+  .bz_lc .bz_line h5 {
+    font-size: 18px;
+    font-weight: 900;
+    margin: 0px;
+    padding-bottom: 15px;
+    color: #333;
+  }
+
+  .bz_lc .bz_line p {
+    font-size: 16px;
+    line-height: 24px;
+    margin: 0px;
+    padding-bottom: 2px;
+  }
+
+  .bz_lc .bz_line p b {
+    font-weight: normal;
+  }
+
+  .bz_lc .bz_line p b.color1 {
+    color: #1890ff;
+  }
+
+  .bz_lc .bz_line p b.color2 {
+    color: #3ee293;
+  }
+
+  .bz_lc .bz_line p b.color3 {
+    color: #e2a912;
+  }
+
+  .con_right2 {
+    height: 488px;
+    overflow-y: scroll;
+    width: 340px;
+  }
+
+  .table_div {
+    width: 100%;
+  }
+
+  .table_div h5 {
+    font-size: 14px;
+    text-align: left;
+    color: #555;
+  }
+
+  .table_div h4 {
+    font-size: 18px;
+    text-align: center;
+    color: #333;
+    font-weight: 800;
+  }
+
+  .table_div p {
+    font-size: 16px;
+    text-align: left;
+    color: #444;
+    margin-bottom: 10px;
+    margin-top: 5px;
+    line-height: 25px;
+  }
+
+  .table_div p i {
+    color: #f00;
+    font-style: normal;
+  }
+
+  .table_div h6 {
+    font-size: 16px;
+    text-align: right;
+    color: #444;
+  }
+
+  .table_div p .el-image {
+    display: inline-flex;
+    width: 100px;
+    height: auto;
+  }
+</style>

+ 422 - 0
data-ui/src/views/data/digitalemergency1/log/rectification.vue

@@ -0,0 +1,422 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="状态" prop="riskStatus">
+        <el-select v-model="queryParams.riskStatus" placeholder="状态" clearable>
+          <el-option
+            v-for="dict in dict.type.risk_status"
+            v-show="dict.value !== 'risk_status_3'"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="记录时间">
+        <el-date-picker
+          v-model="dateRange"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+      <!--<el-form-item label="企业ID" prop="busEnterpriseId">-->
+      <!--<el-input-->
+      <!--v-model="queryParams.busEnterpriseId"-->
+      <!--placeholder="请输入企业ID"-->
+      <!--clearable-->
+      <!--@keyup.enter.native="handleQuery"-->
+      <!--/>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item label="企业名称" prop="busEnterpriseName">-->
+      <!--<el-input-->
+      <!--v-model="queryParams.busEnterpriseName"-->
+      <!--placeholder="请输入企业名称"-->
+      <!--clearable-->
+      <!--@keyup.enter.native="handleQuery"-->
+      <!--/>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item label="经度" prop="longitude">-->
+      <!--<el-input-->
+      <!--v-model="queryParams.longitude"-->
+      <!--placeholder="请输入经度"-->
+      <!--clearable-->
+      <!--@keyup.enter.native="handleQuery"-->
+      <!--/>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item label="纬度" prop="latitude">-->
+      <!--<el-input-->
+      <!--v-model="queryParams.latitude"-->
+      <!--placeholder="请输入纬度"-->
+      <!--clearable-->
+      <!--@keyup.enter.native="handleQuery"-->
+      <!--/>-->
+      <!--</el-form-item>-->
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!--<el-col :span="1.5">-->
+      <!--<el-button-->
+      <!--type="primary"-->
+      <!--plain-->
+      <!--icon="el-icon-plus"-->
+      <!--size="mini"-->
+      <!--@click="handleAdd"-->
+      <!--v-hasPermi="['system:log:add']"-->
+      <!--&gt;新增</el-button>-->
+      <!--</el-col>-->
+      <!--<el-col :span="1.5">-->
+      <!--<el-button-->
+      <!--type="success"-->
+      <!--plain-->
+      <!--icon="el-icon-edit"-->
+      <!--size="mini"-->
+      <!--:disabled="single"-->
+      <!--@click="handleUpdate"-->
+      <!--v-hasPermi="['system:log:edit']"-->
+      <!--&gt;修改</el-button>-->
+      <!--</el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          v-show="false"
+        type="success"
+        plain
+        icon="el-icon-edit"
+        size="mini"
+        :disabled="multiple"
+        @click="handleDelete"
+        v-hasPermi="['system:log:edit']"
+        >审核通过</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          v-show="false"
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:log:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" :selectable="isSelectable"/>
+      <!--<el-table-column label="日志ID" align="center" prop="busLogId" />-->
+      <el-table-column label="日志类型" align="center" prop="busLogType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.log_type" :value="scope.row.busLogType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="来源" align="center" prop="logSource">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.log_source" :value="scope.row.logSource"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="记录时间" align="center">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{mi}:{s}') }}</span>
+        </template>
+      </el-table-column>
+      <!--<el-table-column label="记录人" align="center" prop="createBy">-->
+      <!--</el-table-column>-->
+      <el-table-column label="隐患" align="center" prop="isRisk">
+        <template slot-scope="scope">
+          <label v-show="scope.row.isRisk == 1" style="color: #ff0000">有</label>
+          <label v-show="scope.row.isRisk == 0" style="color: #00ff00">无</label>
+        </template>
+      </el-table-column>
+      <!--<el-table-column label="企业ID" align="center" prop="busEnterpriseId" />-->
+      <el-table-column label="企业名称" align="center" prop="busEnterpriseName"/>
+      <el-table-column label="状态" align="center" prop="riskStatus">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.risk_status" :value="scope.row.riskStatus"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="审核状态" align="center" prop="isCheckStatus">
+        <template slot-scope="scope">
+          <label v-show="scope.row.isCheckStatus == '0'" style="color: #ff0000">待审核</label>
+          <label v-show="scope.row.isCheckStatus == '1'" style="color: #00ff00">已通过</label>
+        </template>
+      </el-table-column>
+      <!--<el-table-column label="经度" align="center" prop="longitude" />-->
+      <!--<el-table-column label="纬度" align="center" prop="latitude" />-->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+
+          <el-button v-show="scope.row.busLogType == 'log_type_0'"
+                     size="mini"
+                     type="text"
+                     icon="list-icon-sj iconfont icon-chakan"
+                     @click="handleInspection(scope.row)"
+                     v-hasPermi="['system:log:edit']"
+          >巡检明细
+          </el-button>
+
+
+          <!--<el-button-->
+          <!--size="mini"-->
+          <!--type="text"-->
+          <!--icon="el-icon-edit"-->
+          <!--@click="handleUpdate(scope.row)"-->
+          <!--v-hasPermi="['system:log:edit']"-->
+          <!--&gt;修改-->
+          <!--</el-button>-->
+          <!--<el-button-->
+          <!--size="mini"-->
+          <!--type="text"-->
+          <!--icon="el-icon-delete"-->
+          <!--@click="handleDelete(scope.row)"-->
+          <!--v-hasPermi="['system:log:remove']"-->
+          <!--&gt;删除-->
+          <!--</el-button>-->
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改日志对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="日志ID" prop="busLogId">
+          <el-input v-model="form.busLogId" placeholder="请输入日志ID"/>
+        </el-form-item>
+        <el-form-item label="来源" prop="logSource">
+          <el-input v-model="form.logSource" placeholder="请输入来源"/>
+        </el-form-item>
+        <el-form-item label="隐患" prop="isRisk">
+          <el-input v-model="form.isRisk" placeholder="请输入隐患"/>
+        </el-form-item>
+        <el-form-item label="企业ID" prop="busEnterpriseId">
+          <el-input v-model="form.busEnterpriseId" placeholder="请输入企业ID"/>
+        </el-form-item>
+        <el-form-item label="企业名称" prop="busEnterpriseName">
+          <el-input v-model="form.busEnterpriseName" placeholder="请输入企业名称"/>
+        </el-form-item>
+        <el-form-item label="经度" prop="longitude">
+          <el-input v-model="form.longitude" placeholder="请输入经度"/>
+        </el-form-item>
+        <el-form-item label="纬度" prop="latitude">
+          <el-input v-model="form.latitude" placeholder="请输入纬度"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {listLog, getLog, delLog, addLog, updateLog, checkLog} from "@/api/centerdata_emergency1/log";
+
+  export default {
+    name: "Log",
+    dicts: ['log_type', 'log_source', 'risk_status'],
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 日志表格数据
+        logList: [],
+        // 日期范围
+        dateRange: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          busLogId: null,
+          busLogType: null,
+          logSource: null,
+          isRisk: 1,
+          busEnterpriseId: null,
+          busEnterpriseName: null,
+          riskStatus: null,
+          longitude: null,
+          latitude: null,
+          // 日期范围
+          beginTime: null,
+          endTime: null,
+        },
+        excel_col:{
+          busEnterpriseName: null
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {}
+      };
+    },
+    mounted() {
+      this.queryParams.busLogId = this.$route.query.busLogId
+      this.queryParams.busEnterpriseId = this.$route.query.busEnterpriseId
+      this.getList();
+    },
+    watch: {
+      '$route.query.busLogId': {
+        handler: function (newValue, oldValue) {
+          if(newValue != undefined){
+            this.queryParams.busLogId = newValue
+          }
+          if(oldValue != undefined){
+            this.queryParams.busLogId = oldValue
+          }
+          this.getList();
+        },
+      },
+      '$route.query.busEnterpriseId': {
+        handler: function (newValue, oldValue) {
+          if(newValue != undefined){
+            this.queryParams.busEnterpriseId = newValue
+          }
+          if(oldValue != undefined){
+            this.queryParams.busEnterpriseId = oldValue
+          }
+          this.getList();
+        },
+      }
+
+    },
+    methods: {
+      /** 查询日志列表 */
+      getList() {
+        this.loading = true;
+        this.queryParams.beginTime = this.dateRange[0];
+        this.queryParams.endTime = this.dateRange[1];
+        listLog(this.queryParams).then(response => {
+          this.logList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      isSelectable(row, index) {
+        return row.busLogType === 'log_type_0';
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          busLogId: null,
+          busLogType: null,
+          logSource: null,
+          isRisk: null,
+          busEnterpriseId: null,
+          busEnterpriseName: null,
+          riskStatus: "0",
+          longitude: null,
+          latitude: null
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.dateRange = [];
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.busLogId)
+        this.single = selection.length !== 1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.title = "添加日志";
+      },
+      /** 修改按钮操作 */
+      handleInspection(row) {
+        this.$router.push({
+          path: '/data/emergency/rectificationlog',
+          query: {"log_id": row.busLogId}
+        })
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.busLogId != null) {
+              updateLog(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addLog(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const busLogIds = row.busLogId || this.ids;
+        checkLog(busLogIds).then(res=>{
+          this.getList();
+          this.$modal.msgSuccess("审核成功");
+        });
+        /*this.$modal.confirm('是否确认删除日志编号为"' + busLogIds + '"的数据项?').then(function () {
+          return delLog(busLogIds);
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {
+        });*/
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        this.queryParams.beginTime = this.dateRange[0];
+        this.queryParams.endTime = this.dateRange[1];
+        this.download('sooka-sponest-center-data/log/export', {
+          ...this.queryParams
+        }, `log_${new Date().getTime()}.xlsx`)
+      }
+    }
+  };
+</script>

+ 32 - 0
src/main/java/com/sooka/sponest/data/app/controller/AppPatroAlertController.java

@@ -0,0 +1,32 @@
+package com.sooka.sponest.data.app.controller;
+
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.sooka.sponest.data.app.domain.AppLeaveBo;
+import com.sooka.sponest.data.app.service.AppLeaveService;
+import com.sooka.sponest.data.emergency.domain.TPatrolAlert;
+import com.sooka.sponest.data.emergency.service.TPatrolAlertService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@RestController
+@RequestMapping("AppPatroAlertController")
+public class AppPatroAlertController extends BaseController {
+
+    @Autowired
+    private TPatrolAlertService service;
+
+    @ApiOperation(value = "巡更告警", notes = "巡更告警")
+    @GetMapping("/list")
+    public AjaxResult list(TPatrolAlert tAttach)
+    {
+        List<TPatrolAlert> list = service.selectTPatrolAlertList(tAttach);
+        return AjaxResult.success(list);
+    }
+
+}

+ 11 - 0
src/main/java/com/sooka/sponest/data/emergency/appmin/xuncha/controller/AppXunchaController.java

@@ -35,6 +35,17 @@ public class AppXunchaController extends BaseController {
         return AjaxResult.success(tableDataInfo.getRows());
     }
 
+    @GetMapping("/getRectificationFile")
+    public AjaxResult getRectificationFile(){
+        AppXunchaVO vo = new AppXunchaVO();
+        vo.setIsRisk("1");
+        startPage();
+        List list = appXunchaService.getXunchaList(vo);
+        list.removeAll(Collections.singleton(null));
+        TableDataInfo tableDataInfo = getDataTable(list);
+        return AjaxResult.success(tableDataInfo.getRows());
+    }
+
 
     @RequestMapping("getXHXqzgtzsDetail")
     public AjaxResult getXHXqzgtzsDetail(AppXunchaVO vo){

+ 1 - 0
src/main/java/com/sooka/sponest/data/emergency/appmin/xuncha/domain/AppXunchaVO.java

@@ -16,5 +16,6 @@ public class AppXunchaVO extends BaseBusinessEntity {
     String busEnterpriseName;
 
     String logId;
+    String isRisk;
 
 }

+ 103 - 0
src/main/java/com/sooka/sponest/data/emergency/controller/TPatrolAlertController.java

@@ -0,0 +1,103 @@
+package com.sooka.sponest.data.emergency.controller;
+
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.sooka.sponest.data.emergency.domain.TAttach;
+import com.sooka.sponest.data.emergency.domain.TPatrolAlert;
+import com.sooka.sponest.data.emergency.service.ITAttachService;
+import com.sooka.sponest.data.emergency.service.TPatrolAlertService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.NotEmpty;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 附件Controller
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+@RestController
+@RequestMapping("/patrolAlert")
+public class TPatrolAlertController extends BaseController
+{
+    @Autowired
+    private TPatrolAlertService service;
+
+    /**
+     * 查询附件列表
+     */
+    @RequiresPermissions("system:patrolalert:list")
+    @GetMapping("/list")
+    public TableDataInfo list(TPatrolAlert tAttach)
+    {
+        startPage();
+        List<TPatrolAlert> list = service.selectTPatrolAlertList(tAttach);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出附件列表
+     */
+    @RequiresPermissions("system:patrolalert:export")
+    @Log(title = "附件", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TPatrolAlert tAttach)
+    {
+        List<TPatrolAlert> list = service.selectTPatrolAlertList(tAttach);
+        ExcelUtil<TPatrolAlert> util = new ExcelUtil<TPatrolAlert>(TPatrolAlert.class);
+        util.exportExcel(response, list, "附件数据");
+    }
+
+    /**
+     * 获取附件详细信息
+     */
+    @RequiresPermissions("system:patrolalert:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return success(service.selectTPatrolAlertById(id));
+    }
+
+    /**
+     * 新增附件
+     */
+    @RequiresPermissions("system:patrolalert:add")
+    @Log(title = "附件", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TPatrolAlert alert)
+    {
+        return toAjax(service.insertTPatrolAlert(alert));
+    }
+
+    /**
+     * 修改附件
+     */
+    @RequiresPermissions("system:patrolalert:edit")
+    @Log(title = "附件", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TPatrolAlert alert)
+    {
+        return toAjax(service.updateTPatrolAlert(alert));
+    }
+
+    /**
+     * 删除附件
+     */
+    @RequiresPermissions("system:patrolalert:remove")
+    @Log(title = "附件", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@NotEmpty(message = "主键不能为空")
+                                 @PathVariable("ids") String[] ids)
+    {
+        return toAjax(service.deleteTPatrolAlertByAttachIds(ids));
+    }
+}

+ 33 - 0
src/main/java/com/sooka/sponest/data/emergency/domain/TPatrolAlert.java

@@ -0,0 +1,33 @@
+package com.sooka.sponest.data.emergency.domain;
+
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import com.sooka.sponest.data.base.domain.BaseBusinessEntity;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 巡更告警
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+@Data
+public class TPatrolAlert extends BaseBusinessEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private String id;
+
+    /** 标题 */
+    @Excel(name = "标题")
+    private String title;
+    private String deptId;
+
+    /** 内容 */
+    @Excel(name = "内容")
+    private String content;
+
+}

+ 62 - 0
src/main/java/com/sooka/sponest/data/emergency/mapper/TPatrolAlertMapper.java

@@ -0,0 +1,62 @@
+package com.sooka.sponest.data.emergency.mapper;
+
+import com.sooka.sponest.data.emergency.domain.TPatrolAlert;
+
+import java.util.List;
+
+/**
+ * 附件Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+public interface TPatrolAlertMapper
+{
+    /**
+     * 查询附件
+     *
+     * @param id 附件主键
+     * @return 附件
+     */
+    public TPatrolAlert selectTPatrolAlertById(String id);
+
+    /**
+     * 查询附件列表
+     *
+     * @param patrolAlert 附件
+     * @return 附件集合
+     */
+    public List<TPatrolAlert> selectTPatrolAlertList(TPatrolAlert patrolAlert);
+
+    /**
+     * 新增附件
+     *
+     * @param patrolAlert 附件
+     * @return 结果
+     */
+    public int insertTPatrolAlert(TPatrolAlert patrolAlert);
+
+    /**
+     * 修改附件
+     *
+     * @param patrolAlert 附件
+     * @return 结果
+     */
+    public int updateTPatrolAlert(TPatrolAlert patrolAlert);
+
+    /**
+     * 删除附件
+     *
+     * @param id 附件主键
+     * @return 结果
+     */
+    public int deleteTPatrolAlertByAttachId(String id);
+
+    /**
+     * 批量删除附件
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTPatrolAlertByAttachIds(String[] ids);
+}

+ 63 - 0
src/main/java/com/sooka/sponest/data/emergency/service/TPatrolAlertService.java

@@ -0,0 +1,63 @@
+package com.sooka.sponest.data.emergency.service;
+
+import com.sooka.sponest.data.emergency.domain.TAttach;
+import com.sooka.sponest.data.emergency.domain.TPatrolAlert;
+
+import java.util.List;
+
+/**
+ * 附件Service接口
+ *
+ * @author ruoyi
+ * @date 2022-11-15
+ */
+public interface TPatrolAlertService
+{
+    /**
+     * 查询附件
+     *
+     * @param id 附件主键
+     * @return 附件
+     */
+    public TPatrolAlert selectTPatrolAlertById(String id);
+
+    /**
+     * 查询附件列表
+     *
+     * @param patrolAlert 附件
+     * @return 附件集合
+     */
+    public List<TPatrolAlert> selectTPatrolAlertList(TPatrolAlert patrolAlert);
+
+    /**
+     * 新增附件
+     *
+     * @param patrolAlert 附件
+     * @return 结果
+     */
+    public int insertTPatrolAlert(TPatrolAlert patrolAlert);
+
+    /**
+     * 修改附件
+     *
+     * @param patrolAlert 附件
+     * @return 结果
+     */
+    public int updateTPatrolAlert(TPatrolAlert patrolAlert);
+
+    /**
+     * 删除附件
+     *
+     * @param id 附件主键
+     * @return 结果
+     */
+    public int deleteTPatrolAlertByAttachId(String id);
+
+    /**
+     * 批量删除附件
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTPatrolAlertByAttachIds(String[] ids);
+}

+ 52 - 0
src/main/java/com/sooka/sponest/data/emergency/service/impl/TPatrolAlertServiceImpl.java

@@ -0,0 +1,52 @@
+package com.sooka.sponest.data.emergency.service.impl;
+
+import com.ruoyi.common.datascope.annotation.DataScope;
+import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
+import com.sooka.sponest.data.emergency.domain.TPatrolAlert;
+import com.sooka.sponest.data.emergency.mapper.TAttachMapper;
+import com.sooka.sponest.data.emergency.mapper.TPatrolAlertMapper;
+import com.sooka.sponest.data.emergency.service.TPatrolAlertService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+
+@Service
+public class TPatrolAlertServiceImpl  extends BaseServiceImpl implements TPatrolAlertService {
+    @Autowired
+    private TPatrolAlertMapper mapper;
+    @Override
+    public TPatrolAlert selectTPatrolAlertById(String id) {
+        return mapper.selectTPatrolAlertById(id);
+    }
+
+    @Override
+    @DataScope(deptAlias = "d")
+    public List<TPatrolAlert> selectTPatrolAlertList(TPatrolAlert patrolAlert) {
+        setSookaDataBase(patrolAlert);
+        return mapper.selectTPatrolAlertList(patrolAlert);
+    }
+
+    @Override
+    public int insertTPatrolAlert(TPatrolAlert patrolAlert) {
+        patrolAlert.setId(UUID.randomUUID().toString().replaceAll("-", ""));
+        return mapper.insertTPatrolAlert(patrolAlert);
+    }
+
+    @Override
+    public int updateTPatrolAlert(TPatrolAlert patrolAlert) {
+        return mapper.updateTPatrolAlert(patrolAlert);
+    }
+
+    @Override
+    public int deleteTPatrolAlertByAttachId(String id) {
+        return mapper.deleteTPatrolAlertByAttachId( id);
+    }
+
+    @Override
+    public int deleteTPatrolAlertByAttachIds(String[] ids) {
+        return mapper.deleteTPatrolAlertByAttachIds( ids);
+    }
+}

+ 3 - 1
src/main/resources/mapper/emergency/appmin/AppXunchaMapper.xml

@@ -57,7 +57,6 @@
     <select id="getXunchaList" parameterMap="pm_AppXunchaVO" resultMap="rm_AppXunchaListBO">
         select t.nickName as nickName,
         t.deptName as deptName,
-
         log.bus_log_id as busLogId,
         (select dict_label from ${database_system}.sys_dict_data where dict_value = log.bus_log_type ) as busLogTypeLabel ,
         log.bus_enterprise_id as busEnterpriseId,
@@ -82,6 +81,9 @@
         <if test="createBy != null and createBy != ''">
             and log.create_by = #{createBy}
         </if>
+        <if test="isRisk != null and isRisk != ''">
+            and log.is_risk = #{isRisk}
+        </if>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
         order by log.create_time desc

+ 66 - 0
src/main/resources/mapper/emergency/system/TPatrolAlertMapper.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sooka.sponest.data.emergency.mapper.TPatrolAlertMapper">
+
+    <resultMap type="TPatrolAlert" id="TPatrolAlertResult">
+        <result property="id"    column="id"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="title"    column="title"    />
+        <result property="content"    column="content"    />
+    </resultMap>
+
+    <sql id="selectTPatrolAlertVo">
+        select * from centerdata_t_emergency_patrol_alert
+    </sql>
+
+    <select id="selectTPatrolAlertList" parameterType="TPatrolAlert" resultMap="TPatrolAlertResult">
+        <include refid="selectTPatrolAlertVo"/>
+        <where>
+            <if test="id != null  and id != ''"> and id = #{id}</if>
+            <if test="title != null  and title != ''"> and title like concat('%', #{title}, '%')</if>
+        </where>
+        ${params.dataScope}
+    </select>
+
+    <select id="selectTPatrolAlertById" parameterType="String" resultMap="TPatrolAlertResult">
+        <include refid="selectTPatrolAlertVo"/>
+        where id = #{id}
+        ${params.dataScope}
+    </select>
+
+    <insert id="insertTPatrolAlert" parameterType="TPatrolAlert">
+        insert into centerdata_t_emergency_patrol_alert
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="title != null">title,</if>
+            <if test="content != null">content,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="title != null">#{title},</if>
+            <if test="content != null">#{content},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTPatrolAlert" parameterType="TPatrolAlert">
+        update centerdata_t_emergency_patrol_alert
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="title != null">title = #{title},</if>
+            <if test="content != null">content = #{content},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTPatrolAlertByAttachId" parameterType="String">
+        delete from centerdata_t_emergency_patrol_alert where id = #{id}
+    </delete>
+
+    <delete id="deleteTPatrolAlertByAttachIds" parameterType="String">
+        delete from centerdata_t_emergency_patrol_alert where id in
+        <foreach item="ids" collection="array" open="(" separator="," close=")">
+            #{ids}
+        </foreach>
+    </delete>
+</mapper>