|
@@ -3,6 +3,7 @@ package cn.cslg.report.service;
|
|
import cn.cslg.report.common.core.base.Constants;
|
|
import cn.cslg.report.common.core.base.Constants;
|
|
import cn.cslg.report.common.model.PASPatentVO;
|
|
import cn.cslg.report.common.model.PASPatentVO;
|
|
import cn.cslg.report.common.model.ProjectSourceVO;
|
|
import cn.cslg.report.common.model.ProjectSourceVO;
|
|
|
|
+import cn.cslg.report.common.model.dto.EventAddNewDTO;
|
|
import cn.cslg.report.common.model.dto.PasUserDTO;
|
|
import cn.cslg.report.common.model.dto.PasUserDTO;
|
|
import cn.cslg.report.common.model.vo.*;
|
|
import cn.cslg.report.common.model.vo.*;
|
|
import cn.cslg.report.common.utils.CacheUtils;
|
|
import cn.cslg.report.common.utils.CacheUtils;
|
|
@@ -192,6 +193,7 @@ public class OutInterfaceService {
|
|
.build();
|
|
.build();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @title 分页查询人员
|
|
* @title 分页查询人员
|
|
* @description 接口来源:PCS
|
|
* @description 接口来源:PCS
|
|
@@ -205,7 +207,7 @@ public class OutInterfaceService {
|
|
map.put("tenant", personnelVO.getTenant());
|
|
map.put("tenant", personnelVO.getTenant());
|
|
map.put("size", personnelVO.getSize());
|
|
map.put("size", personnelVO.getSize());
|
|
map.put("current", personnelVO.getCurrent());
|
|
map.put("current", personnelVO.getCurrent());
|
|
- map.put("notInPersonIds",personnelVO.getNotInPersonIds());
|
|
|
|
|
|
+ map.put("notInPersonIds", personnelVO.getNotInPersonIds());
|
|
JSONObject json = new JSONObject(map);
|
|
JSONObject json = new JSONObject(map);
|
|
RequestBody requestBody = RequestBody.create(JSON, String.valueOf(json));
|
|
RequestBody requestBody = RequestBody.create(JSON, String.valueOf(json));
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
@@ -226,7 +228,7 @@ public class OutInterfaceService {
|
|
|
|
|
|
String param = new Gson().toJson(ids);
|
|
String param = new Gson().toJson(ids);
|
|
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), param);
|
|
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), param);
|
|
- OkHttpClient okHttpClient =new OkHttpClient.Builder()
|
|
|
|
|
|
+ OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
|
.connectTimeout(60, TimeUnit.SECONDS)
|
|
.connectTimeout(60, TimeUnit.SECONDS)
|
|
.writeTimeout(60, TimeUnit.SECONDS)
|
|
.writeTimeout(60, TimeUnit.SECONDS)
|
|
.readTimeout(60, TimeUnit.SECONDS)
|
|
.readTimeout(60, TimeUnit.SECONDS)
|
|
@@ -321,6 +323,7 @@ public class OutInterfaceService {
|
|
|
|
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
}
|
|
}
|
|
|
|
+
|
|
public String getPatentNos(Integer projectId) throws IOException {
|
|
public String getPatentNos(Integer projectId) throws IOException {
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
Request request = new Request.Builder()
|
|
Request request = new Request.Builder()
|
|
@@ -355,7 +358,7 @@ public class OutInterfaceService {
|
|
Report report = reportService.getById(patentVO.getReportId());
|
|
Report report = reportService.getById(patentVO.getReportId());
|
|
if (type == 0) {
|
|
if (type == 0) {
|
|
patentVO.setProjectId(report.getProjectId());
|
|
patentVO.setProjectId(report.getProjectId());
|
|
- patentVO.setImportTaskId(taskIds);
|
|
|
|
|
|
+ patentVO.setImportTaskId(taskIds);
|
|
|
|
|
|
}
|
|
}
|
|
String param = new Gson().toJson(patentVO);
|
|
String param = new Gson().toJson(patentVO);
|
|
@@ -372,6 +375,27 @@ public class OutInterfaceService {
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 调用分析系统新增事件接口
|
|
|
|
+ *
|
|
|
|
+ * @param eventAddNewDTOs
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public String getEventIdsFromPAS(List<EventAddNewDTO> eventAddNewDTOs) throws IOException {
|
|
|
|
+ String param = new Gson().toJson(eventAddNewDTOs);
|
|
|
|
+ RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), param);
|
|
|
|
+ OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
|
|
|
+ .connectTimeout(60, TimeUnit.SECONDS)
|
|
|
|
+ .writeTimeout(60, TimeUnit.SECONDS)
|
|
|
|
+ .readTimeout(60, TimeUnit.SECONDS)
|
|
|
|
+ .build();
|
|
|
|
+ Request request = new Request.Builder()
|
|
|
|
+ .url(PASUrl + "/api/v2/event/addNew")
|
|
|
|
+ .post(requestBody)
|
|
|
|
+ .build();
|
|
|
|
+ return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
|
|
+ }
|
|
|
|
+
|
|
public String getConPantentNos(PatentVO patentVO, int type) throws IOException {
|
|
public String getConPantentNos(PatentVO patentVO, int type) throws IOException {
|
|
LambdaQueryWrapper<ImportTask> queryWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<ImportTask> queryWrapper = new LambdaQueryWrapper<>();
|
|
queryWrapper.eq(ImportTask::getReportId, patentVO.getReportId());
|
|
queryWrapper.eq(ImportTask::getReportId, patentVO.getReportId());
|
|
@@ -386,25 +410,25 @@ public class OutInterfaceService {
|
|
map.put("endNumber", patentVO.getEndNumber());
|
|
map.put("endNumber", patentVO.getEndNumber());
|
|
}
|
|
}
|
|
//专利名称
|
|
//专利名称
|
|
- map.put("patentName",patentVO.getPatentName());
|
|
|
|
|
|
+ map.put("patentName", patentVO.getPatentName());
|
|
//专利摘要
|
|
//专利摘要
|
|
- map.put("abstractStr",patentVO.getAbstractStr());
|
|
|
|
|
|
+ map.put("abstractStr", patentVO.getAbstractStr());
|
|
map.put("size", patentVO.getSize());
|
|
map.put("size", patentVO.getSize());
|
|
map.put("current", patentVO.getCurrent());
|
|
map.put("current", patentVO.getCurrent());
|
|
map.put("patentNos", patentVO.getPatentNos());
|
|
map.put("patentNos", patentVO.getPatentNos());
|
|
//申请人名字
|
|
//申请人名字
|
|
- map.put("applicationName",patentVO.getApplicationName());
|
|
|
|
|
|
+ map.put("applicationName", patentVO.getApplicationName());
|
|
//申请号
|
|
//申请号
|
|
- map.put("applicationNo",patentVO.getApplicationNo());
|
|
|
|
|
|
+ map.put("applicationNo", patentVO.getApplicationNo());
|
|
//专利号
|
|
//专利号
|
|
- map.put("patentNo",patentVO.getPatentNo());
|
|
|
|
|
|
+ map.put("patentNo", patentVO.getPatentNo());
|
|
//权利人名字
|
|
//权利人名字
|
|
- map.put("obligeeName" ,patentVO.getObligeeName());
|
|
|
|
|
|
+ map.put("obligeeName", patentVO.getObligeeName());
|
|
map.put("notInPatentNos", patentVO.getNotInPatentNos());
|
|
map.put("notInPatentNos", patentVO.getNotInPatentNos());
|
|
//分类号(IPC,UPC,CPC)
|
|
//分类号(IPC,UPC,CPC)
|
|
- map.put("numberCpc",patentVO.getNumberCpc());
|
|
|
|
- map.put("numberIpc",patentVO.getNumberIpc());
|
|
|
|
- map.put("numberUpc",patentVO.getNumberUpc());
|
|
|
|
|
|
+ map.put("numberCpc", patentVO.getNumberCpc());
|
|
|
|
+ map.put("numberIpc", patentVO.getNumberIpc());
|
|
|
|
+ map.put("numberUpc", patentVO.getNumberUpc());
|
|
JSONObject json = new JSONObject(map);
|
|
JSONObject json = new JSONObject(map);
|
|
RequestBody requestBody = RequestBody.create(JSON, String.valueOf(json));
|
|
RequestBody requestBody = RequestBody.create(JSON, String.valueOf(json));
|
|
OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
|
OkHttpClient okHttpClient = new OkHttpClient.Builder()
|
|
@@ -418,29 +442,32 @@ public class OutInterfaceService {
|
|
.build();
|
|
.build();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
}
|
|
}
|
|
|
|
+
|
|
//根据专利号列表获得专利详情
|
|
//根据专利号列表获得专利详情
|
|
- public String getPatentDTOListForRMS(PatentVO patentVO) throws IOException{
|
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
|
- map.put("patentNos", patentVO.getPatentNos());
|
|
|
|
- JSONObject json = new JSONObject(map);
|
|
|
|
- RequestBody requestBody = RequestBody.create(JSON, String.valueOf(json));
|
|
|
|
- OkHttpClient okHttpClient = new OkHttpClient
|
|
|
|
- .Builder()
|
|
|
|
- .connectTimeout(60, TimeUnit.SECONDS)
|
|
|
|
- .writeTimeout(60, TimeUnit.SECONDS)
|
|
|
|
- .readTimeout(60, TimeUnit.SECONDS)
|
|
|
|
- .build();;;
|
|
|
|
- Request request = new Request.Builder()
|
|
|
|
- .url(PASUrl + "/api/v2/system/getPatentDTOListForRMS")
|
|
|
|
- .post(requestBody)
|
|
|
|
- .build();
|
|
|
|
- return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+ public String getPatentDTOListForRMS(PatentVO patentVO) throws IOException {
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("patentNos", patentVO.getPatentNos());
|
|
|
|
+ JSONObject json = new JSONObject(map);
|
|
|
|
+ RequestBody requestBody = RequestBody.create(JSON, String.valueOf(json));
|
|
|
|
+ OkHttpClient okHttpClient = new OkHttpClient
|
|
|
|
+ .Builder()
|
|
|
|
+ .connectTimeout(60, TimeUnit.SECONDS)
|
|
|
|
+ .writeTimeout(60, TimeUnit.SECONDS)
|
|
|
|
+ .readTimeout(60, TimeUnit.SECONDS)
|
|
|
|
+ .build();
|
|
|
|
+ ;
|
|
|
|
+ ;
|
|
|
|
+ Request request = new Request.Builder()
|
|
|
|
+ .url(PASUrl + "/api/v2/system/getPatentDTOListForRMS")
|
|
|
|
+ .post(requestBody)
|
|
|
|
+ .build();
|
|
|
|
+ return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
public String getComPatentNos(PatentVO patentVO) throws IOException {
|
|
public String getComPatentNos(PatentVO patentVO) throws IOException {
|
|
- if(patentVO.getReportId()!=null) {
|
|
|
|
|
|
+ if (patentVO.getReportId() != null) {
|
|
LambdaQueryWrapper<ImportTask> queryWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<ImportTask> queryWrapper = new LambdaQueryWrapper<>();
|
|
queryWrapper.eq(ImportTask::getReportId, patentVO.getReportId());
|
|
queryWrapper.eq(ImportTask::getReportId, patentVO.getReportId());
|
|
Report report = reportService.getById(patentVO.getReportId());
|
|
Report report = reportService.getById(patentVO.getReportId());
|
|
@@ -471,7 +498,7 @@ public class OutInterfaceService {
|
|
.connectTimeout(300, TimeUnit.SECONDS)//设置连接超时时间
|
|
.connectTimeout(300, TimeUnit.SECONDS)//设置连接超时时间
|
|
.readTimeout(300, TimeUnit.SECONDS)//设置读取超时时间
|
|
.readTimeout(300, TimeUnit.SECONDS)//设置读取超时时间
|
|
.build();
|
|
.build();
|
|
- String param = new Gson().toJson(taskParams);
|
|
|
|
|
|
+ String param = new Gson().toJson(taskParams);
|
|
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), param);
|
|
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), param);
|
|
Request request = new Request.Builder()
|
|
Request request = new Request.Builder()
|
|
.url(PASUrl + "/api/v2/project/import/sysPatent")
|
|
.url(PASUrl + "/api/v2/project/import/sysPatent")
|
|
@@ -511,6 +538,7 @@ public class OutInterfaceService {
|
|
.build();
|
|
.build();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @title 获得分析系统自定义字段选项
|
|
* @title 获得分析系统自定义字段选项
|
|
* @description 获得分析系统自定义字段选项
|
|
* @description 获得分析系统自定义字段选项
|
|
@@ -519,7 +547,7 @@ public class OutInterfaceService {
|
|
public String getPatentQueryTree(Integer projectId) throws IOException {
|
|
public String getPatentQueryTree(Integer projectId) throws IOException {
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
Request request = new Request.Builder()
|
|
Request request = new Request.Builder()
|
|
- .url(PASUrl + "/api/v2/project/field/tree?projectId="+projectId)
|
|
|
|
|
|
+ .url(PASUrl + "/api/v2/project/field/tree?projectId=" + projectId)
|
|
.get()
|
|
.get()
|
|
.build();
|
|
.build();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
@@ -550,22 +578,23 @@ public class OutInterfaceService {
|
|
public String getPersonIdByNamePCS(String personName) throws IOException {
|
|
public String getPersonIdByNamePCS(String personName) throws IOException {
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
Request request = new Request.Builder()
|
|
Request request = new Request.Builder()
|
|
- .url(PCSUrl + "/permission/api/system/getPersonIdByName?personName="+personName)
|
|
|
|
|
|
+ .url(PCSUrl + "/permission/api/system/getPersonIdByName?personName=" + personName)
|
|
.get()
|
|
.get()
|
|
.build();
|
|
.build();
|
|
|
|
|
|
- return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
|
|
|
|
+ return Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
|
|
}
|
|
}
|
|
|
|
+
|
|
public List<Integer> getDutyDepartsFromPCS(Integer personId) throws IOException {
|
|
public List<Integer> getDutyDepartsFromPCS(Integer personId) throws IOException {
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
OkHttpClient okHttpClient = new OkHttpClient();
|
|
Request request = new Request.Builder()
|
|
Request request = new Request.Builder()
|
|
- .url(PCSUrl + "/permission/api/system/getDutyDeparts?personId="+personId)
|
|
|
|
|
|
+ .url(PCSUrl + "/permission/api/system/getDutyDeparts?personId=" + personId)
|
|
.get()
|
|
.get()
|
|
.build();
|
|
.build();
|
|
-String resBody =okHttpClient.newCall(request).execute().body().string();
|
|
|
|
|
|
+ String resBody = okHttpClient.newCall(request).execute().body().string();
|
|
|
|
|
|
- List<Integer> ids = JSONArray.parseArray(resBody,Integer.class);
|
|
|
|
- return ids;
|
|
|
|
|
|
+ List<Integer> ids = JSONArray.parseArray(resBody, Integer.class);
|
|
|
|
+ return ids;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|