Merge remote-tracking branch 'origin/pet' into dev
commit
2a08fe0b7b
|
@ -91,7 +91,8 @@ public class DwController extends BaseController {
|
||||||
@RequestMapping(value = "getAllMessage")
|
@RequestMapping(value = "getAllMessage")
|
||||||
public Object getAllMessage() throws Exception {
|
public Object getAllMessage() throws Exception {
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
return dwService.getAllMessage();
|
TraceGet dto = JSONObject.parseObject(JSONObject.toJSONString(pd), TraceGet.class);
|
||||||
|
return dwService.getAllMessage(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.zcloud.controller.map;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
|
import com.zcloud.controller.map.testDto.TestDto;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.bus.CorpInfoService;
|
import com.zcloud.service.bus.CorpInfoService;
|
||||||
|
@ -910,16 +911,22 @@ public class MapController extends BaseController {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
// TODO 判断是否是公司人员定位
|
// TODO 判断是否是公司人员定位
|
||||||
if (true){
|
if ("035958e685cf4850bc40151c5e0617a6".equals(pd.getString("corpId"))) {
|
||||||
TraceGet mapInfo = new TraceGet();
|
TraceGet mapInfo = new TraceGet();
|
||||||
mapInfo.setId(pd.getString("id"));
|
mapInfo.setId(pd.getString("id"));
|
||||||
return dwService.getTrace(mapInfo);
|
return dwService.getTrace(mapInfo);
|
||||||
}else {
|
}
|
||||||
|
|
||||||
|
if ("21590a00ea5e462e9ee44dd332dddc26".equals(pd.getString("corpId"))){
|
||||||
|
TraceGet mapInfo = new TraceGet();
|
||||||
|
mapInfo.setId(pd.getString("id"));
|
||||||
|
return dwService.getLtTrace(mapInfo);
|
||||||
|
}
|
||||||
PageData value = usersService.getPersonByCardNo(pd);
|
PageData value = usersService.getPersonByCardNo(pd);
|
||||||
map.put("result", "success");
|
map.put("result", "success");
|
||||||
map.put("pd", value);
|
map.put("pd", value);
|
||||||
return map;
|
return map;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/getAllDwMessage")
|
@RequestMapping(value = "/getAllDwMessage")
|
||||||
|
@ -927,7 +934,7 @@ public class MapController extends BaseController {
|
||||||
public Object getAllDwMessage() throws Exception {
|
public Object getAllDwMessage() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
// TODO 判断是否是公司人员定位
|
// 一公司人员定位系统
|
||||||
if (pd.get("corpId") != null && "035958e685cf4850bc40151c5e0617a6".equals(pd.getString("corpId"))) {
|
if (pd.get("corpId") != null && "035958e685cf4850bc40151c5e0617a6".equals(pd.getString("corpId"))) {
|
||||||
AlarmGet alarmGet = new AlarmGet();
|
AlarmGet alarmGet = new AlarmGet();
|
||||||
alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
|
alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
|
||||||
|
@ -935,15 +942,32 @@ public class MapController extends BaseController {
|
||||||
alarmGet.getPage().setSize("12");
|
alarmGet.getPage().setSize("12");
|
||||||
alarmGet.setCorpId(pd.getString("corpId"));
|
alarmGet.setCorpId(pd.getString("corpId"));
|
||||||
map.put("result", "success");
|
map.put("result", "success");
|
||||||
map.put("alarmList",dwService.getAlarmList(alarmGet));
|
map.put("alarmList", dwService.getAlarmList(alarmGet));
|
||||||
map.put("orthermessage",dwService.getAllMessage());
|
TraceGet get = new TraceGet();
|
||||||
|
get.setCorpId("035958e685cf4850bc40151c5e0617a6");
|
||||||
|
map.put("orthermessage", dwService.getAllMessage(get));
|
||||||
return map;
|
return map;
|
||||||
}else {
|
// 九公司人员定位系统
|
||||||
|
} else if (pd.get("corpId") != null && "21590a00ea5e462e9ee44dd332dddc26".equals(pd.getString("corpId"))) {
|
||||||
|
AlarmGet alarmGet = new AlarmGet();
|
||||||
|
alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
|
||||||
|
alarmGet.getPage().setCurrent("1");
|
||||||
|
alarmGet.getPage().setSize("12");
|
||||||
|
alarmGet.setCorpId(pd.getString("corpId"));
|
||||||
|
map.put("result", "success");
|
||||||
|
map.put("alarmList", new ArrayList<>());
|
||||||
|
TraceGet get = new TraceGet();
|
||||||
|
get.setCorpId("21590a00ea5e462e9ee44dd332dddc26");
|
||||||
|
map.put("orthermessage",dwService.getAllMessage(get));
|
||||||
|
return map;
|
||||||
|
} else {
|
||||||
PageData value = usersService.getPersonByCardNo(pd);
|
PageData value = usersService.getPersonByCardNo(pd);
|
||||||
map.put("result", "success");
|
map.put("result", "success");
|
||||||
map.put("pd", value);
|
map.put("pd", value);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -961,11 +985,15 @@ public class MapController extends BaseController {
|
||||||
GetLastPropDto dto = new GetLastPropDto();
|
GetLastPropDto dto = new GetLastPropDto();
|
||||||
dto.setDeviceCode(pd.getString("CARDNO"));
|
dto.setDeviceCode(pd.getString("CARDNO"));
|
||||||
return dwService.getLastProp(dto);
|
return dwService.getLastProp(dto);
|
||||||
}else {
|
}
|
||||||
|
if (pd.get("corpId") != null && "21590a00ea5e462e9ee44dd332dddc26".equals(pd.getString("corpId"))) {
|
||||||
|
GetLastPropDto dto = new GetLastPropDto();
|
||||||
|
dto.setDeviceCode(pd.getString("CARDNO"));
|
||||||
|
return dwService.getLtLastProp(dto);
|
||||||
|
}
|
||||||
// TODO 其他系统有待开发
|
// TODO 其他系统有待开发
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping(value = "/getCameraList")
|
@RequestMapping(value = "/getCameraList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.zcloud.controller.map.testDto;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class TestDto {
|
||||||
|
public static Map<String,Object> getTestInfo() {
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
HashMap<String, String> UwbBQ = new HashMap<>();
|
||||||
|
HashMap<String, String> UwbJiZhan = new HashMap<>();
|
||||||
|
HashMap<String, String> HKcamera = new HashMap<>();
|
||||||
|
HashMap<String, String> tklyr = new HashMap<>();
|
||||||
|
UwbBQ.put("name", "UWB-BQ");
|
||||||
|
UwbBQ.put("code", "0");
|
||||||
|
UwbBQ.put("num", "0");
|
||||||
|
UwbJiZhan.put("name", "UWB-基站");
|
||||||
|
UwbJiZhan.put("code", "0");
|
||||||
|
UwbJiZhan.put("num", "0");
|
||||||
|
HKcamera.put("name", "海康摄像头");
|
||||||
|
HKcamera.put("code", "0");
|
||||||
|
HKcamera.put("num", "0");
|
||||||
|
tklyr.put("name", "天坑路沿人");
|
||||||
|
tklyr.put("code", "0");
|
||||||
|
tklyr.put("num", "0");
|
||||||
|
map.put("UwbBQ", UwbBQ);
|
||||||
|
map.put("UwbJiZhan", UwbJiZhan);
|
||||||
|
map.put("HKcamera", HKcamera);
|
||||||
|
map.put("tklyr", tklyr);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ public interface DwService {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
Object saveOrUpdateMap(MapInfo param) throws Exception;
|
Object saveOrUpdateMap(MapInfo param) throws Exception;
|
||||||
Object getTrace(TraceGet param) throws Exception;
|
Object getTrace(TraceGet param) throws Exception;
|
||||||
|
Object getLtTrace(TraceGet mapInfo);
|
||||||
Object getAlarmList(AlarmGet param) throws Exception;
|
Object getAlarmList(AlarmGet param) throws Exception;
|
||||||
Object manageAlarm(AlarmManageDto param) throws Exception;
|
Object manageAlarm(AlarmManageDto param) throws Exception;
|
||||||
// 废弃
|
// 废弃
|
||||||
|
@ -24,8 +25,10 @@ public interface DwService {
|
||||||
Object deleteMap(DeleteDto deleteDto);
|
Object deleteMap(DeleteDto deleteDto);
|
||||||
// 第二版定位接口
|
// 第二版定位接口
|
||||||
Object getLastProp(GetLastPropDto dto) throws Exception;
|
Object getLastProp(GetLastPropDto dto) throws Exception;
|
||||||
Object getAllMessage() throws Exception;
|
Object getLtLastProp(GetLastPropDto dto) throws Exception;
|
||||||
|
Object getAllMessage(TraceGet param) throws Exception;
|
||||||
Object getCameraList(GetCameraListDto dto) throws Exception;
|
Object getCameraList(GetCameraListDto dto) throws Exception;
|
||||||
Object getCameraInfo(GetCameraInfoDto dto) throws Exception;
|
Object getCameraInfo(GetCameraInfoDto dto) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import lombok.Data;
|
||||||
public class TraceGet {
|
public class TraceGet {
|
||||||
private String user_id;
|
private String user_id;
|
||||||
private String id;
|
private String id;
|
||||||
|
private String corpId;
|
||||||
private String startTime;
|
private String startTime;
|
||||||
private String endTime;
|
private String endTime;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,11 @@ public class DwServiceImpl implements DwService {
|
||||||
return HttpUtil.post(url + "dw/getTrace", param);
|
return HttpUtil.post(url + "dw/getTrace", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getLtTrace(TraceGet param) {
|
||||||
|
return HttpUtil.post(url + "dw/LtGetTrace", param);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getAlarmList(AlarmGet param) throws Exception {
|
public Object getAlarmList(AlarmGet param) throws Exception {
|
||||||
return HttpUtil.post(url + "dw/getAlarmList", param);
|
return HttpUtil.post(url + "dw/getAlarmList", param);
|
||||||
|
@ -74,8 +79,13 @@ public class DwServiceImpl implements DwService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getAllMessage() throws Exception {
|
public Object getLtLastProp(GetLastPropDto dto) throws Exception {
|
||||||
return HttpUtil.post(url + "dw/getAllMessage",null);
|
return HttpUtil.post(url + "dw/getLtLastProp", dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getAllMessage(TraceGet param) throws Exception {
|
||||||
|
return HttpUtil.post(url + "dw/getAllMessage",param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -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
|
bus_gatevideo v
|
||||||
LEFT JOIN mk_gate_area o on v.GATE_AREA_ID = o.GATE_AREA_ID
|
LEFT JOIN mk_gate_area o on v.GATE_AREA_ID = o.GATE_AREA_ID
|
||||||
WHERE
|
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 != ''">
|
<if test="AREA != null and AREA != ''">
|
||||||
and o.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
and o.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||||
</if>
|
</if>
|
||||||
<if test="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
<if test="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||||
and o.CORPINFO_ID = #{CORP_INFO_ID}
|
and o.CORPINFO_ID = #{CORP_INFO_ID}
|
||||||
</if>
|
</if>
|
||||||
|
group by
|
||||||
|
v.GATEVIDEO_ID
|
||||||
</select>
|
</select>
|
||||||
<select id="getTodayInOutCount" resultType="com.zcloud.entity.PageData">
|
<select id="getTodayInOutCount" resultType="com.zcloud.entity.PageData">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
@ -258,6 +258,8 @@
|
||||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||||
and o.CORPINFO_ID = #{CORPINFO_ID}
|
and o.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
v.GATEVIDEO_ID
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue