luowei 2 vuotta sitten
vanhempi
commit
b13ef47712

+ 1 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/access/CoreMonitoringTaskRegistrationMonitorMapper.xml

@@ -102,6 +102,7 @@
             a.task_id = #{taskId}
           AND b.`host` = #{host}
           AND b.video_channel =#{videoChannel}
+          AND sd1.id=#{videoChannel}
     </select>
 
     <insert id="insertCoreMonitoringTaskRegistrationMonitor" parameterType="com.xunmei.core.access.domain.CoreMonitoringTaskRegistrationMonitor">

+ 12 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysDeviceServiceImpl.java

@@ -175,14 +175,24 @@ public class SysDeviceServiceImpl extends ServiceImpl<SysDeviceMapper, SysDevice
                     videoVO.setVideoName(s.getDeviceName());
                     List<AccessType> accessByVideo = sysDeviceMapper.getAccessByVideo(s.getId(), taskId);
                     if (accessByVideo.size()>0) {
-                        accessByVideo.forEach(a -> {
+                        for (AccessType a:accessByVideo){
                             String situation = a.getSituation();
                             int num = a.getNum();
                             videoVO.setType(1);
                             if (situation.equals("1") && num > 0) {
                                 videoVO.setType(2);
+                                break;
                             }
-                        });
+                        }
+                  /*      accessByVideo.forEach(a -> {
+                            String situation = a.getSituation();
+                            int num = a.getNum();
+                            videoVO.setType(1);
+                            if (situation.equals("1") && num > 0) {
+                                videoVO.setType(2);
+                            }
+                        });*/
+
                     } else {
                         videoVO.setType(0);
                     }