limeng преди 2 месеца
родител
ревизия
526029e4eb

+ 10 - 1
event-ui/src/api/event/eventProcess/eventProcess.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-// 查询报文日志列表
+// 事件综合查询列表
 export function selectCompositeEventList(query) {
   return request({
     url: '/center-event/eventProcess/selectCompositeEventList',
@@ -8,3 +8,12 @@ export function selectCompositeEventList(query) {
     params: query
   })
 }
+
+// 事件综合查询详情
+export function getCompositeEventDetail(query) {
+  return request({
+    url: '/center-event/eventProcess/getCompositeEventDetail',
+    method: 'get',
+    params: query
+  })
+}

+ 56 - 34
event-ui/src/views/event/eventProcess/index.vue

@@ -62,10 +62,48 @@
       </el-table-column>
     </el-table>
     <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="selectCompositeEventList"/>
+
+    <!-- 事件详情对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="事件标题" prop="eventName">
+              <el-input v-model="form.eventName" readonly/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="事件描述" prop="eventDescription">
+              <el-input v-model="form.eventDescription" type="textarea" readonly :rows="3" resize="none"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
+
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
+
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+      </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 {selectCompositeEventList} from "@/api/event/eventProcess/eventProcess";
+import {getCompositeEventDetail, selectCompositeEventList} from "@/api/event/eventProcess/eventProcess";
 import {getEventTypeTree} from "@/api/event/eventType/eventType";
 
 export default {
@@ -76,8 +114,12 @@ export default {
     return {
       // 总条数
       total: 0,
+      // 标题
+      title: "事件详情",
+      // 详情弹层开关
+      open: false,
       // 选中数组
-      ids: [],
+      eventIds: [],
       // 遮罩层
       loading: true,
       // 显示搜索条件
@@ -86,14 +128,17 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        eventId: null,
+        eventName: null,
+        eventStatus: null,
+        eventType: null,
         reportTimeRange: [],
         reportTimeStart: null,
         reportTimeEnd: null,
-        eventName: null,
         reportSource: null,
-        eventStatus: null,
-        eventType: null,
       },
+      // 表单参数
+      form: {},
       compositeEventList: [],
       eventTypeOptions: [], // 事件类型树形数据源
       props: {
@@ -130,36 +175,13 @@ export default {
     },
     /** 查询数据详情 */
     handleDetail(row) {
-      this.findView = true;
-      this.reset();
-      this.srcList=[]
-      this.detailSee = true
-      const id = row.id || this.ids
-      getEventcatalogue(id).then(response => {
+      this.queryParams.eventId = row.eventId;
+      this.queryParams.eventStatus = row.eventStatus;
+      getCompositeEventDetail(this.queryParams).then(response => {
+        console.log(response.data)
         this.form = response.data;
-        const list = response.data.attach;
-        if(list.length == 0){
-          this.detailSee = false;
-        }
-        for (let i = 0; i < list.length; i++) {
-          this.$set(list[i], "url", list[i].attachPath)
-        }
-        list.forEach(e => {
-          if (e.fileType == 'video') {
-            this.filevedioList.push(e);
-          } else {
-            this.fileList.push(e);
-          }
-        })
-        this.form.attachId = this.fileList;
-        this.srcList=this.form.attachId.map(a=>a.url)
-        this.detailflValue()
-        listSJfl({parentId: 0}).then(response => {
-          this.eventTypeList = response.data;
-        });
-        this.openSee = true;
-        this.submit = false;
-        this.title = "事件详情";
+        this.open = true;
+
       });
     },
     /** 获取事件类型数据源 */

+ 2 - 2
src/main/java/com/sooka/sponest/event/eventProcess/controller/EventProcessController.java

@@ -54,8 +54,8 @@ public class EventProcessController extends BaseController {
      * @author limeng
      * */
     @GetMapping("/getCompositeEventDetail")
-    public EventInfoBO getCompositeEventDetail(EventInfo eventInfo) {
-        return null;
+    public AjaxResult getCompositeEventDetail(EventInfo eventInfo) {
+        return AjaxResult.success(eventProcessService.getCompositeEventDetail(eventInfo));
     }
 
     //******************************************待确认事件块**************************************************/

+ 25 - 26
src/main/java/com/sooka/sponest/event/eventProcess/service/impl/EventProcessServiceImpl.java

@@ -2,19 +2,15 @@ package com.sooka.sponest.event.eventProcess.service.impl;
 
 
 import com.alibaba.fastjson.JSON;
-import com.ruoyi.common.core.constant.HttpStatus;
-import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.core.utils.file.FilePrefixUtils;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteDeptService;
 import com.ruoyi.system.api.RemoteFileService;
 import com.ruoyi.system.api.domain.SysDept;
-import com.ruoyi.system.api.domain.SysFile;
 import com.ruoyi.system.api.domain.SysUser;
 import com.sooka.sponest.event.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.event.eventAttach.domain.EventAttach;
@@ -38,9 +34,9 @@ import com.sooka.sponest.monitor.api.domain.CenterdataTCamera;
 import org.apache.commons.collections4.MapUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import java.util.*;
@@ -107,17 +103,20 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
      * */
     @Override
     public EventInfoBO getCompositeEventDetail(EventInfo eventInfo) {
-//        // 入参校验
-//        if (eventInfo == null || eventInfo.getEventId() == null || eventInfo.getEventStatus() == null)
-//            return new EventInfoBO();
-//        if (eventInfo.getEventStatus().equals(EVENT_STATUS_1)) { // 上报
-//            return eventProcessMapper.getUnconfirmedEventDetail(eventInfo);
-//        } else if (eventInfo.getEventStatus().equals(EVENT_STATUS_98) || eventInfo.getEventStatus().equals(EVENT_STATUS_99)) { // 误报 重复
-//            return eventProcessMapper.getUsualEventDetail(eventInfo);
-//        } else { // 确认 签收 办结 审核通过 归档
-//            return eventProcessMapper.getProcessEventDetail(eventInfo);
-//        }
-        return null;
+        EventInfoBO eventInfoBO = new EventInfoBO();
+        EventInfo eventDetail;
+        // 入参校验
+        if (eventInfo == null || eventInfo.getEventId() == null || eventInfo.getEventStatus() == null)
+            return new EventInfoBO();
+        if (eventInfo.getEventStatus().equals(EVENT_STATUS_1)) { // 上报
+            eventDetail = eventProcessMapper.getUnconfirmedEventDetail(eventInfo);
+        } else if (eventInfo.getEventStatus().equals(EVENT_STATUS_98) || eventInfo.getEventStatus().equals(EVENT_STATUS_99)) { // 误报 重复
+            eventDetail = eventProcessMapper.getUsualEventDetail(eventInfo);
+        } else { // 确认 签收 办结 审核通过 归档
+            eventDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
+        }
+        BeanUtils.copyProperties(eventDetail, eventInfoBO);
+        return eventInfoBO;
     }
 
     @Override
@@ -481,8 +480,8 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
                 }
 
                 eventInfo.setEventStatus(EVENT_STATUS_2);
-                EventInfo processEventDetailById = eventProcessMapper.getProcessEventDetail(eventInfo);
-                if (null == processEventDetailById) {
+                EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
+                if (null == eventProcessDetail) {
                     return AjaxResult.error(EventEnum.EVENT_NOT_FOUND.getDescribe());
                 }
 
@@ -523,8 +522,8 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
                 }
 
                 eventInfo.setEventStatus(EVENT_STATUS_3);
-                EventInfo processEventDetailById = eventProcessMapper.getProcessEventDetail(eventInfo);
-                if (null == processEventDetailById) {
+                EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
+                if (null == eventProcessDetail) {
                     return AjaxResult.error(EventEnum.EVENT_NOT_FOUND.getDescribe());
                 }
 
@@ -562,8 +561,8 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
                 }
 
                 eventInfo.setEventStatus(EVENT_STATUS_4);
-                EventInfo processEventDetailById = eventProcessMapper.getProcessEventDetail(eventInfo);
-                if (null == processEventDetailById) {
+                EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
+                if (null == eventProcessDetail) {
                     return AjaxResult.error(EventEnum.EVENT_NOT_FOUND.getDescribe());
                 }
 
@@ -603,8 +602,8 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
                 }
 
                 eventInfo.setEventStatus(EVENT_STATUS_5);
-                EventInfo processEventDetailById = eventProcessMapper.getProcessEventDetail(eventInfo);
-                if (null == processEventDetailById) {
+                EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
+                if (null == eventProcessDetail) {
                     return AjaxResult.error(EventEnum.EVENT_NOT_FOUND.getDescribe());
                 }
 
@@ -639,8 +638,8 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
             }
 
 
-            EventInfo processEventDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
-            if (null == processEventDetail || (!EVENT_STATUS_2.equals(processEventDetail.getEventStatus()) && !EVENT_STATUS_3.equals(processEventDetail.getEventStatus()))) {
+            EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
+            if (null == eventProcessDetail || (!EVENT_STATUS_2.equals(eventProcessDetail.getEventStatus()) && !EVENT_STATUS_3.equals(eventProcessDetail.getEventStatus()))) {
                 return AjaxResult.error(EventEnum.EVENT_NOT_FOUND.getDescribe());
             }
 

+ 47 - 47
src/main/resources/mapper/event/eventProcess/EventProcessMapper.xml

@@ -6,8 +6,8 @@
 
     <!--  *************************************** resultMap块 开始***********************************************  -->
 
-    <!--  查询待确认事件  -->
-    <resultMap type="EventInfoBO" id="EventInfoResult">
+    <!--  查询待确认事件列表  -->
+    <resultMap type="EventInfoBO" id="EventInfoUnconfirmedResult">
         <result property="eventId" column="event_id"/>
         <result property="eventType" column="event_type"/>
         <result property="eventTypeName" column="event_type_name"/>
@@ -34,17 +34,17 @@
                 select="selectEventAttachListByEventIdToUnconfirmed">
         </collection>
     </resultMap>
+
     <!--  待确认事件 / 无异常事件列表关联附件sql  -->
     <select id="selectEventAttachListByEventIdToUnconfirmed" resultType="EventAttach">
         SELECT id, log_id logId, event_id eventId, path, source, source_type sourceType, sort
         FROM event_attach_unconfirmed
         WHERE event_id = #{eventId}
-          and source = 'event_log_file_source_1'
-        order by sort
+        ORDER BY sort
     </select>
 
     <!--  待确认事件详情  -->
-    <resultMap type="EventInfo" id="EventDetailResult">
+    <resultMap type="EventInfo" id="EventDetailUnconfirmedResult">
         <result property="eventId" column="event_id"/>
         <result property="eventType" column="event_type"/>
         <result property="eventTypeName" column="event_type_name"/>
@@ -69,12 +69,12 @@
                 property="eventLogList"
                 ofType="EventLog"
                 column="event_id"
-                select="selectEventLogList">
+                select="selectEventLogListToUnconfirmed">
         </collection>
     </resultMap>
 
     <!--  待确认事件详情日志  -->
-    <resultMap type="EventLog" id="EventAttachResult">
+    <resultMap type="EventLog" id="selectEventLogListToUnconfirmed">
         <id property="id" column="id"/>
         <result property="content" column="content"/>
         <!-- 嵌套ATTACH集合 -->
@@ -82,20 +82,20 @@
                 property="attachList"
                 ofType="EventAttach"
                 column="id"
-                select="selectEventAttachListByLogId">
+                select="selectEventAttachListByLogIdToUnconfirmed">
         </collection>
     </resultMap>
 
     <!--  待确认事件详情日志  -->
-    <select id="selectEventLogList" resultMap="EventAttachResult">
+    <select id="selectEventLogListToUnconfirmed" resultMap="EventDetailUnconfirmedResult">
         SELECT *
         FROM event_log
         WHERE event_id = #{eventId}
-        order by create_time
+        ORDER BY create_time
     </select>
 
     <!--  待确认事件日志关联附件  -->
-    <select id="selectEventAttachListByLogId" resultType="EventAttach">
+    <select id="selectEventAttachListByLogIdToUnconfirmed" resultType="EventAttach">
         SELECT log_id      logId,
                event_id    eventId,
                path,
@@ -104,7 +104,7 @@
                sort
         FROM event_attach_unconfirmed
         WHERE log_id = #{id}
-        order by sort
+        ORDER BY sort
     </select>
 
     <!--  确认事件列表  / 无异常事件列表  -->
@@ -135,13 +135,13 @@
                 select="selectEventAttachListByEventIdToProcess">
         </collection>
     </resultMap>
+
     <!--  确认事件列表关联附件sql  -->
     <select id="selectEventAttachListByEventIdToProcess" resultType="EventAttach">
         SELECT id, log_id logId, event_id eventId, path, source, source_type sourceType, sort
         FROM event_attach_process
         WHERE event_id = #{eventId}
-          and source = 'event_log_file_source_99'
-        order by sort
+        ORDER BY sort
     </select>
 
     <!--  确认事件详情  -->
@@ -192,7 +192,7 @@
         SELECT *
         FROM event_log
         WHERE event_id = #{eventId}
-        order by create_time
+        ORDER BY create_time
     </select>
 
     <!--  确认事件日志关联附件  -->
@@ -205,7 +205,7 @@
                sort
         FROM event_attach_process
         WHERE log_id = #{id}
-        order by sort
+        ORDER BY sort
     </select>
 
     <!--  *************************************** resultMap块 开始***********************************************  -->
@@ -232,7 +232,7 @@
                         a.update_by,
                         a.update_time
         FROM event_unconfirmed a
-                 LEFT JOIN event_type b ON a.event_type = b.id
+        LEFT JOIN event_type b ON a.event_type = b.id
     </sql>
 
     <sql id="selectEventProcessInfoVo">
@@ -256,7 +256,7 @@
                         a.update_by,
                         a.update_time
         FROM event_process a
-                 LEFT JOIN event_type b ON a.event_type = b.id
+        LEFT JOIN event_type b ON a.event_type = b.id
     </sql>
 
     <sql id="selectUsualEventInfoVo">
@@ -280,37 +280,37 @@
                         a.update_by,
                         a.update_time
         FROM event_usual a
-                 LEFT JOIN event_type b ON a.event_type = b.id
+        LEFT JOIN event_type b ON a.event_type = b.id
     </sql>
 
     <sql id="selectEventListWhere">
         <if test="eventId!= null and eventId!= ''">
-            and a.event_id = #{eventId}
+            AND a.event_id = #{eventId}
         </if>
         <if test="eventType!= null and eventType!= ''">
-            and a.event_type = #{eventType}
+            AND a.event_type = #{eventType}
         </if>
         <if test="eventName!= null and eventName!= ''">
-            and a.event_name LIKE CONCAT('%', #{eventName}, '%')
+            AND a.event_name LIKE CONCAT('%', #{eventName}, '%')
         </if>
         <if test="reportTimeStart != null and reportTimeEnd != null">
-            and a.report_time between
+            AND a.report_time BETWEEN
             concat(#{reportTimeStart}, ' 00:00:00')
-            and
+            AND
             concat(#{reportTimeEnd}, ' 23:59:59')
         </if>
         <if test="reportSource!= null and reportSource!= ''">
-            and a.report_source = #{reportSource}
+            AND a.report_source = #{reportSource}
         </if>
         <if test="eventStatus!= null and eventStatus!= ''">
-            and a.event_status = #{eventStatus}
+            AND a.event_status = #{eventStatus}
         </if>
     </sql>
     <!--  *************************************** sql块 结束***********************************************  -->
 
     <!-- **************************************** 业务块 开始 *********************************************** -->
     <insert id="insertEventInfo" parameterType="EventInfo">
-        insert into ${tableName}
+        INSERT INTO ${tableName}
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="eventId != null">event_id,</if>
             <if test="eventType != null">event_type,</if>
@@ -351,19 +351,19 @@
         </trim>
     </insert>
 
-    <select id="selectUnConfirmedList" parameterType="EventInfo" resultMap="EventInfoResult">
+    <select id="selectUnConfirmedList" parameterType="EventInfo" resultMap="EventInfoUnconfirmedResult">
         <include refid="selectUnconfirmedEventInfoVo"/>
-        LEFT JOIN event_dept ed on a.event_id = ed.event_id
-        LEFT JOIN ${database_system}.sys_dept d on ed.dept_id = d.dept_id
+        LEFT JOIN event_dept ed ON a.event_id = ed.event_id
+        LEFT JOIN ${database_system}.sys_dept d ON ed.dept_id = d.dept_id
         <where>
             <include refid="selectEventListWhere"/>
             ${params.dataScope}
         </where>
-        order by a.create_time desc
+        ORDER BY a.create_time DESC
     </select>
 
-    <select id="getUnconfirmedEventDetail" resultMap="EventDetailResult">
-        SELECT * FROM event_unconfirmed
+    <select id="getUnconfirmedEventDetail" resultMap="EventDetailUnconfirmedResult">
+        SELECT * FROM event_unconfirmed a
         <where>
             <include refid="selectEventListWhere"/>
         </where>
@@ -371,17 +371,17 @@
 
     <select id="selectEventProcessList" parameterType="EventInfo" resultMap="EventInfoProcessResult">
         <include refid="selectEventProcessInfoVo"/>
-        LEFT JOIN event_dept ed on a.event_id = ed.event_id
-        LEFT JOIN ${database_system}.sys_dept d on ed.dept_id = d.dept_id
+        LEFT JOIN event_dept ed ON a.event_id = ed.event_id
+        LEFT JOIN ${database_system}.sys_dept d ON ed.dept_id = d.dept_id
         <where>
             <include refid="selectEventListWhere"/>
             ${params.dataScope}
         </where>
-        order by a.create_time desc
+        ORDER BY a.create_time DESC
     </select>
 
     <select id="getProcessEventDetail" resultMap="EventDetailProcessResult">
-        SELECT * FROM event_process
+        SELECT * FROM event_process a
         <where>
             <include refid="selectEventListWhere"/>
         </where>
@@ -389,17 +389,17 @@
 
     <select id="selectUsualList" parameterType="EventInfo" resultMap="EventInfoProcessResult">
         <include refid="selectUsualEventInfoVo"/>
-        LEFT JOIN event_dept ed on a.event_id = ed.event_id
-        LEFT JOIN ${database_system}.sys_dept d on ed.dept_id = d.dept_id
+        LEFT JOIN event_dept ed ON a.event_id = ed.event_id
+        LEFT JOIN ${database_system}.sys_dept d ON ed.dept_id = d.dept_id
         <where>
             <include refid="selectEventListWhere"/>
             ${params.dataScope}
         </where>
-        order by a.create_time desc
+        ORDER BY a.create_time DESC
     </select>
 
     <select id="getUsualEventDetail" resultMap="EventDetailProcessResult">
-        SELECT * FROM event_usual
+        SELECT * FROM event_usual a
         <where>
             <include refid="selectEventListWhere"/>
         </where>
@@ -407,7 +407,7 @@
 
 
     <insert id="insertEventProcess" parameterType="EventInfo">
-        insert into event_process
+        INSERT INTO event_process
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="eventId != null">event_id,</if>
             <if test="eventType != null">event_type,</if>
@@ -449,7 +449,7 @@
     </insert>
 
     <insert id="insertEventUsual" parameterType="EventInfo">
-        insert into event_usual
+        INSERT INTO event_usual
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="eventId != null">event_id,</if>
             <if test="eventType != null">event_type,</if>
@@ -497,7 +497,7 @@
     </delete>
 
     <update id="updateEventProcess" parameterType="EventInfo">
-        update event_process
+        UPDATE event_process
         <trim prefix="SET" suffixOverrides=",">
             <if test="eventType != null and eventType != ''">event_type = #{eventType},</if>
             <if test="eventName != null and eventName != ''">event_name = #{eventName},</if>
@@ -512,7 +512,7 @@
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
         </trim>
-        where event_id = #{eventId}
+        WHERE event_id = #{eventId}
     </update>
 
     <delete id="deleteEventProcess" parameterType="EventInfo">
@@ -520,8 +520,8 @@
         WHERE event_id = #{eventId}
     </delete>
 
-    <select id="selectProcessAttachFromUnconfirmed" resultMap="EventInfoResult">
-        select event_id from event_compensation
+    <select id="selectProcessAttachFromUnconfirmed" resultMap="EventInfoUnconfirmedResult">
+        SELECT event_id FROM event_compensation
     </select>
     <!-- **************************************** 业务块 结束 *********************************************** -->