|
@@ -85,7 +85,7 @@ public class ControlUtil {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public static JSONArray set(String userId, String userName, RepositoryImpl Repository, JSONArray path, JSONObject infoValueSet,
|
|
|
+ public static JSONArray set(String userId, String userName,String ipAddress, RepositoryImpl Repository, JSONArray path, JSONObject infoValueSet,
|
|
|
String controlReason, HttpServletRequest request) throws Exception {
|
|
|
JSONArray result;
|
|
|
Object valueObject = ComputeUtil.getValueObject(Repository, path);
|
|
@@ -105,17 +105,18 @@ public class ControlUtil {
|
|
|
result = set(Repository, currData, infoValueSet, sdoList);
|
|
|
}
|
|
|
|
|
|
- ControlUtil.saveBatchOperationLog(userId, userName, sdoList, infoValueSet, result, controlReason, Repository, request);
|
|
|
+ ControlUtil.saveBatchOperationLog(userId, userName,ipAddress,sdoList, infoValueSet, result, controlReason, Repository, request);
|
|
|
// ControlUtil.saveOperationLog(userId, userName, sdoList, infoValueSet, result);
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public static void saveOperationLog(String userId, String userName, List<SceneDataObject> sdoList, JSONObject infoValueSet, JSONArray points) {
|
|
|
+ public static void saveOperationLog(String userId, String userName, List<SceneDataObject> sdoList, JSONObject infoValueSet, JSONArray points,String ipAddress) {
|
|
|
try {
|
|
|
JSONObject postParam = new JSONObject();
|
|
|
postParam.put("groupCode", RepositoryContainer.RepositoryProject.groupCode);
|
|
|
postParam.put("projectId", RepositoryContainer.RepositoryProject.projectId);
|
|
|
+ postParam.put("ipAddress", ipAddress);
|
|
|
if (userId == null || userId.length() == 0) {
|
|
|
postParam.put("userId", "systemId");
|
|
|
} else {
|
|
@@ -191,7 +192,7 @@ public class ControlUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static void saveBatchOperationLog(String userId, String userName, List<SceneDataObject> sdoList, JSONObject infoValueSet, JSONArray points,
|
|
|
+ public static void saveBatchOperationLog(String userId, String userName,String ipAddress, List<SceneDataObject> sdoList, JSONObject infoValueSet, JSONArray points,
|
|
|
String controlReason, RepositoryImpl Repository, HttpServletRequest request) {
|
|
|
try {
|
|
|
String authorization = request.getHeader("Authorization");
|
|
@@ -204,6 +205,7 @@ public class ControlUtil {
|
|
|
JSONObject postParam;
|
|
|
postParam = new JSONObject();
|
|
|
JSONObject postParam2 = new JSONObject();
|
|
|
+ postParam.put("ipAddress", ipAddress);
|
|
|
postParam.put("groupCode", RepositoryContainer.RepositoryProject.groupCode);
|
|
|
postParam.put("projectId", RepositoryContainer.RepositoryProject.projectId);
|
|
|
//控制中心保存指令
|