|
|
@@ -3,6 +3,7 @@ package easydo.technology.service;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
+import java.util.UUID;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
@@ -53,15 +54,21 @@ public class OAService {
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("userName", username);
|
|
|
object.put("password", password);
|
|
|
+
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "查询OAtoken的req========>" + object.toJSONString() + ",url========>" + url);
|
|
|
JSONObject resObject = HttpClientUtil.sendPOST(url, object.toJSONString());
|
|
|
- log.info("查询OAtoken的res======>" + resObject.toJSONString());
|
|
|
+ log.info(uuid + "查询OAtoken的res========>" + resObject.toJSONString());
|
|
|
return resObject.getString("id");
|
|
|
}
|
|
|
|
|
|
public String getUsername(String ticket) {
|
|
|
String getLoginNameUrl = host + oaUsernamePath + ticket;
|
|
|
+
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "查询OA username的url========>" + getLoginNameUrl);
|
|
|
String username = HttpClientUtil.sendOaGET_USERNAME(getLoginNameUrl);
|
|
|
- log.info("查询OA username的ticket====>" + ticket + ",res======>" + username);
|
|
|
+ log.info(uuid + "查询OA username的ticket====>" + ticket + ",res======>" + username);
|
|
|
return HttpClientUtil.sendOaGET_USERNAME(getLoginNameUrl);
|
|
|
}
|
|
|
|
|
|
@@ -70,8 +77,11 @@ public class OAService {
|
|
|
String getLoginNameUrl = host + oaUserInfoPath + token;
|
|
|
Map<String, String> header = new HashMap<>();
|
|
|
header.put("token", token);
|
|
|
+
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "查询OA telNumber的url========>" + getLoginNameUrl);
|
|
|
JSONObject resObj = HttpClientUtil.sendGETWithHeader_Obj(getLoginNameUrl, header);
|
|
|
- log.info("查询OA telNumber的username======>" + username + ",res======>" + resObj.toJSONString());
|
|
|
+ log.info(uuid + "查询OA telNumber的username======>" + username + ",res======>" + resObj.toJSONString());
|
|
|
return resObj.getString("telNumber");
|
|
|
}
|
|
|
|
|
|
@@ -104,8 +114,10 @@ public class OAService {
|
|
|
object.put("noneBindingSender", sysUser.getUsername());
|
|
|
object.put("noneBindingReceiver", sysUser.getUsername());
|
|
|
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "生成OA待办req========>" + object.toJSONString() + ",url========>" + sendTodoUrl);
|
|
|
JSONObject resObj = HttpClientUtil.sendPOSTWithHeader(sendTodoUrl, object.toJSONString(), header);
|
|
|
- log.info("生成OA待办req======>" + object.toJSONString() + ",res======>" + resObj.toJSONString());
|
|
|
+ log.info(uuid + "生成OA待办res========>" + resObj.toJSONString());
|
|
|
|
|
|
resObj.put("url", object.getString("url"));
|
|
|
return resObj;
|
|
|
@@ -123,8 +135,11 @@ public class OAService {
|
|
|
object.put("taskId", taskId);
|
|
|
object.put("state", state);
|
|
|
object.put("subState", subState);
|
|
|
+
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "更新OA待办req========>" + object.toJSONString() + ",url========>" + updateTodoUrl);
|
|
|
JSONObject resObj = HttpClientUtil.sendPOSTWithHeader(updateTodoUrl, object.toJSONString(), header);
|
|
|
- log.info("更新OA待办req======>" + object.toJSONString() + ",res======>" + resObj.toJSONString());
|
|
|
+ log.info(uuid + "更新OA待办res========>" + resObj.toJSONString());
|
|
|
return resObj.getBoolean("success");
|
|
|
}
|
|
|
|
|
|
@@ -153,8 +168,10 @@ public class OAService {
|
|
|
object.put("noneBindingSender", sendUser.getUsername());
|
|
|
object.put("noneBindingReceiver", receiveUser.getUsername());
|
|
|
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "推送OA消息req========>" + object.toJSONString() + ",url========>" + sendMessageUrl);
|
|
|
JSONObject resObj = HttpClientUtil.sendPOSTWithHeader(sendMessageUrl, object.toJSONString(), header);
|
|
|
- log.info("推送OA消息req======>" + object.toJSONString() + ",res======>" + resObj.toJSONString());
|
|
|
+ log.info(uuid + "推送OA消息res========>" + resObj.toJSONString());
|
|
|
return resObj.getBoolean("success");
|
|
|
}
|
|
|
}
|