Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz商业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz商业套件
iBiz商业中心
提交
37c0f655
提交
37c0f655
编写于
10月 23, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
8babb97b
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
100 行增加
和
3 行删除
+100
-3
Ir_model_fields.java
.../businesscentral/core/odoo_ir/domain/Ir_model_fields.java
+24
-0
Ir_model_fieldsSearchContext.java
...ral/core/odoo_ir/filter/Ir_model_fieldsSearchContext.java
+14
-0
Ir_model_fieldsMapper.java
...esscentral/core/odoo_ir/mapper/Ir_model_fieldsMapper.java
+2
-0
IIr_model_fieldsService.java
...central/core/odoo_ir/service/IIr_model_fieldsService.java
+2
-0
Ir_modelServiceImpl.java
...entral/core/odoo_ir/service/impl/Ir_modelServiceImpl.java
+3
-0
Ir_model_fieldsServiceImpl.java
...core/odoo_ir/service/impl/Ir_model_fieldsServiceImpl.java
+13
-0
Ir_model_fieldsMapper.xml
.../mapper/odoo_ir/ir_model_fields/Ir_model_fieldsMapper.xml
+13
-3
iBizBusinessCentral.json
...core/src/main/resources/sysmodel/iBizBusinessCentral.json
+29
-0
未找到文件。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/domain/Ir_model_fields.java
浏览文件 @
37c0f655
...
...
@@ -79,6 +79,22 @@ public class Ir_model_fields extends EntityMP implements Serializable {
@JSONField
(
name
=
"field_description"
)
@JsonProperty
(
"field_description"
)
private
String
fieldDescription
;
/**
* ID
*/
@DEField
(
name
=
"model_id"
)
@TableField
(
value
=
"model_id"
)
@JSONField
(
name
=
"model_id"
)
@JsonProperty
(
"model_id"
)
private
Long
modelId
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_ir
.
domain
.
Ir_model
odooModel
;
...
...
@@ -114,6 +130,14 @@ public class Ir_model_fields extends EntityMP implements Serializable {
this
.
modify
(
"field_description"
,
fieldDescription
);
}
/**
* 设置 [ID]
*/
public
void
setModelId
(
Long
modelId
){
this
.
modelId
=
modelId
;
this
.
modify
(
"model_id"
,
modelId
);
}
@Override
public
Serializable
getDefaultKey
(
boolean
gen
)
{
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/filter/Ir_model_fieldsSearchContext.java
浏览文件 @
37c0f655
...
...
@@ -34,6 +34,20 @@ public class Ir_model_fieldsSearchContext extends QueryWrapperContext<Ir_model_f
this
.
getSearchCond
().
like
(
"name"
,
n_name_like
);
}
}
private
String
n_model_eq
;
//[模型]
public
void
setN_model_eq
(
String
n_model_eq
)
{
this
.
n_model_eq
=
n_model_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_model_eq
)){
this
.
getSearchCond
().
eq
(
"model"
,
n_model_eq
);
}
}
private
Long
n_model_id_eq
;
//[ID]
public
void
setN_model_id_eq
(
Long
n_model_id_eq
)
{
this
.
n_model_id_eq
=
n_model_id_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_model_id_eq
)){
this
.
getSearchCond
().
eq
(
"model_id"
,
n_model_id_eq
);
}
}
/**
* 启用快速搜索
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/mapper/Ir_model_fieldsMapper.java
浏览文件 @
37c0f655
...
...
@@ -62,4 +62,6 @@ public interface Ir_model_fieldsMapper extends BaseMapper<Ir_model_fields>{
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
Ir_model_fields
>
selectByModelId
(
@Param
(
"id"
)
Serializable
id
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/service/IIr_model_fieldsService.java
浏览文件 @
37c0f655
...
...
@@ -38,6 +38,8 @@ public interface IIr_model_fieldsService extends IService<Ir_model_fields>{
boolean
save
(
Ir_model_fields
et
)
;
void
saveBatch
(
List
<
Ir_model_fields
>
list
)
;
Page
<
Ir_model_fields
>
searchDefault
(
Ir_model_fieldsSearchContext
context
)
;
List
<
Ir_model_fields
>
selectByModelId
(
Long
id
)
;
void
removeByModelId
(
Long
id
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/service/impl/Ir_modelServiceImpl.java
浏览文件 @
37c0f655
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"Ir_modelServiceImpl"
)
public
class
Ir_modelServiceImpl
extends
ServiceImpl
<
Ir_modelMapper
,
Ir_model
>
implements
IIr_modelService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_ir
.
service
.
IIr_model_fieldsService
irModelFieldsService
;
protected
int
batchSize
=
500
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_ir/service/impl/Ir_model_fieldsServiceImpl.java
浏览文件 @
37c0f655
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"Ir_model_fieldsServiceImpl"
)
public
class
Ir_model_fieldsServiceImpl
extends
ServiceImpl
<
Ir_model_fieldsMapper
,
Ir_model_fields
>
implements
IIr_model_fieldsService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_ir
.
service
.
IIr_modelService
irModelService
;
protected
int
batchSize
=
500
;
...
...
@@ -148,6 +151,16 @@ public class Ir_model_fieldsServiceImpl extends ServiceImpl<Ir_model_fieldsMappe
}
@Override
public
List
<
Ir_model_fields
>
selectByModelId
(
Long
id
)
{
return
baseMapper
.
selectByModelId
(
id
);
}
@Override
public
void
removeByModelId
(
Long
id
)
{
this
.
remove
(
new
QueryWrapper
<
Ir_model_fields
>().
eq
(
"model_id"
,
id
));
}
/**
* 查询集合 数据集
...
...
businesscentral-core/src/main/resources/mapper/odoo_ir/ir_model_fields/Ir_model_fieldsMapper.xml
浏览文件 @
37c0f655
...
...
@@ -5,17 +5,27 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"Ir_model_fieldsResultMap"
databaseId=
"postgresql"
>
<![CDATA[select t1.* from (SELECT t1.FIELD_DESCRIPTION, t1.ID, t1.MODEL, t1.NAME, t1.TRACKING FROM IR_MODEL_FIELDS t1 ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.FIELD_DESCRIPTION, t1.ID, t1.MODEL, t1.
MODEL_ID, t1.
NAME, t1.TRACKING FROM IR_MODEL_FIELDS t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"Ir_model_fieldsResultMap"
type=
"cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_model_fields"
autoMapping=
"true"
>
<id
property=
"id"
column=
"id"
/>
<!--主键字段映射-->
<result
property=
"fieldDescription"
column=
"field_description"
/>
<result
property=
"modelId"
column=
"model_id"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"odooModel"
javaType=
"cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_model"
column=
"model_id"
select=
"cn.ibizlab.businesscentral.core.odoo_ir.mapper.Ir_modelMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IR_MODEL_FIELDS_IR_MODEL_MODEL_ID] -->
<select
id=
"selectByModelId"
resultMap=
"Ir_model_fieldsResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where model_id=#{id}
</select>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.businesscentral.core.odoo_ir.filter.Ir_model_fieldsSearchContext"
resultMap=
"Ir_model_fieldsResultMap"
>
...
...
@@ -28,12 +38,12 @@
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"postgresql"
>
<![CDATA[ SELECT t1.FIELD_DESCRIPTION, t1.ID, t1.MODEL, t1.NAME, t1.TRACKING FROM IR_MODEL_FIELDS t1
<![CDATA[ SELECT t1.FIELD_DESCRIPTION, t1.ID, t1.MODEL, t1.
MODEL_ID, t1.
NAME, t1.TRACKING FROM IR_MODEL_FIELDS t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"postgresql"
>
<![CDATA[ SELECT t1.FIELD_DESCRIPTION, t1.ID, t1.MODEL, t1.NAME, t1.TRACKING FROM IR_MODEL_FIELDS t1
<![CDATA[ SELECT t1.FIELD_DESCRIPTION, t1.ID, t1.MODEL, t1.
MODEL_ID, t1.
NAME, t1.TRACKING FROM IR_MODEL_FIELDS t1
]]>
</sql>
</mapper>
...
...
businesscentral-core/src/main/resources/sysmodel/iBizBusinessCentral.json
浏览文件 @
37c0f655
...
...
@@ -71639,6 +71639,12 @@
}
],
"subEntitys":[
{"name":"DER1N_IR_MODEL_FIELDS_IR_MODEL_MODEL_ID",
"relation_type":"DER1N",
"code_name":"Odoo_model",
"entity_name":"IR_MODEL_FIELDS",
"ref_entity_name":"IR_MODEL"
}
],
"parentEntitys":[
]
...
...
@@ -71715,11 +71721,34 @@
"data_length":100,
"key_field":0,
"major_field":0
},
{
"fieldname":"MODEL_ID" ,
"codename":"Model_id",
"field_logic_name":"ID",
"entity_name":"Ir_model_fields",
"ref_de":"IR_MODEL",
"ref_field_name":"ID",
"relation_name":"DER1N_IR_MODEL_FIELDS_IR_MODEL_MODEL_ID",
"relation_codename":"Odoo_model",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"data_length":20,
"key_field":0,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_IR_MODEL_FIELDS_IR_MODEL_MODEL_ID",
"relation_type":"DER1N",
"code_name":"Odoo_model",
"entity_name":"IR_MODEL_FIELDS",
"ref_entity_name":"IR_MODEL"
}
]
}
,
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录