Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz商业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz商业套件
iBiz商业中心
提交
cd7c83e8
提交
cd7c83e8
编写于
10月 22, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
71a00f92
变更
18
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
1402 行增加
和
0 行删除
+1402
-0
Account_moveServiceImpl.java
...re/odoo_account/service/impl/Account_moveServiceImpl.java
+3
-0
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL.java
..._ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL.java
+128
-0
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext.java
...LUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext.java
+67
-0
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper.java
...BUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper.java
+69
-0
IPRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELService.java
...UTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELService.java
+62
-0
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELServiceImpl.java
...VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELServiceImpl.java
+223
-0
Product_attribute_valueServiceImpl.java
...duct/service/impl/Product_attribute_valueServiceImpl.java
+3
-0
Product_template_attribute_lineServiceImpl.java
...vice/impl/Product_template_attribute_lineServiceImpl.java
+3
-0
Account_move_purchase_order_rel.java
...odoo_purchase/domain/Account_move_purchase_order_rel.java
+128
-0
Account_move_purchase_order_relSearchContext.java
.../filter/Account_move_purchase_order_relSearchContext.java
+67
-0
Account_move_purchase_order_relMapper.java
...urchase/mapper/Account_move_purchase_order_relMapper.java
+69
-0
IAccount_move_purchase_order_relService.java
...hase/service/IAccount_move_purchase_order_relService.java
+62
-0
Account_move_purchase_order_relServiceImpl.java
...vice/impl/Account_move_purchase_order_relServiceImpl.java
+223
-0
Purchase_orderServiceImpl.java
...odoo_purchase/service/impl/Purchase_orderServiceImpl.java
+3
-0
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+8
-0
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper.xml
...IBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper.xml
+58
-0
Account_move_purchase_order_relMapper.xml
...chase_order_rel/Account_move_purchase_order_relMapper.xml
+58
-0
iBizBusinessCentral.json
...core/src/main/resources/sysmodel/iBizBusinessCentral.json
+168
-0
未找到文件。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_account/service/impl/Account_moveServiceImpl.java
浏览文件 @
cd7c83e8
...
@@ -57,6 +57,9 @@ public class Account_moveServiceImpl extends ServiceImpl<Account_moveMapper, Acc
...
@@ -57,6 +57,9 @@ public class Account_moveServiceImpl extends ServiceImpl<Account_moveMapper, Acc
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_move_lineService
accountMoveLineService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_move_lineService
accountMoveLineService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
IAccount_move_purchase_order_relService
accountMovePurchaseOrderRelService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_moveService
accountMoveService
=
this
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_moveService
accountMoveService
=
this
;
@Autowired
@Autowired
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_product/domain/PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
domain
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.businesscentral.util.domain.EntityBase
;
import
cn.ibizlab.businesscentral.util.annotation.DEField
;
import
cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType
;
import
cn.ibizlab.businesscentral.util.helper.DataObject
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.businesscentral.util.annotation.Audit
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.businesscentral.util.domain.EntityMP
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
/**
* 实体[产品属性]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL"
,
resultMap
=
"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELResultMap"
)
public
class
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* ID
*/
@DEField
(
isKeyField
=
true
)
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
private
String
id
;
/**
* ID
*/
@DEField
(
name
=
"product_attribute_value_id"
)
@TableField
(
value
=
"product_attribute_value_id"
)
@JSONField
(
name
=
"product_attribute_value_id"
)
@JsonProperty
(
"product_attribute_value_id"
)
private
Long
productAttributeValueId
;
/**
* ID
*/
@DEField
(
name
=
"product_template_attribute_line_id"
)
@TableField
(
value
=
"product_template_attribute_line_id"
)
@JSONField
(
name
=
"product_template_attribute_line_id"
)
@JsonProperty
(
"product_template_attribute_line_id"
)
private
Long
productTemplateAttributeLineId
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
domain
.
Product_attribute_value
odooProductAttributeValue
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
domain
.
Product_template_attribute_line
odooProductTemplateAttributeLine
;
/**
* 设置 [ID]
*/
public
void
setProductAttributeValueId
(
Long
productAttributeValueId
){
this
.
productAttributeValueId
=
productAttributeValueId
;
this
.
modify
(
"product_attribute_value_id"
,
productAttributeValueId
);
}
/**
* 设置 [ID]
*/
public
void
setProductTemplateAttributeLineId
(
Long
productTemplateAttributeLineId
){
this
.
productTemplateAttributeLineId
=
productTemplateAttributeLineId
;
this
.
modify
(
"product_template_attribute_line_id"
,
productTemplateAttributeLineId
);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"id"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
@TableField
(
exist
=
false
)
@JsonIgnore
private
String
irmodel
=
"product.attribute.value.product.template.attribute.line.rel"
;
@Override
public
String
getIrModel
(){
return
this
.
irmodel
;
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_product/filter/PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
filter
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
lombok.*
;
import
lombok.extern.slf4j.Slf4j
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
cn.ibizlab.businesscentral.util.filter.QueryWrapperContext
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.ibizlab.businesscentral.core.odoo_product.domain.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
;
/**
* 关系型数据实体[PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL] 查询条件对象
*/
@Slf4j
@Data
public
class
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext
extends
QueryWrapperContext
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
{
private
String
n_id_like
;
//[ID]
public
void
setN_id_like
(
String
n_id_like
)
{
this
.
n_id_like
=
n_id_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_id_like
)){
this
.
getSearchCond
().
like
(
"id"
,
n_id_like
);
}
}
private
Long
n_product_attribute_value_id_eq
;
//[ID]
public
void
setN_product_attribute_value_id_eq
(
Long
n_product_attribute_value_id_eq
)
{
this
.
n_product_attribute_value_id_eq
=
n_product_attribute_value_id_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_product_attribute_value_id_eq
)){
this
.
getSearchCond
().
eq
(
"product_attribute_value_id"
,
n_product_attribute_value_id_eq
);
}
}
private
Long
n_product_template_attribute_line_id_eq
;
//[ID]
public
void
setN_product_template_attribute_line_id_eq
(
Long
n_product_template_attribute_line_id_eq
)
{
this
.
n_product_template_attribute_line_id_eq
=
n_product_template_attribute_line_id_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_product_template_attribute_line_id_eq
)){
this
.
getSearchCond
().
eq
(
"product_template_attribute_line_id"
,
n_product_template_attribute_line_id_eq
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
this
.
getSearchCond
().
and
(
wrapper
->
wrapper
.
like
(
"id"
,
query
)
);
}
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_product/mapper/PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.*
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
java.util.HashMap
;
import
org.apache.ibatis.annotations.Select
;
import
cn.ibizlab.businesscentral.core.odoo_product.domain.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
;
import
cn.ibizlab.businesscentral.core.odoo_product.filter.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper
extends
BaseMapper
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>{
Page
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
wrapper
)
;
@Override
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
selectById
(
Serializable
id
);
@Override
int
insert
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
entity
);
@Override
int
update
(
@Param
(
Constants
.
ENTITY
)
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
entity
,
@Param
(
"ew"
)
Wrapper
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
updateWrapper
);
@Override
int
deleteById
(
Serializable
id
);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select
(
"${sql}"
)
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update
(
"${sql}"
)
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert
(
"${sql}"
)
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
selectByProductAttributeValueId
(
@Param
(
"id"
)
Serializable
id
)
;
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
selectByProductTemplateAttributeLineId
(
@Param
(
"id"
)
Serializable
id
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_product/service/IPRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELService.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
java.util.Collection
;
import
java.math.BigInteger
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
import
cn.ibizlab.businesscentral.core.odoo_product.domain.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
;
import
cn.ibizlab.businesscentral.core.odoo_product.filter.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL] 服务对象接口
*/
public
interface
IPRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELService
extends
IService
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>{
boolean
create
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
;
void
createBatch
(
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
list
)
;
boolean
update
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
;
void
updateBatch
(
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
get
(
String
key
)
;
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
getDraft
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
;
boolean
checkKey
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
;
boolean
save
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
;
void
saveBatch
(
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
list
)
;
Page
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
searchDefault
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext
context
)
;
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
selectByProductAttributeValueId
(
Long
id
)
;
void
removeByProductAttributeValueId
(
Long
id
)
;
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
selectByProductTemplateAttributeLineId
(
Long
id
)
;
void
removeByProductTemplateAttributeLineId
(
Long
id
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List
<
JSONObject
>
select
(
String
sql
,
Map
param
);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean
execute
(
String
sql
,
Map
param
);
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_product/service/impl/PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELServiceImpl.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
impl
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Map
;
import
java.util.HashSet
;
import
java.util.HashMap
;
import
java.util.Collection
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.math.BigInteger
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
cn.ibizlab.businesscentral.util.errors.BadRequestAlertException
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.businesscentral.core.odoo_product.domain.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
;
import
cn.ibizlab.businesscentral.core.odoo_product.filter.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext
;
import
cn.ibizlab.businesscentral.core.odoo_product.service.IPRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELService
;
import
cn.ibizlab.businesscentral.util.helper.CachedBeanCopier
;
import
cn.ibizlab.businesscentral.util.helper.DEFieldCacheMap
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.businesscentral.core.odoo_product.mapper.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.StringUtils
;
/**
* 实体[产品属性] 服务对象接口实现
*/
@Slf4j
@Service
(
"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELServiceImpl"
)
public
class
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELServiceImpl
extends
ServiceImpl
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper
,
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
implements
IPRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IProduct_attribute_valueService
productAttributeValueService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IProduct_template_attribute_lineService
productTemplateAttributeLineService
;
protected
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
create
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
@Transactional
public
void
createBatch
(
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"id"
,
et
.
getId
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
@Transactional
public
void
updateBatch
(
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
@Transactional
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Transactional
public
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
get
(
String
key
)
{
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
();
et
.
setId
(
key
);
}
else
{
}
return
et
;
}
@Override
public
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
getDraft
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
@Override
@Transactional
public
boolean
save
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
public
boolean
saveOrUpdate
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
public
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
selectByProductAttributeValueId
(
Long
id
)
{
return
baseMapper
.
selectByProductAttributeValueId
(
id
);
}
@Override
public
void
removeByProductAttributeValueId
(
Long
id
)
{
this
.
remove
(
new
QueryWrapper
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>().
eq
(
"product_attribute_value_id"
,
id
));
}
@Override
public
List
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
selectByProductTemplateAttributeLineId
(
Long
id
)
{
return
baseMapper
.
selectByProductTemplateAttributeLineId
(
id
);
}
@Override
public
void
removeByProductTemplateAttributeLineId
(
Long
id
)
{
this
.
remove
(
new
QueryWrapper
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>().
eq
(
"product_template_attribute_line_id"
,
id
));
}
/**
* 查询集合 数据集
*/
@Override
public
Page
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
searchDefault
(
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
@Override
public
List
<
JSONObject
>
select
(
String
sql
,
Map
param
){
return
this
.
baseMapper
.
selectBySQL
(
sql
,
param
);
}
@Override
@Transactional
public
boolean
execute
(
String
sql
,
Map
param
){
if
(
sql
==
null
||
sql
.
isEmpty
())
{
return
false
;
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"insert"
))
{
return
this
.
baseMapper
.
insertBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"update"
))
{
return
this
.
baseMapper
.
updateBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"delete"
))
{
return
this
.
baseMapper
.
deleteBySQL
(
sql
,
param
);
}
log
.
warn
(
"暂未支持的SQL语法"
);
return
true
;
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_product/service/impl/Product_attribute_valueServiceImpl.java
浏览文件 @
cd7c83e8
...
@@ -53,6 +53,9 @@ public class Product_attribute_valueServiceImpl extends ServiceImpl<Product_attr
...
@@ -53,6 +53,9 @@ public class Product_attribute_valueServiceImpl extends ServiceImpl<Product_attr
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IProduct_attribute_custom_valueService
productAttributeCustomValueService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IProduct_attribute_custom_valueService
productAttributeCustomValueService
;
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IPRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELService
productAttributeValueProductTemplateAttributeLineRelService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IProduct_template_attribute_valueService
productTemplateAttributeValueService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IProduct_template_attribute_valueService
productTemplateAttributeValueService
;
@Autowired
@Autowired
@Lazy
@Lazy
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_product/service/impl/Product_template_attribute_lineServiceImpl.java
浏览文件 @
cd7c83e8
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"Product_template_attribute_lineServiceImpl"
)
@Service
(
"Product_template_attribute_lineServiceImpl"
)
public
class
Product_template_attribute_lineServiceImpl
extends
ServiceImpl
<
Product_template_attribute_lineMapper
,
Product_template_attribute_line
>
implements
IProduct_template_attribute_lineService
{
public
class
Product_template_attribute_lineServiceImpl
extends
ServiceImpl
<
Product_template_attribute_lineMapper
,
Product_template_attribute_line
>
implements
IProduct_template_attribute_lineService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IPRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELService
productAttributeValueProductTemplateAttributeLineRelService
;
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IProduct_attributeService
productAttributeService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_product
.
service
.
IProduct_attributeService
productAttributeService
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/domain/Account_move_purchase_order_rel.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
domain
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.businesscentral.util.domain.EntityBase
;
import
cn.ibizlab.businesscentral.util.annotation.DEField
;
import
cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType
;
import
cn.ibizlab.businesscentral.util.helper.DataObject
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.businesscentral.util.annotation.Audit
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.businesscentral.util.domain.EntityMP
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
/**
* 实体[ 凭证录入采购单]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"ACCOUNT_MOVE_PURCHASE_ORDER_REL"
,
resultMap
=
"Account_move_purchase_order_relResultMap"
)
public
class
Account_move_purchase_order_rel
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* ID
*/
@DEField
(
isKeyField
=
true
)
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
private
String
id
;
/**
* ID
*/
@DEField
(
name
=
"purchase_order_id"
)
@TableField
(
value
=
"purchase_order_id"
)
@JSONField
(
name
=
"purchase_order_id"
)
@JsonProperty
(
"purchase_order_id"
)
private
Long
purchaseOrderId
;
/**
* ID
*/
@DEField
(
name
=
"account_move_id"
)
@TableField
(
value
=
"account_move_id"
)
@JSONField
(
name
=
"account_move_id"
)
@JsonProperty
(
"account_move_id"
)
private
Long
accountMoveId
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
domain
.
Account_move
odooAccountMove
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
domain
.
Purchase_order
odooPurchaseOrder
;
/**
* 设置 [ID]
*/
public
void
setPurchaseOrderId
(
Long
purchaseOrderId
){
this
.
purchaseOrderId
=
purchaseOrderId
;
this
.
modify
(
"purchase_order_id"
,
purchaseOrderId
);
}
/**
* 设置 [ID]
*/
public
void
setAccountMoveId
(
Long
accountMoveId
){
this
.
accountMoveId
=
accountMoveId
;
this
.
modify
(
"account_move_id"
,
accountMoveId
);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"id"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
@TableField
(
exist
=
false
)
@JsonIgnore
private
String
irmodel
=
"account.move.purchase.order.rel"
;
@Override
public
String
getIrModel
(){
return
this
.
irmodel
;
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/filter/Account_move_purchase_order_relSearchContext.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
filter
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
lombok.*
;
import
lombok.extern.slf4j.Slf4j
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
cn.ibizlab.businesscentral.util.filter.QueryWrapperContext
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_move_purchase_order_rel
;
/**
* 关系型数据实体[Account_move_purchase_order_rel] 查询条件对象
*/
@Slf4j
@Data
public
class
Account_move_purchase_order_relSearchContext
extends
QueryWrapperContext
<
Account_move_purchase_order_rel
>
{
private
String
n_id_like
;
//[ID]
public
void
setN_id_like
(
String
n_id_like
)
{
this
.
n_id_like
=
n_id_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_id_like
)){
this
.
getSearchCond
().
like
(
"id"
,
n_id_like
);
}
}
private
Long
n_purchase_order_id_eq
;
//[ID]
public
void
setN_purchase_order_id_eq
(
Long
n_purchase_order_id_eq
)
{
this
.
n_purchase_order_id_eq
=
n_purchase_order_id_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_purchase_order_id_eq
)){
this
.
getSearchCond
().
eq
(
"purchase_order_id"
,
n_purchase_order_id_eq
);
}
}
private
Long
n_account_move_id_eq
;
//[ID]
public
void
setN_account_move_id_eq
(
Long
n_account_move_id_eq
)
{
this
.
n_account_move_id_eq
=
n_account_move_id_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_account_move_id_eq
)){
this
.
getSearchCond
().
eq
(
"account_move_id"
,
n_account_move_id_eq
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
this
.
getSearchCond
().
and
(
wrapper
->
wrapper
.
like
(
"id"
,
query
)
);
}
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/mapper/Account_move_purchase_order_relMapper.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.*
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
java.util.HashMap
;
import
org.apache.ibatis.annotations.Select
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_move_purchase_order_rel
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_move_purchase_order_relSearchContext
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
Account_move_purchase_order_relMapper
extends
BaseMapper
<
Account_move_purchase_order_rel
>{
Page
<
Account_move_purchase_order_rel
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
Account_move_purchase_order_relSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Account_move_purchase_order_rel
>
wrapper
)
;
@Override
Account_move_purchase_order_rel
selectById
(
Serializable
id
);
@Override
int
insert
(
Account_move_purchase_order_rel
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
Account_move_purchase_order_rel
entity
);
@Override
int
update
(
@Param
(
Constants
.
ENTITY
)
Account_move_purchase_order_rel
entity
,
@Param
(
"ew"
)
Wrapper
<
Account_move_purchase_order_rel
>
updateWrapper
);
@Override
int
deleteById
(
Serializable
id
);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select
(
"${sql}"
)
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update
(
"${sql}"
)
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert
(
"${sql}"
)
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
Account_move_purchase_order_rel
>
selectByAccountMoveId
(
@Param
(
"id"
)
Serializable
id
)
;
List
<
Account_move_purchase_order_rel
>
selectByPurchaseOrderId
(
@Param
(
"id"
)
Serializable
id
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/IAccount_move_purchase_order_relService.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
java.util.Collection
;
import
java.math.BigInteger
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_move_purchase_order_rel
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_move_purchase_order_relSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[Account_move_purchase_order_rel] 服务对象接口
*/
public
interface
IAccount_move_purchase_order_relService
extends
IService
<
Account_move_purchase_order_rel
>{
boolean
create
(
Account_move_purchase_order_rel
et
)
;
void
createBatch
(
List
<
Account_move_purchase_order_rel
>
list
)
;
boolean
update
(
Account_move_purchase_order_rel
et
)
;
void
updateBatch
(
List
<
Account_move_purchase_order_rel
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
Account_move_purchase_order_rel
get
(
String
key
)
;
Account_move_purchase_order_rel
getDraft
(
Account_move_purchase_order_rel
et
)
;
boolean
checkKey
(
Account_move_purchase_order_rel
et
)
;
boolean
save
(
Account_move_purchase_order_rel
et
)
;
void
saveBatch
(
List
<
Account_move_purchase_order_rel
>
list
)
;
Page
<
Account_move_purchase_order_rel
>
searchDefault
(
Account_move_purchase_order_relSearchContext
context
)
;
List
<
Account_move_purchase_order_rel
>
selectByAccountMoveId
(
Long
id
)
;
void
removeByAccountMoveId
(
Long
id
)
;
List
<
Account_move_purchase_order_rel
>
selectByPurchaseOrderId
(
Long
id
)
;
void
removeByPurchaseOrderId
(
Long
id
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List
<
JSONObject
>
select
(
String
sql
,
Map
param
);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean
execute
(
String
sql
,
Map
param
);
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/impl/Account_move_purchase_order_relServiceImpl.java
0 → 100644
浏览文件 @
cd7c83e8
package
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
impl
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Map
;
import
java.util.HashSet
;
import
java.util.HashMap
;
import
java.util.Collection
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.math.BigInteger
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
cn.ibizlab.businesscentral.util.errors.BadRequestAlertException
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_move_purchase_order_rel
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_move_purchase_order_relSearchContext
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.service.IAccount_move_purchase_order_relService
;
import
cn.ibizlab.businesscentral.util.helper.CachedBeanCopier
;
import
cn.ibizlab.businesscentral.util.helper.DEFieldCacheMap
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.mapper.Account_move_purchase_order_relMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.StringUtils
;
/**
* 实体[ 凭证录入采购单] 服务对象接口实现
*/
@Slf4j
@Service
(
"Account_move_purchase_order_relServiceImpl"
)
public
class
Account_move_purchase_order_relServiceImpl
extends
ServiceImpl
<
Account_move_purchase_order_relMapper
,
Account_move_purchase_order_rel
>
implements
IAccount_move_purchase_order_relService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_moveService
accountMoveService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
IPurchase_orderService
purchaseOrderService
;
protected
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
create
(
Account_move_purchase_order_rel
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
@Transactional
public
void
createBatch
(
List
<
Account_move_purchase_order_rel
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
Account_move_purchase_order_rel
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"id"
,
et
.
getId
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
@Transactional
public
void
updateBatch
(
List
<
Account_move_purchase_order_rel
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
@Transactional
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Transactional
public
Account_move_purchase_order_rel
get
(
String
key
)
{
Account_move_purchase_order_rel
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
Account_move_purchase_order_rel
();
et
.
setId
(
key
);
}
else
{
}
return
et
;
}
@Override
public
Account_move_purchase_order_rel
getDraft
(
Account_move_purchase_order_rel
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
Account_move_purchase_order_rel
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
@Override
@Transactional
public
boolean
save
(
Account_move_purchase_order_rel
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
public
boolean
saveOrUpdate
(
Account_move_purchase_order_rel
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
Account_move_purchase_order_rel
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
Account_move_purchase_order_rel
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
public
List
<
Account_move_purchase_order_rel
>
selectByAccountMoveId
(
Long
id
)
{
return
baseMapper
.
selectByAccountMoveId
(
id
);
}
@Override
public
void
removeByAccountMoveId
(
Long
id
)
{
this
.
remove
(
new
QueryWrapper
<
Account_move_purchase_order_rel
>().
eq
(
"account_move_id"
,
id
));
}
@Override
public
List
<
Account_move_purchase_order_rel
>
selectByPurchaseOrderId
(
Long
id
)
{
return
baseMapper
.
selectByPurchaseOrderId
(
id
);
}
@Override
public
void
removeByPurchaseOrderId
(
Long
id
)
{
this
.
remove
(
new
QueryWrapper
<
Account_move_purchase_order_rel
>().
eq
(
"purchase_order_id"
,
id
));
}
/**
* 查询集合 数据集
*/
@Override
public
Page
<
Account_move_purchase_order_rel
>
searchDefault
(
Account_move_purchase_order_relSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
Account_move_purchase_order_rel
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
Account_move_purchase_order_rel
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
@Override
public
List
<
JSONObject
>
select
(
String
sql
,
Map
param
){
return
this
.
baseMapper
.
selectBySQL
(
sql
,
param
);
}
@Override
@Transactional
public
boolean
execute
(
String
sql
,
Map
param
){
if
(
sql
==
null
||
sql
.
isEmpty
())
{
return
false
;
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"insert"
))
{
return
this
.
baseMapper
.
insertBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"update"
))
{
return
this
.
baseMapper
.
updateBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"delete"
))
{
return
this
.
baseMapper
.
deleteBySQL
(
sql
,
param
);
}
log
.
warn
(
"暂未支持的SQL语法"
);
return
true
;
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/impl/Purchase_orderServiceImpl.java
浏览文件 @
cd7c83e8
...
@@ -53,6 +53,9 @@ public class Purchase_orderServiceImpl extends ServiceImpl<Purchase_orderMapper,
...
@@ -53,6 +53,9 @@ public class Purchase_orderServiceImpl extends ServiceImpl<Purchase_orderMapper,
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_invoiceService
accountInvoiceService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_invoiceService
accountInvoiceService
;
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
IAccount_move_purchase_order_relService
accountMovePurchaseOrderRelService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
IPurchase_bill_unionService
purchaseBillUnionService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
IPurchase_bill_unionService
purchaseBillUnionService
;
@Autowired
@Autowired
@Lazy
@Lazy
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
cd7c83e8
...
@@ -132,6 +132,9 @@
...
@@ -132,6 +132,9 @@
<!--输出实体[ACCOUNT_MOVE_LINE]数据结构 -->
<!--输出实体[ACCOUNT_MOVE_LINE]数据结构 -->
<!--输出实体[ACCOUNT_MOVE_PURCHASE_ORDER_REL]数据结构 -->
<!--输出实体[ACCOUNT_MOVE_REVERSAL]数据结构 -->
<!--输出实体[ACCOUNT_MOVE_REVERSAL]数据结构 -->
...
@@ -771,6 +774,9 @@
...
@@ -771,6 +774,9 @@
<!--输出实体[NOTE_TAG]数据结构 -->
<!--输出实体[NOTE_TAG]数据结构 -->
<!--输出实体[PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL]数据结构 -->
<!--输出实体[PAYMENT_ACQUIRER]数据结构 -->
<!--输出实体[PAYMENT_ACQUIRER]数据结构 -->
...
@@ -1266,6 +1272,7 @@
...
@@ -1266,6 +1272,7 @@
<!--输出实体[ACCOUNT_JOURNAL]外键关系 -->
<!--输出实体[ACCOUNT_JOURNAL]外键关系 -->
<!--输出实体[ACCOUNT_MOVE]外键关系 -->
<!--输出实体[ACCOUNT_MOVE]外键关系 -->
<!--输出实体[ACCOUNT_MOVE_LINE]外键关系 -->
<!--输出实体[ACCOUNT_MOVE_LINE]外键关系 -->
<!--输出实体[ACCOUNT_MOVE_PURCHASE_ORDER_REL]外键关系 -->
<!--输出实体[ACCOUNT_MOVE_REVERSAL]外键关系 -->
<!--输出实体[ACCOUNT_MOVE_REVERSAL]外键关系 -->
<!--输出实体[ACCOUNT_PARTIAL_RECONCILE]外键关系 -->
<!--输出实体[ACCOUNT_PARTIAL_RECONCILE]外键关系 -->
<!--输出实体[ACCOUNT_PAYMENT]外键关系 -->
<!--输出实体[ACCOUNT_PAYMENT]外键关系 -->
...
@@ -1479,6 +1486,7 @@
...
@@ -1479,6 +1486,7 @@
<!--输出实体[NOTE_NOTE]外键关系 -->
<!--输出实体[NOTE_NOTE]外键关系 -->
<!--输出实体[NOTE_STAGE]外键关系 -->
<!--输出实体[NOTE_STAGE]外键关系 -->
<!--输出实体[NOTE_TAG]外键关系 -->
<!--输出实体[NOTE_TAG]外键关系 -->
<!--输出实体[PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL]外键关系 -->
<!--输出实体[PAYMENT_ACQUIRER]外键关系 -->
<!--输出实体[PAYMENT_ACQUIRER]外键关系 -->
<!--输出实体[PAYMENT_ACQUIRER_ONBOARDING_WIZARD]外键关系 -->
<!--输出实体[PAYMENT_ACQUIRER_ONBOARDING_WIZARD]外键关系 -->
<!--输出实体[PAYMENT_ICON]外键关系 -->
<!--输出实体[PAYMENT_ICON]外键关系 -->
...
...
businesscentral-core/src/main/resources/mapper/odoo_product/product_attribute_value_product_template_attribute_line_rel/PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper.xml
0 → 100644
浏览文件 @
cd7c83e8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.businesscentral.core.odoo_product.mapper.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELResultMap"
databaseId=
"postgresql"
>
<![CDATA[select t1.* from (SELECT t1.PRODUCT_ATTRIBUTE_VALUE_ID, t1.PRODUCT_TEMPLATE_ATTRIBUTE_LINE_ID FROM PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELResultMap"
type=
"cn.ibizlab.businesscentral.core.odoo_product.domain.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL"
autoMapping=
"true"
>
<result
property=
"productAttributeValueId"
column=
"product_attribute_value_id"
/>
<result
property=
"productTemplateAttributeLineId"
column=
"product_template_attribute_line_id"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"odooProductAttributeValue"
javaType=
"cn.ibizlab.businesscentral.core.odoo_product.domain.Product_attribute_value"
column=
"product_attribute_value_id"
select=
"cn.ibizlab.businesscentral.core.odoo_product.mapper.Product_attribute_valueMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"odooProductTemplateAttributeLine"
javaType=
"cn.ibizlab.businesscentral.core.odoo_product.domain.Product_template_attribute_line"
column=
"product_template_attribute_line_id"
select=
"cn.ibizlab.businesscentral.core.odoo_product.mapper.Product_template_attribute_lineMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_ATTRIBUTE_VALUE_ID] -->
<select
id=
"selectByProductAttributeValueId"
resultMap=
"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where product_attribute_value_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_ID] -->
<select
id=
"selectByProductTemplateAttributeLineId"
resultMap=
"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where product_template_attribute_line_id=#{id}
</select>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.businesscentral.core.odoo_product.filter.PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELSearchContext"
resultMap=
"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_RELResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"postgresql"
>
<![CDATA[ SELECT t1.PRODUCT_ATTRIBUTE_VALUE_ID, t1.PRODUCT_TEMPLATE_ATTRIBUTE_LINE_ID FROM PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"postgresql"
>
<![CDATA[ SELECT t1.PRODUCT_ATTRIBUTE_VALUE_ID, t1.PRODUCT_TEMPLATE_ATTRIBUTE_LINE_ID FROM PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL t1
]]>
</sql>
</mapper>
businesscentral-core/src/main/resources/mapper/odoo_purchase/account_move_purchase_order_rel/Account_move_purchase_order_relMapper.xml
0 → 100644
浏览文件 @
cd7c83e8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.businesscentral.core.odoo_purchase.mapper.Account_move_purchase_order_relMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"Account_move_purchase_order_relResultMap"
databaseId=
"postgresql"
>
<![CDATA[select t1.* from (SELECT t1.ACCOUNT_MOVE_ID, t1.PURCHASE_ORDER_ID FROM ACCOUNT_MOVE_PURCHASE_ORDER_REL t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"Account_move_purchase_order_relResultMap"
type=
"cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_move_purchase_order_rel"
autoMapping=
"true"
>
<result
property=
"purchaseOrderId"
column=
"purchase_order_id"
/>
<result
property=
"accountMoveId"
column=
"account_move_id"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"odooAccountMove"
javaType=
"cn.ibizlab.businesscentral.core.odoo_account.domain.Account_move"
column=
"account_move_id"
select=
"cn.ibizlab.businesscentral.core.odoo_account.mapper.Account_moveMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"odooPurchaseOrder"
javaType=
"cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order"
column=
"purchase_order_id"
select=
"cn.ibizlab.businesscentral.core.odoo_purchase.mapper.Purchase_orderMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_MOVE_PURCHASE_ORDER_REL_ACCOUNT_MOVE_ACCOUNT_MOVE_ID] -->
<select
id=
"selectByAccountMoveId"
resultMap=
"Account_move_purchase_order_relResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where account_move_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_MOVE_PURCHASE_ORDER_REL_PURCHASE_ORDER_PURCHASE_ORDER_ID] -->
<select
id=
"selectByPurchaseOrderId"
resultMap=
"Account_move_purchase_order_relResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where purchase_order_id=#{id}
</select>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_move_purchase_order_relSearchContext"
resultMap=
"Account_move_purchase_order_relResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"postgresql"
>
<![CDATA[ SELECT t1.ACCOUNT_MOVE_ID, t1.PURCHASE_ORDER_ID FROM ACCOUNT_MOVE_PURCHASE_ORDER_REL t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"postgresql"
>
<![CDATA[ SELECT t1.ACCOUNT_MOVE_ID, t1.PURCHASE_ORDER_ID FROM ACCOUNT_MOVE_PURCHASE_ORDER_REL t1
]]>
</sql>
</mapper>
businesscentral-core/src/main/resources/sysmodel/iBizBusinessCentral.json
浏览文件 @
cd7c83e8
...
@@ -19196,6 +19196,12 @@
...
@@ -19196,6 +19196,12 @@
"entity_name":"ACCOUNT_MOVE_LINE",
"entity_name":"ACCOUNT_MOVE_LINE",
"ref_entity_name":"ACCOUNT_MOVE"
"ref_entity_name":"ACCOUNT_MOVE"
},
},
{"name":"DER1N_ACCOUNT_MOVE_PURCHASE_ORDER_REL_ACCOUNT_MOVE_ACCOUNT_MOVE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_account_move",
"entity_name":"ACCOUNT_MOVE_PURCHASE_ORDER_REL",
"ref_entity_name":"ACCOUNT_MOVE"
},
{"name":"DER1N_ACCOUNT_MOVE__ACCOUNT_MOVE__REVERSE_ENTRY_ID",
{"name":"DER1N_ACCOUNT_MOVE__ACCOUNT_MOVE__REVERSE_ENTRY_ID",
"relation_type":"DER1N",
"relation_type":"DER1N",
"code_name":"Odoo_reverse_entry",
"code_name":"Odoo_reverse_entry",
...
@@ -20508,6 +20514,78 @@
...
@@ -20508,6 +20514,78 @@
"ref_entity_name":"UOM_UOM"
"ref_entity_name":"UOM_UOM"
}
}
]
]
}
,
{
"entity_name":"ACCOUNT_MOVE_PURCHASE_ORDER_REL",
"logic_name":" 凭证录入采购单",
"code_name":"Account_move_purchase_order_rel",
"table_name":"ACCOUNT_MOVE_PURCHASE_ORDER_REL",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"ID",
"entity_name":"Account_move_purchase_order_rel",
"field_type":"GUID",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":200,
"key_field":1,
"major_field":1
},
{
"fieldname":"PURCHASE_ORDER_ID" ,
"codename":"Purchase_order_id",
"field_logic_name":"ID",
"entity_name":"Account_move_purchase_order_rel",
"ref_de":"PURCHASE_ORDER",
"ref_field_name":"ID",
"relation_name":"DER1N_ACCOUNT_MOVE_PURCHASE_ORDER_REL_PURCHASE_ORDER_PURCHASE_ORDER_ID",
"relation_codename":"Odoo_purchase_order",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"major_field":0
},
{
"fieldname":"ACCOUNT_MOVE_ID" ,
"codename":"Account_move_id",
"field_logic_name":"ID",
"entity_name":"Account_move_purchase_order_rel",
"ref_de":"ACCOUNT_MOVE",
"ref_field_name":"ID",
"relation_name":"DER1N_ACCOUNT_MOVE_PURCHASE_ORDER_REL_ACCOUNT_MOVE_ACCOUNT_MOVE_ID",
"relation_codename":"Odoo_account_move",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_ACCOUNT_MOVE_PURCHASE_ORDER_REL_ACCOUNT_MOVE_ACCOUNT_MOVE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_account_move",
"entity_name":"ACCOUNT_MOVE_PURCHASE_ORDER_REL",
"ref_entity_name":"ACCOUNT_MOVE"
},
{"name":"DER1N_ACCOUNT_MOVE_PURCHASE_ORDER_REL_PURCHASE_ORDER_PURCHASE_ORDER_ID",
"relation_type":"DER1N",
"code_name":"Odoo_purchase_order",
"entity_name":"ACCOUNT_MOVE_PURCHASE_ORDER_REL",
"ref_entity_name":"PURCHASE_ORDER"
}
]
}
}
,
,
{
{
...
@@ -104843,6 +104921,78 @@
...
@@ -104843,6 +104921,78 @@
"ref_entity_name":"RES_USERS"
"ref_entity_name":"RES_USERS"
}
}
]
]
}
,
{
"entity_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"logic_name":"产品属性",
"code_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"table_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"ID",
"entity_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"field_type":"GUID",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":200,
"key_field":1,
"major_field":1
},
{
"fieldname":"PRODUCT_ATTRIBUTE_VALUE_ID" ,
"codename":"Product_attribute_value_id",
"field_logic_name":"ID",
"entity_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"ref_de":"PRODUCT_ATTRIBUTE_VALUE",
"ref_field_name":"ID",
"relation_name":"DER1N_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_ATTRIBUTE_VALUE_ID",
"relation_codename":"Odoo_product_attribute_value",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"major_field":0
},
{
"fieldname":"PRODUCT_TEMPLATE_ATTRIBUTE_LINE_ID" ,
"codename":"Product_template_attribute_line_id",
"field_logic_name":"ID",
"entity_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"ref_de":"PRODUCT_TEMPLATE_ATTRIBUTE_LINE",
"ref_field_name":"ID",
"relation_name":"DER1N_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_ID",
"relation_codename":"Odoo_product_template_attribute_line",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_ATTRIBUTE_VALUE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_product_attribute_value",
"entity_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"ref_entity_name":"PRODUCT_ATTRIBUTE_VALUE"
},
{"name":"DER1N_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_product_template_attribute_line",
"entity_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"ref_entity_name":"PRODUCT_TEMPLATE_ATTRIBUTE_LINE"
}
]
}
}
,
,
{
{
...
@@ -108657,6 +108807,12 @@
...
@@ -108657,6 +108807,12 @@
"entity_name":"PRODUCT_ATTRIBUTE_CUSTOM_VALUE",
"entity_name":"PRODUCT_ATTRIBUTE_CUSTOM_VALUE",
"ref_entity_name":"PRODUCT_ATTRIBUTE_VALUE"
"ref_entity_name":"PRODUCT_ATTRIBUTE_VALUE"
},
},
{"name":"DER1N_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_ATTRIBUTE_VALUE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_product_attribute_value",
"entity_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"ref_entity_name":"PRODUCT_ATTRIBUTE_VALUE"
},
{"name":"DER1N_PRODUCT_TEMPLATE_ATTRIBUTE_VALUE__PRODUCT_ATTRIBUTE_VALUE__PRODUCT_ATTRIBUTE_VALUE_ID",
{"name":"DER1N_PRODUCT_TEMPLATE_ATTRIBUTE_VALUE__PRODUCT_ATTRIBUTE_VALUE__PRODUCT_ATTRIBUTE_VALUE_ID",
"relation_type":"DER1N",
"relation_type":"DER1N",
"code_name":"Odoo_product_attribute_value",
"code_name":"Odoo_product_attribute_value",
...
@@ -118648,6 +118804,12 @@
...
@@ -118648,6 +118804,12 @@
}
}
],
],
"subEntitys":[
"subEntitys":[
{"name":"DER1N_PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_product_template_attribute_line",
"entity_name":"PRODUCT_ATTRIBUTE_VALUE_PRODUCT_TEMPLATE_ATTRIBUTE_LINE_REL",
"ref_entity_name":"PRODUCT_TEMPLATE_ATTRIBUTE_LINE"
}
],
],
"parentEntitys":[
"parentEntitys":[
{"name":"DER1N_PRODUCT_TEMPLATE_ATTRIBUTE_LINE__PRODUCT_ATTRIBUTE__ATTRIBUTE_ID",
{"name":"DER1N_PRODUCT_TEMPLATE_ATTRIBUTE_LINE__PRODUCT_ATTRIBUTE__ATTRIBUTE_ID",
...
@@ -123109,6 +123271,12 @@
...
@@ -123109,6 +123271,12 @@
"entity_name":"ACCOUNT_INVOICE",
"entity_name":"ACCOUNT_INVOICE",
"ref_entity_name":"PURCHASE_ORDER"
"ref_entity_name":"PURCHASE_ORDER"
},
},
{"name":"DER1N_ACCOUNT_MOVE_PURCHASE_ORDER_REL_PURCHASE_ORDER_PURCHASE_ORDER_ID",
"relation_type":"DER1N",
"code_name":"Odoo_purchase_order",
"entity_name":"ACCOUNT_MOVE_PURCHASE_ORDER_REL",
"ref_entity_name":"PURCHASE_ORDER"
},
{"name":"DER1N_PURCHASE_BILL_UNION__PURCHASE_ORDER__PURCHASE_ORDER_ID",
{"name":"DER1N_PURCHASE_BILL_UNION__PURCHASE_ORDER__PURCHASE_ORDER_ID",
"relation_type":"DER1N",
"relation_type":"DER1N",
"code_name":"Odoo_purchase_order",
"code_name":"Odoo_purchase_order",
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录