修改bug

This commit is contained in:
guoshengxiong 2024-06-11 16:18:30 +08:00
parent 2e43ee55a4
commit cd1a93e6b8
2 changed files with 17 additions and 2 deletions

View File

@ -2161,7 +2161,7 @@ public class HikvisionCall {
"\t\t\"operatorType\": " + i + "\n" + "\t\t\"operatorType\": " + i + "\n" +
"\t}\n" + "\t}\n" +
"}"; "}";
JSONObject sdRs = HikvisionUtil.simpleDownload(project, sdStr); JSONObject sdRs = HikvisionUtil.downloadSimple(project, sdStr);
if (HikvisionUtil.isFail(sdRs)) { if (HikvisionUtil.isFail(sdRs)) {
log.error("下发人员权限失败:" + workerInfo.getWorkerName() + "" + dev.getDevName() + " fail" + sdRs.toJSONString() + ","); log.error("下发人员权限失败:" + workerInfo.getWorkerName() + "" + dev.getDevName() + " fail" + sdRs.toJSONString() + ",");
String code = sdRs.getString("code"); String code = sdRs.getString("code");

View File

@ -488,7 +488,7 @@ public class HikvisionUtil {
* @param project * @param project
* @return * @return
*/ */
public static JSONObject simpleDownload(Project project, String param) throws Exception { public static JSONObject downloadSimple(Project project, String param) throws Exception {
if (project == null || !Objects.equals(project.getSyncHikvision(), 1)) { if (project == null || !Objects.equals(project.getSyncHikvision(), 1)) {
return null; return null;
} }
@ -632,4 +632,19 @@ public class HikvisionUtil {
String rs = doPost(host, path, JSONArray.toJSONString(hikvisionOrganization), null, project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret()); String rs = doPost(host, path, JSONArray.toJSONString(hikvisionOrganization), null, project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret());
return rs; return rs;
} }
/**
* 按人员详情与设备下发
*
* @param project
* @param param
* @return
* @throws Exception
*/
public static JSONObject downloadAuthDiy(Project project, JSONObject param) throws Exception {
final String ARTEMIS_PATH = "/artemis";
final String path = ARTEMIS_PATH + "/api/acps/v1/authDownload/special/person/diy";
String host = "https://" + project.getArtemisConfigHost();
return doPostRtObj(host, path, JSONArray.toJSONString(param), null, project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret());
}
} }