|
@@ -83,14 +83,7 @@ public class PatentStarApiService {
|
|
private WebVOTransformService webVOTransformService;
|
|
private WebVOTransformService webVOTransformService;
|
|
|
|
|
|
public Records patentStarSearchLocal(PatentStarListDTO patentStarListDTO) throws IOException {
|
|
public Records patentStarSearchLocal(PatentStarListDTO patentStarListDTO) throws IOException {
|
|
- RetrieveRecord retrieveRecord = new RetrieveRecord();
|
|
|
|
- retrieveRecord.setConditions(patentStarListDTO.getCurrentQuery());
|
|
|
|
-
|
|
|
|
- if (patentStarListDTO.getRetrieveRecordId() != null) {
|
|
|
|
- retrieveRecord = retrieveRecordService.getById(patentStarListDTO.getRetrieveRecordId());
|
|
|
|
- patentStarListDTO.setCurrentQuery(retrieveRecord.getConditions());
|
|
|
|
- patentStarListDTO.setDBType(retrieveRecord.getDbType());
|
|
|
|
- }
|
|
|
|
|
|
+ RetrieveRecord retrieveRecord =retrieveRecordService.setRetrieveRecord(patentStarListDTO);
|
|
long start = System.currentTimeMillis();
|
|
long start = System.currentTimeMillis();
|
|
Map<String, Object> map = this.patentStarSearchApi(patentStarListDTO);
|
|
Map<String, Object> map = this.patentStarSearchApi(patentStarListDTO);
|
|
long end = System.currentTimeMillis();
|
|
long end = System.currentTimeMillis();
|
|
@@ -98,18 +91,8 @@ public class PatentStarApiService {
|
|
if (map == null) {
|
|
if (map == null) {
|
|
ThrowException.throwXiaoShiException("检索失败,请检查检索式");
|
|
ThrowException.throwXiaoShiException("检索失败,请检查检索式");
|
|
}
|
|
}
|
|
-
|
|
|
|
- //记录检索历史
|
|
|
|
- retrieveRecord.setRetrieveTime(new Date());
|
|
|
|
retrieveRecord.setTotalNum(Integer.parseInt(map.get("total").toString()));
|
|
retrieveRecord.setTotalNum(Integer.parseInt(map.get("total").toString()));
|
|
- retrieveRecord.setDbType(patentStarListDTO.getDBType());
|
|
|
|
-
|
|
|
|
if (patentStarListDTO.getRetrieveRecordId() == null) {
|
|
if (patentStarListDTO.getRetrieveRecordId() == null) {
|
|
- //获取创建人信息
|
|
|
|
- PersonnelVO personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
|
- retrieveRecord.setCreateTime(new Date());
|
|
|
|
- retrieveRecord.setCreateId(personnelVO.getId());
|
|
|
|
- retrieveRecord.setTenantId(personnelVO.getTenantId());
|
|
|
|
retrieveRecord.insert();
|
|
retrieveRecord.insert();
|
|
} else {
|
|
} else {
|
|
retrieveRecord.updateById();
|
|
retrieveRecord.updateById();
|