流程清单筛选

This commit is contained in:
446052889@qq.com 2022-11-14 20:11:46 +08:00
parent d0618c1b92
commit f37662f0e9
10 changed files with 113 additions and 25 deletions

View File

@ -32,9 +32,9 @@ public class CoEProcessListController {
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.processlist_header_query")
public String getProcessListHeader (UserContext me, String wsId, String teamId, String searchInput, String levelValue, String tableFilter) {
public String getProcessListHeader (UserContext me, String wsId, String teamId, String searchInput, String levelValue, String tableFilter, String customFilter) {
PALRepositoryListWeb web = new PALRepositoryListWeb(me);
return web.getProcessListHeader(wsId, teamId, searchInput, levelValue, tableFilter);
return web.getProcessListHeader(wsId, teamId, searchInput, levelValue, tableFilter, customFilter);
}
/**
@ -50,9 +50,9 @@ public class CoEProcessListController {
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.processlist_data_query")
public String getProcessListTableData(UserContext me, String wsId, String teamId, String searchInput, String levelValue, int currentPage, int pageStep, String tableHead, String tableFilter) {
public String getProcessListTableData(UserContext me, String wsId, String teamId, String searchInput, String levelValue, int currentPage, int pageStep, String tableHead, String tableFilter, String customFilter) {
PALRepositoryListWeb web = new PALRepositoryListWeb(me);
return web.getProcessListTableData(wsId, teamId, searchInput, levelValue, currentPage, pageStep, tableHead, tableFilter);
return web.getProcessListTableData(wsId, teamId, searchInput, levelValue, currentPage, pageStep, tableHead, tableFilter, customFilter);
}
/**
@ -78,9 +78,9 @@ public class CoEProcessListController {
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal.processlist_data_export")
public String processListExportExcel(UserContext me, String wsId, String teamId, String searchInput, String levelValue, String tableFilter) {
public String processListExportExcel(UserContext me, String wsId, String teamId, String searchInput, String levelValue, String tableFilter, String customFilter) {
PALRepositoryListWeb web = new PALRepositoryListWeb(me);
return web.processListExportExcel(wsId, teamId, searchInput, levelValue, tableFilter);
return web.processListExportExcel(wsId, teamId, searchInput, levelValue, tableFilter, customFilter);
}
}

View File

@ -12,9 +12,13 @@ import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeModel;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodModel;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.pal.ws.dao.CoeWorkSpaceDaoFactory;
@ -22,6 +26,7 @@ import com.actionsoft.apps.coe.pal.pal.ws.model.CoeWorkSpaceModel;
import com.actionsoft.apps.coe.pal.pal.ws.web.VersionUtil;
import com.actionsoft.apps.coe.pal.processlist.cache.ProcessListConfigCache;
import com.actionsoft.apps.coe.pal.processlist.model.ProcessListConfigModel;
import com.actionsoft.apps.coe.pal.util.SubUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@ -478,7 +483,7 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param tableFilter 表格表头筛选条件
* @return
*/
public String getProcessListHeader(String wsId, String teamId, String searchInput, String levelValue, String tableFilter) {
public String getProcessListHeader(String wsId, String teamId, String searchInput, String levelValue, String tableFilter, String customFilter) {
String category = "process";
ResponseObject ro = ResponseObject.newOkResponse();
// 获取默认的表格列
@ -543,7 +548,7 @@ public class PALRepositoryListWeb extends ActionWeb {
ro.put("customTableUncheckedData", customTableUncheckedData);// 未选中表项
}
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter);
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter, customFilter);
ro.put("totalCount", palList.size());
return ro.toString();
}
@ -554,7 +559,7 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param category
* @return
*/
private List<PALRepositoryModel> getFilteredPalRepositoryList(String wsId, String teamId, String category, String searchInput, String levelValue, String tableFilter) {
private List<PALRepositoryModel> getFilteredPalRepositoryList(String wsId, String teamId, String category, String searchInput, String levelValue, String tableFilter, String customFilter) {
// type,status
JSONObject tableFilterObj = JSONObject.parseObject(tableFilter);
// 类型
@ -567,6 +572,32 @@ public class PALRepositoryListWeb extends ActionWeb {
if (tableFilterObj.containsKey("status")) {
statusList = JSONArray.parseArray(tableFilterObj.getString("status"), String.class);
}
// 自定义筛选
JSONObject customFilterObj = JSONObject.parseObject(customFilter);
JSONArray frameworkSearchInput1Arr = customFilterObj.getJSONArray("frameworkSearchInput1Arr");//流程架构L1
JSONArray frameworkSearchInput2Arr = customFilterObj.getJSONArray("frameworkSearchInput2Arr");//流程架构L2
JSONArray frameworkSearchInput3Arr = customFilterObj.getJSONArray("frameworkSearchInput3Arr");//流程架构L3
JSONArray issuingDepartmentArr = customFilterObj.getJSONArray("issuingDepartmentArr");// 发布部门
Set<String> l1Set = new HashSet<>();
Set<String> l2Set = new HashSet<>();
Set<String> l3Set = new HashSet<>();
Set<String> deptSet = new HashSet<>();
for (int i = 0; i < frameworkSearchInput1Arr.size(); i++) {
l1Set.add(handleCustomFilterName(frameworkSearchInput1Arr.getJSONObject(i).getString("name")));
}
for (int i = 0; i < frameworkSearchInput2Arr.size(); i++) {
l2Set.add(handleCustomFilterName(frameworkSearchInput2Arr.getJSONObject(i).getString("name")));
}
for (int i = 0; i < frameworkSearchInput3Arr.size(); i++) {
l3Set.add(handleCustomFilterName(frameworkSearchInput3Arr.getJSONObject(i).getString("name")));
}
for (int i = 0; i < issuingDepartmentArr.size(); i++) {
deptSet.add(issuingDepartmentArr.getJSONObject(i).getString("id"));
}
List<PALRepositoryModel> palList = new ArrayList<>();
Set<String> ids = new HashSet<>();
PALRepositoryCache.getAllChildrenModelsByPid(wsId, category, palList, ids);
@ -621,12 +652,64 @@ public class PALRepositoryListWeb extends ActionWeb {
continue;
}
}
// 自定义筛选
if (l1Set.size() > 0) {
PALRepositoryPropertyModel l1PropModel = PALRepositoryPropertyCache.getPropertyByPropertyId(model.getId(), "Process_Architecture_L1");
if (l1PropModel == null || !l1Set.contains(l1PropModel.getPropertyValue())) {
continue;
}
}
if (l2Set.size() > 0) {
PALRepositoryPropertyModel l2PropModel = PALRepositoryPropertyCache.getPropertyByPropertyId(model.getId(), "Process_Architecture_L2");
if (l2PropModel == null || !l2Set.contains(l2PropModel.getPropertyValue())) {
continue;
}
}
if (l3Set.size() > 0) {
PALRepositoryPropertyModel l3PropModel = PALRepositoryPropertyCache.getPropertyByPropertyId(model.getId(), "Process_Architecture_L3");
if (l3PropModel == null || !l3Set.contains(l3PropModel.getPropertyValue())) {
continue;
}
}
if (deptSet.size() > 0) {
List<DesignerShapeRelationModel> list = DesignerShapeRelationCache.getByFileId(model.getId(), "Issuing_department");
if (list == null || list.size() == 0) {
continue;
}
boolean flag = false;
for (DesignerShapeRelationModel relation : list) {
if (UtilString.isEmpty(relation.getShapeId())) {// 文件属性
JSONObject obj = JSONObject.parseObject(relation.getRelationShapeText());
String id = obj.getString("id");
if (deptSet.contains(id)) {
flag = true;
break;
}
}
}
if (!flag) {
continue;
}
}
// 追加
tmpPalList.add(model);
}
return tmpPalList;
}
private String handleCustomFilterName(String name) {
String str2 = "";
String str1=name.substring(0, name.lastIndexOf(".")+1);
if(UtilString.isNotEmpty(str1)){
String end=name.substring(name.lastIndexOf(".")+1);
int len=Integer.valueOf(SubUtil.getQuantity(end).length());
str2=name.substring(str1.length()+len, name.length());
}else{
str2=name;
}
return str2.trim();
}
private LinkedHashMap<String, JSONObject> getDefaultFixedTableColumn(String category) {
String columnType = "default";
LinkedHashMap<String, JSONObject> map = new LinkedHashMap<>(16, 0.75f, true);
@ -768,11 +851,11 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param tableFilter
* @return
*/
public String getProcessListTableData(String wsId, String teamId, String searchInput, String levelValue, int currentPage, int pageStep, String tableHead, String tableFilter) {
public String getProcessListTableData(String wsId, String teamId, String searchInput, String levelValue, int currentPage, int pageStep, String tableHead, String tableFilter, String customFilter) {
String category = "process";
ResponseObject ro = ResponseObject.newOkResponse();
// 获取流程信息
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter);
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter, customFilter);
int startPoint = 0;
int endPoint = 0;
if (currentPage <= 0) {
@ -919,11 +1002,12 @@ public class PALRepositoryListWeb extends ActionWeb {
* @param tableFilter
* @return
*/
public String processListExportExcel(String wsId, String teamId, String searchInput, String levelValue, String tableFilter) {
public String processListExportExcel(String wsId, String teamId, String searchInput, String levelValue, String tableFilter, String customFilter) {
JSONObject conditions = new JSONObject();
conditions.put("searchInput", searchInput);
conditions.put("levelValue", levelValue);
conditions.put("tableFilter", tableFilter);
conditions.put("customFilter", customFilter);
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet(I18nRes.findValue(ProcessListConstant.PROCESSLIST, ("流程清单")));
// 模板标题
@ -991,7 +1075,8 @@ public class PALRepositoryListWeb extends ActionWeb {
String searchInput = conditions.getString("searchInput");
String levelValue = conditions.getString("levelValue");
String tableFilter = conditions.getString("tableFilter");
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter);
String customFilter = conditions.getString("customFilter");
List<PALRepositoryModel> palList = getFilteredPalRepositoryList(wsId, teamId, category, searchInput, levelValue, tableFilter, customFilter);
// 获取配置信息
JSONArray tableHeadConfigArr = getProcessListTableHeaderData(wsId, category);
// 获取展现到Excel的扩展字段

View File

@ -4,4 +4,4 @@
var teamId = "<#teamId>";
var levelSelect = <#levelSelect>;
var defaultSelectVal = <#defaultSelectVal>;
var wHref = "./w";</script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/chunk-ced74f8c.079f8c54.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-2004eb4d.47f80d5d.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-2d224ef1.f27d8dfa.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-ced74f8c.fd10408c.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/app.fba1b030.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/app.44056653.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-vendors.dfef4ec2.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/app.fba1b030.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-vendors.dfef4ec2.js></script><script src=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/app.44056653.js></script></body></html>
var wHref = "./w";</script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/chunk-203da88e.3e3aba47.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-2004eb4d.47f80d5d.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-203da88e.4207b479.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-2d224ef1.f27d8dfa.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/app.fba1b030.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/app.5c1ffedb.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-vendors.dfef4ec2.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.processlist/main/css/app.fba1b030.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/chunk-vendors.dfef4ec2.js></script><script src=../apps/com.actionsoft.apps.coe.pal.processlist/main/js/app.5c1ffedb.js></script></body></html>

View File

@ -10,6 +10,7 @@
<param name="searchInput"/>
<param name="levelValue"/>
<param name="tableFilter"/>
<param name="customFilter"/>
</cmd-bean>
<cmd-bean name="com.actionsoft.apps.coe.pal.processlist_data_query">
<param name="wsId"/>
@ -20,6 +21,7 @@
<param name="pageStep"/>
<param name="tableHead"/>
<param name="tableFilter"/>
<param name="customFilter"/>
</cmd-bean>
<cmd-bean name="com.actionsoft.apps.coe.pal.processlist_config_save">
<param name="wsId"/>
@ -31,5 +33,6 @@
<param name="searchInput"/>
<param name="levelValue"/>
<param name="tableFilter"/>
<param name="customFilter"/>
</cmd-bean>
</aws-actions>

View File

@ -0,0 +1 @@
#palRelationAddress[data-v-3b59fe57] .el-dialog__body{padding:10px 20px;color:#606266;font-size:14px;word-break:break-all}#palRelationAddress[data-v-3b59fe57] .el-input__inner{border-radius:0}#palRelationAddress[data-v-3b59fe57] .el-tree{min-width:100%;display:inline-block!important}.checkbox-item[data-v-3b59fe57],.redio-item[data-v-3b59fe57]{margin:10px 0;display:block}.div-left[data-v-3b59fe57]{float:left;width:249px;height:400px;border-right:1px dashed #f2f2f2}.div-middle[data-v-3b59fe57]{float:left;width:248px;height:400px;border-right:1px dashed #f2f2f2}.div-right[data-v-3b59fe57]{float:right;width:249px;height:400px;background-color:#2a85a0}#palRelationAddress[data-v-3b59fe57] .el-table__row .icon-delete-display{display:none}#palRelationAddress[data-v-3b59fe57] .el-table__row:hover .icon-delete-display{display:inline}#palRelationAddress[data-v-3b59fe57] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f5f7fa;color:#4e7ff9}#palRelationAddress[data-v-3b59fe57] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .awsui-iconfont{color:#4e7ff9!important}#palRepositoryTree[data-v-6527f53c] .el-dialog__body{padding:10px 20px;color:#606266;font-size:14px;word-break:break-all}#palRepositoryTree[data-v-6527f53c] .el-input__inner{border-radius:0}#palRepositoryTree[data-v-6527f53c] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f5f7fa;color:#4e7ff9}#palRepositoryTree[data-v-6527f53c] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .awsui-iconfont{color:#4e7ff9!important}.tree[data-v-6527f53c]{overflow:auto;width:458px;height:300px}#palRepositoryTree[data-v-6527f53c] .el-tree{min-width:100%;display:inline-block!important}#bpmOrgAddress[data-v-6de64a47] .el-dialog__body{padding:10px 20px;color:#606266;font-size:14px;word-break:break-all}#bpmOrgAddress[data-v-6de64a47] .el-input__inner{border-radius:0}#bpmOrgAddress[data-v-6de64a47] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:#f5f7fa;color:#4e7ff9}#bpmOrgAddress[data-v-6de64a47] .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .awsui-iconfont{color:#4e7ff9!important}.tree[data-v-6de64a47]{overflow:auto;width:458px;height:300px}#bpmOrgAddress[data-v-6de64a47] .el-tree{min-width:100%;display:inline-block!important}.el-select--medium{float:left}a,button,div,i,input,span{outline:none}.grid-content[data-v-478a61d9]{border-radius:4px;min-height:36px}.custom_table_dlg_icon[data-v-478a61d9]{color:#4e7ff9;font-size:20px;cursor:pointer;position:relative;top:5px}.custom-table-dlg-li[data-v-478a61d9]{text-align:left;padding-left:20px;height:30px;line-height:30px;vertical-align:middle;cursor:move}.custom-table-dlg-li[data-v-478a61d9]:hover{background-color:#f5f7fa}.custom-table-dlg-li-item[data-v-478a61d9]{display:inline-block;width:88%}.custom-table-dlg-li-item-icon[data-v-478a61d9]{width:10%;text-align:center}.icon-display[data-v-478a61d9]{display:none}.custom-table-dlg-li:hover .icon-display[data-v-478a61d9]{display:inline-block}.custom-table-dlg-footer[data-v-478a61d9]{height:40px;text-align:right;padding:10px}.draggable-title[data-v-478a61d9]{text-align:left;padding-left:20px;height:30px;line-height:30px;font-size:12px;color:#95a2b2}.head-title[data-v-478a61d9]{display:inline-block}.button_fixed_width[data-v-478a61d9]{width:80px}#customTableDlg[data-v-478a61d9] .awsui-sidebar__header{padding:10px 10px 10px 20px}#processlistMain[data-v-478a61d9] .el-table__row:hover .processlist-title,#processlistMain[data-v-478a61d9] .el-table__row:hover .processlist-title-version{color:#4e7ff9!important}.processlist-title-version[data-v-478a61d9]{display:inline-block;-webkit-transform:scale(.9);font-size:12px;color:#aaa}.btn-more-data[data-v-478a61d9]:hover{color:#4e7ff9}.btn-more-data[data-v-478a61d9]{cursor:pointer}

View File

@ -1 +0,0 @@
.el-select--medium{float:left}a,button,div,i,input,span{outline:none}.grid-content[data-v-73d834fa]{border-radius:4px;min-height:36px}.custom_table_dlg_icon[data-v-73d834fa]{color:#4e7ff9;font-size:20px;cursor:pointer;position:relative;top:5px}.custom-table-dlg-li[data-v-73d834fa]{text-align:left;padding-left:20px;height:30px;line-height:30px;vertical-align:middle;cursor:move}.custom-table-dlg-li[data-v-73d834fa]:hover{background-color:#f5f7fa}.custom-table-dlg-li-item[data-v-73d834fa]{display:inline-block;width:88%}.custom-table-dlg-li-item-icon[data-v-73d834fa]{width:10%;text-align:center}.icon-display[data-v-73d834fa]{display:none}.custom-table-dlg-li:hover .icon-display[data-v-73d834fa]{display:inline-block}.custom-table-dlg-footer[data-v-73d834fa]{height:40px;text-align:right;padding:10px}.draggable-title[data-v-73d834fa]{text-align:left;padding-left:20px;height:30px;line-height:30px;font-size:12px;color:#95a2b2}.head-title[data-v-73d834fa]{display:inline-block}.button_fixed_width[data-v-73d834fa]{width:80px}#customTableDlg[data-v-73d834fa] .awsui-sidebar__header{padding:10px 10px 10px 20px}#processlistMain[data-v-73d834fa] .el-table__row:hover .processlist-title,#processlistMain[data-v-73d834fa] .el-table__row:hover .processlist-title-version{color:#4e7ff9!important}.processlist-title-version[data-v-73d834fa]{display:inline-block;-webkit-transform:scale(.9);font-size:12px;color:#aaa}.btn-more-data[data-v-73d834fa]:hover{color:#4e7ff9}.btn-more-data[data-v-73d834fa]{cursor:pointer}