shichongfu
2023-04-25 ce0b49552668d3331055e2b1a1447a743dc54939
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
package com.product.admin.service.idel;
 
import com.product.core.entity.DataTableEntity;
import com.product.core.entity.FieldSetEntity;
import com.product.core.exception.BaseException;
 
public interface IPublicService {
 
    FieldSetEntity getTableByUuid(String uuid) throws BaseException;
 
    FieldSetEntity getTableByTableName(String tableName) throws BaseException;
 
    /**
     * 获取临时编码
     *
     * @param table      表名
     * @param field      字段名
     * @param parentCode 上级编码,如果没有上级编码,则为"",不能为null
     * @return
     * @throws BaseException
     */
    void createdCode(FieldSetEntity fse, String table, String field, String parentCode) throws BaseException;
 
    String getTableByFunction(String function_uuid) throws BaseException;
 
    /**
     * @param table_name     表名
     * @param relevanceTable 是否关联表(外键关联必须在field表中配置field_relation_table)
     * @return
     * @throws BaseException
     */
    String getFields(String table_name, boolean relevanceTable) throws BaseException;
 
    /**
     * 通用列表查询
     * 可传入 filter 参数可用 key: ~select_params~ 多个用逗号分割
     * 可传入 orderby
     * fse 中必须要表名 分页参数
     * 默认加载参照
     *
     * @param fse
     * @return
     * @throws BaseException
     */
    DataTableEntity listTable(FieldSetEntity fse) throws BaseException;
 
    /**
     * 通用列表查询
     * 可传入 filter
     * 动态参数可用 key: ~select_params~ 多个用逗号分割
     * 可传入 orderby
     * fse 中必须要表名 如果没有分页参数 则查询第一页 最大条数 Integer.MAX_VALUE
     *
     * @param fse
     * @param isLoadPromptData  是否加载参照
     * @param permissionType    数据权限类型 1 公司 2 人员 3公司&&人员   可为空(不过滤)
     * @param permissionCompany 公司过滤字段 可为空 默认 org_level_uuid 只有填入 permissionType 生效
     * @param permissionStaff   人员过滤字段 可为空 为空时则不过滤 只有填入 permissionType 生效
     * @return
     * @throws BaseException
     */
    DataTableEntity listTable(FieldSetEntity fse, boolean isLoadPromptData, Integer permissionType, String permissionCompany, String permissionStaff) throws BaseException;
 
    /**
     * 列表过滤
     *
     * @param fse
     * @param permissionType  数据权限类型 1 公司 2 人员 3公司&&人员
     * @param permissionField 数据权限过滤字段  permissionType
     * @return
     * @throws BaseException
     */
    String getListFilter(FieldSetEntity fse, Integer permissionType, String... permissionField) throws BaseException;
 
    /**
     * 通用列表查询
     * 可传入 filter 参数可用 key: ~select_params~ 多个用逗号分割
     * 可传入 orderby
     * fse 中必须要表名 分页参数
     *
     * @param fse
     * @param isLoadPromptData 是否加载参照
     * @return
     * @throws BaseException
     */
    DataTableEntity listTable(FieldSetEntity fse, boolean isLoadPromptData) throws BaseException;
 
    /**
     * 通用数据查询
     * fse 中必须要表名 & uuid
     *
     * @param fse
     * @param isMoreSubData 是否查询子表
     * @return
     * @throws BaseException
     */
    FieldSetEntity getFieldSetEntity(FieldSetEntity fse, boolean isMoreSubData) throws BaseException;
 
    /**
     * 通用数据保存
     *
     * @param fse
     * @return
     * @throws BaseException
     */
    String saveFieldSetEntity(FieldSetEntity fse) throws BaseException;
 
    /**
     * 通用数据删除
     * fse 必传表名 && uuid(多个用逗号分割)
     *
     * @param fse
     * @return
     * @throws BaseException
     */
    boolean delete(FieldSetEntity fse) throws BaseException;
}