部门试图代码优化

This commit is contained in:
yujh 2025-02-21 18:19:59 +08:00
parent 708c6fbdba
commit 031b2ac6bf
3 changed files with 270 additions and 65 deletions

View File

@ -15,7 +15,7 @@
<div id="app"> <div id="app">
<div id="floatingChatIcon" @click="openGptHome" > <div id="floatingChatIcon" @click="openGptHome" >
<img src="../apps/com.awspaas.user.apps.gpt_interface/img/robot-icon.png" style="border-radius: 5px;" > <img src="../apps/com.awspaas.user.apps.gpt_interface/img/robot-icon.png" style="border-radius: 5px;" >
<span style="margin-top: 6px;font-size: 12px;">AI文件搜索</span> <span style="margin-top: 6px;font-size: 12px;">AI文件搜索</span>
<el-dialog <el-dialog
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="70%" width="70%"
@ -26,7 +26,7 @@
<i class="button-icon" @click="openInFullScreen"></i> <i class="button-icon" @click="openInFullScreen"></i>
</span> </span>
<iframe :src="newPageUrl" frameborder="0" style="width: 100%; height: 100%;"></iframe> <iframe :src="newPageUrl" frameborder="0" style="width: 100%; height: 100%;"></iframe>
</el-dialog> </el-dialog>
</div> </div>
<div id="main"> <div id="main">
@ -137,7 +137,7 @@
<img src="../apps/com.awspaas.user.apps.yili.integration/static/icon4.png" v-if="node.data.fileType == 'guideFile'" style="vertical-align: middle; width: 15px;height: 15px;border-radius:100%" /> <img src="../apps/com.awspaas.user.apps.yili.integration/static/icon4.png" v-if="node.data.fileType == 'guideFile'" style="vertical-align: middle; width: 15px;height: 15px;border-radius:100%" />
<img src="../apps/com.awspaas.user.apps.yili.integration/static/icon3.png" v-if="node.data.fileType == 'formFile'" style="vertical-align: middle; width: 15px;height: 15px;border-radius:100%" /> <img src="../apps/com.awspaas.user.apps.yili.integration/static/icon3.png" v-if="node.data.fileType == 'formFile'" style="vertical-align: middle; width: 15px;height: 15px;border-radius:100%" />
{{node.data.name}} {{node.data.name}}
<!--<em style="font-style:normal;margin-left: 100px;float: right;">发布时间:{{node.data.time}}</em><em style="font-style:normal;margin-left: 100px;float: right;">编制人:{{node.data.people}}</em>--> <!--<em style="font-style:normal;margin-left: 100px;float: right;">发布时间:{{node.data.time}}</em><em style="font-style:normal;margin-left: 100px;float: right;">编制人:{{node.data.people}}</em>-->
</a> </a>
</span> </span>
<span v-else> <span v-else>
@ -176,8 +176,8 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<div style="text-align: center;position: absolute;width: 78%;top: 19%;z-index: 1200;background: #ffffff;height: 500px;line-height: 300px;" v-if="loading==true">数据加载中...</div> <div style="text-align: center;position: absolute;width: 78%;top: 19%;z-index: 1200;background: #ffffff;height: 500px;line-height: 300px;" v-if="loading==true">数据加载中...</div>
</div> </div>
<div id="rightDiv" ref="rightHeight"> <div id="rightDiv" ref="rightHeight">
<div id="rightBottom"> <div id="rightBottom">
<div id="infoCart"> <div id="infoCart">
@ -257,7 +257,9 @@
checkedInfo:false, checkedInfo:false,
checked1:false,//选中状态 checked1:false,//选中状态
concatenatedNamesTooltip:'暂无发布部门', concatenatedNamesTooltip:'暂无发布部门',
doesItExist:false doesItExist:false,
// 防抖计时器
debounceTimer: null
}; };
}, },
mounted(){ mounted(){
@ -334,13 +336,7 @@
}, },
watch: { watch: {
filtertreeText(val){ filtertreeText(val){
if(this.checkedInfo==true){ this.search();
this.fitlerNoFrameOptions = this.noFrameOptions.filter(option => {
return option.name.toLowerCase().includes(val.toLowerCase());
});
}else{
this.$refs.treeNode.filter(val);
}
}, },
filterText(val) { filterText(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
@ -349,29 +345,29 @@
methods: { methods: {
// 全部选中 // 全部选中
chooseAll() { chooseAll() {
this.roleList = ""; this.roleList = "";
// 判断按钮的状态 // 判断按钮的状态
if (this.checked1) { if (this.checked1) {
this.loading=true; this.loading=true;
// 设置 // 设置
this.$refs.tree.setCheckedNodes(this.list); this.$refs.tree.setCheckedNodes(this.list);
} else { } else {
this.$refs.tree.setCheckedNodes([]); this.$refs.tree.setCheckedNodes([]);
} }
this.treelist = this.$refs.tree.getCheckedKeys(); this.treeListNodes = this.$refs.tree.getCheckedNodes();
this.treeListNodes = this.$refs.tree.getCheckedNodes(); this.treelist = this.$refs.tree.getCheckedKeys();
this.selectdept = JSON.stringify(this.treelist) this.selectdept = JSON.stringify(this.treelist)
this.options = [] this.options = []
if (this.treelist.length == 0) { if (this.treelist.length == 0) {
this.selectdept = [] this.selectdept = []
} }
this.leftTreedatabind() this.leftTreedatabind()
}, },
//增加键盘回车事件 //增加键盘回车事件
search(){ search(){
// 控制一下,如果用户没输入东西就不去搜索 // 控制一下,如果用户没输入东西就不去搜索
if(this.filtertreeText == ""){ /*if(this.filtertreeText == ""){
return return
}else{ }else{
if(this.checkedInfo==true){ if(this.checkedInfo==true){
@ -381,7 +377,19 @@
}else{ }else{
this.$refs.treeNode.filter(this.filtertreeText); this.$refs.treeNode.filter(this.filtertreeText);
} }
}*/
// 清除之前的计时器
if (this.debounceTimer) {
clearTimeout(this.debounceTimer);
} }
// 设置新的计时器
this.debounceTimer = setTimeout(() => {
// 调用查询接口的方法
this.loading=true;
this.options = []
this.leftTreedatabind()
}, 500); // 500 毫秒的延迟,可以根据实际需求调整
}, },
navtab(e){ navtab(e){
this.tab = e; this.tab = e;
@ -443,7 +451,8 @@
this.options = [] this.options = []
let params = { let params = {
dept: _this.selectdept, dept: _this.selectdept,
fileType: _this.filetype fileType: _this.filetype,
filtertreeText: _this.filtertreeText
} }
$.ajax({ $.ajax({
url: api.leftTreeurl, url: api.leftTreeurl,
@ -475,7 +484,7 @@
_this.formFileNum = 0 _this.formFileNum = 0
} }
//最后搜索一下 //最后搜索一下
this.search(); //this.search();
}); });
}, },
@ -485,7 +494,8 @@
this.options = [] this.options = []
let params = { let params = {
dept: _this.selectdept, dept: _this.selectdept,
fileType: _this.filetype fileType: _this.filetype,
filtertreeText: _this.filtertreeText
} }
$.ajax({ $.ajax({
url: api.leftTreeurl, url: api.leftTreeurl,
@ -510,7 +520,7 @@
_this.defaultkey.push(element.ID) _this.defaultkey.push(element.ID)
}); });
//最后搜索一下 //最后搜索一下
this.search(); //this.search();
} }
}); });
}, },
@ -531,7 +541,7 @@
} }
}, },
selcetchangetype(e) { selcetchangetype(e) {
this.loading=true; this.loading=true;
this.filetype = this.selectvalue this.filetype = this.selectvalue
this.options = [] this.options = []
this.leftTreedatabind() this.leftTreedatabind()
@ -564,7 +574,7 @@
nodeArry.push(nodeObj.data) nodeArry.push(nodeObj.data)
this.$refs.tree.setCheckedNodes(nodeArry); this.$refs.tree.setCheckedNodes(nodeArry);
this.treeListNodes = this.$refs.tree.getCheckedNodes(); this.treeListNodes = this.$refs.tree.getCheckedNodes();
this.selectdept = []; //this.selectdept = [];
this.processFileNum = '';//流程数量 this.processFileNum = '';//流程数量
this.policyFileNum = '';//制度数量 this.policyFileNum = '';//制度数量
if(this.checkedInfo==true){ if(this.checkedInfo==true){
@ -590,16 +600,17 @@
setDefault(){ setDefault(){
this.treelist.push(this.departmentId); this.treelist.push(this.departmentId);
this.idjson.push(this.departmentId); this.idjson.push(this.departmentId);
this.selectdept = JSON.stringify(this.treelist)
}, },
openGptHome() { openGptHome() {
//let url = "https://chatgpt-uat.dcin-test.digitalyili.com/welcome?from=libchat&lib=ef2b50fd79c52577d51222bc58b231d7&priv=1&sid=" + sid ; //let url = "https://chatgpt-uat.dcin-test.digitalyili.com/welcome?from=libchat&lib=ef2b50fd79c52577d51222bc58b231d7&priv=1&sid=" + sid ;
//this.fullscreen = window.innerWidth <= 768; // 小屏幕时全屏显示 //this.fullscreen = window.innerWidth <= 768; // 小屏幕时全屏显示
//https://yiligpt.x.digitalyili.com/libchat?lib=b8e082947190f2aa4fca0d96a5a95ea5&priv=1&sid= //https://yiligpt.x.digitalyili.com/libchat?lib=b8e082947190f2aa4fca0d96a5a95ea5&priv=1&sid=
//this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https://yiligpt.x.digitalyili.com/libchat?lib=b8e082947190f2aa4fca0d96a5a95ea5&priv=1&sid=" + sid; //this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https://yiligpt.x.digitalyili.com/libchat?lib=b8e082947190f2aa4fca0d96a5a95ea5&priv=1&sid=" + sid;
var sids=encodeURIComponent(sid); var sids=encodeURIComponent(sid);
//this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https%3A%2F%2Fyiligpt.x.digitalyili.com%2Flibchat%3Flib%3Db8e082947190f2aa4fca0d96a5a95ea5%26priv%3D1%26sid%3D"+ sids; //this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https%3A%2F%2Fyiligpt.x.digitalyili.com%2Flibchat%3Flib%3Db8e082947190f2aa4fca0d96a5a95ea5%26priv%3D1%26sid%3D"+ sids;
this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https://yiligpt.x.digitalyili.com/libchat%25253Flib=b8e082947190f2aa4fca0d96a5a95ea5%252526priv=1%252526sid="+ sids; this.newPageUrl = "https://iam.digitalyili.com/proxy/sso?target=https://yiligpt.x.digitalyili.com/libchat%25253Flib=b8e082947190f2aa4fca0d96a5a95ea5%252526priv=1%252526sid="+ sids;
document.cookie = "AWSSESSIONID="+sid; document.cookie = "AWSSESSIONID="+sid;
this.param1=sid; this.param1=sid;
this.dialogVisible = true; this.dialogVisible = true;
@ -611,7 +622,7 @@
this.dialogVisible = false; this.dialogVisible = false;
window.open("https://iam.digitalyili.com/proxy/sso?target=https%3A%2F%2Fyiligpt.x.digitalyili.com%2Fauth-center%253Fplatform%253Doa%2526lib%253Db8e082947190f2aa4fca0d96a5a95ea5%2526priv%253D1", "_blank"); window.open("https://iam.digitalyili.com/proxy/sso?target=https%3A%2F%2Fyiligpt.x.digitalyili.com%2Fauth-center%253Fplatform%253Doa%2526lib%253Db8e082947190f2aa4fca0d96a5a95ea5%2526priv%253D1", "_blank");
} }
}, },
}); });
</script> </script>
@ -702,7 +713,7 @@
.el-input--prefix .el-input__inner{padding-left: 45px; height: 35px;line-height: 35px; width: 90%;} .el-input--prefix .el-input__inner{padding-left: 45px; height: 35px;line-height: 35px; width: 90%;}
.el-input__icon{line-height: 35px;} .el-input__icon{line-height: 35px;}
.el-input--suffix .el-input__inner{ height: 35px;line-height: 35px; width: 100%;} .el-input--suffix .el-input__inner{ height: 35px;line-height: 35px; width: 100%;}
#postSearchCart .el-input{width: 81%!important;} #postSearchCart .el-input{width: 81%!important;}
.el-input__suffix{right: 25px;} .el-input__suffix{right: 25px;}
/* 左侧手风琴样式 */ /* 左侧手风琴样式 */
.el-tree-node__content{ background-color: #f1f5fa!important;padding: 6px 10px!important;} .el-tree-node__content{ background-color: #f1f5fa!important;padding: 6px 10px!important;}

View File

@ -67,10 +67,17 @@ public class DataViewController {
} }
return queryTermsDeptVal; return queryTermsDeptVal;
} }
@Mapping(value = "com.awspaas.user.apps.yili.reportform.service.DataViewService_deptView", @Mapping(value = "com.awspaas.user.apps.yili.reportform.service.DataViewService_deptView",
desc = "部门视图") desc = "部门视图")
public String deptView(UserContext uc, RequestParams params) { public String deptView(UserContext uc, RequestParams params) {
String deptViewVal = deptViewVal = new DataViewService(uc).deptView(uc, params); //这里先做一个参数用于新旧切换
return deptViewVal; String deptViewVersion = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.reportform", "deptViewVersion");
System.out.println(">>>deptViewVersion = " + deptViewVersion);
if("2.0".equals(deptViewVersion)){
return new DataViewService(uc).getDeptViewInfo(uc, params);
}else{
return new DataViewService(uc).deptView(uc, params);
}
} }
} }

View File

@ -24,19 +24,15 @@ import com.alibaba.fastjson.JSONObject;
import com.awspaas.user.apps.yili.reportform.util.GetNodesUtil; import com.awspaas.user.apps.yili.reportform.util.GetNodesUtil;
import com.awspaas.user.apps.yili.reportform.util.TaskUtil; import com.awspaas.user.apps.yili.reportform.util.TaskUtil;
import com.awspaas.user.apps.yili.reportform.util.TreeUtil; import com.awspaas.user.apps.yili.reportform.util.TreeUtil;
import java.util.ArrayList;
import java.util.Comparator; import java.sql.Connection;
import java.util.HashMap; import java.util.*;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.TreeSet;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import javax.lang.model.SourceVersion;
import static java.util.stream.Collectors.collectingAndThen; import static java.util.stream.Collectors.collectingAndThen;
import static java.util.stream.Collectors.toCollection; import static java.util.stream.Collectors.toCollection;
@ -1672,11 +1668,7 @@ public class DataViewService
fileTypes.add(fileType); fileTypes.add(fileType);
fileType = new HashMap<>(); fileType = new HashMap<>();
fileType.put("termsKey", "policyFile"); fileType.put("termsKey", "policyFile");
fileType.put("termsVal", "制度"); fileType.put("termsVal", "制度/操作指导");
fileTypes.add(fileType);
fileType = new HashMap<>();
fileType.put("termsKey", "guideFile");
fileType.put("termsVal", "操作指导");
fileTypes.add(fileType); fileTypes.add(fileType);
fileType = new HashMap<>(); fileType = new HashMap<>();
fileType.put("termsKey", "formFile"); fileType.put("termsKey", "formFile");
@ -1700,13 +1692,77 @@ public class DataViewService
} }
/**
* 根据查询条件获取部门视图数据
* @param uc 用户上下文
* @param params 参数列表
* @return
*/
public String getDeptViewInfo(UserContext uc, RequestParams params) {
ResponseObject ro = ResponseObject.newOkResponse();
List<String> frameIDs = new ArrayList<>();//树的架构文件集合
LinkedHashMap<String, Integer> filesCount = new LinkedHashMap<>();//各文件数量集合
filesCount.put("processFileNum", 0);
filesCount.put("policyFileNum", 0);
filesCount.put("guideFileNum", 0);
filesCount.put("formFileNum", 0);
filesCount.put("processschemeFileNum", 0);
filesCount.put("engineeringtandardFileNum", 0);
List<Map> fileMaps = new ArrayList<>();
String deptString = params.get("dept"); //前端部门过滤字段
String fileType = params.get("fileType");//前端文件类型过滤字段
String filterTreeText = params.get("filtertreeText");//前端文件名称过滤字段
System.out.println(">>>deptString = " + deptString);
System.out.println(">>>fileType = " + fileType);
System.out.println(">>>filterTreeText = " + filterTreeText);
//默认的过滤文件类型
Set<String> validMethodIds = new HashSet<>(Arrays.asList(
"process.epc",
"control.policy",
"process.flowchart",
"engineering.standard",
"process.scheme"
));
//先获取流程资产库全部文件
String wsId = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.reportform", "wsId");
Iterator<PALRepositoryModel> allPALRepositoryList = PALRepositoryCache.getByWsId(wsId);
//遍历全部文件把符合条件的集合加入fileMaps中
while (allPALRepositoryList.hasNext()) {
Map fileMap = new HashMap<String,String>();//model组装的fileMap数据
PALRepositoryModel model = allPALRepositoryList.next();
String methodId = model.getMethodId();//文件类型
String policyType = model.getExt3();//策略类型
// 过滤无效文件
if (!isValidFile(model, filterTreeText, deptString, fileType, validMethodIds)) {
continue;
}
//1. 获取树的架构信息
String plParentId = model.getParentId();
PALRepositoryModel reFileModel = PALRepositoryCache.getCache().get(plParentId);
if (null != reFileModel) {
String PLMETHODID = reFileModel.getMethodId();
if (PLMETHODID.equals("process.framework")) {
frameIDs.add(plParentId);
}
String rePPLPARENTID = reFileModel.getParentId();
frameIDs.add(rePPLPARENTID);
}
//把model信息组装成最终想要的信息
model2FileMap(uc,model,fileMap);
//最后统计文件数量
addFileTypeNum(methodId,policyType,filesCount,fileMap);
fileMaps.add(fileMap);
}
//把架构信息增加的fileMaps里
addFrameInfoToFileMaps(fileMaps,frameIDs);
//组装成树
List<Map> fileTreeNodes = TreeUtil.buildTreeFileFirst("0", fileMaps, "process", "frame", null, null);
//组装返回信息 开始
ro.put("filesCount", filesCount);
ro.put("fileMaps", fileTreeNodes);
//组装返回信息 结束
return ro.toString();
}
public String deptView(UserContext uc, RequestParams params) { public String deptView(UserContext uc, RequestParams params) {
ResponseObject ro = ResponseObject.newOkResponse(); ResponseObject ro = ResponseObject.newOkResponse();
@ -2034,7 +2090,6 @@ public class DataViewService
path = "./w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid=" + fileRowMap.getString("FILEID") + "&" + "sid=" + sid + "&" + "taskId=" + taskId; path = "./w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid=" + fileRowMap.getString("FILEID") + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
nodeType = "file"; nodeType = "file";
fileMap.put("ID", fileRowMap.getString("FILEID")); fileMap.put("ID", fileRowMap.getString("FILEID"));
fileMap.put("PARENTID", fileRowMap.getString("PLPARENTID")); fileMap.put("PARENTID", fileRowMap.getString("PLPARENTID"));
@ -2442,4 +2497,136 @@ public class DataViewService
} }
return taskId; return taskId;
} }
/**
* 计算指定文件类型数量
* @param methodId
*/
public void addFileTypeNum(String methodId,String policyType,LinkedHashMap<String, Integer> filesCount,Map fileMap){
if (methodId.equals("process.epc") || methodId.equals("process.flowchart")) {
fileMap.put("fileType", "processFile");
filesCount.put("processFileNum", filesCount.get("processFileNum") +1);
} else if (methodId.equals("control.policy") && (UtilString.isEmpty(policyType) || policyType.equals("regulation"))) {
fileMap.put("fileType", "policyFile");
filesCount.put("policyFileNum", filesCount.get("policyFileNum") +1);
} else if (methodId.equals("control.policy") && policyType.equals("I/O_L4")) {
fileMap.put("fileType", "guideFile");
filesCount.put("guideFileNum", filesCount.get("guideFileNum") +1);
} else if (methodId.equals("data.form")) {
fileMap.put("fileType", "formFile");
filesCount.put("formFileNum", filesCount.get("formFileNum") +1);
}else if(methodId.equals("engineering.standard")){
fileMap.put("fileType", "engineeringtandardFile");
filesCount.put("engineeringtandardFileNum", filesCount.get("engineeringtandardFileNum") +1);
} else if (methodId.equals("process.scheme")) {
fileMap.put("fileType", "processschemeFile");
filesCount.put("processschemeFileNum", filesCount.get("processschemeFileNum") +1);
}
}
/**
* 把架构信息增加的fileMaps里
* @param fileMaps
* @param frameIDs
*/
public void addFrameInfoToFileMaps(List<Map> fileMaps,List<String> frameIDs){
List<RowMap> frameRowMaps = new ArrayList<>();
frameIDs = frameIDs.stream().distinct().collect(Collectors.toList());
for (String frameID : frameIDs) {
frameRowMaps = GetNodesUtil.getParentFrame(frameID, frameRowMaps);
}
frameRowMaps = frameRowMaps.stream()
.collect(collectingAndThen(
toCollection(
() -> new TreeSet<>(Comparator.comparing(o -> o.getString("FRAMEID")))),
ArrayList::new));
for (RowMap frameRowMap : frameRowMaps) {
Map<String,Object> frameMap = new HashMap<>();
String nodeType = "frame";
frameMap.put("ID", frameRowMap.getString("FRAMEID"));
frameMap.put("PARENTID", frameRowMap.getString("FRAMEPARENTID"));
frameMap.put("name", frameRowMap.getString("FRAMENAME"));
frameMap.put("ORDERINDEX", frameRowMap.getString("FRAMEORDERINDEX"));
frameMap.put("TLEVEL", frameRowMap.getString("FRAMELEVEL"));
frameMap.put("nodeType", nodeType);
fileMaps.add(frameMap);
}
}
/**
* model信息转fileMap
* @param model
* @param fileMap
*/
public void model2FileMap(UserContext uc,PALRepositoryModel model,Map fileMap){
String path = "./w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid=" + model.getId() + "&" + "sid=" + uc.getSessionId() + "&" + "taskId=";
String nodeType = "file";
fileMap.put("ID", model.getId());
fileMap.put("PARENTID", model.getParentId());
fileMap.put("name", model.getName());
fileMap.put("PLMETHODID", model.getMethodId());
fileMap.put("PUBDATETIME", model.getPublishDate());
fileMap.put("path", path);
fileMap.put("ORDERINDEX",model.getOrderIndex());
fileMap.put("nodeType", nodeType);
}
/**
* 判断文件是否有效
*/
private boolean isValidFile(PALRepositoryModel model,String filterTreeText,String deptString,String fileType,Set<String> validMethodIds) {
String methodId = model.getMethodId();
String fileName = model.getName();
// 1. 文件发布状态检查
if (!model.isPublish() || model.isStop() || !"1".equals(model.getExt5()) ||
UtilString.isEmpty(model.getExt6())) {
return false;
}
// 2. 文件名称过滤 如果前端查文件名称则名称匹配上则直接返回无需走类型过滤和部门过滤
if(UtilString.isNotEmpty(filterTreeText) && !fileName.contains(filterTreeText)){
return false;
}
// 3. 文件类型过滤
//查询条件为空则查默认的文件类型
if(UtilString.isEmpty(fileType) && !validMethodIds.contains(methodId)){
return false;
}
//查询条件不为空且不为全部
if (UtilString.isNotEmpty(fileType) && !fileType.equals("totalFile")){
//查询流程
if(fileType.equals("processFile") && !methodId.equals("process.epc") && !methodId.equals("process.flowchart")){
return false;
}
//查询制度
if(fileType.equals("policyFile") && !methodId.equals("control.policy")){
return false;
}
//查询表单
if(fileType.equals("formFile") && !methodId.equals("data.form")){
return false;
}
//查询工程技术标准
if(fileType.equals("engineeringtandardFile") && !methodId.equals("engineering.standard")){
return false;
}
//查询方案图
if(fileType.equals("processschemeFile") && !methodId.equals("process.scheme")){
return false;
}
}
// 4. 部门过滤
//没有查询文件名时才过滤部门
if(UtilString.isEmpty(filterTreeText)){
if(UtilString.isEmpty(deptString)){
return false;
}
String[] deptArray = model.getExt6().split(",");
if (Arrays.stream(deptArray).noneMatch(deptString::contains)) {
return false;
}
}
return true;
}
} }