移动方法
This commit is contained in:
parent
3caec4f5c2
commit
8e1aa06145
@ -551,7 +551,7 @@ public class HikvisionCall {
|
||||
String rs = null;
|
||||
param.put("pageNo", param.getIntValue("pageNo") + 1);
|
||||
try {
|
||||
rs = HikvisionUtil.getDoorEventsForHttp(project, param);
|
||||
rs = HikvisionUtil.getDoorEvents(project, param);
|
||||
} catch (Exception e) {
|
||||
log.error("err:", e);
|
||||
return;
|
||||
@ -665,7 +665,7 @@ public class HikvisionCall {
|
||||
String rs = null;
|
||||
param.put(Cts.PAGE_NO, param.getIntValue(Cts.PAGE_NO) + 1);
|
||||
try {
|
||||
rs = HikvisionUtil.getCrossRecordsForHttp(project, param);
|
||||
rs = HikvisionUtil.getCrossRecords(project, param);
|
||||
} catch (Exception e) {
|
||||
log.error("err:", e);
|
||||
return;
|
||||
@ -851,7 +851,7 @@ public class HikvisionCall {
|
||||
// deleteWorker.setId(wiJo.getLong("personId"));
|
||||
// deleteWorkerFromHttp(deleteWorker, project);
|
||||
// }
|
||||
String rs = HikvisionUtil.doAddWorkerFromHttp(workerInfo, project);
|
||||
String rs = HikvisionUtil.addWorker(workerInfo, project);
|
||||
sendNoticeAndSetStatusForWorker("添加人员到海康isc", rs, workerInfo, 1, 1);
|
||||
}
|
||||
|
||||
@ -911,7 +911,7 @@ public class HikvisionCall {
|
||||
}
|
||||
|
||||
public void editWorkerFromHttp(WorkerInfo workerInfo, Project project) throws Exception {
|
||||
String rs = HikvisionUtil.doEditWorkerFromHttp(workerInfo, project);
|
||||
String rs = HikvisionUtil.editWorker(workerInfo, project);
|
||||
sendNoticeAndSetStatusForWorker("更新人员到海康isc", rs, workerInfo, 1, 2);
|
||||
}
|
||||
|
||||
@ -924,7 +924,7 @@ public class HikvisionCall {
|
||||
public void addWorkerFace(WorkerInfo workerInfo, Project project) throws Exception {
|
||||
String fieldAcquisitionUrl = workerInfo.getFieldAcquisitionUrl();
|
||||
if (StringUtils.isNotBlank(fieldAcquisitionUrl)) {
|
||||
String rs = HikvisionUtil.doAddWorkerFace(workerInfo, project);
|
||||
String rs = HikvisionUtil.addWorkerFace(workerInfo, project);
|
||||
sendNoticeAndSetStatusForWorker("添加人员照片到海康isc", rs, workerInfo, 2, 1);
|
||||
}
|
||||
}
|
||||
@ -1408,7 +1408,7 @@ public class HikvisionCall {
|
||||
addJo.put("driver", c.getDriverWorkerName());
|
||||
addJo.put("driverPhone", c.getDriverTelephone());
|
||||
addJo.put("plateNo", carInfo.getCarNumber());
|
||||
JSONObject rs = HikvisionUtil.addAlarmCarForHttp(project, addJo);
|
||||
JSONObject rs = HikvisionUtil.addAlarmCar(project, addJo);
|
||||
sendNoticeAndSetStatusForCarInfo("车辆添加黑名单到海康isc", rs.toJSONString(), carInfo, 7, null, null, true);
|
||||
} else {
|
||||
sendNoticeAndSetStatusForCarInfo("车辆取消黑名单到海康isc", null, carInfo, 7, null, true, false);
|
||||
@ -1421,7 +1421,7 @@ public class HikvisionCall {
|
||||
String alarmSyscode = joOne.getString("alarmSyscode");
|
||||
JSONObject deleteJo = new JSONObject();
|
||||
deleteJo.put("alarmSyscodes", alarmSyscode);
|
||||
JSONObject rs = HikvisionUtil.deletionAlarmCarForHttp(project, deleteJo);
|
||||
JSONObject rs = HikvisionUtil.deletionAlarmCar(project, deleteJo);
|
||||
sendNoticeAndSetStatusForCarInfo("车辆取消黑名单到海康isc", rs.toJSONString(), carInfo, 7, null, null, true);
|
||||
}
|
||||
}
|
||||
@ -1696,7 +1696,7 @@ public class HikvisionCall {
|
||||
JSONObject oldCarInfo = searchCarInfoByCarNumberFromHttp(carInfo.getCarNumber(), project);
|
||||
if (oldCarInfo != null) {
|
||||
log.info("海康存在车辆,车牌号:{}", oldCarInfo.getString("plateNo"));
|
||||
String rs = HikvisionUtil.deleteCarInfoByIdFromHttp(oldCarInfo.getString("vehicleId"), project);
|
||||
String rs = HikvisionUtil.deleteCarInfoById(oldCarInfo.getString("vehicleId"), project);
|
||||
sendNoticeAndSetStatusForCarInfo("删除车辆白名单到海康isc", rs, carInfo, 4, 3, null, true);
|
||||
} else {
|
||||
sendNoticeAndSetStatusForCarInfo("删除车辆白名单到海康isc", null, carInfo, 4, 3, true, false);
|
||||
@ -1879,7 +1879,7 @@ public class HikvisionCall {
|
||||
}
|
||||
|
||||
private void addOrgNoticeFromHttp(Project project, HikvisionOrganization hikvisionOrganization) throws Exception {
|
||||
String rs = HikvisionUtil.addOrgFromHttp(project, hikvisionOrganization);
|
||||
String rs = HikvisionUtil.addOrg(project, hikvisionOrganization);
|
||||
sendNoticeForOrg("添加组织到海康isc", rs, hikvisionOrganization.getOrgName());
|
||||
}
|
||||
|
||||
@ -1963,7 +1963,7 @@ public class HikvisionCall {
|
||||
return;
|
||||
}
|
||||
HikvisionOrganization hikvisionOrganization = getHikvisionOrganization(project);
|
||||
HikvisionUtil.addOrgFromHttp(project, hikvisionOrganization);
|
||||
HikvisionUtil.addOrg(project, hikvisionOrganization);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2142,7 +2142,7 @@ public class HikvisionCall {
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
"}";
|
||||
JSONObject rs = HikvisionUtil.doorSearchV2ForHttp(project, JSONObject.parseObject(json));
|
||||
JSONObject rs = HikvisionUtil.doorSearchV2(project, JSONObject.parseObject(json));
|
||||
if (HikvisionUtil.isFail(rs)) {
|
||||
log.error(workerInfo.getWorkerName() + "," + dev.getDevName() + " fail:" + rs.toJSONString() + ",");
|
||||
failSb.append(workerInfo.getWorkerName() + "," + dev.getDevName() + ",失败原因:下发异常;");
|
||||
|
||||
@ -384,7 +384,7 @@ public class HikvisionUtil {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String addOrgFromHttp(Project project, HikvisionOrganization hikvisionOrganization) throws Exception {
|
||||
public static String addOrg(Project project, HikvisionOrganization hikvisionOrganization) throws Exception {
|
||||
final String ARTEMIS_PATH = "/artemis";
|
||||
final String path = ARTEMIS_PATH + "/api/resource/v1/org/batch/add";
|
||||
String host = "https://" + project.getArtemisConfigHost();
|
||||
@ -499,7 +499,7 @@ public class HikvisionUtil {
|
||||
return JSON.parseObject(doPost(host, path, param, null, project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret()));
|
||||
}
|
||||
|
||||
public static String doAddWorkerFromHttp(WorkerInfo workerInfo, Project project) throws Exception {
|
||||
public static String addWorker(WorkerInfo workerInfo, Project project) throws Exception {
|
||||
final String ARTEMIS_PATH = "/artemis";
|
||||
final String path = ARTEMIS_PATH + "/api/resource/v2/person/single/add";
|
||||
String host = "https://" + project.getArtemisConfigHost();
|
||||
@ -508,7 +508,7 @@ public class HikvisionUtil {
|
||||
return rs;
|
||||
}
|
||||
|
||||
public static String doEditWorkerFromHttp(WorkerInfo workerInfo, Project project) throws Exception {
|
||||
public static String editWorker(WorkerInfo workerInfo, Project project) throws Exception {
|
||||
final String ARTEMIS_PATH = "/artemis";
|
||||
final String path = ARTEMIS_PATH + "/api/resource/v1/person/single/update";
|
||||
String host = "https://" + project.getArtemisConfigHost();
|
||||
@ -516,7 +516,7 @@ public class HikvisionUtil {
|
||||
return doPost(host, path, body, null, project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret());
|
||||
}
|
||||
|
||||
public static String doAddWorkerFace(WorkerInfo workerInfo, Project project) throws Exception {
|
||||
public static String addWorkerFace(WorkerInfo workerInfo, Project project) throws Exception {
|
||||
final String ARTEMIS_PATH = "/artemis";
|
||||
final String path = ARTEMIS_PATH + "/api/resource/v1/face/single/add";
|
||||
String host = "https://" + project.getArtemisConfigHost();
|
||||
@ -532,7 +532,7 @@ public class HikvisionUtil {
|
||||
* @param project
|
||||
* @return
|
||||
*/
|
||||
public static JSONObject addAlarmCarForHttp(Project project, JSONObject param) throws Exception {
|
||||
public static JSONObject addAlarmCar(Project project, JSONObject param) throws Exception {
|
||||
if (project == null || !Objects.equals(project.getSyncHikvision(), 1)) {
|
||||
return null;
|
||||
}
|
||||
@ -548,7 +548,7 @@ public class HikvisionUtil {
|
||||
* @param project
|
||||
* @return
|
||||
*/
|
||||
public static JSONObject deletionAlarmCarForHttp(Project project, JSONObject param) throws Exception {
|
||||
public static JSONObject deletionAlarmCar(Project project, JSONObject param) throws Exception {
|
||||
if (project == null || !Objects.equals(project.getSyncHikvision(), 1)) {
|
||||
return null;
|
||||
}
|
||||
@ -558,7 +558,7 @@ public class HikvisionUtil {
|
||||
return JSON.parseObject(doPost(host, path, JSON.toJSONString(param), null, project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret()));
|
||||
}
|
||||
|
||||
public static String deleteCarInfoByIdFromHttp(String carId, Project project) throws Exception {
|
||||
public static String deleteCarInfoById(String carId, Project project) throws Exception {
|
||||
final String ARTEMIS_PATH = "/artemis";
|
||||
final String path = ARTEMIS_PATH + "/api/resource/v1/vehicle/batch/delete";
|
||||
String host = "https://" + project.getArtemisConfigHost();
|
||||
@ -576,7 +576,7 @@ public class HikvisionUtil {
|
||||
* @param project
|
||||
* @param param
|
||||
*/
|
||||
public static String getDoorEventsForHttp(Project project, JSONObject param) throws Exception {
|
||||
public static String getDoorEvents(Project project, JSONObject param) throws Exception {
|
||||
if (project == null || !Objects.equals(project.getSyncHikvision(), 1)) {
|
||||
return null;
|
||||
}
|
||||
@ -592,7 +592,7 @@ public class HikvisionUtil {
|
||||
* @param project
|
||||
* @param param
|
||||
*/
|
||||
public static String getCrossRecordsForHttp(Project project, JSONObject param) throws Exception {
|
||||
public static String getCrossRecords(Project project, JSONObject param) throws Exception {
|
||||
if (project == null || !Objects.equals(project.getSyncHikvision(), 1)) {
|
||||
return null;
|
||||
}
|
||||
@ -616,7 +616,7 @@ public class HikvisionUtil {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public static JSONObject doorSearchV2ForHttp(Project project, JSONObject param) throws Exception {
|
||||
public static JSONObject doorSearchV2(Project project, JSONObject param) throws Exception {
|
||||
if (project == null || !Objects.equals(project.getSyncHikvision(), 1)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user