//重点人口信息管理,条件查询重点人口信息
|
function queryKeypeopleByBlood() {
|
var queryData = {};
|
queryData.blood = "AB";
|
var args = JSON.stringify(queryData);
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/keyPeople/queryKeypeopleByBlood.action",
|
data : args,
|
contentType : "application/json;charset=utf-8",
|
success : function(data) {
|
if (data.length != 0) {
|
showfaceresultlist(data);
|
}else{
|
ctrlFaceResultlist("none");
|
swal("没有识别到符合相貌特征的对象!","请重试!","error");
|
}
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
console.log("识别执行失败!");
|
}
|
});
|
}
|
//保存智能识别结果
|
function savefaceresult(){
|
if(faceresultStr!=''){
|
var nowdate = new Date();
|
var nowday = nowdate.format("yyyy-MM-dd");
|
var obj = {
|
'faceId':'0',
|
'videoId':prefacevideoId,
|
'faceTime':nowday,
|
'faceUrl':targetcanvas.toDataURL("image/jpeg"),
|
'faceResult':faceresultStr,
|
};
|
var args = JSON.stringify(obj);
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/face/insert.action",
|
data : args,
|
contentType : "application/json;charset=utf-8",
|
success : function(data) {
|
if(data == 1){
|
swal("保存成功!","请重试!","error");
|
}else{
|
swal("保存失败!","请重试!","error");
|
}
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
console.log("ajax请求失败!");
|
}
|
});
|
}else{
|
swal("没有识别到符合相貌特征的对象,无法保存!","请重试!","error");
|
}
|
}
|
//根据身份证号获取关键人口
|
function getKeypeopleByCardId(cardid,videodata,alarmdata) {
|
var queryData = {};
|
queryData.identity = cardid;
|
var args = JSON.stringify(queryData);
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/keyPeople/queryKeypeople.action",
|
data : args,
|
contentType : "application/json;charset=utf-8",
|
success : function(data) {
|
if (data.length != 0) {
|
appendAlarmPic(data[0],videodata,alarmdata);
|
}else{
|
swal("没有重点人口信息符合您的检索条件!","请重试!","error");
|
}
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
console.log("条件查询重点人口信息失败!");
|
}
|
});
|
}
|
//获取全部追踪记录
|
function getFaceRecord(){
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/face/getFaceAll.action",
|
contentType : "application/json;charset=utf-8",
|
success : function(data) {
|
showFaceFollowRecord(data);
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
// 请求失败时执行该函数
|
console.log("智能追踪信息获取失败!");
|
}
|
});
|
}
|
//根据id获取追踪记录详细信息
|
function getFaceFollowById(id){
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/face/selectFaceById.action",
|
data : "faceId=" + id,
|
success : function(data) {
|
if (data.length != 0) {
|
showInfoFaceFollow_3D(data);
|
}else{
|
console.log("获取追踪记录信息为空!");
|
}
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
console.log("根据ID获取追踪记录详细信息失败!");
|
}
|
});
|
}
|
//获取全部智能识别记录
|
function getFaceAlarmRecord(){
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/faceAlarm/getFaceAlarmNoPic.action",
|
contentType : "application/json;charset=utf-8",
|
success : function(data) {
|
showFaceAlarmRecord(data);
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
// 请求失败时执行该函数
|
console.log("智能识别报警信息获取失败!");
|
}
|
});
|
}
|
//根据id获取智能识别报警详细信息
|
function getFaceAlarmById(id){
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/faceAlarm/getFaceAlarmById.action",
|
data : "faId=" + id,
|
success : function(data) {
|
if (data.length != 0) {
|
showInfoFaceAlarm_3D(data);
|
}else{
|
console.log("获取智能识别报警信息为空!");
|
}
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
console.log("根据ID获取智能识别报警详细信息失败!");
|
}
|
});
|
}
|
//获取全部刷卡记录
|
function getCardRecord(){
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/card/getCardAll.action",
|
contentType : "application/json;charset=utf-8",
|
success : function(data) {
|
showCardRecord(data);
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
// 请求失败时执行该函数
|
console.log("刷卡记录信息获取失败!");
|
}
|
});
|
}
|
//根据id获取刷卡记录详细信息
|
function getCardById(id){
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/card/getCardById.action",
|
data : "crId=" + id,
|
success : function(data) {
|
if (data.length != 0) {
|
showInfoCard_3D(data);
|
}else{
|
console.log("获取刷卡记录信息为空!");
|
}
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
console.log("根据ID获取刷卡记录详细信息失败!");
|
}
|
});
|
}
|
//接处警应急,根据坐标获取周边200米范围内的人员(路线显示)
|
var policemanList = []; //调用的警员
|
var rePolicemanList = [] ; //重复的警员
|
function getPolicemanList(position){
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/police/getPoliceRealDateWithManPos.action",
|
contentType : "application/json;charset=utf-8",
|
success : function(data) {
|
var lng = Number(position[0]);
|
var lat = Number(position[1]);
|
for (var i = 0; i < data.length; i++) {
|
var dis = getFlatternDistance(lng,lat,Number(data[i].longitude),Number(data[i].latitude));
|
if(dis <= Number($("#ePoliceRadius").val())){
|
if(rePolicemanList.indexOf(data[i].deviceNum) == -1){
|
rePolicemanList.push(data[i].deviceNum);
|
}else{
|
policemanList = policemanList.filter(item =>item.deviceNum !== data[i].deviceNum);
|
}
|
policemanList.push(data[i]);
|
}
|
}
|
clearRouteLines();
|
showPolice_3D(policemanList,'RHPC');
|
showRoadNavs(policemanList);
|
startintercom(policemanList,'police');
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
// 请求失败时执行该函数
|
console.log("接处警应急200米范围内人员获取失败!");
|
}
|
});
|
}
|
|
//接处警应急,根据坐标获取周边200米范围内的车辆(路线显示)
|
var policeCarList = []; //调用的警车
|
var rePoliceCarList = []; //重复的警车
|
function getPoliceCarList(position){
|
$.ajax({
|
type : "post",
|
url : "../../easyAPI/car/getPoliceCarRealData.action",
|
contentType : "application/json;charset=utf-8",
|
success : function (data){
|
var realPoliceCarList = [];
|
var lng = Number(position[0]);
|
var lat = Number(position[1]);
|
for ( var i = 0; i < data.length; i++) {
|
if(data[i].realdata != undefined){
|
var dis = getFlatternDistance(lng,lat,data[i].realdata.longitude,data[i].realdata.latitude);
|
if(dis <= Number($("#ePoliceRadius").val())){
|
if(rePoliceCarList.indexOf(data[i].car.carId) == -1){
|
rePoliceCarList.push(data[i].car.carId);
|
}else{
|
policeCarList = policeCarList.filter(item =>item.car.carId !== data[i].car.carId);
|
}
|
policeCarList.push(data[i]);
|
realPoliceCarList.push(data[i].realdata);
|
}
|
}
|
}
|
clearRouteLines();
|
showPoliceCar_3D(policeCarList)//显示200米范围内的车辆
|
showRoadNavs(policeCarList);
|
startintercom(realPoliceCarList);
|
},
|
error : function(XMLHttpRequest, textStatus, errorThrown){
|
console.log("接处警应急200米范围内车辆获取失败!");
|
}
|
});
|
}
|