|
@@ -1,6 +1,7 @@
|
|
|
package cn.cslg.pas.service;
|
|
|
|
|
|
import cn.cslg.pas.common.utils.Response;
|
|
|
+import cn.cslg.pas.common.utils.SecurityUtils.LoginUtils;
|
|
|
import cn.cslg.pas.domain.PatentField;
|
|
|
import cn.cslg.pas.domain.ProjectField;
|
|
|
import cn.cslg.pas.common.core.base.Constants;
|
|
@@ -36,7 +37,7 @@ public class PatentFieldService {
|
|
|
private final List<String> finalDefaultList = Arrays.asList("name", "ipcList", "applicationNo", "applicationDate", "applicant2", "applicant4");
|
|
|
private final List<String> finalDefaultQuery = Arrays.asList("13", "18-6", "19-6", "25-12");
|
|
|
private final List<String> finalProjectField = Arrays.asList("clientName", "scenarioid", "typeid", "technicalTheme");
|
|
|
-
|
|
|
+ private final LoginUtils loginUtils;
|
|
|
public List<PatentField> getUserFieldDataList(Integer projectId, String from) {
|
|
|
List<PatentField> patentFieldList = this.getList(from);
|
|
|
List<ProjectField> projectField = projectFieldService.getProjectFieldByProjectId(projectId);
|
|
@@ -55,11 +56,12 @@ public class PatentFieldService {
|
|
|
|
|
|
|
|
|
public List<PatentField> getUserSetting(SystemFieldVO params) {
|
|
|
+ Integer createId =loginUtils.getId();
|
|
|
if (params.getRefresh() != null && params.getRefresh()) {
|
|
|
- cacheUtils.deleteUserSystemFieldSetting(params.getProjectId(), params.getType(), params.getView(), 3);
|
|
|
+ cacheUtils.deleteUserSystemFieldSetting(params.getProjectId(), params.getType(), params.getView(), 3,createId);
|
|
|
}
|
|
|
List<PatentField> dataList = this.getUserFieldDataList(params.getProjectId(), params.getType());
|
|
|
- List<PatentField> userSetting = cacheUtils.getUserSystemFieldSetting(params.getProjectId(), params.getType(), params.getView(), 3);
|
|
|
+ List<PatentField> userSetting = cacheUtils.getUserSystemFieldSetting(params.getProjectId(), params.getType(), params.getView(), 3,createId);
|
|
|
if (userSetting == null || userSetting.size() == 0) {
|
|
|
List<PatentField> defaultList = new ArrayList<>();
|
|
|
List<PatentField> patentFieldList = this.getList(params.getType());
|
|
@@ -74,7 +76,7 @@ public class PatentFieldService {
|
|
|
defaultList = patentFieldList.stream().filter(item -> finalProjectField.contains(item.getKey())).collect(Collectors.toList());
|
|
|
break;
|
|
|
}
|
|
|
- cacheUtils.setUserSystemFieldSetting(params.getProjectId(), params.getType(), params.getView(), 3, defaultList);
|
|
|
+ cacheUtils.setUserSystemFieldSetting(params.getProjectId(), params.getType(), params.getView(), 3, defaultList,createId);
|
|
|
userSetting = defaultList;
|
|
|
}
|
|
|
List<PatentField> finalUserSetting = userSetting;
|
|
@@ -92,7 +94,8 @@ public class PatentFieldService {
|
|
|
patentFieldList.get(i).setHidden(null);
|
|
|
patentFieldList.get(i).setOrder(i);
|
|
|
}
|
|
|
- cacheUtils.setUserSystemFieldSetting(params.getProjectId(), params.getType(), params.getView(), 3, patentFieldList);
|
|
|
+ Integer createId =loginUtils.getId();
|
|
|
+ cacheUtils.setUserSystemFieldSetting(params.getProjectId(), params.getType(), params.getView(), 3, patentFieldList,createId);
|
|
|
params.setRefresh(false);
|
|
|
return this.getUserSetting(params);
|
|
|
}
|