|
|
@@ -1,11 +1,7 @@
|
|
|
package easydo.technology.service;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
@@ -50,8 +46,10 @@ public class GLDCostService {
|
|
|
Map<String, String> header = new HashMap<>();
|
|
|
header.put("Authorization", costAuthorization);
|
|
|
header.put("X-CORAL-TENANT", tenantId);
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "查询合约规划合约视角req========>" + data.toJSONString() + ",url========>" + url);
|
|
|
JSONObject resObj = HttpClientUtil.sendPOSTWithHeader(url, data.toJSONString(), header);
|
|
|
- log.info("查询合约规划合约视角req========>" + data.toJSONString() + "res========>" + resObj.toJSONString());
|
|
|
+ log.info(uuid + "查询合约规划合约视角res========>" + resObj.toJSONString());
|
|
|
return resObj;
|
|
|
}
|
|
|
|
|
|
@@ -67,8 +65,10 @@ public class GLDCostService {
|
|
|
Map<String, String> header = new HashMap<>();
|
|
|
header.put("Authorization", costAuthorization);
|
|
|
header.put("X-CORAL-TENANT", tenantId);
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "查询合约规划科目视角req========>" + data.toJSONString() + ",url========>" + url);
|
|
|
JSONObject resObj = HttpClientUtil.sendPOSTWithHeader(url, data.toJSONString(), header);
|
|
|
- log.info("查询合约规划科目视角req========>" + data.toJSONString() + "res========>" + resObj.toJSONString());
|
|
|
+ log.info(uuid + "查询合约规划科目视角res========>" + resObj.toJSONString());
|
|
|
return resObj;
|
|
|
}
|
|
|
|
|
|
@@ -82,8 +82,10 @@ public class GLDCostService {
|
|
|
Map<String, String> header = new HashMap<>();
|
|
|
header.put("Authorization", costAuthorization);
|
|
|
header.put("X-CORAL-TENANT", tenantId);
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "修改合约规划状态req========>" + data.toJSONString() + ",url========>" + url);
|
|
|
JSONObject resObj = HttpClientUtil.sendPOSTWithHeader(url, data.toJSONString(), header);
|
|
|
- log.info("修改合约规划状态req========>" + data.toJSONString() + "res========>" + resObj.toJSONString());
|
|
|
+ log.info(uuid + "修改合约规划状态res========>" + resObj.toJSONString());
|
|
|
if (!"success".equals(resObj.getString("code"))) {
|
|
|
throw new BizException("修改合约规划状态异常");
|
|
|
}
|
|
|
@@ -99,8 +101,10 @@ public class GLDCostService {
|
|
|
Map<String, String> header = new HashMap<>();
|
|
|
header.put("Authorization", costAuthorization);
|
|
|
header.put("X-CORAL-TENANT", tenantId);
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ log.info(uuid + "查询合同信息req========>" + data.toJSONString() + ",url========>" + url);
|
|
|
JSONObject resObj = HttpClientUtil.sendPOSTWithHeader(url, data.toJSONString(), header);
|
|
|
- log.info("查询合同信息req========>" + data.toJSONString() + "res========>" + resObj.toJSONString());
|
|
|
+ log.info(uuid + "查询合同信息res========>" + resObj.toJSONString());
|
|
|
JSONArray array = resObj.getJSONArray("data");
|
|
|
List<GLDContract> list = new ArrayList<>();
|
|
|
for (Object obj : array) {
|
|
|
@@ -128,7 +132,7 @@ public class GLDCostService {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
- public void getContractFile(String objectId, String fileName,HttpServletRequest request,HttpServletResponse response) {
|
|
|
+ public void getContractFile(String objectId, String fileName, HttpServletRequest request, HttpServletResponse response) {
|
|
|
String url = costHost + costContractFile + objectId;
|
|
|
Map<String, String> header = new HashMap<>();
|
|
|
header.put("Authorization", costAuthorization);
|
|
|
@@ -136,7 +140,7 @@ public class GLDCostService {
|
|
|
if (StringUtil.isEmpty(fileName)) {
|
|
|
fileName = "contract.pdf";
|
|
|
}
|
|
|
- HttpClientUtil.sendGETWithHeader_OutputStream(url, header,request, response, fileName);
|
|
|
+ HttpClientUtil.sendGETWithHeader_OutputStream(url, header, request, response, fileName);
|
|
|
}
|
|
|
|
|
|
// public static void main(String[] args) {
|