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;
|
}
|