|
|
|
@ -11,6 +11,7 @@ import apelet.common.online.model.constant.DataRuleType; |
|
|
|
import apelet.common.online.model.constant.FieldFilterType; |
|
|
|
import apelet.common.online.model.constant.FieldFilterType; |
|
|
|
import apelet.common.online.model.constant.RelationType; |
|
|
|
import apelet.common.online.model.constant.RelationType; |
|
|
|
import apelet.common.orm.impl.*; |
|
|
|
import apelet.common.orm.impl.*; |
|
|
|
|
|
|
|
import apelet.common.orm.parser.FilterParser; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
@ -62,7 +63,7 @@ public class ListDataOrmService extends ListDataService { |
|
|
|
OnlineTable masterTable = datasourceResult.getData().getMasterTable(); |
|
|
|
OnlineTable masterTable = datasourceResult.getData().getMasterTable(); |
|
|
|
OnlineForm onlineForm = onlineFormService.getOnlineFormFromCache(dto.getFormId()); |
|
|
|
OnlineForm onlineForm = onlineFormService.getOnlineFormFromCache(dto.getFormId()); |
|
|
|
// 根据 metaCode 过滤权限规则:非空→基础数据权限,为空→列表权限
|
|
|
|
// 根据 metaCode 过滤权限规则:非空→基础数据权限,为空→列表权限
|
|
|
|
List<PermissionDataRuleSchema> ruleSchemaList = permissionDataRuleSchemaService.listByFormId(onlineForm.getFormId()); |
|
|
|
List<PermissionDataRuleSchema> ruleSchemaList = permissionDataRuleSchemaService.listByFormId(onlFormHead.getId()); |
|
|
|
String conditionExpression = null; |
|
|
|
String conditionExpression = null; |
|
|
|
if (CollUtil.isNotEmpty(ruleSchemaList)) { |
|
|
|
if (CollUtil.isNotEmpty(ruleSchemaList)) { |
|
|
|
List<PermissionDataRuleSchema> filtered = new ArrayList<>(); |
|
|
|
List<PermissionDataRuleSchema> filtered = new ArrayList<>(); |
|
|
|
@ -83,7 +84,12 @@ public class ListDataOrmService extends ListDataService { |
|
|
|
getOrmSelector(widgetList, selectorSet, masterTable, new HashMap<>()); |
|
|
|
getOrmSelector(widgetList, selectorSet, masterTable, new HashMap<>()); |
|
|
|
Filter filter = getFilter(); |
|
|
|
Filter filter = getFilter(); |
|
|
|
if (StrUtil.isNotBlank(conditionExpression)) { |
|
|
|
if (StrUtil.isNotBlank(conditionExpression)) { |
|
|
|
//todo 这里调用 过滤器
|
|
|
|
Filter parsed = FilterParser.parse(conditionExpression); |
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(parsed.getItems())) { |
|
|
|
|
|
|
|
for (FilterItem item : parsed.getItems()) { |
|
|
|
|
|
|
|
filter.add(item); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Sorter sorter = new Sorter(); |
|
|
|
Sorter sorter = new Sorter(); |
|
|
|
|