Administrator 3 năm trước cách đây
mục cha
commit
6ed2ceaba9

+ 2 - 2
leiSP-admin/src/main/resources/application-druid.yml

@@ -6,10 +6,10 @@ spring:
         druid:
             # 主库数据源
             master:
-#                url: jdbc:mysql://192.168.100.11:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://192.168.100.11:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
 
 
-                url: jdbc:mysql://192.168.100.11:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                url: jdbc:mysql://192.168.100.11:53306/senlinfanghuo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: senlinfanghuo
                 password: slfh123456
 

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

@@ -7,11 +7,10 @@ leisp:
   # 版权年份
   copyrightYear: 2019
   # 实例演示开关
-  demoEnabled: true
+  demoEnabled: false
   # 文件路径 示例( Windows配置D:/leisp/uploadPath,Linux配置 /home/leisp/uploadPath)
-  profile: /home/soft/temp/
+  profile: /home/leisp/uploadPath
 #  profile: D:/leisp/uploadPath
-#  profile: /home/leisp/uploadPath
   #profile : f:/
   # 获取ip地址开关
   addressEnabled: false

+ 33 - 20
leiSP-system/src/main/java/com/sooka/system/service/impl/SysNoticeServiceImpl.java

@@ -63,37 +63,50 @@ public class SysNoticeServiceImpl implements ISysNoticeService
         int lines = noticeMapper.insertNotice(notice);
         SysNoticeTo sysNoticeTo = new SysNoticeTo();
         sysNoticeTo.setNoticeId(notice.getNoticeId());
-        String[] userIds = notice.getGlobalUserIds().split(",");
+//        String[] userIds = notice.getGlobalUserIds().split(",");
+        //临时修改
+        String[] userIds = null;
+        if(notice.getGlobalUserIds() != null){
+            userIds = notice.getGlobalUserIds().split(",");
+        }
+
+
         System.out.println(notice.getGlobalUserIds()+"=notice.getGlobalUserIds");
         System.out.println(notice.getGlobalDeptIds()+"=notice.getGlobalDeptIds");
-        System.out.println(userIds.length+"=userIds.length");
+//        System.out.println(userIds.length+"=userIds.length");
         System.out.println(notice.getIsGroupNotice()+"=notice.getIsGroupNotice()");
-        if(notice.getIsGroupNotice().equals("1")){//群发模式 不插入扩展表
+        if(notice.getIsGroupNotice()!=null &&  notice.getIsGroupNotice().equals("1")){//群发模式 不插入扩展表
             System.out.println("群发模式 不插入扩展表");
             return lines;
         }
 
-        Long[] userIdArray = sysNoticeToMapper.selectUserIdsByDeptIds(notice.getGlobalDeptIds().split(","));//根据部门选择的用户ID
-        Set userIdSet = new HashSet();
-        for (Object obj:userIdArray) {
-            userIdSet.add(obj);
-        }
-        System.out.println(userIdSet.size()+"=userIdSet.size()");
-        for (int i = 0; i < userIds.length; i++) {
-            if("".equals(userIds[i])){
-                System.out.println(userIds[i]+"=userIds[i] 为空");
-                continue;
+        if(notice.getGlobalDeptIds() != null){
+            Long[] userIdArray = sysNoticeToMapper.selectUserIdsByDeptIds(notice.getGlobalDeptIds().split(","));//根据部门选择的用户ID
+            Set userIdSet = new HashSet();
+            for (Object obj:userIdArray) {
+                userIdSet.add(obj);
+            }
+            System.out.println(userIdSet.size()+"=userIdSet.size()");
+            for (int i = 0; userIds!= null && i < userIds.length; i++) {
+                if("".equals(userIds[i])){
+                    System.out.println(userIds[i]+"=userIds[i] 为空");
+                    continue;
+                }
+                userIdSet.add(Long.valueOf(userIds[i]));//
             }
-            userIdSet.add(Long.valueOf(userIds[i]));//
-        }
 
-        Iterator<Long> iterator = userIdSet.iterator();
-        while (iterator.hasNext()){
-            sysNoticeTo.setId(UUID.randomUUID().toString().replace("-",""));
-            sysNoticeTo.setUserId(iterator.next());
-            sysNoticeToMapper.insertSysNoticeTo(sysNoticeTo);
+            Iterator<Long> iterator = userIdSet.iterator();
+            while (iterator.hasNext()){
+                sysNoticeTo.setId(UUID.randomUUID().toString().replace("-",""));
+                sysNoticeTo.setUserId(iterator.next());
+                sysNoticeToMapper.insertSysNoticeTo(sysNoticeTo);
+            }
         }
 
+
+
+
+
         /*for (int i = 0; i < userIds.length; i++) {
             sysNoticeTo.setId(UUID.randomUUID().toString().replace("-",""));
             System.out.println(userIds[i]+"=userIds[i]");

+ 15 - 0
mybusiness/pom.xml

@@ -77,6 +77,21 @@
             <version>1.4.21</version>
         </dependency>-->
 
+
+        <!--ActiveMq-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-activemq</artifactId>
+            <version>1.5.0.RELEASE</version>
+        </dependency>
+        <!--消息队列连接池-->
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-pool</artifactId>
+            <version>5.15.0</version>
+        </dependency>
+
+
     </dependencies>
 
 

+ 1 - 1
mybusiness/src/main/java/com/business/slfh/app/camera/service/impl/HikcServiceImpl.java

@@ -273,7 +273,7 @@ public class HikcServiceImpl implements HikcService {
 
                 String name = UUID.randomUUID() + ".jpg";//图片名称 557350c7-7469-46c1-9a06-358dabdd2580.jpg
                 String fileName = "/profile/upload/" + sdf + "/" + name;//图片地址 /profile/upload/2021/01/23/557350c7-7469-46c1-9a06-358dabdd2580.jpg
-                String dirPath = Global.getProfile() + "upload/" + sdf;//本地路径 D:/temp/upload/2021/01/23
+                String dirPath = Global.getProfile() + "/upload/" + sdf;//本地路径 D:/temp/upload/2021/01/23
                 File file = new File(dirPath);
                 if (!file.exists()) {
                     file.mkdirs();

+ 13 - 0
mybusiness/src/main/java/com/business/slfh/manager/firemanager/controller/TUEventFireController.java

@@ -7,6 +7,7 @@ import com.business.slfh.manager.firemanager.service.ITUEventFireService;
 import com.business.slfh.manager.firereportmanager.domain.TUFirereport;
 import com.business.slfh.manager.firereportmanager.service.ITUFirereportService;
 import com.business.slfh.manager.othersmanager.domain.TUEventOthers;
+import com.business.slfh.manager.othersmanager.service.ITUEventOthersService;
 import com.business.slfh.manager.taskmanager.domain.TUTask;
 import com.business.slfh.manager.taskmanager.service.ITUTaskService;
 import com.business.slfh.tools.UUID_Tools;
@@ -54,6 +55,9 @@ public class TUEventFireController extends BaseController
     @Autowired
     private ITUEventFireService tUEventFireService;
     @Autowired
+    private ITUEventOthersService ituEventOthersService;
+
+    @Autowired
     private ITUFirereportService tUFirereportService;
     @Autowired
     private ITUEventprocessService tUEventprocessService;
@@ -145,6 +149,15 @@ public class TUEventFireController extends BaseController
         return prefix + "/edit";
     }
 
+    @GetMapping("/quickClear")
+    @ResponseBody
+    public String quickClear(ModelMap mmap)
+    {
+        tUEventFireService.clearAllEvent();
+        return "处理所有事件为无异常状态";
+    }
+
+
     /**
      * 查看【历史火情】 跳转页面
      */

+ 15 - 8
mybusiness/src/main/java/com/business/slfh/manager/firemanager/mapper/TUEventFireMapper.java

@@ -6,15 +6,22 @@ import com.business.slfh.manager.firemanager.domain.TUEventFire;
 
 /**
  * 【请填写功能名称】Mapper接口
- * 
+ *
  * @author lei
  * @date 2020-11-25
  */
-public interface TUEventFireMapper 
+public interface TUEventFireMapper
 {
+
+    /**
+     * 一键清理
+     */
+    public void clearAllEvent_fire();
+    public void clearAllEvent_others();
+
     /**
      * 查询【请填写功能名称】
-     * 
+     *
      * @param id 【请填写功能名称】ID
      * @return 【请填写功能名称】
      */
@@ -22,7 +29,7 @@ public interface TUEventFireMapper
 
     /**
      * 查询【请填写功能名称】列表
-     * 
+     *
      * @param tUEventFire 【请填写功能名称】
      * @return 【请填写功能名称】集合
      */
@@ -38,7 +45,7 @@ public interface TUEventFireMapper
 
     /**
      * 新增【请填写功能名称】
-     * 
+     *
      * @param tUEventFire 【请填写功能名称】
      * @return 结果
      */
@@ -46,7 +53,7 @@ public interface TUEventFireMapper
 
     /**
      * 修改【请填写功能名称】
-     * 
+     *
      * @param tUEventFire 【请填写功能名称】
      * @return 结果
      */
@@ -54,7 +61,7 @@ public interface TUEventFireMapper
 
     /**
      * 删除【请填写功能名称】
-     * 
+     *
      * @param id 【请填写功能名称】ID
      * @return 结果
      */
@@ -62,7 +69,7 @@ public interface TUEventFireMapper
 
     /**
      * 批量删除【请填写功能名称】
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */

+ 13 - 8
mybusiness/src/main/java/com/business/slfh/manager/firemanager/service/ITUEventFireService.java

@@ -7,15 +7,20 @@ import com.business.slfh.tools.domain.SendMessageVO;
 
 /**
  * 【请填写功能名称】Service接口
- * 
+ *
  * @author lei
  * @date 2020-11-25
  */
-public interface ITUEventFireService 
+public interface ITUEventFireService
 {
+
+
+    public void clearAllEvent();
+
+
     /**
      * 查询【请填写功能名称】
-     * 
+     *
      * @param id 【请填写功能名称】ID
      * @return 【请填写功能名称】
      */
@@ -23,7 +28,7 @@ public interface ITUEventFireService
 
     /**
      * 查询【请填写功能名称】列表
-     * 
+     *
      * @param tUEventFire 【请填写功能名称】
      * @return 【请填写功能名称】集合
      */
@@ -31,7 +36,7 @@ public interface ITUEventFireService
 
     /**
      * 新增【请填写功能名称】
-     * 
+     *
      * @param tUEventFire 【请填写功能名称】
      * @return 结果
      */
@@ -39,7 +44,7 @@ public interface ITUEventFireService
 
     /**
      * 修改【请填写功能名称】
-     * 
+     *
      * @param tUEventFire 【请填写功能名称】
      * @return 结果
      */
@@ -63,7 +68,7 @@ public interface ITUEventFireService
 
     /**
      * 批量删除【请填写功能名称】
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
@@ -71,7 +76,7 @@ public interface ITUEventFireService
 
     /**
      * 删除【请填写功能名称】信息
-     * 
+     *
      * @param id 【请填写功能名称】ID
      * @return 结果
      */

+ 7 - 0
mybusiness/src/main/java/com/business/slfh/manager/firemanager/service/impl/TUEventFireServiceImpl.java

@@ -55,6 +55,13 @@ public class TUEventFireServiceImpl implements ITUEventFireService {
     @Resource
     ISysNoticeService noticeService;
 
+
+    @Override
+    public void clearAllEvent() {
+        tUEventFireMapper.clearAllEvent_fire();
+        tUEventFireMapper.clearAllEvent_others();
+    }
+
     /**
      * 查询【请填写功能名称】
      *

+ 4 - 4
mybusiness/src/main/java/com/business/slfh/tools/WebSocketConfig.java

@@ -7,9 +7,9 @@ import org.springframework.web.socket.server.standard.ServerEndpointExporter;
 @Configuration
 public class WebSocketConfig {
 
-//    @Bean
-//    public ServerEndpointExporter serverEndpointExporter() {
-//        return new ServerEndpointExporter();
-//    }
+    @Bean
+    public ServerEndpointExporter serverEndpointExporter() {
+        return new ServerEndpointExporter();
+    }
 
 }

+ 2 - 0
mybusiness/src/main/java/com/business/slfh/tools/service/impl/SendMessageServiceImpl.java

@@ -95,6 +95,8 @@ public class SendMessageServiceImpl implements SendMessageService {
             notice.setNoticeContent(tUNotice.getContent());
             notice.setNoticeTitle(tUNotice.getTitle());
             notice.setNoticeType("1");//1通知 2公告
+            notice.setGlobalUserIds(sendMessageVO.getUserIds());
+
             //notice.setNoticeType(tUEventFire.getReportType());
             //notice.setCreateBy(ShiroUtils.getLoginName());//App异常
             noticeService.insertNotice(notice);

+ 8 - 0
mybusiness/src/main/resources/mapper/grid/manager/TUEventFireMapper.xml

@@ -31,6 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="hikEventType"    column="hik_event_type"    />
     </resultMap>
 
+
+    <update id="clearAllEvent_fire">
+        update t_u_event_fire set event_status = 'event_status_6'
+    </update>
+    <update id="clearAllEvent_others">
+        update t_u_event_others set event_status = 'event_status_6'
+    </update>
+
     <sql id="selectTUEventFireVo">
         select t.hik_event_type,
         (select dept_name from sys_dept where dept_id=t.dept_id) dept_name,

+ 15 - 0
mybusiness/src/main/resources/templates/business/manager/firemanager/index.html

@@ -87,6 +87,11 @@
                 <a class="btn btn-primary" onclick="showHistoryFire()" shiro:hasPermission="system:fire:edit">
                     <i class="fa fa-edit"></i> 历史火情
                 </a>
+                <a class="btn btn-danger" onclick="quickClear()">
+                    <i class="fa fa-edit"></i> 一键清理事件
+                </a>
+
+
             </div>
             <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
@@ -95,6 +100,16 @@
     </div>
     <th:block th:include="include :: footer" />
     <script th:inline="javascript">
+
+        function quickClear(){
+            $.ajax({
+                url : prefix + "/quickClear",
+                success : function (e) {
+                    $.modal.msgSuccess(e);
+                }
+            });
+        }
+
         function showHistoryFire() {
             var url = prefix + "/showHistoryFire";
             // window.open(url);

+ 1 - 1
mybusiness/src/main/resources/templates/business/visualization/ry.html

@@ -111,7 +111,7 @@
     });
 
     function livestream(userId) {
-        window.open("http://36.97.65.105:8080/players/srs_player.html?app=e&stream=livestream"+userId+"&server=36.97.65.105&port=1935&autostart=true&vhost=players");
+        window.open("http://36.97.65.105:4466/players/srs_player.html?app=live&stream=livestream"+userId+"&server=36.97.65.105&port=1935&autostart=true&vhost=players");
 
     }