|
|
@@ -311,7 +311,7 @@ public class DataUtil {
|
|
|
String id = objectMap.get("id").toString();
|
|
|
|
|
|
JsonObject paramJson = new JsonObject();
|
|
|
- paramJson.addProperty("clientId", i);
|
|
|
+// paramJson.addProperty("clientId", i);
|
|
|
paramJson.addProperty("personId", id);
|
|
|
paramJson.addProperty("personName", objectMap.get("name").toString());
|
|
|
paramJson.addProperty("orgIndexCode", objectMap.get("orgIndexCode").toString());
|
|
|
@@ -337,27 +337,13 @@ public class DataUtil {
|
|
|
|
|
|
if (historyMap.containsKey(id)) {
|
|
|
if (!paramJson.toString().equals(historyMap.get(id))) {
|
|
|
+ paramJson.addProperty("personId", tableData.get(id));
|
|
|
updateList.add(paramJson);
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
addList.add(paramJson);
|
|
|
-
|
|
|
-// if(tableData != null && tableData.containsKey(id)){
|
|
|
-// apiPath = "/api/resource/v1/person/single/update";
|
|
|
-// apiUtil.doPost(apiPath, paramJson.toString(), null, header);
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-//
|
|
|
-// clientMap.put(i, id);
|
|
|
-// String result = apiUtil.doPost(apiPath, paramJson.toString(), null, header);
|
|
|
-// JsonElement parse = jsonParser.parse(result);
|
|
|
-// JsonObject resultJson = parse.getAsJsonObject();
|
|
|
-// if("0".equals(resultJson.get("code").getAsString()) && "success".equals(resultJson.get("msg").getAsString())){
|
|
|
-// JsonObject array = resultJson.get("data").getAsJsonObject();
|
|
|
-// idMap.put(id, array.get("personId").getAsString());
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
String apiPath = "/api/resource/v1/person/single/add";
|
|
|
@@ -402,7 +388,7 @@ public class DataUtil {
|
|
|
Entity entity = Entity.create(tableName);
|
|
|
entity.set("send_data", paramJson.toString());
|
|
|
Entity where = Entity.create(tableName);
|
|
|
- where.set("source_id", paramJson.get("personId").getAsString());
|
|
|
+ where.set("hikvision_id", paramJson.get("personId").getAsString());
|
|
|
SqlRunnerAdapter.db().dynamicUpdate(tableName, entity, where);
|
|
|
}
|
|
|
}
|