Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz商业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz商业套件
iBiz商业中心
提交
f8c4c539
提交
f8c4c539
编写于
10月 27, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
540b43e1
变更
20
展开全部
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
908 行增加
和
0 行删除
+908
-0
Purchase_order_lineExService.java
...core/extensions/service/Purchase_order_lineExService.java
+35
-0
Account_taxServiceImpl.java
...ore/odoo_account/service/impl/Account_taxServiceImpl.java
+3
-0
purchase_orderFallback.java
...ral/core/odoo_purchase/client/purchase_orderFallback.java
+4
-0
purchase_orderFeignClient.java
.../core/odoo_purchase/client/purchase_orderFeignClient.java
+4
-0
purchase_order_lineFallback.java
...ore/odoo_purchase/client/purchase_order_lineFallback.java
+4
-0
purchase_order_lineFeignClient.java
.../odoo_purchase/client/purchase_order_lineFeignClient.java
+4
-0
Account_tax_purchase_order_line_rel.java
..._purchase/domain/Account_tax_purchase_order_line_rel.java
+123
-0
Account_tax_purchase_order_line_relSearchContext.java
...ter/Account_tax_purchase_order_line_relSearchContext.java
+57
-0
Account_tax_purchase_order_line_relMapper.java
...ase/mapper/Account_tax_purchase_order_line_relMapper.java
+69
-0
IAccount_tax_purchase_order_line_relService.java
.../service/IAccount_tax_purchase_order_line_relService.java
+62
-0
IPurchase_orderService.java
...al/core/odoo_purchase/service/IPurchase_orderService.java
+1
-0
IPurchase_order_lineService.java
...re/odoo_purchase/service/IPurchase_order_lineService.java
+1
-0
Account_tax_purchase_order_line_relServiceImpl.java
.../impl/Account_tax_purchase_order_line_relServiceImpl.java
+255
-0
Purchase_orderServiceImpl.java
...odoo_purchase/service/impl/Purchase_orderServiceImpl.java
+7
-0
Purchase_order_lineServiceImpl.java
...purchase/service/impl/Purchase_order_lineServiceImpl.java
+10
-0
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+4
-0
Account_tax_purchase_order_line_relMapper.xml
...er_line_rel/Account_tax_purchase_order_line_relMapper.xml
+58
-0
iBizBusinessCentral.json
...core/src/main/resources/sysmodel/iBizBusinessCentral.json
+86
-0
Purchase_orderResource.java
...lab/businesscentral/core/rest/Purchase_orderResource.java
+44
-0
Purchase_order_lineResource.java
...usinesscentral/core/rest/Purchase_order_lineResource.java
+77
-0
未找到文件。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions/service/Purchase_order_lineExService.java
0 → 100644
浏览文件 @
f8c4c539
package
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.service.impl.Purchase_order_lineServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order_line
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[采购订单行] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"Purchase_order_lineExService"
)
public
class
Purchase_order_lineExService
extends
Purchase_order_lineServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[Product_change]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Purchase_order_line
product_change
(
Purchase_order_line
et
)
{
return
super
.
product_change
(
et
);
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_account/service/impl/Account_taxServiceImpl.java
浏览文件 @
f8c4c539
...
@@ -64,6 +64,9 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
...
@@ -64,6 +64,9 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_reconcile_modelService
accountReconcileModelService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_reconcile_modelService
accountReconcileModelService
;
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
IAccount_tax_purchase_order_line_relService
accountTaxPurchaseOrderLineRelService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_base
.
service
.
IRes_companyService
resCompanyService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_base
.
service
.
IRes_companyService
resCompanyService
;
@Autowired
@Autowired
@Lazy
@Lazy
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/client/purchase_orderFallback.java
浏览文件 @
f8c4c539
...
@@ -84,6 +84,10 @@ public class purchase_orderFallback implements purchase_orderFeignClient{
...
@@ -84,6 +84,10 @@ public class purchase_orderFallback implements purchase_orderFeignClient{
return
null
;
return
null
;
}
}
public
Purchase_order
calc_amount
(
Long
id
,
Purchase_order
purchase_order
){
return
null
;
}
public
Boolean
checkKey
(
Purchase_order
purchase_order
){
public
Boolean
checkKey
(
Purchase_order
purchase_order
){
return
false
;
return
false
;
}
}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/client/purchase_orderFeignClient.java
浏览文件 @
f8c4c539
...
@@ -80,6 +80,10 @@ public interface purchase_orderFeignClient {
...
@@ -80,6 +80,10 @@ public interface purchase_orderFeignClient {
Purchase_order
button_unlock
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
Purchase_order
button_unlock
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{id}/calc_amount"
)
Purchase_order
calc_amount
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order
purchase_order
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/checkkey"
)
Boolean
checkKey
(
@RequestBody
Purchase_order
purchase_order
);
Boolean
checkKey
(
@RequestBody
Purchase_order
purchase_order
);
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/client/purchase_order_lineFallback.java
浏览文件 @
f8c4c539
...
@@ -69,6 +69,10 @@ public class purchase_order_lineFallback implements purchase_order_lineFeignClie
...
@@ -69,6 +69,10 @@ public class purchase_order_lineFallback implements purchase_order_lineFeignClie
}
}
public
Purchase_order_line
product_change
(
Long
id
,
Purchase_order_line
purchase_order_line
){
return
null
;
}
public
Boolean
save
(
Purchase_order_line
purchase_order_line
){
public
Boolean
save
(
Purchase_order_line
purchase_order_line
){
return
false
;
return
false
;
}
}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/client/purchase_order_lineFeignClient.java
浏览文件 @
f8c4c539
...
@@ -64,6 +64,10 @@ public interface purchase_order_lineFeignClient {
...
@@ -64,6 +64,10 @@ public interface purchase_order_lineFeignClient {
Boolean
checkKey
(
@RequestBody
Purchase_order_line
purchase_order_line
);
Boolean
checkKey
(
@RequestBody
Purchase_order_line
purchase_order_line
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_order_lines/{id}/product_change"
)
Purchase_order_line
product_change
(
@PathVariable
(
"id"
)
Long
id
,
@RequestBody
Purchase_order_line
purchase_order_line
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_order_lines/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_order_lines/save"
)
Boolean
save
(
@RequestBody
Purchase_order_line
purchase_order_line
);
Boolean
save
(
@RequestBody
Purchase_order_line
purchase_order_line
);
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/domain/Account_tax_purchase_order_line_rel.java
0 → 100644
浏览文件 @
f8c4c539
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_TAX_PURCHASE_ORDER_LINE_REL"
,
resultMap
=
"Account_tax_purchase_order_line_relResultMap"
)
public
class
Account_tax_purchase_order_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
Long
id
;
/**
* ID
*/
@DEField
(
name
=
"purchase_order_line_id"
)
@TableField
(
value
=
"purchase_order_line_id"
)
@JSONField
(
name
=
"purchase_order_line_id"
)
@JsonProperty
(
"purchase_order_line_id"
)
private
Long
purchaseOrderLineId
;
/**
* ID
*/
@DEField
(
name
=
"account_tax_id"
)
@TableField
(
value
=
"account_tax_id"
)
@JSONField
(
name
=
"account_tax_id"
)
@JsonProperty
(
"account_tax_id"
)
private
Long
accountTaxId
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
domain
.
Account_tax
odooAccountTax
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
domain
.
Purchase_order_line
odooPurchaseOrderLine
;
/**
* 设置 [ID]
*/
public
void
setPurchaseOrderLineId
(
Long
purchaseOrderLineId
){
this
.
purchaseOrderLineId
=
purchaseOrderLineId
;
this
.
modify
(
"purchase_order_line_id"
,
purchaseOrderLineId
);
}
/**
* 设置 [ID]
*/
public
void
setAccountTaxId
(
Long
accountTaxId
){
this
.
accountTaxId
=
accountTaxId
;
this
.
modify
(
"account_tax_id"
,
accountTaxId
);
}
@Override
public
Serializable
getDefaultKey
(
boolean
gen
)
{
return
IdWorker
.
getId
();
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"id"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/filter/Account_tax_purchase_order_line_relSearchContext.java
0 → 100644
浏览文件 @
f8c4c539
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_tax_purchase_order_line_rel
;
/**
* 关系型数据实体[Account_tax_purchase_order_line_rel] 查询条件对象
*/
@Slf4j
@Data
public
class
Account_tax_purchase_order_line_relSearchContext
extends
QueryWrapperContext
<
Account_tax_purchase_order_line_rel
>
{
private
Long
n_purchase_order_line_id_eq
;
//[ID]
public
void
setN_purchase_order_line_id_eq
(
Long
n_purchase_order_line_id_eq
)
{
this
.
n_purchase_order_line_id_eq
=
n_purchase_order_line_id_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_purchase_order_line_id_eq
)){
this
.
getSearchCond
().
eq
(
"purchase_order_line_id"
,
n_purchase_order_line_id_eq
);
}
}
private
Long
n_account_tax_id_eq
;
//[ID]
public
void
setN_account_tax_id_eq
(
Long
n_account_tax_id_eq
)
{
this
.
n_account_tax_id_eq
=
n_account_tax_id_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_account_tax_id_eq
)){
this
.
getSearchCond
().
eq
(
"account_tax_id"
,
n_account_tax_id_eq
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
}
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/mapper/Account_tax_purchase_order_line_relMapper.java
0 → 100644
浏览文件 @
f8c4c539
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_tax_purchase_order_line_rel
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_tax_purchase_order_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
Account_tax_purchase_order_line_relMapper
extends
BaseMapper
<
Account_tax_purchase_order_line_rel
>{
Page
<
Account_tax_purchase_order_line_rel
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
Account_tax_purchase_order_line_relSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Account_tax_purchase_order_line_rel
>
wrapper
)
;
@Override
Account_tax_purchase_order_line_rel
selectById
(
Serializable
id
);
@Override
int
insert
(
Account_tax_purchase_order_line_rel
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
Account_tax_purchase_order_line_rel
entity
);
@Override
int
update
(
@Param
(
Constants
.
ENTITY
)
Account_tax_purchase_order_line_rel
entity
,
@Param
(
"ew"
)
Wrapper
<
Account_tax_purchase_order_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
<
Account_tax_purchase_order_line_rel
>
selectByAccountTaxId
(
@Param
(
"id"
)
Serializable
id
)
;
List
<
Account_tax_purchase_order_line_rel
>
selectByPurchaseOrderLineId
(
@Param
(
"id"
)
Serializable
id
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/IAccount_tax_purchase_order_line_relService.java
0 → 100644
浏览文件 @
f8c4c539
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_tax_purchase_order_line_rel
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_tax_purchase_order_line_relSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[Account_tax_purchase_order_line_rel] 服务对象接口
*/
public
interface
IAccount_tax_purchase_order_line_relService
extends
IService
<
Account_tax_purchase_order_line_rel
>{
boolean
create
(
Account_tax_purchase_order_line_rel
et
)
;
void
createBatch
(
List
<
Account_tax_purchase_order_line_rel
>
list
)
;
boolean
update
(
Account_tax_purchase_order_line_rel
et
)
;
void
updateBatch
(
List
<
Account_tax_purchase_order_line_rel
>
list
)
;
boolean
remove
(
Long
key
)
;
void
removeBatch
(
Collection
<
Long
>
idList
)
;
Account_tax_purchase_order_line_rel
get
(
Long
key
)
;
Account_tax_purchase_order_line_rel
getDraft
(
Account_tax_purchase_order_line_rel
et
)
;
boolean
checkKey
(
Account_tax_purchase_order_line_rel
et
)
;
boolean
save
(
Account_tax_purchase_order_line_rel
et
)
;
void
saveBatch
(
List
<
Account_tax_purchase_order_line_rel
>
list
)
;
Page
<
Account_tax_purchase_order_line_rel
>
searchDefault
(
Account_tax_purchase_order_line_relSearchContext
context
)
;
List
<
Account_tax_purchase_order_line_rel
>
selectByAccountTaxId
(
Long
id
)
;
void
removeByAccountTaxId
(
Long
id
)
;
List
<
Account_tax_purchase_order_line_rel
>
selectByPurchaseOrderLineId
(
Long
id
)
;
void
removeByPurchaseOrderLineId
(
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/IPurchase_orderService.java
浏览文件 @
f8c4c539
...
@@ -39,6 +39,7 @@ public interface IPurchase_orderService extends IService<Purchase_order>{
...
@@ -39,6 +39,7 @@ public interface IPurchase_orderService extends IService<Purchase_order>{
Purchase_order
button_confirm
(
Purchase_order
et
)
;
Purchase_order
button_confirm
(
Purchase_order
et
)
;
Purchase_order
button_done
(
Purchase_order
et
)
;
Purchase_order
button_done
(
Purchase_order
et
)
;
Purchase_order
button_unlock
(
Purchase_order
et
)
;
Purchase_order
button_unlock
(
Purchase_order
et
)
;
Purchase_order
calc_amount
(
Purchase_order
et
)
;
boolean
checkKey
(
Purchase_order
et
)
;
boolean
checkKey
(
Purchase_order
et
)
;
Purchase_order
get_name
(
Purchase_order
et
)
;
Purchase_order
get_name
(
Purchase_order
et
)
;
boolean
save
(
Purchase_order
et
)
;
boolean
save
(
Purchase_order
et
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/IPurchase_order_lineService.java
浏览文件 @
f8c4c539
...
@@ -35,6 +35,7 @@ public interface IPurchase_order_lineService extends IService<Purchase_order_lin
...
@@ -35,6 +35,7 @@ public interface IPurchase_order_lineService extends IService<Purchase_order_lin
Purchase_order_line
get
(
Long
key
)
;
Purchase_order_line
get
(
Long
key
)
;
Purchase_order_line
getDraft
(
Purchase_order_line
et
)
;
Purchase_order_line
getDraft
(
Purchase_order_line
et
)
;
boolean
checkKey
(
Purchase_order_line
et
)
;
boolean
checkKey
(
Purchase_order_line
et
)
;
Purchase_order_line
product_change
(
Purchase_order_line
et
)
;
boolean
save
(
Purchase_order_line
et
)
;
boolean
save
(
Purchase_order_line
et
)
;
void
saveBatch
(
List
<
Purchase_order_line
>
list
)
;
void
saveBatch
(
List
<
Purchase_order_line
>
list
)
;
Page
<
Purchase_order_line
>
searchDefault
(
Purchase_order_lineSearchContext
context
)
;
Page
<
Purchase_order_line
>
searchDefault
(
Purchase_order_lineSearchContext
context
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/impl/Account_tax_purchase_order_line_relServiceImpl.java
0 → 100644
浏览文件 @
f8c4c539
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_tax_purchase_order_line_rel
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_tax_purchase_order_line_relSearchContext
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.service.IAccount_tax_purchase_order_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.util.helper.EBSServiceImpl
;
import
cn.ibizlab.businesscentral.core.odoo_purchase.mapper.Account_tax_purchase_order_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
(
"Account_tax_purchase_order_line_relServiceImpl"
)
public
class
Account_tax_purchase_order_line_relServiceImpl
extends
EBSServiceImpl
<
Account_tax_purchase_order_line_relMapper
,
Account_tax_purchase_order_line_rel
>
implements
IAccount_tax_purchase_order_line_relService
{
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_taxService
accountTaxService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
IPurchase_order_lineService
purchaseOrderLineService
;
protected
int
batchSize
=
500
;
public
String
getIrModel
(){
return
"account.tax.purchase.order.line.rel"
;
}
private
boolean
messageinfo
=
false
;
public
void
setMessageInfo
(
boolean
messageinfo
){
this
.
messageinfo
=
messageinfo
;
}
@Override
@Transactional
public
boolean
create
(
Account_tax_purchase_order_line_rel
et
)
{
boolean
mail_create_nosubscribe
=
et
.
get
(
"mail_create_nosubscribe"
)
!=
null
;
boolean
mail_create_nolog
=
et
.
get
(
"mail_create_nolog"
)
!=
null
;
boolean
mail_notrack
=
et
.
get
(
"mail_notrack"
)
!=
null
;
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
if
(
messageinfo
&&
!
mail_create_nosubscribe
&&
false
)
{
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
SpringContextHolder
.
getBean
(
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
.
Mail_followersExService
.
class
).
add_default_followers
(
this
,
et
);
}
if
(
messageinfo
&&
!
mail_create_nolog
&&
false
)
{
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
SpringContextHolder
.
getBean
(
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
.
Mail_tracking_valueExService
.
class
).
add_default_create_message
(
this
,
et
);
}
if
(
messageinfo
&&
!
mail_notrack
&&
false
)
{
}
return
true
;
}
@Override
@Transactional
public
void
createBatch
(
List
<
Account_tax_purchase_order_line_rel
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
Account_tax_purchase_order_line_rel
et
)
{
Account_tax_purchase_order_line_rel
old
=
new
Account_tax_purchase_order_line_rel
()
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
old
);
boolean
mail_notrack
=
et
.
get
(
"mail_notrack"
)
!=
null
;
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"id"
,
et
.
getId
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
if
(
messageinfo
&&
!
mail_notrack
&&
false
)
{
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
SpringContextHolder
.
getBean
(
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
.
Mail_tracking_valueExService
.
class
).
message_track
(
this
,
old
,
et
);
}
return
true
;
}
@Override
@Transactional
public
void
updateBatch
(
List
<
Account_tax_purchase_order_line_rel
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
Long
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
@Transactional
public
void
removeBatch
(
Collection
<
Long
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Transactional
public
Account_tax_purchase_order_line_rel
get
(
Long
key
)
{
Account_tax_purchase_order_line_rel
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
Account_tax_purchase_order_line_rel
();
}
else
{
}
return
et
;
}
@Override
public
Account_tax_purchase_order_line_rel
getDraft
(
Account_tax_purchase_order_line_rel
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
Account_tax_purchase_order_line_rel
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
@Override
@Transactional
public
boolean
save
(
Account_tax_purchase_order_line_rel
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
public
boolean
saveOrUpdate
(
Account_tax_purchase_order_line_rel
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
Account_tax_purchase_order_line_rel
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
Account_tax_purchase_order_line_rel
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
public
List
<
Account_tax_purchase_order_line_rel
>
selectByAccountTaxId
(
Long
id
)
{
return
baseMapper
.
selectByAccountTaxId
(
id
);
}
@Override
public
void
removeByAccountTaxId
(
Long
id
)
{
this
.
remove
(
new
QueryWrapper
<
Account_tax_purchase_order_line_rel
>().
eq
(
"account_tax_id"
,
id
));
}
@Override
public
List
<
Account_tax_purchase_order_line_rel
>
selectByPurchaseOrderLineId
(
Long
id
)
{
return
baseMapper
.
selectByPurchaseOrderLineId
(
id
);
}
@Override
public
void
removeByPurchaseOrderLineId
(
Long
id
)
{
this
.
remove
(
new
QueryWrapper
<
Account_tax_purchase_order_line_rel
>().
eq
(
"purchase_order_line_id"
,
id
));
}
/**
* 查询集合 数据集
*/
@Override
public
Page
<
Account_tax_purchase_order_line_rel
>
searchDefault
(
Account_tax_purchase_order_line_relSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
Account_tax_purchase_order_line_rel
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
Account_tax_purchase_order_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_purchase/service/impl/Purchase_orderServiceImpl.java
浏览文件 @
f8c4c539
...
@@ -233,6 +233,13 @@ public class Purchase_orderServiceImpl extends EBSServiceImpl<Purchase_orderMapp
...
@@ -233,6 +233,13 @@ public class Purchase_orderServiceImpl extends EBSServiceImpl<Purchase_orderMapp
return
et
;
return
et
;
}
}
@Override
@Transactional
public
Purchase_order
calc_amount
(
Purchase_order
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
public
boolean
checkKey
(
Purchase_order
et
)
{
public
boolean
checkKey
(
Purchase_order
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/odoo_purchase/service/impl/Purchase_order_lineServiceImpl.java
浏览文件 @
f8c4c539
...
@@ -55,6 +55,9 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
...
@@ -55,6 +55,9 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_invoice_lineService
accountInvoiceLineService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_account
.
service
.
IAccount_invoice_lineService
accountInvoiceLineService
;
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_purchase
.
service
.
IAccount_tax_purchase_order_line_relService
accountTaxPurchaseOrderLineRelService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_stock
.
service
.
IStock_moveService
stockMoveService
;
protected
cn
.
ibizlab
.
businesscentral
.
core
.
odoo_stock
.
service
.
IStock_moveService
stockMoveService
;
@Autowired
@Autowired
@Lazy
@Lazy
...
@@ -194,6 +197,13 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
...
@@ -194,6 +197,13 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
public
boolean
checkKey
(
Purchase_order_line
et
)
{
public
boolean
checkKey
(
Purchase_order_line
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
}
@Override
@Transactional
public
Purchase_order_line
product_change
(
Purchase_order_line
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
Purchase_order_line
et
)
{
public
boolean
save
(
Purchase_order_line
et
)
{
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
f8c4c539
...
@@ -177,6 +177,9 @@
...
@@ -177,6 +177,9 @@
<!--输出实体[ACCOUNT_TAX_GROUP]数据结构 -->
<!--输出实体[ACCOUNT_TAX_GROUP]数据结构 -->
<!--输出实体[ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL]数据结构 -->
<!--输出实体[ACCOUNT_TAX_TEMPLATE]数据结构 -->
<!--输出实体[ACCOUNT_TAX_TEMPLATE]数据结构 -->
...
@@ -1296,6 +1299,7 @@
...
@@ -1296,6 +1299,7 @@
<!--输出实体[ACCOUNT_SETUP_BANK_MANUAL_CONFIG]外键关系 -->
<!--输出实体[ACCOUNT_SETUP_BANK_MANUAL_CONFIG]外键关系 -->
<!--输出实体[ACCOUNT_TAX]外键关系 -->
<!--输出实体[ACCOUNT_TAX]外键关系 -->
<!--输出实体[ACCOUNT_TAX_GROUP]外键关系 -->
<!--输出实体[ACCOUNT_TAX_GROUP]外键关系 -->
<!--输出实体[ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL]外键关系 -->
<!--输出实体[ACCOUNT_TAX_TEMPLATE]外键关系 -->
<!--输出实体[ACCOUNT_TAX_TEMPLATE]外键关系 -->
<!--输出实体[ACCOUNT_UNRECONCILE]外键关系 -->
<!--输出实体[ACCOUNT_UNRECONCILE]外键关系 -->
<!--输出实体[ASSET_ASSET]外键关系 -->
<!--输出实体[ASSET_ASSET]外键关系 -->
...
...
businesscentral-core/src/main/resources/mapper/odoo_purchase/account_tax_purchase_order_line_rel/Account_tax_purchase_order_line_relMapper.xml
0 → 100644
浏览文件 @
f8c4c539
<?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_tax_purchase_order_line_relMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"Account_tax_purchase_order_line_relResultMap"
databaseId=
"postgresql"
>
<![CDATA[select t1.* from (SELECT t1.ACCOUNT_TAX_ID, t1.PURCHASE_ORDER_LINE_ID FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"Account_tax_purchase_order_line_relResultMap"
type=
"cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_tax_purchase_order_line_rel"
autoMapping=
"true"
>
<result
property=
"purchaseOrderLineId"
column=
"purchase_order_line_id"
/>
<result
property=
"accountTaxId"
column=
"account_tax_id"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"odooAccountTax"
javaType=
"cn.ibizlab.businesscentral.core.odoo_account.domain.Account_tax"
column=
"account_tax_id"
select=
"cn.ibizlab.businesscentral.core.odoo_account.mapper.Account_taxMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"odooPurchaseOrderLine"
javaType=
"cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order_line"
column=
"purchase_order_line_id"
select=
"cn.ibizlab.businesscentral.core.odoo_purchase.mapper.Purchase_order_lineMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_ACCOUNT_TAX_ACCOUNT_TAX_ID] -->
<select
id=
"selectByAccountTaxId"
resultMap=
"Account_tax_purchase_order_line_relResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where account_tax_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_PURCHASE_ORDER_LINE_PURCHASE_ORDER_LINE_ID] -->
<select
id=
"selectByPurchaseOrderLineId"
resultMap=
"Account_tax_purchase_order_line_relResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where purchase_order_line_id=#{id}
</select>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_tax_purchase_order_line_relSearchContext"
resultMap=
"Account_tax_purchase_order_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.ACCOUNT_TAX_ID, t1.PURCHASE_ORDER_LINE_ID FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"postgresql"
>
<![CDATA[ SELECT t1.ACCOUNT_TAX_ID, t1.PURCHASE_ORDER_LINE_ID FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL t1
]]>
</sql>
</mapper>
businesscentral-core/src/main/resources/sysmodel/iBizBusinessCentral.json
浏览文件 @
f8c4c539
...
@@ -28044,6 +28044,12 @@
...
@@ -28044,6 +28044,12 @@
"entity_name":"ACCOUNT_RECONCILE_MODEL",
"entity_name":"ACCOUNT_RECONCILE_MODEL",
"ref_entity_name":"ACCOUNT_TAX"
"ref_entity_name":"ACCOUNT_TAX"
},
},
{"name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_ACCOUNT_TAX_ACCOUNT_TAX_ID",
"relation_type":"DER1N",
"code_name":"Odoo_account_tax",
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"ref_entity_name":"ACCOUNT_TAX"
},
{"name":"DER1N_RES_COMPANY__ACCOUNT_TAX__ACCOUNT_PURCHASE_TAX_ID",
{"name":"DER1N_RES_COMPANY__ACCOUNT_TAX__ACCOUNT_PURCHASE_TAX_ID",
"relation_type":"DER1N",
"relation_type":"DER1N",
"code_name":"Odoo_account_purchase_tax",
"code_name":"Odoo_account_purchase_tax",
...
@@ -28313,6 +28319,80 @@
...
@@ -28313,6 +28319,80 @@
"ref_entity_name":"RES_USERS"
"ref_entity_name":"RES_USERS"
}
}
]
]
}
,
{
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"logic_name":"采购订单税率",
"code_name":"Account_tax_purchase_order_line_rel",
"table_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"id",
"entity_name":"Account_tax_purchase_order_line_rel",
"field_type":"ACID",
"nullable":1,
"physical_field":0,
"data_type":"BIGINT",
"key_field":1,
"show_order":1000,
"major_field":0
},
{
"fieldname":"PURCHASE_ORDER_LINE_ID" ,
"codename":"Purchase_order_line_id",
"field_logic_name":"ID",
"entity_name":"Account_tax_purchase_order_line_rel",
"ref_de":"PURCHASE_ORDER_LINE",
"ref_field_name":"ID",
"relation_name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_PURCHASE_ORDER_LINE_PURCHASE_ORDER_LINE_ID",
"relation_codename":"Odoo_purchase_order_line",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"ACCOUNT_TAX_ID" ,
"codename":"Account_tax_id",
"field_logic_name":"ID",
"entity_name":"Account_tax_purchase_order_line_rel",
"ref_de":"ACCOUNT_TAX",
"ref_field_name":"ID",
"relation_name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_ACCOUNT_TAX_ACCOUNT_TAX_ID",
"relation_codename":"Odoo_account_tax",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_ACCOUNT_TAX_ACCOUNT_TAX_ID",
"relation_type":"DER1N",
"code_name":"Odoo_account_tax",
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"ref_entity_name":"ACCOUNT_TAX"
},
{"name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_PURCHASE_ORDER_LINE_PURCHASE_ORDER_LINE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_purchase_order_line",
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"ref_entity_name":"PURCHASE_ORDER_LINE"
}
]
}
}
,
,
{
{
...
@@ -132082,6 +132162,12 @@
...
@@ -132082,6 +132162,12 @@
"entity_name":"ACCOUNT_INVOICE_LINE",
"entity_name":"ACCOUNT_INVOICE_LINE",
"ref_entity_name":"PURCHASE_ORDER_LINE"
"ref_entity_name":"PURCHASE_ORDER_LINE"
},
},
{"name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_PURCHASE_ORDER_LINE_PURCHASE_ORDER_LINE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_purchase_order_line",
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"ref_entity_name":"PURCHASE_ORDER_LINE"
},
{"name":"DER1N_STOCK_MOVE__PURCHASE_ORDER_LINE__CREATED_PURCHASE_LINE_ID",
{"name":"DER1N_STOCK_MOVE__PURCHASE_ORDER_LINE__CREATED_PURCHASE_LINE_ID",
"relation_type":"DER1N",
"relation_type":"DER1N",
"code_name":"Odoo_created_purchase_line",
"code_name":"Odoo_created_purchase_line",
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Purchase_orderResource.java
浏览文件 @
f8c4c539
...
@@ -170,6 +170,17 @@ public class Purchase_orderResource {
...
@@ -170,6 +170,17 @@ public class Purchase_orderResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Calc_amount-all')"
)
@ApiOperation
(
value
=
"calc_amount"
,
tags
=
{
"采购订单"
},
notes
=
"calc_amount"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/{purchase_order_id}/calc_amount"
)
public
ResponseEntity
<
Purchase_orderDTO
>
calc_amount
(
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setId
(
purchase_order_id
);
domain
=
purchase_orderService
.
calc_amount
(
domain
);
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@ApiOperation
(
value
=
"检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"检查采购订单"
)
@ApiOperation
(
value
=
"检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"检查采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_orders/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
...
@@ -382,6 +393,17 @@ public class Purchase_orderResource {
...
@@ -382,6 +393,17 @@ public class Purchase_orderResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Calc_amount-all')"
)
@ApiOperation
(
value
=
"根据采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/calc_amount"
)
public
ResponseEntity
<
Purchase_orderDTO
>
calc_amountByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setRequisitionId
(
purchase_requisition_id
);
domain
=
purchase_orderService
.
calc_amount
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@ApiOperation
(
value
=
"根据采购申请检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请检查采购订单"
)
@ApiOperation
(
value
=
"根据采购申请检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据采购申请检查采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
public
ResponseEntity
<
Boolean
>
checkKeyByPurchase_requisition
(
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
...
@@ -601,6 +623,17 @@ public class Purchase_orderResource {
...
@@ -601,6 +623,17 @@ public class Purchase_orderResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Calc_amount-all')"
)
@ApiOperation
(
value
=
"根据供应商采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_orders/{purchase_order_id}/calc_amount"
)
public
ResponseEntity
<
Purchase_orderDTO
>
calc_amountByRes_supplier
(
@PathVariable
(
"res_supplier_id"
)
Long
res_supplier_id
,
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setPartnerId
(
res_supplier_id
);
domain
=
purchase_orderService
.
calc_amount
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@ApiOperation
(
value
=
"根据供应商检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商检查采购订单"
)
@ApiOperation
(
value
=
"根据供应商检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商检查采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_orders/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_orders/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByRes_supplier
(
@PathVariable
(
"res_supplier_id"
)
Long
res_supplier_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
public
ResponseEntity
<
Boolean
>
checkKeyByRes_supplier
(
@PathVariable
(
"res_supplier_id"
)
Long
res_supplier_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
...
@@ -820,6 +853,17 @@ public class Purchase_orderResource {
...
@@ -820,6 +853,17 @@ public class Purchase_orderResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Calc_amount-all')"
)
@ApiOperation
(
value
=
"根据供应商采购申请采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购申请采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/calc_amount"
)
public
ResponseEntity
<
Purchase_orderDTO
>
calc_amountByRes_supplierPurchase_requisition
(
@PathVariable
(
"res_supplier_id"
)
Long
res_supplier_id
,
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@PathVariable
(
"purchase_order_id"
)
Long
purchase_order_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
Purchase_order
domain
=
purchase_orderMapping
.
toDomain
(
purchase_orderdto
);
domain
.
setRequisitionId
(
purchase_requisition_id
);
domain
=
purchase_orderService
.
calc_amount
(
domain
)
;
purchase_orderdto
=
purchase_orderMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
purchase_orderdto
);
}
@ApiOperation
(
value
=
"根据供应商采购申请检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购申请检查采购订单"
)
@ApiOperation
(
value
=
"根据供应商采购申请检查采购订单"
,
tags
=
{
"采购订单"
},
notes
=
"根据供应商采购申请检查采购订单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByRes_supplierPurchase_requisition
(
@PathVariable
(
"res_supplier_id"
)
Long
res_supplier_id
,
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
public
ResponseEntity
<
Boolean
>
checkKeyByRes_supplierPurchase_requisition
(
@PathVariable
(
"res_supplier_id"
)
Long
res_supplier_id
,
@PathVariable
(
"purchase_requisition_id"
)
Long
purchase_requisition_id
,
@RequestBody
Purchase_orderDTO
purchase_orderdto
)
{
...
...
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Purchase_order_lineResource.java
浏览文件 @
f8c4c539
此差异已折叠。
点击以展开。
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录