KMS代码提交
This commit is contained in:
parent
9237bbf35b
commit
5ab902d47c
Binary file not shown.
@ -41,16 +41,10 @@ public class KnwlSearchController {
|
||||
|
||||
/* 知识检索-属性-检索数据库 */
|
||||
@Mapping("com.actionsoft.apps.kms_knwl_attr_search_dosearch")
|
||||
public String attrSearchCard(UserContext uc, int curPage, int rowsPerPage, String sortIndx, String sortDir, String searchDimensionIds, String schemaMetaData, String cardName, String publishTime, String publishUser,String publishDep, String tags, String lastPublishId, String searchType,String departId) {
|
||||
public String attrSearchCard(UserContext uc, int curPage, int rowsPerPage, String sortIndx, String sortDir, String searchDimensionIds, String schemaMetaData, String cardName, String publishUser, String publishTime, String tags, String lastPublishId, String searchType,String departId) {
|
||||
KnwlSearchWeb knwlSearchWeb = new KnwlSearchWeb(uc);
|
||||
return knwlSearchWeb.attrSearchCard(curPage, rowsPerPage, sortIndx, sortDir, searchDimensionIds, schemaMetaData, cardName, publishTime,publishDep, publishUser, tags, lastPublishId, searchType,departId);
|
||||
}
|
||||
|
||||
/* 全文检索 */
|
||||
@Mapping("com.actionsoft.apps.kms_knwl_fullsearch_list_json")
|
||||
public String fullSearch(UserContext uc, int curPage, int rowsPerPage, String searchText, String docTypes, String searchType) {
|
||||
KnwlSearchWeb knwlSearchWeb = new KnwlSearchWeb(uc);
|
||||
return knwlSearchWeb.fullSearch(curPage, rowsPerPage, searchText, docTypes, searchType);
|
||||
System.out.println("departId>>>>>>>>>>>"+departId);
|
||||
return knwlSearchWeb.attrSearchCard(curPage, rowsPerPage, sortIndx, sortDir, searchDimensionIds, schemaMetaData, cardName, publishTime, publishUser, tags, lastPublishId, searchType,departId);
|
||||
}
|
||||
|
||||
/* 全文检索 */
|
||||
@ -60,6 +54,20 @@ public class KnwlSearchController {
|
||||
return knwlSearchWeb.getDeptmentList(curPage, rowsPerPage, searchText, docTypes, searchType);
|
||||
}
|
||||
|
||||
/* 全文检索 */
|
||||
@Mapping("com.actionsoft.apps.kms_knwl_search_getuser_list_json")
|
||||
public String getUserList(UserContext uc, int curPage, int rowsPerPage, String searchText, String docTypes, String searchType) {
|
||||
KnwlSearchWeb knwlSearchWeb = new KnwlSearchWeb(uc);
|
||||
return knwlSearchWeb.getUserList(curPage, rowsPerPage, searchText, docTypes, searchType);
|
||||
}
|
||||
|
||||
|
||||
/* 全文检索 */
|
||||
@Mapping("com.actionsoft.apps.kms_knwl_fullsearch_list_json")
|
||||
public String fullSearch(UserContext uc, int curPage, int rowsPerPage, String searchText, String docTypes, String searchType) {
|
||||
KnwlSearchWeb knwlSearchWeb = new KnwlSearchWeb(uc);
|
||||
return knwlSearchWeb.fullSearch(curPage, rowsPerPage, searchText, docTypes, searchType);
|
||||
}
|
||||
|
||||
// 键盘地址本查询团队成员模糊匹配
|
||||
@Mapping("com.actionsoft.apps.kms_knwl_memberlist")
|
||||
@ -69,8 +77,6 @@ public class KnwlSearchController {
|
||||
return knwlSearchWeb.getUserList(term);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 全文检索查询
|
||||
*
|
||||
|
||||
@ -281,7 +281,7 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
* @return JSON
|
||||
* @author wangshibao
|
||||
*/
|
||||
public String attrSearchCard(int curPage, int rowsPerPage, String sortIndx, String sortDir, String searchDimensionIds, String schemaMetaData, String cardName, String publishTime, String publishDep,String publishUser, String tags, String lastPublishId, String searchType,String departId) {
|
||||
public String attrSearchCard(int curPage, int rowsPerPage, String sortIndx, String sortDir, String searchDimensionIds, String schemaMetaData, String cardName, String publishTime, String publishUser, String tags, String lastPublishId, String searchType,String departId) {
|
||||
ResponseObject responseObject = ResponseObject.newOkResponse();
|
||||
boolean isKnwlMgr = KMSUtil.isKnwlManager(this.getContext().getUID());
|
||||
try {
|
||||
@ -294,9 +294,6 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
List<String> tagList = JSONArray.parseArray(URLDecoder.decode(tags, StandardCharsets.UTF_8.name()), String.class);
|
||||
cardName = URLDecoder.decode(cardName, StandardCharsets.UTF_8.name());
|
||||
List<String> publishUsers = UtilString.isEmpty(publishUser) ? new ArrayList<String>() : Arrays.asList(publishUser.split(","));
|
||||
|
||||
List<String> publishDeps = UtilString.isEmpty(publishDep) ? new ArrayList<String>() : Arrays.asList(publishDep.split(","));
|
||||
|
||||
JSONObject publishTimeJO = JSONObject.parseObject(publishTime);
|
||||
String publishStartTimeStr = "";
|
||||
String publishEndTimeStr = "";
|
||||
@ -359,6 +356,7 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
String id = DBSql.getString("select ID from app_act_coe_pal_repository where EXT4 = '" + publishModel.getCardModel().getId() + "'");
|
||||
String departName = "";
|
||||
try {
|
||||
System.out.println("查询到的uuid是什么>>>>>>>>>>>>>"+id);
|
||||
Map<String, JSONObject> queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(id);
|
||||
if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) {
|
||||
// 发布部门
|
||||
@ -369,6 +367,7 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
for (Object PUBDEPTO : PUBDEPTJA) {
|
||||
JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO));
|
||||
String dempId = PUBDEPTJO.getString("id");
|
||||
System.out.println("发布部门中的部门id是什么>>>>>"+dempId);
|
||||
DepartmentModel departmentById = SDK.getORGAPI().getDepartmentById(dempId);
|
||||
departName+=departmentById.getName()+",";
|
||||
}
|
||||
@ -378,6 +377,7 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("部门名称>>>>>>>>"+departName);
|
||||
if (UtilString.isNotEmpty(departName)){
|
||||
departName = departName.substring(0,departName.length()-1);
|
||||
}
|
||||
@ -565,6 +565,52 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
return responseObject.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取发布部门数据
|
||||
* @param curPage
|
||||
* @param rowsPerPage
|
||||
* @param searchText
|
||||
* @param docTypes
|
||||
* @param searchType
|
||||
* @return
|
||||
*/
|
||||
public String getDeptmentList(int curPage, int rowsPerPage, String searchText, String docTypes, String searchType) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
JSONArray data = new JSONArray();
|
||||
List<RowMap> depmaps = DBSql.getMaps("select ID,DEPARTMENTNAME FROM ORGDEPARTMENT WHERE CLOSED='0'");
|
||||
for(int i=0;i<depmaps.size();i++){
|
||||
JSONObject o = new JSONObject();
|
||||
o.put("value", depmaps.get(i).getString("ID"));
|
||||
o.put("text", depmaps.get(i).getString("DEPARTMENTNAME"));
|
||||
data.add(o);
|
||||
}
|
||||
ro.put("data", data);
|
||||
return ro.toString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String getUserList(int curPage, int rowsPerPage, String searchText, String docTypes, String searchType) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
JSONArray data = new JSONArray();
|
||||
List<RowMap> depmaps = DBSql.getMaps("select USERID,USERNAME FROM ORGUSER WHERE CLOSED='0'");
|
||||
for(int i=0;i<depmaps.size();i++){
|
||||
JSONObject o = new JSONObject();
|
||||
o.put("value", depmaps.get(i).getString("USERID"));
|
||||
o.put("text", depmaps.get(i).getString("USERNAME"));
|
||||
data.add(o);
|
||||
}
|
||||
ro.put("data", data);
|
||||
return ro.toString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 全文检索
|
||||
*
|
||||
@ -592,38 +638,6 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
return responseObject.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取发布部门数据
|
||||
* @param curPage
|
||||
* @param rowsPerPage
|
||||
* @param searchText
|
||||
* @param docTypes
|
||||
* @param searchType
|
||||
* @return
|
||||
*/
|
||||
public String getDeptmentList(int curPage, int rowsPerPage, String searchText, String docTypes, String searchType) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
JSONArray data = new JSONArray();
|
||||
List<RowMap> depmaps = DBSql.getMaps("select ID,DEPARTMENTNAME FROM ORGDEPARTMENT WHERE CLOSED='0'");
|
||||
for(int i=0;i<depmaps.size();i++){
|
||||
JSONObject o = new JSONObject();
|
||||
o.put("value", depmaps.get(i).getString("ID"));
|
||||
o.put("text", depmaps.get(i).getString("DEPARTMENTNAME"));
|
||||
data.add(o);
|
||||
}
|
||||
ro.put("data", data);
|
||||
return ro.toString();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 返回aws平台的所有人员列表
|
||||
*
|
||||
@ -722,7 +736,7 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
JSONArray array=new JSONArray();
|
||||
for (int i = 0; i < Integer.MAX_VALUE; i++) {
|
||||
String lastPublishId="";
|
||||
JSONObject obj1 = (JSONObject) JSONObject.parse(attrSearchCard(curPage, rowsPerPage, "publishTime", "","down", "[]", "{\"01\":[],\"2\":[]}", "", "", "", "[]", lastPublishId, "",""));
|
||||
JSONObject obj1 = (JSONObject) JSONObject.parse(attrSearchCard(curPage, rowsPerPage, "publishTime", "down", "[]", "{\"01\":[],\"2\":[]}", "", "", "", "[]", lastPublishId, "",""));
|
||||
JSONObject dataobj1=(JSONObject)obj1.get("data");
|
||||
JSONArray results=(JSONArray)dataobj1.get("data");
|
||||
array.addAll(results);
|
||||
@ -941,7 +955,7 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
}
|
||||
JSONArray data = new JSONArray();
|
||||
if (hasPerm) {
|
||||
String result = attrSearchCard(1, 1000, sortIndx, "down", "['" + rootDirectoryId + "']", "{01:[],2:[]}", "", "", "", "[]", "", "","","");
|
||||
String result = attrSearchCard(1, 1000, sortIndx, "down", "['" + rootDirectoryId + "']", "{01:[],2:[]}", "", "", "", "[]", "", "","");
|
||||
JSONObject rs = JSONObject.parseObject(result);
|
||||
data = rs.getJSONObject("data").getJSONArray("data");
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
@ -989,7 +1003,7 @@ public class KnwlSearchWeb extends ActionWeb {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
JSONArray data = new JSONArray();
|
||||
if ("true".equals(hasPerm)) {
|
||||
String result = attrSearchCard(1, 1000, sortIndx, "down", "['" + directoryId + "']", "{01:[],2:[]}", "", "", "", "[]", "", "","","");
|
||||
String result = attrSearchCard(1, 1000, sortIndx, "down", "['" + directoryId + "']", "{01:[],2:[]}", "", "", "", "[]", "", "","");
|
||||
JSONObject rs = JSONObject.parseObject(result);
|
||||
data = rs.getJSONObject("data").getJSONArray("data");
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user