Merge branch 'limingyu-20240520-一公司摄像头显示bug' into pet
commit
00e4c37c83
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.controller.mkmj;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.mkmj.GateVideoService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import com.zcloud.util.hk.HKUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/gateVideo")
|
||||
public class GateVideoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private GateVideoService gateVideoService;
|
||||
|
||||
@RequestMapping(value="/goAllVideo")
|
||||
@ResponseBody
|
||||
public Object goAllVideo() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String DATA_IDS = pd.getString("DATA_IDS");
|
||||
if(Tools.notEmpty(DATA_IDS)){
|
||||
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
||||
pd.put("ArrayDATA_IDS", ArrayDATA_IDS);
|
||||
}
|
||||
List<PageData> videoList = gateVideoService.listBo(pd); //根据ID读取
|
||||
for (PageData video : videoList) {
|
||||
if(video.get("INDEXCODE")!=null && !"".equals(video.getString("INDEXCODE"))){
|
||||
Map<String, Object> data = HKUtil.camerasPreviewURLs(video.getString("INDEXCODE"), "hls");
|
||||
video.put("HLSVIDEOURL", data);
|
||||
Map<String, Object> resData = (Map<String, Object>) data.get("data");
|
||||
video.put("GBSVIDEOURL",resData.get("url"));
|
||||
}
|
||||
}
|
||||
map.put("videoList", videoList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.service.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface GateVideoService {
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listBo(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.service.mkmj.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.map.GateVideoMapper;
|
||||
import com.zcloud.service.mkmj.GateVideoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class GateVideoServiceImpl implements GateVideoService {
|
||||
|
||||
@Autowired
|
||||
private GateVideoMapper gateVideoMapper;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listBo(PageData pd)throws Exception{
|
||||
return gateVideoMapper.listBo(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -146,14 +146,15 @@
|
|||
bus_gatevideo v
|
||||
LEFT JOIN mk_gate_area o on v.GATE_AREA_ID = o.GATE_AREA_ID
|
||||
WHERE
|
||||
v.isdelete = 0
|
||||
v.isdelete = 0 and v.LATITUDE IS NOT NULL and v.LONGITUDE IS NOT NULL
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and o.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||
and o.CORPINFO_ID = #{CORP_INFO_ID}
|
||||
</if>
|
||||
|
||||
group by
|
||||
v.GATEVIDEO_ID
|
||||
</select>
|
||||
<select id="getTodayInOutCount" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
|
|
|
@ -258,6 +258,8 @@
|
|||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and o.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
GROUP BY
|
||||
v.GATEVIDEO_ID
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue