Commit 380abc51 authored by zhangjianqian's avatar zhangjianqian

大屏监控修改H5player 缩放

parent 4f794384
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.system.domain.Listaw; import com.zehong.system.domain.Listaw;
import com.zehong.system.domain.TDetailInfoList; import com.zehong.system.domain.TDetailInfoList;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import com.zehong.system.service.ITDetectorInfoService;
import com.zehong.system.service.ITDetectorUserService;
import com.zehong.system.service.ITEmployedPeopleInfoService; import com.zehong.system.service.ITEmployedPeopleInfoService;
import com.zehong.web.codeconfig.CodeConFig; import com.zehong.web.codeconfig.CodeConFig;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -35,6 +38,9 @@ public class TDeviceInfoController extends BaseController ...@@ -35,6 +38,9 @@ public class TDeviceInfoController extends BaseController
@Autowired @Autowired
private ITEmployedPeopleInfoService tEmployedPeopleInfoService; private ITEmployedPeopleInfoService tEmployedPeopleInfoService;
@Autowired
private ITDetectorInfoService itDetectorInfoService;
/** /**
* 查询设备信息列表 * 查询设备信息列表
*/ */
...@@ -206,4 +212,12 @@ public class TDeviceInfoController extends BaseController ...@@ -206,4 +212,12 @@ public class TDeviceInfoController extends BaseController
} }
} }
@GetMapping("/selectDeviceNum")
public AjaxResult selectDeviceNum(String enterpriseId)
{
Map<String,Object> map = itDetectorInfoService.selectDetectorNum(enterpriseId);
Map<String,Object> map1 =tDeviceInfoService.selectDeviceNum(enterpriseId);
map.putAll(map1);
return AjaxResult.success(map);
}
} }
package com.zehong.system.mapper; package com.zehong.system.mapper;
import com.zehong.system.domain.TDetectorInfo; import com.zehong.system.domain.TDetectorInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 探测器Mapper接口 * 探测器Mapper接口
...@@ -71,4 +73,10 @@ public interface TDetectorInfoMapper ...@@ -71,4 +73,10 @@ public interface TDetectorInfoMapper
* @return 结果 * @return 结果
*/ */
public int deleteTDetectorInfoByIds(Long[] detectorIds); public int deleteTDetectorInfoByIds(Long[] detectorIds);
/**
* 用户安全监控设备 数量
* @return
*/
public Map<String,Object> selectDetectorNum(@Param("enterpriseIds")String[] enterpriseIds);
} }
package com.zehong.system.mapper; package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TDeviceInfo; import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -110,4 +112,10 @@ public interface TDeviceInfoMapper ...@@ -110,4 +112,10 @@ public interface TDeviceInfoMapper
* @param deviceId * @param deviceId
*/ */
void deleteDeviceDetailInfo(int deviceId); void deleteDeviceDetailInfo(int deviceId);
/**
* 查询设备数量
* @return
*/
Map<String,Object> selectDeviceNum(@Param("enterpriseIds")String[] enterpriseIds);
} }
...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; ...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TDetectorInfo; import com.zehong.system.domain.TDetectorInfo;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 探测器Service接口 * 探测器Service接口
...@@ -80,4 +81,9 @@ public interface ITDetectorInfoService ...@@ -80,4 +81,9 @@ public interface ITDetectorInfoService
* @return 结果 * @return 结果
*/ */
public int deleteTDetectorInfoById(Long detectorId); public int deleteTDetectorInfoById(Long detectorId);
/**
* 用户安全监控设备 数量
* @return
*/
public Map<String,Object> selectDetectorNum(String enterpriseId);
} }
package com.zehong.system.service; package com.zehong.system.service;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TDeviceInfo; import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -110,4 +112,9 @@ public interface ITDeviceInfoService ...@@ -110,4 +112,9 @@ public interface ITDeviceInfoService
* @param deviceId * @param deviceId
*/ */
void deleteDeviceDetailInfo(int deviceId); void deleteDeviceDetailInfo(int deviceId);
/**
* 查询设备数量
* @return
*/
Map<String,Object> selectDeviceNum( String enterpriseId);
} }
...@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 探测器Service业务层处理 * 探测器Service业务层处理
...@@ -147,4 +148,12 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService ...@@ -147,4 +148,12 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService
{ {
return tDetectorInfoMapper.deleteTDetectorInfoById(detectorId); return tDetectorInfoMapper.deleteTDetectorInfoById(detectorId);
} }
/**
* 用户安全监控设备 数量
* @return
*/
@Override
public Map<String,Object> selectDetectorNum(String enterpriseId){
return tDetectorInfoMapper.selectDetectorNum(enterpriseId.split(","));
}
} }
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -172,4 +174,12 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService ...@@ -172,4 +174,12 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
public void deleteDeviceDetailInfo(int deviceId) { public void deleteDeviceDetailInfo(int deviceId) {
tDeviceInfoMapper.deleteDeviceDetailInfo(deviceId); tDeviceInfoMapper.deleteDeviceDetailInfo(deviceId);
} }
/**
* 查询设备数量
* @return
*/
@Override
public Map<String,Object> selectDeviceNum(String enterpriseId){
return tDeviceInfoMapper.selectDeviceNum(enterpriseId.split(","));
}
} }
...@@ -256,4 +256,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -256,4 +256,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{detectorId} #{detectorId}
</foreach> </foreach>
</delete> </delete>
<select id="selectDetectorNum" resultType="java.util.HashMap">
SELECT IFNULL(SUM(IF(detector_status=0,1,0)),0) AS changNum,IFNULL(SUM(detector_status=1),0) AS liNum,
IFNULL(SUM(IF(detector_status=2,1,0)),0) AS baoNum ,
(SELECT COUNT(user_id) FROM t_detector_user WHERE is_del = 0) AS userNum
FROM t_detector_info WHERE is_del = 0
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -207,5 +207,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -207,5 +207,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="deleteDeviceDetailInfo"> <update id="deleteDeviceDetailInfo">
update t_relation_device_detail_info set relation_device_id=NULL where relation_device_detail_id=#{deviceId} update t_relation_device_detail_info set relation_device_id=NULL where relation_device_detail_id=#{deviceId}
</update> </update>
<select id="selectDeviceNum" resultType="java.util.HashMap">
SELECT SUM(IF(device_type=1,1,0)) AS fajing, SUM(IF(device_type=2,1,0)) AS tiaoya ,
(SELECT COUNT(video_manager_id) FROM t_video_manager WHERE is_del = 0
and beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
) AS videoNum,
(SELECT COUNT(site_station_id) FROM t_site_station_info WHERE is_del = 0
and beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
) AS stationNum
FROM t_device_info
WHERE is_del = 0 and beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
#{enterpriseId}
</foreach>
</select>
</mapper> </mapper>
...@@ -209,10 +209,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -209,10 +209,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<select id="selectWorkOrderNum" resultType="java.util.HashMap"> <select id="selectWorkOrderNum" resultType="java.util.HashMap">
SELECT IFNULL(SUM(IF(work_status=3 AND work_type=1,1,0))/SUM(IF(work_type=1,1,0)),0) AS typeOne, SELECT IFNULL(SUM(IF(work_status=3 AND work_type=1,1,0))/SUM(IF(work_type=1,1,0)),1) AS typeOne,
IFNULL(SUM(IF(work_status=3 AND work_type=2,1,0))/SUM(IF(work_type=2,1,0)),0) AS typeTwo, IFNULL(SUM(IF(work_status=3 AND work_type=2,1,0))/SUM(IF(work_type=2,1,0)),1) AS typeTwo,
IFNULL(SUM(IF(work_status=3 AND work_type=3,1,0))/SUM(IF(work_type=3,1,0)),0) AS typeThree, IFNULL(SUM(IF(work_status=3 AND work_type=3,1,0))/SUM(IF(work_type=3,1,0)),1) AS typeThree,
IFNULL(SUM(IF(work_status=3 AND work_type=4,1,0))/SUM(IF(work_type=4,1,0)),0) AS typeFor, IFNULL(SUM(IF(work_status=3 AND work_type=4,1,0))/SUM(IF(work_type=4,1,0)),1) AS typeFor,
(SELECT COUNT(employed_people_id) FROM t_employed_people_info WHERE is_del = 0 (SELECT COUNT(employed_people_id) FROM t_employed_people_info WHERE is_del = 0
AND beyond_enterprise_id IN AND beyond_enterprise_id IN
<foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")"> <foreach item="enterpriseId" collection="enterpriseIds" open="(" separator="," close=")">
......
...@@ -74,3 +74,10 @@ export function alarmData(query) { ...@@ -74,3 +74,10 @@ export function alarmData(query) {
params: query, params: query,
}); });
} }
export function selectDeviceNum(query) {
return request({
url: '/device/device/selectDeviceNum',
method: 'get',
params: query
})
}
...@@ -320,7 +320,7 @@ export default { ...@@ -320,7 +320,7 @@ export default {
}); });
} }
this.currentTime(); this.currentTime();
this.$refs.mychild.choice(0); this.$refs.mychild.choice(this.selarr);
this.$refs.mychild2.choice(this.selarr); this.$refs.mychild2.choice(this.selarr);
}, },
methods: { methods: {
...@@ -405,6 +405,7 @@ export default { ...@@ -405,6 +405,7 @@ export default {
this.map.infowindowClose(); this.map.infowindowClose();
this.show = false; this.show = false;
this.$refs.mychild2.choice(this.selarr); this.$refs.mychild2.choice(this.selarr);
this.$refs.mychild.choice(this.selarr);
}, },
sel(index, item) { sel(index, item) {
this.map.infowindowClose(); this.map.infowindowClose();
...@@ -427,6 +428,7 @@ export default { ...@@ -427,6 +428,7 @@ export default {
// this.map.companyFilter(this.selarr); // this.map.companyFilter(this.selarr);
this.map.allfilter(this.selarr, this.selarr1); this.map.allfilter(this.selarr, this.selarr1);
this.$refs.mychild2.choice(this.selarr); this.$refs.mychild2.choice(this.selarr);
this.$refs.mychild.choice(this.selarr);
}, },
sel1(index, item) { sel1(index, item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment