Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
6d1d9e56
提交
6d1d9e56
编写于
6月 20, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lab_gzf 部署微服务接口
上级
06bd37a6
变更
30
显示空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
3928 行增加
和
77 行删除
+3928
-77
Dockerfile
...esscentral-app-businesscentral/src/main/docker/Dockerfile
+1
-1
businesscentral-app-businesscentral.yaml
.../src/main/docker/businesscentral-app-businesscentral.yaml
+1
-15
application-businesscentral-prod.yml
...l/src/main/resources/application-businesscentral-prod.yml
+4
-0
TransactionCurrencyServiceImpl.java
...ore/base/service/impl/TransactionCurrencyServiceImpl.java
+2
-2
UomScheduleServiceImpl.java
...entral/core/base/service/impl/UomScheduleServiceImpl.java
+1
-1
UomServiceImpl.java
...usinesscentral/core/base/service/impl/UomServiceImpl.java
+1
-1
ProductPriceLevel.java
...usinesscentral/core/product/domain/ProductPriceLevel.java
+541
-0
ProductSubstitute.java
...usinesscentral/core/product/domain/ProductSubstitute.java
+335
-0
ProductPriceLevelSearchContext.java
...l/core/product/filter/ProductPriceLevelSearchContext.java
+114
-0
ProductSubstituteSearchContext.java
...l/core/product/filter/ProductSubstituteSearchContext.java
+103
-0
ProductPriceLevelMapper.java
...scentral/core/product/mapper/ProductPriceLevelMapper.java
+77
-0
ProductSubstituteMapper.java
...scentral/core/product/mapper/ProductSubstituteMapper.java
+71
-0
IProductPriceLevelService.java
...ntral/core/product/service/IProductPriceLevelService.java
+72
-0
IProductSubstituteService.java
...ntral/core/product/service/IProductSubstituteService.java
+66
-0
PriceLevelServiceImpl.java
...tral/core/product/service/impl/PriceLevelServiceImpl.java
+1
-1
ProductPriceLevelServiceImpl.java
...re/product/service/impl/ProductPriceLevelServiceImpl.java
+285
-0
ProductServiceImpl.java
...central/core/product/service/impl/ProductServiceImpl.java
+2
-2
ProductSubstituteServiceImpl.java
...re/product/service/impl/ProductSubstituteServiceImpl.java
+243
-0
DiscountTypeServiceImpl.java
...tral/core/sales/service/impl/DiscountTypeServiceImpl.java
+1
-1
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+46
-46
ProductPriceLevelMapper.xml
...per/product/productpricelevel/ProductPriceLevelMapper.xml
+101
-0
ProductSubstituteMapper.xml
...per/product/productsubstitute/ProductSubstituteMapper.xml
+69
-0
systemResource.json
...al-core/src/main/resources/permission/systemResource.json
+8
-0
Dockerfile
...esscentral-provider-centralapi/src/main/docker/Dockerfile
+1
-1
businesscentral-provider-centralapi.yaml
.../src/main/docker/businesscentral-provider-centralapi.yaml
+15
-1
OpportunityProductDTO.java
...businesscentral/centralapi/dto/OpportunityProductDTO.java
+792
-0
OpportunityProductMapping.java
...central/centralapi/mapping/OpportunityProductMapping.java
+16
-0
OpportunityProductResource.java
...sscentral/centralapi/rest/OpportunityProductResource.java
+558
-0
QuoteResource.java
...bizlab/businesscentral/centralapi/rest/QuoteResource.java
+396
-0
config.xml
config.xml
+5
-5
未找到文件。
businesscentral-app/businesscentral-app-businesscentral/src/main/docker/Dockerfile
浏览文件 @
6d1d9e56
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-businesscentral.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-businesscentral.jar
EXPOSE
1032
0
EXPOSE
808
0
ADD
businesscentral-app-businesscentral.jar /businesscentral-app-businesscentral.jar
ADD
businesscentral-app-businesscentral.jar /businesscentral-app-businesscentral.jar
businesscentral-app/businesscentral-app-businesscentral/src/main/docker/businesscentral-app-businesscentral.yaml
浏览文件 @
6d1d9e56
...
@@ -3,23 +3,9 @@ services:
...
@@ -3,23 +3,9 @@ services:
businesscentral-app-businesscentral
:
businesscentral-app-businesscentral
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-businesscentral:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-businesscentral:latest
ports
:
ports
:
-
"
10320:1032
0"
-
"
8080:808
0"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=10320
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
-
SPRING_REDIS_HOST=127.0.0.1
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
-
SPRING_DATASOURCE_PASSWORD=b1@@@772
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
-
CAS=https://passport.ibizlab.cn
-
NACOS=172.16.240.110:8848
deploy
:
deploy
:
resources
:
resources
:
limits
:
limits
:
...
...
businesscentral-app/businesscentral-app-businesscentral/src/main/resources/application-businesscentral-prod.yml
浏览文件 @
6d1d9e56
...
@@ -7,6 +7,10 @@ logging:
...
@@ -7,6 +7,10 @@ logging:
#zuul网关路由设置
#zuul网关路由设置
zuul
:
zuul
:
routes
:
routes
:
opportunityproduct
:
path
:
/opportunityproducts/**
serviceId
:
ibizbusinesscentral-centralapi
stripPrefix
:
false
campaignlist
:
campaignlist
:
path
:
/campaignlists/**
path
:
/campaignlists/**
serviceId
:
ibizbusinesscentral-centralapi
serviceId
:
ibizbusinesscentral-centralapi
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/impl/TransactionCurrencyServiceImpl.java
浏览文件 @
6d1d9e56
...
@@ -208,10 +208,10 @@ public class TransactionCurrencyServiceImpl extends ServiceImpl<TransactionCurre
...
@@ -208,10 +208,10 @@ public class TransactionCurrencyServiceImpl extends ServiceImpl<TransactionCurre
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductAssociationService
productassociationService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductAssociationService
productassociationService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
PevelService
productpricep
evelService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
LevelService
productpricel
evelService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductSub
S
tituteService
productsubstituteService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductSub
s
tituteService
productsubstituteService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/impl/UomScheduleServiceImpl.java
浏览文件 @
6d1d9e56
...
@@ -49,7 +49,7 @@ public class UomScheduleServiceImpl extends ServiceImpl<UomScheduleMapper, UomSc
...
@@ -49,7 +49,7 @@ public class UomScheduleServiceImpl extends ServiceImpl<UomScheduleMapper, UomSc
private
cn
.
ibizlab
.
businesscentral
.
core
.
service
.
service
.
IContractDetailService
contractdetailService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
service
.
service
.
IContractDetailService
contractdetailService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
PevelService
productpricep
evelService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
LevelService
productpricel
evelService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/impl/UomServiceImpl.java
浏览文件 @
6d1d9e56
...
@@ -58,7 +58,7 @@ public class UomServiceImpl extends ServiceImpl<UomMapper, Uom> implements IUomS
...
@@ -58,7 +58,7 @@ public class UomServiceImpl extends ServiceImpl<UomMapper, Uom> implements IUomS
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductAssociationService
productassociationService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductAssociationService
productassociationService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
PevelService
productpricep
evelService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
LevelService
productpricel
evelService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/domain/ProductPriceLevel.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.businesscentral.util.domain.EntityMP
;
/**
* 实体[价目表项]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"PRODUCTPRICELEVEL"
,
resultMap
=
"ProductPriceLevelResultMap"
)
public
class
ProductPriceLevel
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* Import Sequence Number
*/
@TableField
(
value
=
"importsequencenumber"
)
@JSONField
(
name
=
"importsequencenumber"
)
@JsonProperty
(
"importsequencenumber"
)
private
Integer
importsequencenumber
;
/**
* 舍入金额
*/
@TableField
(
value
=
"roundingoptionamount"
)
@JSONField
(
name
=
"roundingoptionamount"
)
@JsonProperty
(
"roundingoptionamount"
)
private
BigDecimal
roundingoptionamount
;
/**
* Version Number
*/
@TableField
(
value
=
"versionnumber"
)
@JSONField
(
name
=
"versionnumber"
)
@JsonProperty
(
"versionnumber"
)
private
BigInteger
versionnumber
;
/**
* 金额 (Base)
*/
@DEField
(
name
=
"amount_base"
)
@TableField
(
value
=
"amount_base"
)
@JSONField
(
name
=
"amount_base"
)
@JsonProperty
(
"amount_base"
)
private
BigDecimal
amountBase
;
/**
* Process Id
*/
@TableField
(
value
=
"processid"
)
@JSONField
(
name
=
"processid"
)
@JsonProperty
(
"processid"
)
private
String
processid
;
/**
* 金额
*/
@TableField
(
value
=
"amount"
)
@JSONField
(
name
=
"amount"
)
@JsonProperty
(
"amount"
)
private
BigDecimal
amount
;
/**
* 建立时间
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
CREATEDATE
)
@TableField
(
value
=
"createdate"
,
fill
=
FieldFill
.
INSERT
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"createdate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"createdate"
)
private
Timestamp
createdate
;
/**
* 舍入金额 (Base)
*/
@DEField
(
name
=
"roundingoptionamount_base"
)
@TableField
(
value
=
"roundingoptionamount_base"
)
@JSONField
(
name
=
"roundingoptionamount_base"
)
@JsonProperty
(
"roundingoptionamount_base"
)
private
BigDecimal
roundingoptionamountBase
;
/**
* 更新人
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
UPDATEMAN
)
@TableField
(
value
=
"updateman"
)
@JSONField
(
name
=
"updateman"
)
@JsonProperty
(
"updateman"
)
private
String
updateman
;
/**
* Record Created On
*/
@TableField
(
value
=
"overriddencreatedon"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"overriddencreatedon"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"overriddencreatedon"
)
private
Timestamp
overriddencreatedon
;
/**
* 汇率
*/
@TableField
(
value
=
"exchangerate"
)
@JSONField
(
name
=
"exchangerate"
)
@JsonProperty
(
"exchangerate"
)
private
BigDecimal
exchangerate
;
/**
* 组织
*/
@TableField
(
value
=
"organizationid"
)
@JSONField
(
name
=
"organizationid"
)
@JsonProperty
(
"organizationid"
)
private
String
organizationid
;
/**
* 百分比
*/
@TableField
(
value
=
"percentage"
)
@JSONField
(
name
=
"percentage"
)
@JsonProperty
(
"percentage"
)
private
BigDecimal
percentage
;
/**
* Traversed Path
*/
@TableField
(
value
=
"traversedpath"
)
@JSONField
(
name
=
"traversedpath"
)
@JsonProperty
(
"traversedpath"
)
private
String
traversedpath
;
/**
* 产品 ID
*/
@TableField
(
value
=
"productnumber"
)
@JSONField
(
name
=
"productnumber"
)
@JsonProperty
(
"productnumber"
)
private
String
productnumber
;
/**
* 定价方式
*/
@TableField
(
value
=
"pricingmethodcode"
)
@JSONField
(
name
=
"pricingmethodcode"
)
@JsonProperty
(
"pricingmethodcode"
)
private
String
pricingmethodcode
;
/**
* 舍入选项
*/
@TableField
(
value
=
"roundingoptioncode"
)
@JSONField
(
name
=
"roundingoptioncode"
)
@JsonProperty
(
"roundingoptioncode"
)
private
String
roundingoptioncode
;
/**
* Time Zone Rule Version Number
*/
@TableField
(
value
=
"timezoneruleversionnumber"
)
@JSONField
(
name
=
"timezoneruleversionnumber"
)
@JsonProperty
(
"timezoneruleversionnumber"
)
private
Integer
timezoneruleversionnumber
;
/**
* UTC Conversion Time Zone Code
*/
@TableField
(
value
=
"utcconversiontimezonecode"
)
@JSONField
(
name
=
"utcconversiontimezonecode"
)
@JsonProperty
(
"utcconversiontimezonecode"
)
private
Integer
utcconversiontimezonecode
;
/**
* 产品价目表
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"productpricelevelid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"productpricelevelid"
)
@JsonProperty
(
"productpricelevelid"
)
private
String
productpricelevelid
;
/**
* 销售数量控制
*/
@TableField
(
value
=
"quantitysellingcode"
)
@JSONField
(
name
=
"quantitysellingcode"
)
@JsonProperty
(
"quantitysellingcode"
)
private
String
quantitysellingcode
;
/**
* 更新时间
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
UPDATEDATE
)
@TableField
(
value
=
"updatedate"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"updatedate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"updatedate"
)
private
Timestamp
updatedate
;
/**
* 舍入原则
*/
@TableField
(
value
=
"roundingpolicycode"
)
@JSONField
(
name
=
"roundingpolicycode"
)
@JsonProperty
(
"roundingpolicycode"
)
private
String
roundingpolicycode
;
/**
* 建立人
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
CREATEMAN
)
@TableField
(
value
=
"createman"
,
fill
=
FieldFill
.
INSERT
)
@JSONField
(
name
=
"createman"
)
@JsonProperty
(
"createman"
)
private
String
createman
;
/**
* Stage Id
*/
@TableField
(
value
=
"stageid"
)
@JSONField
(
name
=
"stageid"
)
@JsonProperty
(
"stageid"
)
private
String
stageid
;
/**
* 产品
*/
@TableField
(
value
=
"productid"
)
@JSONField
(
name
=
"productid"
)
@JsonProperty
(
"productid"
)
private
String
productid
;
/**
* 单位计划 ID
*/
@TableField
(
value
=
"uomscheduleid"
)
@JSONField
(
name
=
"uomscheduleid"
)
@JsonProperty
(
"uomscheduleid"
)
private
String
uomscheduleid
;
/**
* 货币
*/
@TableField
(
value
=
"transactioncurrencyid"
)
@JSONField
(
name
=
"transactioncurrencyid"
)
@JsonProperty
(
"transactioncurrencyid"
)
private
String
transactioncurrencyid
;
/**
* 计价单位
*/
@TableField
(
value
=
"uomid"
)
@JSONField
(
name
=
"uomid"
)
@JsonProperty
(
"uomid"
)
private
String
uomid
;
/**
* 折扣表
*/
@TableField
(
value
=
"discounttypeid"
)
@JSONField
(
name
=
"discounttypeid"
)
@JsonProperty
(
"discounttypeid"
)
private
String
discounttypeid
;
/**
* 价目表
*/
@TableField
(
value
=
"pricelevelid"
)
@JSONField
(
name
=
"pricelevelid"
)
@JsonProperty
(
"pricelevelid"
)
private
String
pricelevelid
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
sales
.
domain
.
DiscountType
discounttype
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
domain
.
PriceLevel
pricelevel
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
domain
.
Product
product
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
domain
.
TransactionCurrency
transactioncurrency
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
domain
.
UomSchedule
uomschedule
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
domain
.
Uom
uom
;
/**
* 设置 [Import Sequence Number]
*/
public
void
setImportsequencenumber
(
Integer
importsequencenumber
){
this
.
importsequencenumber
=
importsequencenumber
;
this
.
modify
(
"importsequencenumber"
,
importsequencenumber
);
}
/**
* 设置 [舍入金额]
*/
public
void
setRoundingoptionamount
(
BigDecimal
roundingoptionamount
){
this
.
roundingoptionamount
=
roundingoptionamount
;
this
.
modify
(
"roundingoptionamount"
,
roundingoptionamount
);
}
/**
* 设置 [Version Number]
*/
public
void
setVersionnumber
(
BigInteger
versionnumber
){
this
.
versionnumber
=
versionnumber
;
this
.
modify
(
"versionnumber"
,
versionnumber
);
}
/**
* 设置 [金额 (Base)]
*/
public
void
setAmountBase
(
BigDecimal
amountBase
){
this
.
amountBase
=
amountBase
;
this
.
modify
(
"amount_base"
,
amountBase
);
}
/**
* 设置 [Process Id]
*/
public
void
setProcessid
(
String
processid
){
this
.
processid
=
processid
;
this
.
modify
(
"processid"
,
processid
);
}
/**
* 设置 [金额]
*/
public
void
setAmount
(
BigDecimal
amount
){
this
.
amount
=
amount
;
this
.
modify
(
"amount"
,
amount
);
}
/**
* 设置 [舍入金额 (Base)]
*/
public
void
setRoundingoptionamountBase
(
BigDecimal
roundingoptionamountBase
){
this
.
roundingoptionamountBase
=
roundingoptionamountBase
;
this
.
modify
(
"roundingoptionamount_base"
,
roundingoptionamountBase
);
}
/**
* 设置 [Record Created On]
*/
public
void
setOverriddencreatedon
(
Timestamp
overriddencreatedon
){
this
.
overriddencreatedon
=
overriddencreatedon
;
this
.
modify
(
"overriddencreatedon"
,
overriddencreatedon
);
}
/**
* 格式化日期 [Record Created On]
*/
public
String
formatOverriddencreatedon
(){
if
(
this
.
overriddencreatedon
==
null
)
{
return
null
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
return
sdf
.
format
(
overriddencreatedon
);
}
/**
* 设置 [汇率]
*/
public
void
setExchangerate
(
BigDecimal
exchangerate
){
this
.
exchangerate
=
exchangerate
;
this
.
modify
(
"exchangerate"
,
exchangerate
);
}
/**
* 设置 [组织]
*/
public
void
setOrganizationid
(
String
organizationid
){
this
.
organizationid
=
organizationid
;
this
.
modify
(
"organizationid"
,
organizationid
);
}
/**
* 设置 [百分比]
*/
public
void
setPercentage
(
BigDecimal
percentage
){
this
.
percentage
=
percentage
;
this
.
modify
(
"percentage"
,
percentage
);
}
/**
* 设置 [Traversed Path]
*/
public
void
setTraversedpath
(
String
traversedpath
){
this
.
traversedpath
=
traversedpath
;
this
.
modify
(
"traversedpath"
,
traversedpath
);
}
/**
* 设置 [产品 ID]
*/
public
void
setProductnumber
(
String
productnumber
){
this
.
productnumber
=
productnumber
;
this
.
modify
(
"productnumber"
,
productnumber
);
}
/**
* 设置 [定价方式]
*/
public
void
setPricingmethodcode
(
String
pricingmethodcode
){
this
.
pricingmethodcode
=
pricingmethodcode
;
this
.
modify
(
"pricingmethodcode"
,
pricingmethodcode
);
}
/**
* 设置 [舍入选项]
*/
public
void
setRoundingoptioncode
(
String
roundingoptioncode
){
this
.
roundingoptioncode
=
roundingoptioncode
;
this
.
modify
(
"roundingoptioncode"
,
roundingoptioncode
);
}
/**
* 设置 [Time Zone Rule Version Number]
*/
public
void
setTimezoneruleversionnumber
(
Integer
timezoneruleversionnumber
){
this
.
timezoneruleversionnumber
=
timezoneruleversionnumber
;
this
.
modify
(
"timezoneruleversionnumber"
,
timezoneruleversionnumber
);
}
/**
* 设置 [UTC Conversion Time Zone Code]
*/
public
void
setUtcconversiontimezonecode
(
Integer
utcconversiontimezonecode
){
this
.
utcconversiontimezonecode
=
utcconversiontimezonecode
;
this
.
modify
(
"utcconversiontimezonecode"
,
utcconversiontimezonecode
);
}
/**
* 设置 [销售数量控制]
*/
public
void
setQuantitysellingcode
(
String
quantitysellingcode
){
this
.
quantitysellingcode
=
quantitysellingcode
;
this
.
modify
(
"quantitysellingcode"
,
quantitysellingcode
);
}
/**
* 设置 [舍入原则]
*/
public
void
setRoundingpolicycode
(
String
roundingpolicycode
){
this
.
roundingpolicycode
=
roundingpolicycode
;
this
.
modify
(
"roundingpolicycode"
,
roundingpolicycode
);
}
/**
* 设置 [Stage Id]
*/
public
void
setStageid
(
String
stageid
){
this
.
stageid
=
stageid
;
this
.
modify
(
"stageid"
,
stageid
);
}
/**
* 设置 [产品]
*/
public
void
setProductid
(
String
productid
){
this
.
productid
=
productid
;
this
.
modify
(
"productid"
,
productid
);
}
/**
* 设置 [单位计划 ID]
*/
public
void
setUomscheduleid
(
String
uomscheduleid
){
this
.
uomscheduleid
=
uomscheduleid
;
this
.
modify
(
"uomscheduleid"
,
uomscheduleid
);
}
/**
* 设置 [货币]
*/
public
void
setTransactioncurrencyid
(
String
transactioncurrencyid
){
this
.
transactioncurrencyid
=
transactioncurrencyid
;
this
.
modify
(
"transactioncurrencyid"
,
transactioncurrencyid
);
}
/**
* 设置 [计价单位]
*/
public
void
setUomid
(
String
uomid
){
this
.
uomid
=
uomid
;
this
.
modify
(
"uomid"
,
uomid
);
}
/**
* 设置 [折扣表]
*/
public
void
setDiscounttypeid
(
String
discounttypeid
){
this
.
discounttypeid
=
discounttypeid
;
this
.
modify
(
"discounttypeid"
,
discounttypeid
);
}
/**
* 设置 [价目表]
*/
public
void
setPricelevelid
(
String
pricelevelid
){
this
.
pricelevelid
=
pricelevelid
;
this
.
modify
(
"pricelevelid"
,
pricelevelid
);
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/domain/ProductSubstitute.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.businesscentral.util.domain.EntityMP
;
/**
* 实体[产品替换]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"PRODUCTSUBSTITUTE"
,
resultMap
=
"ProductSubstituteResultMap"
)
public
class
ProductSubstitute
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 产品子套件名称
*/
@TableField
(
value
=
"productsubstitutename"
)
@JSONField
(
name
=
"productsubstitutename"
)
@JsonProperty
(
"productsubstitutename"
)
private
String
productsubstitutename
;
/**
* 状态描述
*/
@TableField
(
value
=
"statuscode"
)
@JSONField
(
name
=
"statuscode"
)
@JsonProperty
(
"statuscode"
)
private
Integer
statuscode
;
/**
* Version Number
*/
@TableField
(
value
=
"versionnumber"
)
@JSONField
(
name
=
"versionnumber"
)
@JsonProperty
(
"versionnumber"
)
private
BigInteger
versionnumber
;
/**
* 建立人
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
CREATEMAN
)
@TableField
(
value
=
"createman"
,
fill
=
FieldFill
.
INSERT
)
@JSONField
(
name
=
"createman"
)
@JsonProperty
(
"createman"
)
private
String
createman
;
/**
* 更新人
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
UPDATEMAN
)
@TableField
(
value
=
"updateman"
)
@JSONField
(
name
=
"updateman"
)
@JsonProperty
(
"updateman"
)
private
String
updateman
;
/**
* Import Sequence Number
*/
@TableField
(
value
=
"importsequencenumber"
)
@JSONField
(
name
=
"importsequencenumber"
)
@JsonProperty
(
"importsequencenumber"
)
private
Integer
importsequencenumber
;
/**
* 汇率
*/
@TableField
(
value
=
"exchangerate"
)
@JSONField
(
name
=
"exchangerate"
)
@JsonProperty
(
"exchangerate"
)
private
BigDecimal
exchangerate
;
/**
* UTC Conversion Time Zone Code
*/
@TableField
(
value
=
"utcconversiontimezonecode"
)
@JSONField
(
name
=
"utcconversiontimezonecode"
)
@JsonProperty
(
"utcconversiontimezonecode"
)
private
Integer
utcconversiontimezonecode
;
/**
* Record Created On
*/
@TableField
(
value
=
"overriddencreatedon"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"overriddencreatedon"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"overriddencreatedon"
)
private
Timestamp
overriddencreatedon
;
/**
* 建立时间
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
CREATEDATE
)
@TableField
(
value
=
"createdate"
,
fill
=
FieldFill
.
INSERT
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"createdate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"createdate"
)
private
Timestamp
createdate
;
/**
* 方向
*/
@TableField
(
value
=
"direction"
)
@JSONField
(
name
=
"direction"
)
@JsonProperty
(
"direction"
)
private
String
direction
;
/**
* 销售关系类型
*/
@TableField
(
value
=
"salesrelationshiptype"
)
@JSONField
(
name
=
"salesrelationshiptype"
)
@JsonProperty
(
"salesrelationshiptype"
)
private
String
salesrelationshiptype
;
/**
* Time Zone Rule Version Number
*/
@TableField
(
value
=
"timezoneruleversionnumber"
)
@JSONField
(
name
=
"timezoneruleversionnumber"
)
@JsonProperty
(
"timezoneruleversionnumber"
)
private
Integer
timezoneruleversionnumber
;
/**
* 产品关系 ID
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"productsubstituteid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"productsubstituteid"
)
@JsonProperty
(
"productsubstituteid"
)
private
String
productsubstituteid
;
/**
* 状态
*/
@TableField
(
value
=
"statecode"
)
@JSONField
(
name
=
"statecode"
)
@JsonProperty
(
"statecode"
)
private
Integer
statecode
;
/**
* 更新时间
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
UPDATEDATE
)
@TableField
(
value
=
"updatedate"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"updatedate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"updatedate"
)
private
Timestamp
updatedate
;
/**
* 产品
*/
@TableField
(
value
=
"productid"
)
@JSONField
(
name
=
"productid"
)
@JsonProperty
(
"productid"
)
private
String
productid
;
/**
* 相关产品
*/
@TableField
(
value
=
"substitutedproductid"
)
@JSONField
(
name
=
"substitutedproductid"
)
@JsonProperty
(
"substitutedproductid"
)
private
String
substitutedproductid
;
/**
* 货币
*/
@TableField
(
value
=
"transactioncurrencyid"
)
@JSONField
(
name
=
"transactioncurrencyid"
)
@JsonProperty
(
"transactioncurrencyid"
)
private
String
transactioncurrencyid
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
domain
.
Product
product
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
domain
.
Product
substitutedproduct
;
/**
*
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
domain
.
TransactionCurrency
transactioncurrency
;
/**
* 设置 [产品子套件名称]
*/
public
void
setProductsubstitutename
(
String
productsubstitutename
){
this
.
productsubstitutename
=
productsubstitutename
;
this
.
modify
(
"productsubstitutename"
,
productsubstitutename
);
}
/**
* 设置 [状态描述]
*/
public
void
setStatuscode
(
Integer
statuscode
){
this
.
statuscode
=
statuscode
;
this
.
modify
(
"statuscode"
,
statuscode
);
}
/**
* 设置 [Version Number]
*/
public
void
setVersionnumber
(
BigInteger
versionnumber
){
this
.
versionnumber
=
versionnumber
;
this
.
modify
(
"versionnumber"
,
versionnumber
);
}
/**
* 设置 [Import Sequence Number]
*/
public
void
setImportsequencenumber
(
Integer
importsequencenumber
){
this
.
importsequencenumber
=
importsequencenumber
;
this
.
modify
(
"importsequencenumber"
,
importsequencenumber
);
}
/**
* 设置 [汇率]
*/
public
void
setExchangerate
(
BigDecimal
exchangerate
){
this
.
exchangerate
=
exchangerate
;
this
.
modify
(
"exchangerate"
,
exchangerate
);
}
/**
* 设置 [UTC Conversion Time Zone Code]
*/
public
void
setUtcconversiontimezonecode
(
Integer
utcconversiontimezonecode
){
this
.
utcconversiontimezonecode
=
utcconversiontimezonecode
;
this
.
modify
(
"utcconversiontimezonecode"
,
utcconversiontimezonecode
);
}
/**
* 设置 [Record Created On]
*/
public
void
setOverriddencreatedon
(
Timestamp
overriddencreatedon
){
this
.
overriddencreatedon
=
overriddencreatedon
;
this
.
modify
(
"overriddencreatedon"
,
overriddencreatedon
);
}
/**
* 格式化日期 [Record Created On]
*/
public
String
formatOverriddencreatedon
(){
if
(
this
.
overriddencreatedon
==
null
)
{
return
null
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
return
sdf
.
format
(
overriddencreatedon
);
}
/**
* 设置 [方向]
*/
public
void
setDirection
(
String
direction
){
this
.
direction
=
direction
;
this
.
modify
(
"direction"
,
direction
);
}
/**
* 设置 [销售关系类型]
*/
public
void
setSalesrelationshiptype
(
String
salesrelationshiptype
){
this
.
salesrelationshiptype
=
salesrelationshiptype
;
this
.
modify
(
"salesrelationshiptype"
,
salesrelationshiptype
);
}
/**
* 设置 [Time Zone Rule Version Number]
*/
public
void
setTimezoneruleversionnumber
(
Integer
timezoneruleversionnumber
){
this
.
timezoneruleversionnumber
=
timezoneruleversionnumber
;
this
.
modify
(
"timezoneruleversionnumber"
,
timezoneruleversionnumber
);
}
/**
* 设置 [状态]
*/
public
void
setStatecode
(
Integer
statecode
){
this
.
statecode
=
statecode
;
this
.
modify
(
"statecode"
,
statecode
);
}
/**
* 设置 [产品]
*/
public
void
setProductid
(
String
productid
){
this
.
productid
=
productid
;
this
.
modify
(
"productid"
,
productid
);
}
/**
* 设置 [相关产品]
*/
public
void
setSubstitutedproductid
(
String
substitutedproductid
){
this
.
substitutedproductid
=
substitutedproductid
;
this
.
modify
(
"substitutedproductid"
,
substitutedproductid
);
}
/**
* 设置 [货币]
*/
public
void
setTransactioncurrencyid
(
String
transactioncurrencyid
){
this
.
transactioncurrencyid
=
transactioncurrencyid
;
this
.
modify
(
"transactioncurrencyid"
,
transactioncurrencyid
);
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/filter/ProductPriceLevelSearchContext.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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.product.domain.ProductPriceLevel
;
/**
* 关系型数据实体[ProductPriceLevel] 查询条件对象
*/
@Slf4j
@Data
public
class
ProductPriceLevelSearchContext
extends
QueryWrapperContext
<
ProductPriceLevel
>
{
private
String
n_pricingmethodcode_eq
;
//[定价方式]
public
void
setN_pricingmethodcode_eq
(
String
n_pricingmethodcode_eq
)
{
this
.
n_pricingmethodcode_eq
=
n_pricingmethodcode_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_pricingmethodcode_eq
)){
this
.
getSearchCond
().
eq
(
"pricingmethodcode"
,
n_pricingmethodcode_eq
);
}
}
private
String
n_roundingoptioncode_eq
;
//[舍入选项]
public
void
setN_roundingoptioncode_eq
(
String
n_roundingoptioncode_eq
)
{
this
.
n_roundingoptioncode_eq
=
n_roundingoptioncode_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_roundingoptioncode_eq
)){
this
.
getSearchCond
().
eq
(
"roundingoptioncode"
,
n_roundingoptioncode_eq
);
}
}
private
String
n_quantitysellingcode_eq
;
//[销售数量控制]
public
void
setN_quantitysellingcode_eq
(
String
n_quantitysellingcode_eq
)
{
this
.
n_quantitysellingcode_eq
=
n_quantitysellingcode_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_quantitysellingcode_eq
)){
this
.
getSearchCond
().
eq
(
"quantitysellingcode"
,
n_quantitysellingcode_eq
);
}
}
private
String
n_roundingpolicycode_eq
;
//[舍入原则]
public
void
setN_roundingpolicycode_eq
(
String
n_roundingpolicycode_eq
)
{
this
.
n_roundingpolicycode_eq
=
n_roundingpolicycode_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_roundingpolicycode_eq
)){
this
.
getSearchCond
().
eq
(
"roundingpolicycode"
,
n_roundingpolicycode_eq
);
}
}
private
String
n_productid_eq
;
//[产品]
public
void
setN_productid_eq
(
String
n_productid_eq
)
{
this
.
n_productid_eq
=
n_productid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_productid_eq
)){
this
.
getSearchCond
().
eq
(
"productid"
,
n_productid_eq
);
}
}
private
String
n_uomscheduleid_eq
;
//[单位计划 ID]
public
void
setN_uomscheduleid_eq
(
String
n_uomscheduleid_eq
)
{
this
.
n_uomscheduleid_eq
=
n_uomscheduleid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_uomscheduleid_eq
)){
this
.
getSearchCond
().
eq
(
"uomscheduleid"
,
n_uomscheduleid_eq
);
}
}
private
String
n_transactioncurrencyid_eq
;
//[货币]
public
void
setN_transactioncurrencyid_eq
(
String
n_transactioncurrencyid_eq
)
{
this
.
n_transactioncurrencyid_eq
=
n_transactioncurrencyid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_transactioncurrencyid_eq
)){
this
.
getSearchCond
().
eq
(
"transactioncurrencyid"
,
n_transactioncurrencyid_eq
);
}
}
private
String
n_uomid_eq
;
//[计价单位]
public
void
setN_uomid_eq
(
String
n_uomid_eq
)
{
this
.
n_uomid_eq
=
n_uomid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_uomid_eq
)){
this
.
getSearchCond
().
eq
(
"uomid"
,
n_uomid_eq
);
}
}
private
String
n_discounttypeid_eq
;
//[折扣表]
public
void
setN_discounttypeid_eq
(
String
n_discounttypeid_eq
)
{
this
.
n_discounttypeid_eq
=
n_discounttypeid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_discounttypeid_eq
)){
this
.
getSearchCond
().
eq
(
"discounttypeid"
,
n_discounttypeid_eq
);
}
}
private
String
n_pricelevelid_eq
;
//[价目表]
public
void
setN_pricelevelid_eq
(
String
n_pricelevelid_eq
)
{
this
.
n_pricelevelid_eq
=
n_pricelevelid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_pricelevelid_eq
)){
this
.
getSearchCond
().
eq
(
"pricelevelid"
,
n_pricelevelid_eq
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
}
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/filter/ProductSubstituteSearchContext.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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.product.domain.ProductSubstitute
;
/**
* 关系型数据实体[ProductSubstitute] 查询条件对象
*/
@Slf4j
@Data
public
class
ProductSubstituteSearchContext
extends
QueryWrapperContext
<
ProductSubstitute
>
{
private
String
n_productsubstitutename_like
;
//[产品子套件名称]
public
void
setN_productsubstitutename_like
(
String
n_productsubstitutename_like
)
{
this
.
n_productsubstitutename_like
=
n_productsubstitutename_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_productsubstitutename_like
)){
this
.
getSearchCond
().
like
(
"productsubstitutename"
,
n_productsubstitutename_like
);
}
}
private
Integer
n_statuscode_eq
;
//[状态描述]
public
void
setN_statuscode_eq
(
Integer
n_statuscode_eq
)
{
this
.
n_statuscode_eq
=
n_statuscode_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_statuscode_eq
)){
this
.
getSearchCond
().
eq
(
"statuscode"
,
n_statuscode_eq
);
}
}
private
String
n_direction_eq
;
//[方向]
public
void
setN_direction_eq
(
String
n_direction_eq
)
{
this
.
n_direction_eq
=
n_direction_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_direction_eq
)){
this
.
getSearchCond
().
eq
(
"direction"
,
n_direction_eq
);
}
}
private
String
n_salesrelationshiptype_eq
;
//[销售关系类型]
public
void
setN_salesrelationshiptype_eq
(
String
n_salesrelationshiptype_eq
)
{
this
.
n_salesrelationshiptype_eq
=
n_salesrelationshiptype_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_salesrelationshiptype_eq
)){
this
.
getSearchCond
().
eq
(
"salesrelationshiptype"
,
n_salesrelationshiptype_eq
);
}
}
private
Integer
n_statecode_eq
;
//[状态]
public
void
setN_statecode_eq
(
Integer
n_statecode_eq
)
{
this
.
n_statecode_eq
=
n_statecode_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_statecode_eq
)){
this
.
getSearchCond
().
eq
(
"statecode"
,
n_statecode_eq
);
}
}
private
String
n_productid_eq
;
//[产品]
public
void
setN_productid_eq
(
String
n_productid_eq
)
{
this
.
n_productid_eq
=
n_productid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_productid_eq
)){
this
.
getSearchCond
().
eq
(
"productid"
,
n_productid_eq
);
}
}
private
String
n_substitutedproductid_eq
;
//[相关产品]
public
void
setN_substitutedproductid_eq
(
String
n_substitutedproductid_eq
)
{
this
.
n_substitutedproductid_eq
=
n_substitutedproductid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_substitutedproductid_eq
)){
this
.
getSearchCond
().
eq
(
"substitutedproductid"
,
n_substitutedproductid_eq
);
}
}
private
String
n_transactioncurrencyid_eq
;
//[货币]
public
void
setN_transactioncurrencyid_eq
(
String
n_transactioncurrencyid_eq
)
{
this
.
n_transactioncurrencyid_eq
=
n_transactioncurrencyid_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_transactioncurrencyid_eq
)){
this
.
getSearchCond
().
eq
(
"transactioncurrencyid"
,
n_transactioncurrencyid_eq
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
this
.
getSearchCond
().
and
(
wrapper
->
wrapper
.
like
(
"productsubstitutename"
,
query
)
);
}
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/mapper/ProductPriceLevelMapper.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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.product.domain.ProductPriceLevel
;
import
cn.ibizlab.businesscentral.core.product.filter.ProductPriceLevelSearchContext
;
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
ProductPriceLevelMapper
extends
BaseMapper
<
ProductPriceLevel
>{
Page
<
ProductPriceLevel
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
ProductPriceLevelSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
ProductPriceLevel
>
wrapper
)
;
@Override
ProductPriceLevel
selectById
(
Serializable
id
);
@Override
int
insert
(
ProductPriceLevel
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
ProductPriceLevel
entity
);
@Override
int
update
(
@Param
(
Constants
.
ENTITY
)
ProductPriceLevel
entity
,
@Param
(
"ew"
)
Wrapper
<
ProductPriceLevel
>
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
<
ProductPriceLevel
>
selectByDiscounttypeid
(
@Param
(
"discounttypeid"
)
Serializable
discounttypeid
)
;
List
<
ProductPriceLevel
>
selectByPricelevelid
(
@Param
(
"pricelevelid"
)
Serializable
pricelevelid
)
;
List
<
ProductPriceLevel
>
selectByProductid
(
@Param
(
"productid"
)
Serializable
productid
)
;
List
<
ProductPriceLevel
>
selectByTransactioncurrencyid
(
@Param
(
"transactioncurrencyid"
)
Serializable
transactioncurrencyid
)
;
List
<
ProductPriceLevel
>
selectByUomscheduleid
(
@Param
(
"uomscheduleid"
)
Serializable
uomscheduleid
)
;
List
<
ProductPriceLevel
>
selectByUomid
(
@Param
(
"uomid"
)
Serializable
uomid
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/mapper/ProductSubstituteMapper.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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.product.domain.ProductSubstitute
;
import
cn.ibizlab.businesscentral.core.product.filter.ProductSubstituteSearchContext
;
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
ProductSubstituteMapper
extends
BaseMapper
<
ProductSubstitute
>{
Page
<
ProductSubstitute
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
ProductSubstituteSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
ProductSubstitute
>
wrapper
)
;
@Override
ProductSubstitute
selectById
(
Serializable
id
);
@Override
int
insert
(
ProductSubstitute
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
ProductSubstitute
entity
);
@Override
int
update
(
@Param
(
Constants
.
ENTITY
)
ProductSubstitute
entity
,
@Param
(
"ew"
)
Wrapper
<
ProductSubstitute
>
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
<
ProductSubstitute
>
selectByProductid
(
@Param
(
"productid"
)
Serializable
productid
)
;
List
<
ProductSubstitute
>
selectBySubstitutedproductid
(
@Param
(
"productid"
)
Serializable
productid
)
;
List
<
ProductSubstitute
>
selectByTransactioncurrencyid
(
@Param
(
"transactioncurrencyid"
)
Serializable
transactioncurrencyid
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/service/IProductPriceLevelService.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
import
cn.ibizlab.businesscentral.core.product.domain.ProductPriceLevel
;
import
cn.ibizlab.businesscentral.core.product.filter.ProductPriceLevelSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[ProductPriceLevel] 服务对象接口
*/
public
interface
IProductPriceLevelService
extends
IService
<
ProductPriceLevel
>{
boolean
create
(
ProductPriceLevel
et
)
;
void
createBatch
(
List
<
ProductPriceLevel
>
list
)
;
ProductPriceLevel
get
(
String
key
)
;
boolean
save
(
ProductPriceLevel
et
)
;
void
saveBatch
(
List
<
ProductPriceLevel
>
list
)
;
boolean
update
(
ProductPriceLevel
et
)
;
void
updateBatch
(
List
<
ProductPriceLevel
>
list
)
;
ProductPriceLevel
getDraft
(
ProductPriceLevel
et
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
checkKey
(
ProductPriceLevel
et
)
;
Page
<
ProductPriceLevel
>
searchDefault
(
ProductPriceLevelSearchContext
context
)
;
List
<
ProductPriceLevel
>
selectByDiscounttypeid
(
String
discounttypeid
)
;
void
removeByDiscounttypeid
(
String
discounttypeid
)
;
List
<
ProductPriceLevel
>
selectByPricelevelid
(
String
pricelevelid
)
;
void
removeByPricelevelid
(
String
pricelevelid
)
;
List
<
ProductPriceLevel
>
selectByProductid
(
String
productid
)
;
void
removeByProductid
(
String
productid
)
;
List
<
ProductPriceLevel
>
selectByTransactioncurrencyid
(
String
transactioncurrencyid
)
;
void
removeByTransactioncurrencyid
(
String
transactioncurrencyid
)
;
List
<
ProductPriceLevel
>
selectByUomscheduleid
(
String
uomscheduleid
)
;
void
removeByUomscheduleid
(
String
uomscheduleid
)
;
List
<
ProductPriceLevel
>
selectByUomid
(
String
uomid
)
;
void
removeByUomid
(
String
uomid
)
;
/**
*自定义查询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
);
List
<
ProductPriceLevel
>
getProductpricelevelByIds
(
List
<
String
>
ids
)
;
List
<
ProductPriceLevel
>
getProductpricelevelByEntities
(
List
<
ProductPriceLevel
>
entities
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/service/IProductSubstituteService.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
import
cn.ibizlab.businesscentral.core.product.domain.ProductSubstitute
;
import
cn.ibizlab.businesscentral.core.product.filter.ProductSubstituteSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[ProductSubstitute] 服务对象接口
*/
public
interface
IProductSubstituteService
extends
IService
<
ProductSubstitute
>{
boolean
create
(
ProductSubstitute
et
)
;
void
createBatch
(
List
<
ProductSubstitute
>
list
)
;
boolean
checkKey
(
ProductSubstitute
et
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
update
(
ProductSubstitute
et
)
;
void
updateBatch
(
List
<
ProductSubstitute
>
list
)
;
boolean
save
(
ProductSubstitute
et
)
;
void
saveBatch
(
List
<
ProductSubstitute
>
list
)
;
ProductSubstitute
get
(
String
key
)
;
ProductSubstitute
getDraft
(
ProductSubstitute
et
)
;
Page
<
ProductSubstitute
>
searchDefault
(
ProductSubstituteSearchContext
context
)
;
List
<
ProductSubstitute
>
selectByProductid
(
String
productid
)
;
void
removeByProductid
(
String
productid
)
;
List
<
ProductSubstitute
>
selectBySubstitutedproductid
(
String
productid
)
;
void
removeBySubstitutedproductid
(
String
productid
)
;
List
<
ProductSubstitute
>
selectByTransactioncurrencyid
(
String
transactioncurrencyid
)
;
void
removeByTransactioncurrencyid
(
String
transactioncurrencyid
)
;
/**
*自定义查询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
);
List
<
ProductSubstitute
>
getProductsubstituteByIds
(
List
<
String
>
ids
)
;
List
<
ProductSubstitute
>
getProductsubstituteByEntities
(
List
<
ProductSubstitute
>
entities
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/service/impl/PriceLevelServiceImpl.java
浏览文件 @
6d1d9e56
...
@@ -61,7 +61,7 @@ public class PriceLevelServiceImpl extends ServiceImpl<PriceLevelMapper, PriceLe
...
@@ -61,7 +61,7 @@ public class PriceLevelServiceImpl extends ServiceImpl<PriceLevelMapper, PriceLe
private
cn
.
ibizlab
.
businesscentral
.
core
.
sales
.
service
.
IOpportunityService
opportunityService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
sales
.
service
.
IOpportunityService
opportunityService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
PevelService
productpricep
evelService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
LevelService
productpricel
evelService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/service/impl/ProductPriceLevelServiceImpl.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.businesscentral.core.product.domain.ProductPriceLevel
;
import
cn.ibizlab.businesscentral.core.product.filter.ProductPriceLevelSearchContext
;
import
cn.ibizlab.businesscentral.core.product.service.IProductPriceLevelService
;
import
cn.ibizlab.businesscentral.util.helper.CachedBeanCopier
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.businesscentral.core.product.mapper.ProductPriceLevelMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.StringUtils
;
/**
* 实体[价目表项] 服务对象接口实现
*/
@Slf4j
@Service
(
"ProductPriceLevelServiceImpl"
)
public
class
ProductPriceLevelServiceImpl
extends
ServiceImpl
<
ProductPriceLevelMapper
,
ProductPriceLevel
>
implements
IProductPriceLevelService
{
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
sales
.
service
.
IDiscountTypeService
discounttypeService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IPriceLevelService
pricelevelService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
ITransactionCurrencyService
transactioncurrencyService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IUomScheduleService
uomscheduleService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
IUomService
uomService
;
private
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
create
(
ProductPriceLevel
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getProductpricelevelid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
ProductPriceLevel
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
ProductPriceLevel
get
(
String
key
)
{
ProductPriceLevel
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
ProductPriceLevel
();
et
.
setProductpricelevelid
(
key
);
}
else
{
}
return
et
;
}
@Override
@Transactional
public
boolean
save
(
ProductPriceLevel
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
ProductPriceLevel
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
boolean
saveBatch
(
Collection
<
ProductPriceLevel
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
public
void
saveBatch
(
List
<
ProductPriceLevel
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
ProductPriceLevel
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"productpricelevelid"
,
et
.
getProductpricelevelid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getProductpricelevelid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
ProductPriceLevel
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
public
ProductPriceLevel
getDraft
(
ProductPriceLevel
et
)
{
return
et
;
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
public
boolean
checkKey
(
ProductPriceLevel
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getProductpricelevelid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getProductpricelevelid
())));
}
@Override
public
List
<
ProductPriceLevel
>
selectByDiscounttypeid
(
String
discounttypeid
)
{
return
baseMapper
.
selectByDiscounttypeid
(
discounttypeid
);
}
@Override
public
void
removeByDiscounttypeid
(
String
discounttypeid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductPriceLevel
>().
eq
(
"discounttypeid"
,
discounttypeid
));
}
@Override
public
List
<
ProductPriceLevel
>
selectByPricelevelid
(
String
pricelevelid
)
{
return
baseMapper
.
selectByPricelevelid
(
pricelevelid
);
}
@Override
public
void
removeByPricelevelid
(
String
pricelevelid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductPriceLevel
>().
eq
(
"pricelevelid"
,
pricelevelid
));
}
@Override
public
List
<
ProductPriceLevel
>
selectByProductid
(
String
productid
)
{
return
baseMapper
.
selectByProductid
(
productid
);
}
@Override
public
void
removeByProductid
(
String
productid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductPriceLevel
>().
eq
(
"productid"
,
productid
));
}
@Override
public
List
<
ProductPriceLevel
>
selectByTransactioncurrencyid
(
String
transactioncurrencyid
)
{
return
baseMapper
.
selectByTransactioncurrencyid
(
transactioncurrencyid
);
}
@Override
public
void
removeByTransactioncurrencyid
(
String
transactioncurrencyid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductPriceLevel
>().
eq
(
"transactioncurrencyid"
,
transactioncurrencyid
));
}
@Override
public
List
<
ProductPriceLevel
>
selectByUomscheduleid
(
String
uomscheduleid
)
{
return
baseMapper
.
selectByUomscheduleid
(
uomscheduleid
);
}
@Override
public
void
removeByUomscheduleid
(
String
uomscheduleid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductPriceLevel
>().
eq
(
"uomscheduleid"
,
uomscheduleid
));
}
@Override
public
List
<
ProductPriceLevel
>
selectByUomid
(
String
uomid
)
{
return
baseMapper
.
selectByUomid
(
uomid
);
}
@Override
public
void
removeByUomid
(
String
uomid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductPriceLevel
>().
eq
(
"uomid"
,
uomid
));
}
/**
* 查询集合 DEFAULT
*/
@Override
public
Page
<
ProductPriceLevel
>
searchDefault
(
ProductPriceLevelSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
ProductPriceLevel
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
ProductPriceLevel
>(
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
;
}
@Override
public
List
<
ProductPriceLevel
>
getProductpricelevelByIds
(
List
<
String
>
ids
)
{
return
this
.
listByIds
(
ids
);
}
@Override
public
List
<
ProductPriceLevel
>
getProductpricelevelByEntities
(
List
<
ProductPriceLevel
>
entities
)
{
List
ids
=
new
ArrayList
();
for
(
ProductPriceLevel
entity
:
entities
){
Serializable
id
=
entity
.
getProductpricelevelid
();
if
(!
ObjectUtils
.
isEmpty
(
id
)){
ids
.
add
(
id
);
}
}
if
(
ids
.
size
()>
0
)
return
this
.
listByIds
(
ids
);
else
return
entities
;
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/service/impl/ProductServiceImpl.java
浏览文件 @
6d1d9e56
...
@@ -61,10 +61,10 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
...
@@ -61,10 +61,10 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductAssociationService
productassociationService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductAssociationService
productassociationService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
PevelService
productpricep
evelService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
LevelService
productpricel
evelService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductSub
S
tituteService
productsubstituteService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductSub
s
tituteService
productsubstituteService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
=
this
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
=
this
;
@Autowired
@Autowired
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/product/service/impl/ProductSubstituteServiceImpl.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
core
.
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.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.businesscentral.core.product.domain.ProductSubstitute
;
import
cn.ibizlab.businesscentral.core.product.filter.ProductSubstituteSearchContext
;
import
cn.ibizlab.businesscentral.core.product.service.IProductSubstituteService
;
import
cn.ibizlab.businesscentral.util.helper.CachedBeanCopier
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.businesscentral.core.product.mapper.ProductSubstituteMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.StringUtils
;
/**
* 实体[产品替换] 服务对象接口实现
*/
@Slf4j
@Service
(
"ProductSubstituteServiceImpl"
)
public
class
ProductSubstituteServiceImpl
extends
ServiceImpl
<
ProductSubstituteMapper
,
ProductSubstitute
>
implements
IProductSubstituteService
{
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductService
productService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
ITransactionCurrencyService
transactioncurrencyService
;
private
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
create
(
ProductSubstitute
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getProductsubstituteid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
ProductSubstitute
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
public
boolean
checkKey
(
ProductSubstitute
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getProductsubstituteid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getProductsubstituteid
())));
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Transactional
public
boolean
update
(
ProductSubstitute
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"productsubstituteid"
,
et
.
getProductsubstituteid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getProductsubstituteid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
ProductSubstitute
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
save
(
ProductSubstitute
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
ProductSubstitute
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
boolean
saveBatch
(
Collection
<
ProductSubstitute
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
public
void
saveBatch
(
List
<
ProductSubstitute
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
ProductSubstitute
get
(
String
key
)
{
ProductSubstitute
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
ProductSubstitute
();
et
.
setProductsubstituteid
(
key
);
}
else
{
}
return
et
;
}
@Override
public
ProductSubstitute
getDraft
(
ProductSubstitute
et
)
{
return
et
;
}
@Override
public
List
<
ProductSubstitute
>
selectByProductid
(
String
productid
)
{
return
baseMapper
.
selectByProductid
(
productid
);
}
@Override
public
void
removeByProductid
(
String
productid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductSubstitute
>().
eq
(
"productid"
,
productid
));
}
@Override
public
List
<
ProductSubstitute
>
selectBySubstitutedproductid
(
String
productid
)
{
return
baseMapper
.
selectBySubstitutedproductid
(
productid
);
}
@Override
public
void
removeBySubstitutedproductid
(
String
productid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductSubstitute
>().
eq
(
"substitutedproductid"
,
productid
));
}
@Override
public
List
<
ProductSubstitute
>
selectByTransactioncurrencyid
(
String
transactioncurrencyid
)
{
return
baseMapper
.
selectByTransactioncurrencyid
(
transactioncurrencyid
);
}
@Override
public
void
removeByTransactioncurrencyid
(
String
transactioncurrencyid
)
{
this
.
remove
(
new
QueryWrapper
<
ProductSubstitute
>().
eq
(
"transactioncurrencyid"
,
transactioncurrencyid
));
}
/**
* 查询集合 DEFAULT
*/
@Override
public
Page
<
ProductSubstitute
>
searchDefault
(
ProductSubstituteSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
ProductSubstitute
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
ProductSubstitute
>(
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
;
}
@Override
public
List
<
ProductSubstitute
>
getProductsubstituteByIds
(
List
<
String
>
ids
)
{
return
this
.
listByIds
(
ids
);
}
@Override
public
List
<
ProductSubstitute
>
getProductsubstituteByEntities
(
List
<
ProductSubstitute
>
entities
)
{
List
ids
=
new
ArrayList
();
for
(
ProductSubstitute
entity
:
entities
){
Serializable
id
=
entity
.
getProductsubstituteid
();
if
(!
ObjectUtils
.
isEmpty
(
id
)){
ids
.
add
(
id
);
}
}
if
(
ids
.
size
()>
0
)
return
this
.
listByIds
(
ids
);
else
return
entities
;
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/sales/service/impl/DiscountTypeServiceImpl.java
浏览文件 @
6d1d9e56
...
@@ -49,7 +49,7 @@ public class DiscountTypeServiceImpl extends ServiceImpl<DiscountTypeMapper, Dis
...
@@ -49,7 +49,7 @@ public class DiscountTypeServiceImpl extends ServiceImpl<DiscountTypeMapper, Dis
private
cn
.
ibizlab
.
businesscentral
.
core
.
sales
.
service
.
IDiscountService
discountService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
sales
.
service
.
IDiscountService
discountService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
PevelService
productpricep
evelService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
product
.
service
.
IProductPrice
LevelService
productpricel
evelService
;
@Autowired
@Autowired
@Lazy
@Lazy
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
ITransactionCurrencyService
transactioncurrencyService
;
private
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
ITransactionCurrencyService
transactioncurrencyService
;
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
6d1d9e56
...
@@ -1348,7 +1348,7 @@
...
@@ -1348,7 +1348,7 @@
<!--输出实体[PRODUCTPRICELEVEL]数据结构 -->
<!--输出实体[PRODUCTPRICELEVEL]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-productpricelevel-
1
-19"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-productpricelevel-
3
-19"
>
<createTable
tableName=
"PRODUCTPRICELEVEL"
>
<createTable
tableName=
"PRODUCTPRICELEVEL"
>
<column
name=
"IMPORTSEQUENCENUMBER"
remarks=
""
type=
"INT"
>
<column
name=
"IMPORTSEQUENCENUMBER"
remarks=
""
type=
"INT"
>
</column>
</column>
...
@@ -3182,7 +3182,7 @@
...
@@ -3182,7 +3182,7 @@
<!--输出实体[CONTACT]数据结构 -->
<!--输出实体[CONTACT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-contact-22
8
-43"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-contact-22
9
-43"
>
<createTable
tableName=
"CONTACT"
>
<createTable
tableName=
"CONTACT"
>
<column
name=
"ADDRESS1_FREIGHTTERMSCODE"
remarks=
""
type=
"VARCHAR(30)"
>
<column
name=
"ADDRESS1_FREIGHTTERMSCODE"
remarks=
""
type=
"VARCHAR(30)"
>
</column>
</column>
...
@@ -3708,7 +3708,7 @@
...
@@ -3708,7 +3708,7 @@
<!--输出实体[QUOTE]数据结构 -->
<!--输出实体[QUOTE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-quote-
9
-46"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-quote-
12
-46"
>
<createTable
tableName=
"QUOTE"
>
<createTable
tableName=
"QUOTE"
>
<column
name=
"BILLTO_COUNTRY"
remarks=
""
type=
"VARCHAR(80)"
>
<column
name=
"BILLTO_COUNTRY"
remarks=
""
type=
"VARCHAR(80)"
>
</column>
</column>
...
@@ -5882,7 +5882,7 @@
...
@@ -5882,7 +5882,7 @@
<!--输出实体[OPPORTUNITYPRODUCT]数据结构 -->
<!--输出实体[OPPORTUNITYPRODUCT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-opportunityproduct-
3
-66"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-opportunityproduct-
8
-66"
>
<createTable
tableName=
"OPPORTUNITYPRODUCT"
>
<createTable
tableName=
"OPPORTUNITYPRODUCT"
>
<column
name=
"PRICEOVERRIDDEN"
remarks=
""
type=
"INT"
>
<column
name=
"PRICEOVERRIDDEN"
remarks=
""
type=
"INT"
>
</column>
</column>
...
@@ -6429,7 +6429,7 @@
...
@@ -6429,7 +6429,7 @@
<!--输出实体[LEAD]数据结构 -->
<!--输出实体[LEAD]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-lead-7
7
-74"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-lead-7
8
-74"
>
<createTable
tableName=
"LEAD"
>
<createTable
tableName=
"LEAD"
>
<column
name=
"ADDRESS1_FAX"
remarks=
""
type=
"VARCHAR(50)"
>
<column
name=
"ADDRESS1_FAX"
remarks=
""
type=
"VARCHAR(50)"
>
</column>
</column>
...
@@ -8997,7 +8997,7 @@
...
@@ -8997,7 +8997,7 @@
<!--输出实体[PRODUCTSUBSTITUTE]数据结构 -->
<!--输出实体[PRODUCTSUBSTITUTE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-productsubstitute-
1
-98"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-productsubstitute-
5
-98"
>
<createTable
tableName=
"PRODUCTSUBSTITUTE"
>
<createTable
tableName=
"PRODUCTSUBSTITUTE"
>
<column
name=
"PRODUCTSUBSTITUTENAME"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"PRODUCTSUBSTITUTENAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
</column>
...
@@ -10397,7 +10397,7 @@
...
@@ -10397,7 +10397,7 @@
<!--输出实体[OPPORTUNITY]数据结构 -->
<!--输出实体[OPPORTUNITY]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-opportunity-
28
-120"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-opportunity-
52
-120"
>
<createTable
tableName=
"OPPORTUNITY"
>
<createTable
tableName=
"OPPORTUNITY"
>
<column
name=
"DECISIONMAKER"
remarks=
""
type=
"INT"
>
<column
name=
"DECISIONMAKER"
remarks=
""
type=
"INT"
>
</column>
</column>
...
@@ -10839,22 +10839,22 @@
...
@@ -10839,22 +10839,22 @@
<addForeignKeyConstraint
baseColumnNames=
"SALESLITERATUREID"
baseTableName=
"SALESLITERATUREITEM"
constraintName=
"DER1N_SALESLITERATUREITEM__SAL"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SALESLITERATUREID"
referencedTableName=
"SALESLITERATURE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SALESLITERATUREID"
baseTableName=
"SALESLITERATUREITEM"
constraintName=
"DER1N_SALESLITERATUREITEM__SAL"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SALESLITERATUREID"
referencedTableName=
"SALESLITERATURE"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[PRODUCTPRICELEVEL]外键关系 -->
<!--输出实体[PRODUCTPRICELEVEL]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
1
-153"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
3
-153"
>
<addForeignKeyConstraint
baseColumnNames=
"DISCOUNTTYPEID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__DISCO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"DISCOUNTTYPEID"
referencedTableName=
"DISCOUNTTYPE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"DISCOUNTTYPEID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__DISCO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"DISCOUNTTYPEID"
referencedTableName=
"DISCOUNTTYPE"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
1
-154"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
3
-154"
>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__PRICE"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__PRICE"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
1
-155"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
3
-155"
>
<addForeignKeyConstraint
baseColumnNames=
"PRODUCTID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__PRODU"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PRODUCTID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__PRODU"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
1
-156"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
3
-156"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__TRANS"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__TRANS"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
1
-157"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
3
-157"
>
<addForeignKeyConstraint
baseColumnNames=
"UOMSCHEDULEID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__UOMSC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMSCHEDULEID"
referencedTableName=
"UOMSCHEDULE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"UOMSCHEDULEID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__UOMSC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMSCHEDULEID"
referencedTableName=
"UOMSCHEDULE"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
1
-158"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productpricelevel-
3
-158"
>
<addForeignKeyConstraint
baseColumnNames=
"UOMID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__UOM__"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMID"
referencedTableName=
"UOM"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"UOMID"
baseTableName=
"PRODUCTPRICELEVEL"
constraintName=
"DER1N_PRODUCTPRICELEVEL__UOM__"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMID"
referencedTableName=
"UOM"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[APPOINTMENT]外键关系 -->
<!--输出实体[APPOINTMENT]外键关系 -->
...
@@ -11028,25 +11028,25 @@
...
@@ -11028,25 +11028,25 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"MONTHLYFISCALCALENDAR"
constraintName=
"DER1N_MONTHLYFISCALCALENDAR__T"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"MONTHLYFISCALCALENDAR"
constraintName=
"DER1N_MONTHLYFISCALCALENDAR__T"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[CONTACT]外键关系 -->
<!--输出实体[CONTACT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
8
-213"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
9
-213"
>
<addForeignKeyConstraint
baseColumnNames=
"CUSTOMERID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT_ACCOUNT_CUSTOMER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"CUSTOMERID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT_ACCOUNT_CUSTOMER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
8
-214"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
9
-214"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
8
-215"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
9
-215"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
8
-216"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
9
-216"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
8
-217"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
9
-217"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
8
-218"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
9
-218"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
8
-219"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-22
9
-219"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[TEAM]外键关系 -->
<!--输出实体[TEAM]外键关系 -->
...
@@ -11067,19 +11067,19 @@
...
@@ -11067,19 +11067,19 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"PRICELEVEL"
constraintName=
"DER1N_PRICELEVEL__TRANSACTIONC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"PRICELEVEL"
constraintName=
"DER1N_PRICELEVEL__TRANSACTIONC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[QUOTE]外键关系 -->
<!--输出实体[QUOTE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
9
-225"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
12
-225"
>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__CAMPAIGN__CAMPAIG"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__CAMPAIGN__CAMPAIG"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
9
-226"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
12
-226"
>
<addForeignKeyConstraint
baseColumnNames=
"OPPORTUNITYID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__OPPORTUNITY__OPPO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"OPPORTUNITYID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__OPPORTUNITY__OPPO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
9
-227"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
12
-227"
>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__PRICELEVEL__PRICE"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__PRICELEVEL__PRICE"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
9
-228"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
12
-228"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
9
-229"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quote-
12
-229"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__TRANSACTIONCURREN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"QUOTE"
constraintName=
"DER1N_QUOTE__TRANSACTIONCURREN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[BULKDELETEOPERATION]外键关系 -->
<!--输出实体[BULKDELETEOPERATION]外键关系 -->
...
@@ -11252,16 +11252,16 @@
...
@@ -11252,16 +11252,16 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"EXPIREDPROCESS"
constraintName=
"DER1N_EXPIREDPROCESS__TRANSACT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"EXPIREDPROCESS"
constraintName=
"DER1N_EXPIREDPROCESS__TRANSACT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[OPPORTUNITYPRODUCT]外键关系 -->
<!--输出实体[OPPORTUNITYPRODUCT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunityproduct-
3
-292"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunityproduct-
8
-292"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTBUNDLEIDREF"
baseTableName=
"OPPORTUNITYPRODUCT"
constraintName=
"DER1N_OPPORTUNITYPRODUCT__OPPO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYPRODUCTID"
referencedTableName=
"OPPORTUNITYPRODUCT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PARENTBUNDLEIDREF"
baseTableName=
"OPPORTUNITYPRODUCT"
constraintName=
"DER1N_OPPORTUNITYPRODUCT__OPPO"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYPRODUCTID"
referencedTableName=
"OPPORTUNITYPRODUCT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunityproduct-
3
-294"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunityproduct-
8
-294"
>
<addForeignKeyConstraint
baseColumnNames=
"PRODUCTID"
baseTableName=
"OPPORTUNITYPRODUCT"
constraintName=
"DER1N_OPPORTUNITYPRODUCT__PROD"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PRODUCTID"
baseTableName=
"OPPORTUNITYPRODUCT"
constraintName=
"DER1N_OPPORTUNITYPRODUCT__PROD"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunityproduct-
3
-295"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunityproduct-
8
-295"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"OPPORTUNITYPRODUCT"
constraintName=
"DER1N_OPPORTUNITYPRODUCT__TRAN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"OPPORTUNITYPRODUCT"
constraintName=
"DER1N_OPPORTUNITYPRODUCT__TRAN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunityproduct-
3
-296"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunityproduct-
8
-296"
>
<addForeignKeyConstraint
baseColumnNames=
"UOMID"
baseTableName=
"OPPORTUNITYPRODUCT"
constraintName=
"DER1N_OPPORTUNITYPRODUCT__UOM_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMID"
referencedTableName=
"UOM"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"UOMID"
baseTableName=
"OPPORTUNITYPRODUCT"
constraintName=
"DER1N_OPPORTUNITYPRODUCT__UOM_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMID"
referencedTableName=
"UOM"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[POSITION]外键关系 -->
<!--输出实体[POSITION]外键关系 -->
...
@@ -11302,28 +11302,28 @@
...
@@ -11302,28 +11302,28 @@
</changeSet>
</changeSet>
<!--输出实体[METRIC]外键关系 -->
<!--输出实体[METRIC]外键关系 -->
<!--输出实体[LEAD]外键关系 -->
<!--输出实体[LEAD]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
7
-308"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
8
-308"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__ACCOUNT__PARENTACC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__ACCOUNT__PARENTACC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
7
-309"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
8
-309"
>
<addForeignKeyConstraint
baseColumnNames=
"RELATEDOBJECTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CAMPAIGNRESPONSE__"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACTIVITYID"
referencedTableName=
"CAMPAIGNRESPONSE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"RELATEDOBJECTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CAMPAIGNRESPONSE__"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACTIVITYID"
referencedTableName=
"CAMPAIGNRESPONSE"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
7
-310"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
8
-310"
>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CAMPAIGN__CAMPAIGN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CAMPAIGN__CAMPAIGN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
7
-311"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
8
-311"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTCONTACTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CONTACT__PARENTCON"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PARENTCONTACTID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__CONTACT__PARENTCON"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
7
-312"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
8
-312"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGCASEID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__INCIDENT__ORIGINAT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"INCIDENTID"
referencedTableName=
"INCIDENT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGCASEID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__INCIDENT__ORIGINAT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"INCIDENTID"
referencedTableName=
"INCIDENT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
7
-313"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
8
-313"
>
<addForeignKeyConstraint
baseColumnNames=
"QUALIFYINGOPPORTUNITYID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__OPPORTUNITY__QUALI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"QUALIFYINGOPPORTUNITYID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__OPPORTUNITY__QUALI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"OPPORTUNITYID"
referencedTableName=
"OPPORTUNITY"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
7
-314"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
8
-314"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
7
-315"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-lead-7
8
-315"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__TRANSACTIONCURRENC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"LEAD"
constraintName=
"DER1N_LEAD__TRANSACTIONCURRENC"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[TERRITORY]外键关系 -->
<!--输出实体[TERRITORY]外键关系 -->
...
@@ -11488,10 +11488,10 @@
...
@@ -11488,10 +11488,10 @@
</changeSet>
</changeSet>
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
<!--输出实体[PRODUCTSUBSTITUTE]外键关系 -->
<!--输出实体[PRODUCTSUBSTITUTE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productsubstitute-
1
-368"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productsubstitute-
5
-368"
>
<addForeignKeyConstraint
baseColumnNames=
"PRODUCTID"
baseTableName=
"PRODUCTSUBSTITUTE"
constraintName=
"DER1N_PRODUCTSUBSTITUTE__PRODU"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PRODUCTID"
baseTableName=
"PRODUCTSUBSTITUTE"
constraintName=
"DER1N_PRODUCTSUBSTITUTE__PRODU"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productsubstitute-
1
-370"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-productsubstitute-
5
-370"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"PRODUCTSUBSTITUTE"
constraintName=
"DER1N_PRODUCTSUBSTITUTE__TRANS"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"PRODUCTSUBSTITUTE"
constraintName=
"DER1N_PRODUCTSUBSTITUTE__TRANS"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[ACTIVITYPOINTER]外键关系 -->
<!--输出实体[ACTIVITYPOINTER]外键关系 -->
...
@@ -11615,25 +11615,25 @@
...
@@ -11615,25 +11615,25 @@
<!--输出实体[RELATIONSHIPS]外键关系 -->
<!--输出实体[RELATIONSHIPS]外键关系 -->
<!--输出实体[CONNECTIONROLE]外键关系 -->
<!--输出实体[CONNECTIONROLE]外键关系 -->
<!--输出实体[OPPORTUNITY]外键关系 -->
<!--输出实体[OPPORTUNITY]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
28
-405"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
52
-405"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__ACCOUNT__PA"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__ACCOUNT__PA"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
28
-406"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
52
-406"
>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__CAMPAIGN__C"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"CAMPAIGNID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__CAMPAIGN__C"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CAMPAIGNID"
referencedTableName=
"CAMPAIGN"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
28
-407"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
52
-407"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTCONTACTID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__CONTACT__PA"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PARENTCONTACTID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__CONTACT__PA"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
28
-408"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
52
-408"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__LEAD__ORIGI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__LEAD__ORIGI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
28
-409"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
52
-409"
>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__PRICELEVEL_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PRICELEVELID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__PRICELEVEL_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
28
-410"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
52
-410"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
28
-411"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-opportunity-
52
-411"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__TRANSACTION"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"OPPORTUNITY"
constraintName=
"DER1N_OPPORTUNITY__TRANSACTION"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[OPPORTUNITYCOMPETITOR]外键关系 -->
<!--输出实体[OPPORTUNITYCOMPETITOR]外键关系 -->
...
...
businesscentral-core/src/main/resources/mapper/product/productpricelevel/ProductPriceLevelMapper.xml
0 → 100644
浏览文件 @
6d1d9e56
<?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.product.mapper.ProductPriceLevelMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"ProductPriceLevelResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`AMOUNT`, t1.`AMOUNT_BASE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DISCOUNTTYPEID`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`ORGANIZATIONID`, t1.`OVERRIDDENCREATEDON`, t1.`PERCENTAGE`, t1.`PRICELEVELID`, t1.`PRICINGMETHODCODE`, t1.`PROCESSID`, t1.`PRODUCTID`, t1.`PRODUCTNUMBER`, t1.`PRODUCTPRICELEVELID`, t1.`QUANTITYSELLINGCODE`, t1.`ROUNDINGOPTIONAMOUNT`, t1.`ROUNDINGOPTIONAMOUNT_BASE`, t1.`ROUNDINGOPTIONCODE`, t1.`ROUNDINGPOLICYCODE`, t1.`STAGEID`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRAVERSEDPATH`, t1.`UOMID`, t1.`UOMSCHEDULEID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER` FROM `PRODUCTPRICELEVEL` t1 ) t1 where productpricelevelid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"ProductPriceLevelResultMap"
type=
"cn.ibizlab.businesscentral.core.product.domain.ProductPriceLevel"
autoMapping=
"true"
>
<id
property=
"productpricelevelid"
column=
"productpricelevelid"
/>
<!--主键字段映射-->
<result
property=
"amountBase"
column=
"amount_base"
/>
<result
property=
"roundingoptionamountBase"
column=
"roundingoptionamount_base"
/>
<result
property=
"productid"
column=
"productid"
/>
<result
property=
"uomscheduleid"
column=
"uomscheduleid"
/>
<result
property=
"transactioncurrencyid"
column=
"transactioncurrencyid"
/>
<result
property=
"uomid"
column=
"uomid"
/>
<result
property=
"discounttypeid"
column=
"discounttypeid"
/>
<result
property=
"pricelevelid"
column=
"pricelevelid"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"discounttype"
javaType=
"cn.ibizlab.businesscentral.core.sales.domain.DiscountType"
column=
"discounttypeid"
select=
"cn.ibizlab.businesscentral.core.sales.mapper.DiscountTypeMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"pricelevel"
javaType=
"cn.ibizlab.businesscentral.core.product.domain.PriceLevel"
column=
"pricelevelid"
select=
"cn.ibizlab.businesscentral.core.product.mapper.PriceLevelMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"product"
javaType=
"cn.ibizlab.businesscentral.core.product.domain.Product"
column=
"productid"
select=
"cn.ibizlab.businesscentral.core.product.mapper.ProductMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"transactioncurrency"
javaType=
"cn.ibizlab.businesscentral.core.base.domain.TransactionCurrency"
column=
"transactioncurrencyid"
select=
"cn.ibizlab.businesscentral.core.base.mapper.TransactionCurrencyMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"uomschedule"
javaType=
"cn.ibizlab.businesscentral.core.base.domain.UomSchedule"
column=
"uomscheduleid"
select=
"cn.ibizlab.businesscentral.core.base.mapper.UomScheduleMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"uom"
javaType=
"cn.ibizlab.businesscentral.core.base.domain.Uom"
column=
"uomid"
select=
"cn.ibizlab.businesscentral.core.base.mapper.UomMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTPRICELEVEL__DISCOUNTTYPE__DISCOUNTTYPEID] -->
<select
id=
"selectByDiscounttypeid"
resultMap=
"ProductPriceLevelResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where discounttypeid=#{discounttypeid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTPRICELEVEL__PRICELEVEL__PRICELEVELID] -->
<select
id=
"selectByPricelevelid"
resultMap=
"ProductPriceLevelResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where pricelevelid=#{pricelevelid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTPRICELEVEL__PRODUCT__PRODUCTID] -->
<select
id=
"selectByProductid"
resultMap=
"ProductPriceLevelResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where productid=#{productid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTPRICELEVEL__TRANSACTIONCURRENCY__TRANSACTIONCURRENCYID] -->
<select
id=
"selectByTransactioncurrencyid"
resultMap=
"ProductPriceLevelResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where transactioncurrencyid=#{transactioncurrencyid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTPRICELEVEL__UOMSCHEDULE__UOMSCHEDULEID] -->
<select
id=
"selectByUomscheduleid"
resultMap=
"ProductPriceLevelResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where uomscheduleid=#{uomscheduleid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTPRICELEVEL__UOM__UOMID] -->
<select
id=
"selectByUomid"
resultMap=
"ProductPriceLevelResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where uomid=#{uomid}
</select>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.businesscentral.core.product.filter.ProductPriceLevelSearchContext"
resultMap=
"ProductPriceLevelResultMap"
>
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=
"mysql"
>
<![CDATA[ SELECT t1.`AMOUNT`, t1.`AMOUNT_BASE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DISCOUNTTYPEID`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`ORGANIZATIONID`, t1.`OVERRIDDENCREATEDON`, t1.`PERCENTAGE`, t1.`PRICELEVELID`, t1.`PRICINGMETHODCODE`, t1.`PROCESSID`, t1.`PRODUCTID`, t1.`PRODUCTNUMBER`, t1.`PRODUCTPRICELEVELID`, t1.`QUANTITYSELLINGCODE`, t1.`ROUNDINGOPTIONAMOUNT`, t1.`ROUNDINGOPTIONAMOUNT_BASE`, t1.`ROUNDINGOPTIONCODE`, t1.`ROUNDINGPOLICYCODE`, t1.`STAGEID`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRAVERSEDPATH`, t1.`UOMID`, t1.`UOMSCHEDULEID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER` FROM `PRODUCTPRICELEVEL` t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`AMOUNT`, t1.`AMOUNT_BASE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DISCOUNTTYPEID`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`ORGANIZATIONID`, t1.`OVERRIDDENCREATEDON`, t1.`PERCENTAGE`, t1.`PRICELEVELID`, t1.`PRICINGMETHODCODE`, t1.`PROCESSID`, t1.`PRODUCTID`, t1.`PRODUCTNUMBER`, t1.`PRODUCTPRICELEVELID`, t1.`QUANTITYSELLINGCODE`, t1.`ROUNDINGOPTIONAMOUNT`, t1.`ROUNDINGOPTIONAMOUNT_BASE`, t1.`ROUNDINGOPTIONCODE`, t1.`ROUNDINGPOLICYCODE`, t1.`STAGEID`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRAVERSEDPATH`, t1.`UOMID`, t1.`UOMSCHEDULEID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER` FROM `PRODUCTPRICELEVEL` t1
]]>
</sql>
</mapper>
businesscentral-core/src/main/resources/mapper/product/productsubstitute/ProductSubstituteMapper.xml
0 → 100644
浏览文件 @
6d1d9e56
<?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.product.mapper.ProductSubstituteMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"ProductSubstituteResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DIRECTION`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`OVERRIDDENCREATEDON`, t1.`PRODUCTID`, t1.`PRODUCTSUBSTITUTEID`, t1.`PRODUCTSUBSTITUTENAME`, t1.`SALESRELATIONSHIPTYPE`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBSTITUTEDPRODUCTID`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER` FROM `PRODUCTSUBSTITUTE` t1 ) t1 where productsubstituteid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"ProductSubstituteResultMap"
type=
"cn.ibizlab.businesscentral.core.product.domain.ProductSubstitute"
autoMapping=
"true"
>
<id
property=
"productsubstituteid"
column=
"productsubstituteid"
/>
<!--主键字段映射-->
<result
property=
"productid"
column=
"productid"
/>
<result
property=
"substitutedproductid"
column=
"substitutedproductid"
/>
<result
property=
"transactioncurrencyid"
column=
"transactioncurrencyid"
/>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"product"
javaType=
"cn.ibizlab.businesscentral.core.product.domain.Product"
column=
"productid"
select=
"cn.ibizlab.businesscentral.core.product.mapper.ProductMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"substitutedproduct"
javaType=
"cn.ibizlab.businesscentral.core.product.domain.Product"
column=
"substitutedproductid"
select=
"cn.ibizlab.businesscentral.core.product.mapper.ProductMapper.selectById"
fetchType=
"lazy"
></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association
property=
"transactioncurrency"
javaType=
"cn.ibizlab.businesscentral.core.base.domain.TransactionCurrency"
column=
"transactioncurrencyid"
select=
"cn.ibizlab.businesscentral.core.base.mapper.TransactionCurrencyMapper.selectById"
fetchType=
"lazy"
></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTSUBSTITUTE__PRODUCT__PRODUCTID] -->
<select
id=
"selectByProductid"
resultMap=
"ProductSubstituteResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where productid=#{productid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTSUBSTITUTE__PRODUCT__SUBSTITUTEDPRODUCTID] -->
<select
id=
"selectBySubstitutedproductid"
resultMap=
"ProductSubstituteResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where substitutedproductid=#{productid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PRODUCTSUBSTITUTE__TRANSACTIONCURRENCY__TRANSACTIONCURRENCYID] -->
<select
id=
"selectByTransactioncurrencyid"
resultMap=
"ProductSubstituteResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
) t1
where transactioncurrencyid=#{transactioncurrencyid}
</select>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.businesscentral.core.product.filter.ProductSubstituteSearchContext"
resultMap=
"ProductSubstituteResultMap"
>
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=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DIRECTION`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`OVERRIDDENCREATEDON`, t1.`PRODUCTID`, t1.`PRODUCTSUBSTITUTEID`, t1.`PRODUCTSUBSTITUTENAME`, t1.`SALESRELATIONSHIPTYPE`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBSTITUTEDPRODUCTID`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER` FROM `PRODUCTSUBSTITUTE` t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DIRECTION`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`OVERRIDDENCREATEDON`, t1.`PRODUCTID`, t1.`PRODUCTSUBSTITUTEID`, t1.`PRODUCTSUBSTITUTENAME`, t1.`SALESRELATIONSHIPTYPE`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBSTITUTEDPRODUCTID`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER` FROM `PRODUCTSUBSTITUTE` t1
]]>
</sql>
</mapper>
businesscentral-core/src/main/resources/permission/systemResource.json
浏览文件 @
6d1d9e56
...
@@ -4,6 +4,14 @@
...
@@ -4,6 +4,14 @@
],
],
"entities"
:[
"entities"
:[
{
{
"dename"
:
"OpportunityProduct"
,
"delogicname"
:
"商机产品"
,
"sysmoudle"
:{
"id"
:
"SALES"
,
"name"
:
"Sales"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
,
{
"dename"
:
"CampaignList"
,
"dename"
:
"CampaignList"
,
"delogicname"
:
"市场活动-营销列表"
,
"delogicname"
:
"市场活动-营销列表"
,
"sysmoudle"
:{
"id"
:
"MARKETING"
,
"name"
:
"Marketing"
},
"sysmoudle"
:{
"id"
:
"MARKETING"
,
"name"
:
"Marketing"
},
...
...
businesscentral-provider/businesscentral-provider-centralapi/src/main/docker/Dockerfile
浏览文件 @
6d1d9e56
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-provider-centralapi.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-provider-centralapi.jar
EXPOSE
8081
EXPOSE
10310
ADD
businesscentral-provider-centralapi.jar /businesscentral-provider-centralapi.jar
ADD
businesscentral-provider-centralapi.jar /businesscentral-provider-centralapi.jar
businesscentral-provider/businesscentral-provider-centralapi/src/main/docker/businesscentral-provider-centralapi.yaml
浏览文件 @
6d1d9e56
...
@@ -3,9 +3,23 @@ services:
...
@@ -3,9 +3,23 @@ services:
businesscentral-provider-centralapi
:
businesscentral-provider-centralapi
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-provider-centralapi:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-provider-centralapi:latest
ports
:
ports
:
-
"
8081:8081
"
-
"
10310:10310
"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=10310
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
-
SPRING_REDIS_HOST=127.0.0.1
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
-
SPRING_DATASOURCE_PASSWORD=b1@@@772
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
-
CAS=https://passport.ibizlab.cn
-
NACOS=172.16.240.110:8848
deploy
:
deploy
:
resources
:
resources
:
limits
:
limits
:
...
...
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/dto/OpportunityProductDTO.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
centralapi
.
dto
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.math.BigInteger
;
import
java.util.Map
;
import
java.util.HashMap
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
cn.ibizlab.businesscentral.util.domain.DTOBase
;
import
lombok.Data
;
/**
* 服务DTO对象[OpportunityProductDTO]
*/
@Data
public
class
OpportunityProductDTO
extends
DTOBase
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 属性 [PRICEOVERRIDDEN]
*
*/
@JSONField
(
name
=
"priceoverridden"
)
@JsonProperty
(
"priceoverridden"
)
private
Integer
priceoverridden
;
/**
* 属性 [TAX_BASE]
*
*/
@JSONField
(
name
=
"tax_base"
)
@JsonProperty
(
"tax_base"
)
private
BigDecimal
taxBase
;
/**
* 属性 [SKIPPRICECALCULATION]
*
*/
@JSONField
(
name
=
"skippricecalculation"
)
@JsonProperty
(
"skippricecalculation"
)
private
String
skippricecalculation
;
/**
* 属性 [VOLUMEDISCOUNTAMOUNT_BASE]
*
*/
@JSONField
(
name
=
"volumediscountamount_base"
)
@JsonProperty
(
"volumediscountamount_base"
)
private
BigDecimal
volumediscountamountBase
;
/**
* 属性 [MANUALDISCOUNTAMOUNT]
*
*/
@JSONField
(
name
=
"manualdiscountamount"
)
@JsonProperty
(
"manualdiscountamount"
)
private
BigDecimal
manualdiscountamount
;
/**
* 属性 [ENTITYIMAGE_TIMESTAMP]
*
*/
@JSONField
(
name
=
"entityimage_timestamp"
)
@JsonProperty
(
"entityimage_timestamp"
)
private
BigInteger
entityimageTimestamp
;
/**
* 属性 [OPPORTUNITYSTATECODE]
*
*/
@JSONField
(
name
=
"opportunitystatecode"
)
@JsonProperty
(
"opportunitystatecode"
)
private
String
opportunitystatecode
;
/**
* 属性 [VOLUMEDISCOUNTAMOUNT]
*
*/
@JSONField
(
name
=
"volumediscountamount"
)
@JsonProperty
(
"volumediscountamount"
)
private
BigDecimal
volumediscountamount
;
/**
* 属性 [EXTENDEDAMOUNT_BASE]
*
*/
@JSONField
(
name
=
"extendedamount_base"
)
@JsonProperty
(
"extendedamount_base"
)
private
BigDecimal
extendedamountBase
;
/**
* 属性 [PRICEPERUNIT_BASE]
*
*/
@JSONField
(
name
=
"priceperunit_base"
)
@JsonProperty
(
"priceperunit_base"
)
private
BigDecimal
priceperunitBase
;
/**
* 属性 [OPPORTUNITYPRODUCTID]
*
*/
@JSONField
(
name
=
"opportunityproductid"
)
@JsonProperty
(
"opportunityproductid"
)
private
String
opportunityproductid
;
/**
* 属性 [VERSIONNUMBER]
*
*/
@JSONField
(
name
=
"versionnumber"
)
@JsonProperty
(
"versionnumber"
)
private
BigInteger
versionnumber
;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField
(
name
=
"createman"
)
@JsonProperty
(
"createman"
)
private
String
createman
;
/**
* 属性 [ENTITYIMAGEID]
*
*/
@JSONField
(
name
=
"entityimageid"
)
@JsonProperty
(
"entityimageid"
)
private
String
entityimageid
;
/**
* 属性 [DESCRIPTION]
*
*/
@JSONField
(
name
=
"description"
)
@JsonProperty
(
"description"
)
private
String
description
;
/**
* 属性 [MANUALDISCOUNTAMOUNT_BASE]
*
*/
@JSONField
(
name
=
"manualdiscountamount_base"
)
@JsonProperty
(
"manualdiscountamount_base"
)
private
BigDecimal
manualdiscountamountBase
;
/**
* 属性 [SEQUENCENUMBER]
*
*/
@JSONField
(
name
=
"sequencenumber"
)
@JsonProperty
(
"sequencenumber"
)
private
Integer
sequencenumber
;
/**
* 属性 [PRODUCTDESCRIPTION]
*
*/
@JSONField
(
name
=
"productdescription"
)
@JsonProperty
(
"productdescription"
)
private
String
productdescription
;
/**
* 属性 [OWNERIDTYPE]
*
*/
@JSONField
(
name
=
"owneridtype"
)
@JsonProperty
(
"owneridtype"
)
private
String
owneridtype
;
/**
* 属性 [PRODUCTOVERRIDDEN]
*
*/
@JSONField
(
name
=
"productoverridden"
)
@JsonProperty
(
"productoverridden"
)
private
Integer
productoverridden
;
/**
* 属性 [PRODUCTNAME]
*
*/
@JSONField
(
name
=
"productname"
)
@JsonProperty
(
"productname"
)
private
String
productname
;
/**
* 属性 [EXCHANGERATE]
*
*/
@JSONField
(
name
=
"exchangerate"
)
@JsonProperty
(
"exchangerate"
)
private
BigDecimal
exchangerate
;
/**
* 属性 [OPPORTUNITYPRODUCTNAME]
*
*/
@JSONField
(
name
=
"opportunityproductname"
)
@JsonProperty
(
"opportunityproductname"
)
private
String
opportunityproductname
;
/**
* 属性 [PROPERTYCONFIGURATIONSTATUS]
*
*/
@JSONField
(
name
=
"propertyconfigurationstatus"
)
@JsonProperty
(
"propertyconfigurationstatus"
)
private
String
propertyconfigurationstatus
;
/**
* 属性 [TAX]
*
*/
@JSONField
(
name
=
"tax"
)
@JsonProperty
(
"tax"
)
private
BigDecimal
tax
;
/**
* 属性 [PRICEPERUNIT]
*
*/
@JSONField
(
name
=
"priceperunit"
)
@JsonProperty
(
"priceperunit"
)
private
BigDecimal
priceperunit
;
/**
* 属性 [PARENTBUNDLEID]
*
*/
@JSONField
(
name
=
"parentbundleid"
)
@JsonProperty
(
"parentbundleid"
)
private
String
parentbundleid
;
/**
* 属性 [OWNERIDYOMINAME]
*
*/
@JSONField
(
name
=
"owneridyominame"
)
@JsonProperty
(
"owneridyominame"
)
private
String
owneridyominame
;
/**
* 属性 [UTCCONVERSIONTIMEZONECODE]
*
*/
@JSONField
(
name
=
"utcconversiontimezonecode"
)
@JsonProperty
(
"utcconversiontimezonecode"
)
private
Integer
utcconversiontimezonecode
;
/**
* 属性 [PRODUCTASSOCIATIONID]
*
*/
@JSONField
(
name
=
"productassociationid"
)
@JsonProperty
(
"productassociationid"
)
private
String
productassociationid
;
/**
* 属性 [BASEAMOUNT]
*
*/
@JSONField
(
name
=
"baseamount"
)
@JsonProperty
(
"baseamount"
)
private
BigDecimal
baseamount
;
/**
* 属性 [PRODUCTTYPECODE]
*
*/
@JSONField
(
name
=
"producttypecode"
)
@JsonProperty
(
"producttypecode"
)
private
String
producttypecode
;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"updatedate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"updatedate"
)
private
Timestamp
updatedate
;
/**
* 属性 [TIMEZONERULEVERSIONNUMBER]
*
*/
@JSONField
(
name
=
"timezoneruleversionnumber"
)
@JsonProperty
(
"timezoneruleversionnumber"
)
private
Integer
timezoneruleversionnumber
;
/**
* 属性 [QUANTITY]
*
*/
@JSONField
(
name
=
"quantity"
)
@JsonProperty
(
"quantity"
)
private
BigDecimal
quantity
;
/**
* 属性 [LINEITEMNUMBER]
*
*/
@JSONField
(
name
=
"lineitemnumber"
)
@JsonProperty
(
"lineitemnumber"
)
private
Integer
lineitemnumber
;
/**
* 属性 [OVERRIDDENCREATEDON]
*
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"overriddencreatedon"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"overriddencreatedon"
)
private
Timestamp
overriddencreatedon
;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"createdate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"createdate"
)
private
Timestamp
createdate
;
/**
* 属性 [EXTENDEDAMOUNT]
*
*/
@JSONField
(
name
=
"extendedamount"
)
@JsonProperty
(
"extendedamount"
)
private
BigDecimal
extendedamount
;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField
(
name
=
"updateman"
)
@JsonProperty
(
"updateman"
)
private
String
updateman
;
/**
* 属性 [ENTITYIMAGE_URL]
*
*/
@JSONField
(
name
=
"entityimage_url"
)
@JsonProperty
(
"entityimage_url"
)
private
String
entityimageUrl
;
/**
* 属性 [PRICINGERRORCODE]
*
*/
@JSONField
(
name
=
"pricingerrorcode"
)
@JsonProperty
(
"pricingerrorcode"
)
private
String
pricingerrorcode
;
/**
* 属性 [ENTITYIMAGE]
*
*/
@JSONField
(
name
=
"entityimage"
)
@JsonProperty
(
"entityimage"
)
private
String
entityimage
;
/**
* 属性 [BASEAMOUNT_BASE]
*
*/
@JSONField
(
name
=
"baseamount_base"
)
@JsonProperty
(
"baseamount_base"
)
private
BigDecimal
baseamountBase
;
/**
* 属性 [IMPORTSEQUENCENUMBER]
*
*/
@JSONField
(
name
=
"importsequencenumber"
)
@JsonProperty
(
"importsequencenumber"
)
private
Integer
importsequencenumber
;
/**
* 属性 [PRODUCTID]
*
*/
@JSONField
(
name
=
"productid"
)
@JsonProperty
(
"productid"
)
private
String
productid
;
/**
* 属性 [PARENTBUNDLEIDREF]
*
*/
@JSONField
(
name
=
"parentbundleidref"
)
@JsonProperty
(
"parentbundleidref"
)
private
String
parentbundleidref
;
/**
* 属性 [UOMID]
*
*/
@JSONField
(
name
=
"uomid"
)
@JsonProperty
(
"uomid"
)
private
String
uomid
;
/**
* 属性 [TRANSACTIONCURRENCYID]
*
*/
@JSONField
(
name
=
"transactioncurrencyid"
)
@JsonProperty
(
"transactioncurrencyid"
)
private
String
transactioncurrencyid
;
/**
* 属性 [OPPORTUNITYID]
*
*/
@JSONField
(
name
=
"opportunityid"
)
@JsonProperty
(
"opportunityid"
)
private
String
opportunityid
;
/**
* 设置 [PRICEOVERRIDDEN]
*/
public
void
setPriceoverridden
(
Integer
priceoverridden
){
this
.
priceoverridden
=
priceoverridden
;
this
.
modify
(
"priceoverridden"
,
priceoverridden
);
}
/**
* 设置 [TAX_BASE]
*/
public
void
setTaxBase
(
BigDecimal
taxBase
){
this
.
taxBase
=
taxBase
;
this
.
modify
(
"tax_base"
,
taxBase
);
}
/**
* 设置 [SKIPPRICECALCULATION]
*/
public
void
setSkippricecalculation
(
String
skippricecalculation
){
this
.
skippricecalculation
=
skippricecalculation
;
this
.
modify
(
"skippricecalculation"
,
skippricecalculation
);
}
/**
* 设置 [VOLUMEDISCOUNTAMOUNT_BASE]
*/
public
void
setVolumediscountamountBase
(
BigDecimal
volumediscountamountBase
){
this
.
volumediscountamountBase
=
volumediscountamountBase
;
this
.
modify
(
"volumediscountamount_base"
,
volumediscountamountBase
);
}
/**
* 设置 [MANUALDISCOUNTAMOUNT]
*/
public
void
setManualdiscountamount
(
BigDecimal
manualdiscountamount
){
this
.
manualdiscountamount
=
manualdiscountamount
;
this
.
modify
(
"manualdiscountamount"
,
manualdiscountamount
);
}
/**
* 设置 [ENTITYIMAGE_TIMESTAMP]
*/
public
void
setEntityimageTimestamp
(
BigInteger
entityimageTimestamp
){
this
.
entityimageTimestamp
=
entityimageTimestamp
;
this
.
modify
(
"entityimage_timestamp"
,
entityimageTimestamp
);
}
/**
* 设置 [OPPORTUNITYSTATECODE]
*/
public
void
setOpportunitystatecode
(
String
opportunitystatecode
){
this
.
opportunitystatecode
=
opportunitystatecode
;
this
.
modify
(
"opportunitystatecode"
,
opportunitystatecode
);
}
/**
* 设置 [VOLUMEDISCOUNTAMOUNT]
*/
public
void
setVolumediscountamount
(
BigDecimal
volumediscountamount
){
this
.
volumediscountamount
=
volumediscountamount
;
this
.
modify
(
"volumediscountamount"
,
volumediscountamount
);
}
/**
* 设置 [EXTENDEDAMOUNT_BASE]
*/
public
void
setExtendedamountBase
(
BigDecimal
extendedamountBase
){
this
.
extendedamountBase
=
extendedamountBase
;
this
.
modify
(
"extendedamount_base"
,
extendedamountBase
);
}
/**
* 设置 [PRICEPERUNIT_BASE]
*/
public
void
setPriceperunitBase
(
BigDecimal
priceperunitBase
){
this
.
priceperunitBase
=
priceperunitBase
;
this
.
modify
(
"priceperunit_base"
,
priceperunitBase
);
}
/**
* 设置 [VERSIONNUMBER]
*/
public
void
setVersionnumber
(
BigInteger
versionnumber
){
this
.
versionnumber
=
versionnumber
;
this
.
modify
(
"versionnumber"
,
versionnumber
);
}
/**
* 设置 [ENTITYIMAGEID]
*/
public
void
setEntityimageid
(
String
entityimageid
){
this
.
entityimageid
=
entityimageid
;
this
.
modify
(
"entityimageid"
,
entityimageid
);
}
/**
* 设置 [DESCRIPTION]
*/
public
void
setDescription
(
String
description
){
this
.
description
=
description
;
this
.
modify
(
"description"
,
description
);
}
/**
* 设置 [MANUALDISCOUNTAMOUNT_BASE]
*/
public
void
setManualdiscountamountBase
(
BigDecimal
manualdiscountamountBase
){
this
.
manualdiscountamountBase
=
manualdiscountamountBase
;
this
.
modify
(
"manualdiscountamount_base"
,
manualdiscountamountBase
);
}
/**
* 设置 [SEQUENCENUMBER]
*/
public
void
setSequencenumber
(
Integer
sequencenumber
){
this
.
sequencenumber
=
sequencenumber
;
this
.
modify
(
"sequencenumber"
,
sequencenumber
);
}
/**
* 设置 [PRODUCTDESCRIPTION]
*/
public
void
setProductdescription
(
String
productdescription
){
this
.
productdescription
=
productdescription
;
this
.
modify
(
"productdescription"
,
productdescription
);
}
/**
* 设置 [OWNERIDTYPE]
*/
public
void
setOwneridtype
(
String
owneridtype
){
this
.
owneridtype
=
owneridtype
;
this
.
modify
(
"owneridtype"
,
owneridtype
);
}
/**
* 设置 [PRODUCTOVERRIDDEN]
*/
public
void
setProductoverridden
(
Integer
productoverridden
){
this
.
productoverridden
=
productoverridden
;
this
.
modify
(
"productoverridden"
,
productoverridden
);
}
/**
* 设置 [PRODUCTNAME]
*/
public
void
setProductname
(
String
productname
){
this
.
productname
=
productname
;
this
.
modify
(
"productname"
,
productname
);
}
/**
* 设置 [EXCHANGERATE]
*/
public
void
setExchangerate
(
BigDecimal
exchangerate
){
this
.
exchangerate
=
exchangerate
;
this
.
modify
(
"exchangerate"
,
exchangerate
);
}
/**
* 设置 [OPPORTUNITYPRODUCTNAME]
*/
public
void
setOpportunityproductname
(
String
opportunityproductname
){
this
.
opportunityproductname
=
opportunityproductname
;
this
.
modify
(
"opportunityproductname"
,
opportunityproductname
);
}
/**
* 设置 [PROPERTYCONFIGURATIONSTATUS]
*/
public
void
setPropertyconfigurationstatus
(
String
propertyconfigurationstatus
){
this
.
propertyconfigurationstatus
=
propertyconfigurationstatus
;
this
.
modify
(
"propertyconfigurationstatus"
,
propertyconfigurationstatus
);
}
/**
* 设置 [TAX]
*/
public
void
setTax
(
BigDecimal
tax
){
this
.
tax
=
tax
;
this
.
modify
(
"tax"
,
tax
);
}
/**
* 设置 [PRICEPERUNIT]
*/
public
void
setPriceperunit
(
BigDecimal
priceperunit
){
this
.
priceperunit
=
priceperunit
;
this
.
modify
(
"priceperunit"
,
priceperunit
);
}
/**
* 设置 [PARENTBUNDLEID]
*/
public
void
setParentbundleid
(
String
parentbundleid
){
this
.
parentbundleid
=
parentbundleid
;
this
.
modify
(
"parentbundleid"
,
parentbundleid
);
}
/**
* 设置 [OWNERIDYOMINAME]
*/
public
void
setOwneridyominame
(
String
owneridyominame
){
this
.
owneridyominame
=
owneridyominame
;
this
.
modify
(
"owneridyominame"
,
owneridyominame
);
}
/**
* 设置 [UTCCONVERSIONTIMEZONECODE]
*/
public
void
setUtcconversiontimezonecode
(
Integer
utcconversiontimezonecode
){
this
.
utcconversiontimezonecode
=
utcconversiontimezonecode
;
this
.
modify
(
"utcconversiontimezonecode"
,
utcconversiontimezonecode
);
}
/**
* 设置 [PRODUCTASSOCIATIONID]
*/
public
void
setProductassociationid
(
String
productassociationid
){
this
.
productassociationid
=
productassociationid
;
this
.
modify
(
"productassociationid"
,
productassociationid
);
}
/**
* 设置 [BASEAMOUNT]
*/
public
void
setBaseamount
(
BigDecimal
baseamount
){
this
.
baseamount
=
baseamount
;
this
.
modify
(
"baseamount"
,
baseamount
);
}
/**
* 设置 [PRODUCTTYPECODE]
*/
public
void
setProducttypecode
(
String
producttypecode
){
this
.
producttypecode
=
producttypecode
;
this
.
modify
(
"producttypecode"
,
producttypecode
);
}
/**
* 设置 [TIMEZONERULEVERSIONNUMBER]
*/
public
void
setTimezoneruleversionnumber
(
Integer
timezoneruleversionnumber
){
this
.
timezoneruleversionnumber
=
timezoneruleversionnumber
;
this
.
modify
(
"timezoneruleversionnumber"
,
timezoneruleversionnumber
);
}
/**
* 设置 [QUANTITY]
*/
public
void
setQuantity
(
BigDecimal
quantity
){
this
.
quantity
=
quantity
;
this
.
modify
(
"quantity"
,
quantity
);
}
/**
* 设置 [LINEITEMNUMBER]
*/
public
void
setLineitemnumber
(
Integer
lineitemnumber
){
this
.
lineitemnumber
=
lineitemnumber
;
this
.
modify
(
"lineitemnumber"
,
lineitemnumber
);
}
/**
* 设置 [OVERRIDDENCREATEDON]
*/
public
void
setOverriddencreatedon
(
Timestamp
overriddencreatedon
){
this
.
overriddencreatedon
=
overriddencreatedon
;
this
.
modify
(
"overriddencreatedon"
,
overriddencreatedon
);
}
/**
* 设置 [EXTENDEDAMOUNT]
*/
public
void
setExtendedamount
(
BigDecimal
extendedamount
){
this
.
extendedamount
=
extendedamount
;
this
.
modify
(
"extendedamount"
,
extendedamount
);
}
/**
* 设置 [ENTITYIMAGE_URL]
*/
public
void
setEntityimageUrl
(
String
entityimageUrl
){
this
.
entityimageUrl
=
entityimageUrl
;
this
.
modify
(
"entityimage_url"
,
entityimageUrl
);
}
/**
* 设置 [PRICINGERRORCODE]
*/
public
void
setPricingerrorcode
(
String
pricingerrorcode
){
this
.
pricingerrorcode
=
pricingerrorcode
;
this
.
modify
(
"pricingerrorcode"
,
pricingerrorcode
);
}
/**
* 设置 [ENTITYIMAGE]
*/
public
void
setEntityimage
(
String
entityimage
){
this
.
entityimage
=
entityimage
;
this
.
modify
(
"entityimage"
,
entityimage
);
}
/**
* 设置 [BASEAMOUNT_BASE]
*/
public
void
setBaseamountBase
(
BigDecimal
baseamountBase
){
this
.
baseamountBase
=
baseamountBase
;
this
.
modify
(
"baseamount_base"
,
baseamountBase
);
}
/**
* 设置 [IMPORTSEQUENCENUMBER]
*/
public
void
setImportsequencenumber
(
Integer
importsequencenumber
){
this
.
importsequencenumber
=
importsequencenumber
;
this
.
modify
(
"importsequencenumber"
,
importsequencenumber
);
}
/**
* 设置 [PRODUCTID]
*/
public
void
setProductid
(
String
productid
){
this
.
productid
=
productid
;
this
.
modify
(
"productid"
,
productid
);
}
/**
* 设置 [PARENTBUNDLEIDREF]
*/
public
void
setParentbundleidref
(
String
parentbundleidref
){
this
.
parentbundleidref
=
parentbundleidref
;
this
.
modify
(
"parentbundleidref"
,
parentbundleidref
);
}
/**
* 设置 [UOMID]
*/
public
void
setUomid
(
String
uomid
){
this
.
uomid
=
uomid
;
this
.
modify
(
"uomid"
,
uomid
);
}
/**
* 设置 [TRANSACTIONCURRENCYID]
*/
public
void
setTransactioncurrencyid
(
String
transactioncurrencyid
){
this
.
transactioncurrencyid
=
transactioncurrencyid
;
this
.
modify
(
"transactioncurrencyid"
,
transactioncurrencyid
);
}
/**
* 设置 [OPPORTUNITYID]
*/
public
void
setOpportunityid
(
String
opportunityid
){
this
.
opportunityid
=
opportunityid
;
this
.
modify
(
"opportunityid"
,
opportunityid
);
}
}
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/mapping/OpportunityProductMapping.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
centralapi
.
mapping
;
import
org.mapstruct.*
;
import
cn.ibizlab.businesscentral.core.sales.domain.OpportunityProduct
;
import
cn.ibizlab.businesscentral.centralapi.dto.OpportunityProductDTO
;
import
cn.ibizlab.businesscentral.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
OpportunityProductMapping
extends
MappingBase
<
OpportunityProductDTO
,
OpportunityProduct
>
{
}
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/OpportunityProductResource.java
0 → 100644
浏览文件 @
6d1d9e56
package
cn
.
ibizlab
.
businesscentral
.
centralapi
.
rest
;
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
lombok.extern.slf4j.Slf4j
;
import
com.alibaba.fastjson.JSONObject
;
import
javax.servlet.ServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.StringUtils
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PostAuthorize
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
cn.ibizlab.businesscentral.centralapi.dto.*
;
import
cn.ibizlab.businesscentral.centralapi.mapping.*
;
import
cn.ibizlab.businesscentral.core.sales.domain.OpportunityProduct
;
import
cn.ibizlab.businesscentral.core.sales.service.IOpportunityProductService
;
import
cn.ibizlab.businesscentral.core.sales.filter.OpportunityProductSearchContext
;
@Slf4j
@Api
(
tags
=
{
"商机产品"
})
@RestController
(
"CentralApi-opportunityproduct"
)
@RequestMapping
(
""
)
public
class
OpportunityProductResource
{
@Autowired
public
IOpportunityProductService
opportunityproductService
;
@Autowired
@Lazy
public
OpportunityProductMapping
opportunityproductMapping
;
@ApiOperation
(
value
=
"获取商机产品草稿"
,
tags
=
{
"商机产品"
},
notes
=
"获取商机产品草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunityproducts/getdraft"
)
public
ResponseEntity
<
OpportunityProductDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductMapping
.
toDto
(
opportunityproductService
.
getDraft
(
new
OpportunityProduct
())));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdto),'iBizBusinessCentral-OpportunityProduct-Save')"
)
@ApiOperation
(
value
=
"保存商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"保存商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunityproducts/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
save
(
opportunityproductMapping
.
toDomain
(
opportunityproductdto
)));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdtos),'iBizBusinessCentral-OpportunityProduct-Save')"
)
@ApiOperation
(
value
=
"批量保存商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"批量保存商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunityproducts/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
opportunityproductService
.
saveBatch
(
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"检查商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"检查商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunityproducts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
checkKey
(
opportunityproductMapping
.
toDomain
(
opportunityproductdto
)));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.get(#opportunityproduct_id),'iBizBusinessCentral-OpportunityProduct-Remove')"
)
@ApiOperation
(
value
=
"删除商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"删除商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/opportunityproducts/{opportunityproduct_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
remove
(
opportunityproduct_id
));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.getOpportunityproductByIds(#ids),'iBizBusinessCentral-OpportunityProduct-Remove')"
)
@ApiOperation
(
value
=
"批量删除商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"批量删除商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
opportunityproductService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.get(#opportunityproduct_id),'iBizBusinessCentral-OpportunityProduct-Update')"
)
@ApiOperation
(
value
=
"更新商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"更新商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/opportunityproducts/{opportunityproduct_id}"
)
@Transactional
public
ResponseEntity
<
OpportunityProductDTO
>
update
(
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityproductid
(
opportunityproduct_id
);
opportunityproductService
.
update
(
domain
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.getOpportunityproductByEntities(this.opportunityproductMapping.toDomain(#opportunityproductdtos)),'iBizBusinessCentral-OpportunityProduct-Update')"
)
@ApiOperation
(
value
=
"批量更新商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"批量更新商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
opportunityproductService
.
updateBatch
(
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdto),'iBizBusinessCentral-OpportunityProduct-Create')"
)
@ApiOperation
(
value
=
"新建商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"新建商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunityproducts"
)
@Transactional
public
ResponseEntity
<
OpportunityProductDTO
>
create
(
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
opportunityproductService
.
create
(
domain
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdtos),'iBizBusinessCentral-OpportunityProduct-Create')"
)
@ApiOperation
(
value
=
"批量新建商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"批量新建商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
opportunityproductService
.
createBatch
(
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(returnObject.body),'iBizBusinessCentral-OpportunityProduct-Get')"
)
@ApiOperation
(
value
=
"获取商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"获取商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunityproducts/{opportunityproduct_id}"
)
public
ResponseEntity
<
OpportunityProductDTO
>
get
(
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
)
{
OpportunityProduct
domain
=
opportunityproductService
.
get
(
opportunityproduct_id
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-OpportunityProduct-Default-all')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"商机产品"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunityproducts/fetchdefault"
)
public
ResponseEntity
<
List
<
OpportunityProductDTO
>>
fetchDefault
(
OpportunityProductSearchContext
context
)
{
Page
<
OpportunityProduct
>
domains
=
opportunityproductService
.
searchDefault
(
context
)
;
List
<
OpportunityProductDTO
>
list
=
opportunityproductMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-OpportunityProduct-Default-all')"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"商机产品"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunityproducts/searchdefault"
)
public
ResponseEntity
<
Page
<
OpportunityProductDTO
>>
searchDefault
(
@RequestBody
OpportunityProductSearchContext
context
)
{
Page
<
OpportunityProduct
>
domains
=
opportunityproductService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
opportunityproductMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据商机获取商机产品草稿"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机获取商机产品草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/getdraft"
)
public
ResponseEntity
<
OpportunityProductDTO
>
getDraftByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
)
{
OpportunityProduct
domain
=
new
OpportunityProduct
();
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductMapping
.
toDto
(
opportunityproductService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdto),'iBizBusinessCentral-OpportunityProduct-Save')"
)
@ApiOperation
(
value
=
"根据商机保存商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机保存商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/save"
)
public
ResponseEntity
<
Boolean
>
saveByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdtos),'iBizBusinessCentral-OpportunityProduct-Save')"
)
@ApiOperation
(
value
=
"根据商机批量保存商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机批量保存商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据商机检查商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机检查商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
checkKey
(
opportunityproductMapping
.
toDomain
(
opportunityproductdto
)));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.get(#opportunityproduct_id),'iBizBusinessCentral-OpportunityProduct-Remove')"
)
@ApiOperation
(
value
=
"根据商机删除商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机删除商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
remove
(
opportunityproduct_id
));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.getOpportunityproductByIds(#ids),'iBizBusinessCentral-OpportunityProduct-Remove')"
)
@ApiOperation
(
value
=
"根据商机批量删除商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机批量删除商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByOpportunity
(
@RequestBody
List
<
String
>
ids
)
{
opportunityproductService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.get(#opportunityproduct_id),'iBizBusinessCentral-OpportunityProduct-Update')"
)
@ApiOperation
(
value
=
"根据商机更新商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机更新商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
@Transactional
public
ResponseEntity
<
OpportunityProductDTO
>
updateByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
domain
.
setOpportunityproductid
(
opportunityproduct_id
);
opportunityproductService
.
update
(
domain
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.getOpportunityproductByEntities(this.opportunityproductMapping.toDomain(#opportunityproductdtos)),'iBizBusinessCentral-OpportunityProduct-Update')"
)
@ApiOperation
(
value
=
"根据商机批量更新商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机批量更新商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdto),'iBizBusinessCentral-OpportunityProduct-Create')"
)
@ApiOperation
(
value
=
"根据商机建立商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机建立商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts"
)
@Transactional
public
ResponseEntity
<
OpportunityProductDTO
>
createByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
opportunityproductService
.
create
(
domain
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdtos),'iBizBusinessCentral-OpportunityProduct-Create')"
)
@ApiOperation
(
value
=
"根据商机批量建立商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机批量建立商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(returnObject.body),'iBizBusinessCentral-OpportunityProduct-Get')"
)
@ApiOperation
(
value
=
"根据商机获取商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据商机获取商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
public
ResponseEntity
<
OpportunityProductDTO
>
getByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
)
{
OpportunityProduct
domain
=
opportunityproductService
.
get
(
opportunityproduct_id
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-OpportunityProduct-Default-all')"
)
@ApiOperation
(
value
=
"根据商机获取DEFAULT"
,
tags
=
{
"商机产品"
}
,
notes
=
"根据商机获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/fetchdefault"
)
public
ResponseEntity
<
List
<
OpportunityProductDTO
>>
fetchOpportunityProductDefaultByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
OpportunityProductSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
OpportunityProduct
>
domains
=
opportunityproductService
.
searchDefault
(
context
)
;
List
<
OpportunityProductDTO
>
list
=
opportunityproductMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-OpportunityProduct-Default-all')"
)
@ApiOperation
(
value
=
"根据商机查询DEFAULT"
,
tags
=
{
"商机产品"
}
,
notes
=
"根据商机查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/opportunityproducts/searchdefault"
)
public
ResponseEntity
<
Page
<
OpportunityProductDTO
>>
searchOpportunityProductDefaultByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
OpportunityProduct
>
domains
=
opportunityproductService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
opportunityproductMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据联系人商机获取商机产品草稿"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机获取商机产品草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/getdraft"
)
public
ResponseEntity
<
OpportunityProductDTO
>
getDraftByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
)
{
OpportunityProduct
domain
=
new
OpportunityProduct
();
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductMapping
.
toDto
(
opportunityproductService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdto),'iBizBusinessCentral-OpportunityProduct-Save')"
)
@ApiOperation
(
value
=
"根据联系人商机保存商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机保存商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/save"
)
public
ResponseEntity
<
Boolean
>
saveByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdtos),'iBizBusinessCentral-OpportunityProduct-Save')"
)
@ApiOperation
(
value
=
"根据联系人商机批量保存商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机批量保存商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据联系人商机检查商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机检查商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
checkKey
(
opportunityproductMapping
.
toDomain
(
opportunityproductdto
)));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.get(#opportunityproduct_id),'iBizBusinessCentral-OpportunityProduct-Remove')"
)
@ApiOperation
(
value
=
"根据联系人商机删除商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机删除商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
remove
(
opportunityproduct_id
));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.getOpportunityproductByIds(#ids),'iBizBusinessCentral-OpportunityProduct-Remove')"
)
@ApiOperation
(
value
=
"根据联系人商机批量删除商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机批量删除商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByContactOpportunity
(
@RequestBody
List
<
String
>
ids
)
{
opportunityproductService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.get(#opportunityproduct_id),'iBizBusinessCentral-OpportunityProduct-Update')"
)
@ApiOperation
(
value
=
"根据联系人商机更新商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机更新商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
@Transactional
public
ResponseEntity
<
OpportunityProductDTO
>
updateByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
domain
.
setOpportunityproductid
(
opportunityproduct_id
);
opportunityproductService
.
update
(
domain
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.getOpportunityproductByEntities(this.opportunityproductMapping.toDomain(#opportunityproductdtos)),'iBizBusinessCentral-OpportunityProduct-Update')"
)
@ApiOperation
(
value
=
"根据联系人商机批量更新商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机批量更新商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdto),'iBizBusinessCentral-OpportunityProduct-Create')"
)
@ApiOperation
(
value
=
"根据联系人商机建立商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机建立商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts"
)
@Transactional
public
ResponseEntity
<
OpportunityProductDTO
>
createByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
opportunityproductService
.
create
(
domain
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdtos),'iBizBusinessCentral-OpportunityProduct-Create')"
)
@ApiOperation
(
value
=
"根据联系人商机批量建立商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机批量建立商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(returnObject.body),'iBizBusinessCentral-OpportunityProduct-Get')"
)
@ApiOperation
(
value
=
"根据联系人商机获取商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据联系人商机获取商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
public
ResponseEntity
<
OpportunityProductDTO
>
getByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
)
{
OpportunityProduct
domain
=
opportunityproductService
.
get
(
opportunityproduct_id
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-OpportunityProduct-Default-all')"
)
@ApiOperation
(
value
=
"根据联系人商机获取DEFAULT"
,
tags
=
{
"商机产品"
}
,
notes
=
"根据联系人商机获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/fetchdefault"
)
public
ResponseEntity
<
List
<
OpportunityProductDTO
>>
fetchOpportunityProductDefaultByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
OpportunityProductSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
OpportunityProduct
>
domains
=
opportunityproductService
.
searchDefault
(
context
)
;
List
<
OpportunityProductDTO
>
list
=
opportunityproductMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-OpportunityProduct-Default-all')"
)
@ApiOperation
(
value
=
"根据联系人商机查询DEFAULT"
,
tags
=
{
"商机产品"
}
,
notes
=
"根据联系人商机查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/searchdefault"
)
public
ResponseEntity
<
Page
<
OpportunityProductDTO
>>
searchOpportunityProductDefaultByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
OpportunityProduct
>
domains
=
opportunityproductService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
opportunityproductMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据客户联系人商机获取商机产品草稿"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机获取商机产品草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/getdraft"
)
public
ResponseEntity
<
OpportunityProductDTO
>
getDraftByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
)
{
OpportunityProduct
domain
=
new
OpportunityProduct
();
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductMapping
.
toDto
(
opportunityproductService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdto),'iBizBusinessCentral-OpportunityProduct-Save')"
)
@ApiOperation
(
value
=
"根据客户联系人商机保存商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机保存商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/save"
)
public
ResponseEntity
<
Boolean
>
saveByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdtos),'iBizBusinessCentral-OpportunityProduct-Save')"
)
@ApiOperation
(
value
=
"根据客户联系人商机批量保存商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机批量保存商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据客户联系人商机检查商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机检查商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
checkKey
(
opportunityproductMapping
.
toDomain
(
opportunityproductdto
)));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.get(#opportunityproduct_id),'iBizBusinessCentral-OpportunityProduct-Remove')"
)
@ApiOperation
(
value
=
"根据客户联系人商机删除商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机删除商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
opportunityproductService
.
remove
(
opportunityproduct_id
));
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.getOpportunityproductByIds(#ids),'iBizBusinessCentral-OpportunityProduct-Remove')"
)
@ApiOperation
(
value
=
"根据客户联系人商机批量删除商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机批量删除商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByAccountContactOpportunity
(
@RequestBody
List
<
String
>
ids
)
{
opportunityproductService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.get(#opportunityproduct_id),'iBizBusinessCentral-OpportunityProduct-Update')"
)
@ApiOperation
(
value
=
"根据客户联系人商机更新商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机更新商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
@Transactional
public
ResponseEntity
<
OpportunityProductDTO
>
updateByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
domain
.
setOpportunityproductid
(
opportunityproduct_id
);
opportunityproductService
.
update
(
domain
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductService.getOpportunityproductByEntities(this.opportunityproductMapping.toDomain(#opportunityproductdtos)),'iBizBusinessCentral-OpportunityProduct-Update')"
)
@ApiOperation
(
value
=
"根据客户联系人商机批量更新商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机批量更新商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdto),'iBizBusinessCentral-OpportunityProduct-Create')"
)
@ApiOperation
(
value
=
"根据客户联系人商机建立商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机建立商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts"
)
@Transactional
public
ResponseEntity
<
OpportunityProductDTO
>
createByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductDTO
opportunityproductdto
)
{
OpportunityProduct
domain
=
opportunityproductMapping
.
toDomain
(
opportunityproductdto
);
domain
.
setOpportunityid
(
opportunity_id
);
opportunityproductService
.
create
(
domain
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(#opportunityproductdtos),'iBizBusinessCentral-OpportunityProduct-Create')"
)
@ApiOperation
(
value
=
"根据客户联系人商机批量建立商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机批量建立商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
OpportunityProductDTO
>
opportunityproductdtos
)
{
List
<
OpportunityProduct
>
domainlist
=
opportunityproductMapping
.
toDomain
(
opportunityproductdtos
);
for
(
OpportunityProduct
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
opportunityproductService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.opportunityproductMapping.toDomain(returnObject.body),'iBizBusinessCentral-OpportunityProduct-Get')"
)
@ApiOperation
(
value
=
"根据客户联系人商机获取商机产品"
,
tags
=
{
"商机产品"
},
notes
=
"根据客户联系人商机获取商机产品"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/{opportunityproduct_id}"
)
public
ResponseEntity
<
OpportunityProductDTO
>
getByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"opportunityproduct_id"
)
String
opportunityproduct_id
)
{
OpportunityProduct
domain
=
opportunityproductService
.
get
(
opportunityproduct_id
);
OpportunityProductDTO
dto
=
opportunityproductMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-OpportunityProduct-Default-all')"
)
@ApiOperation
(
value
=
"根据客户联系人商机获取DEFAULT"
,
tags
=
{
"商机产品"
}
,
notes
=
"根据客户联系人商机获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/fetchdefault"
)
public
ResponseEntity
<
List
<
OpportunityProductDTO
>>
fetchOpportunityProductDefaultByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
OpportunityProductSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
OpportunityProduct
>
domains
=
opportunityproductService
.
searchDefault
(
context
)
;
List
<
OpportunityProductDTO
>
list
=
opportunityproductMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-OpportunityProduct-Default-all')"
)
@ApiOperation
(
value
=
"根据客户联系人商机查询DEFAULT"
,
tags
=
{
"商机产品"
}
,
notes
=
"根据客户联系人商机查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/opportunityproducts/searchdefault"
)
public
ResponseEntity
<
Page
<
OpportunityProductDTO
>>
searchOpportunityProductDefaultByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
OpportunityProductSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
OpportunityProduct
>
domains
=
opportunityproductService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
opportunityproductMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/QuoteResource.java
浏览文件 @
6d1d9e56
...
@@ -158,5 +158,401 @@ public class QuoteResource {
...
@@ -158,5 +158,401 @@ public class QuoteResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quoteMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
.
body
(
new
PageImpl
(
quoteMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedto),'iBizBusinessCentral-Quote-Create')"
)
@ApiOperation
(
value
=
"根据商机建立报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机建立报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes"
)
@Transactional
public
ResponseEntity
<
QuoteDTO
>
createByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
quoteService
.
create
(
domain
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedtos),'iBizBusinessCentral-Quote-Create')"
)
@ApiOperation
(
value
=
"根据商机批量建立报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机批量建立报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedto),'iBizBusinessCentral-Quote-Save')"
)
@ApiOperation
(
value
=
"根据商机保存报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机保存报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/save"
)
public
ResponseEntity
<
Boolean
>
saveByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedtos),'iBizBusinessCentral-Quote-Save')"
)
@ApiOperation
(
value
=
"根据商机批量保存报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机批量保存报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.get(#quote_id),'iBizBusinessCentral-Quote-Remove')"
)
@ApiOperation
(
value
=
"根据商机删除报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机删除报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
remove
(
quote_id
));
}
@PreAuthorize
(
"hasPermission(this.quoteService.getQuoteByIds(#ids),'iBizBusinessCentral-Quote-Remove')"
)
@ApiOperation
(
value
=
"根据商机批量删除报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机批量删除报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByOpportunity
(
@RequestBody
List
<
String
>
ids
)
{
quoteService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.get(#quote_id),'iBizBusinessCentral-Quote-Update')"
)
@ApiOperation
(
value
=
"根据商机更新报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机更新报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}"
)
@Transactional
public
ResponseEntity
<
QuoteDTO
>
updateByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
domain
.
setQuoteid
(
quote_id
);
quoteService
.
update
(
domain
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.getQuoteByEntities(this.quoteMapping.toDomain(#quotedtos)),'iBizBusinessCentral-Quote-Update')"
)
@ApiOperation
(
value
=
"根据商机批量更新报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机批量更新报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.quoteMapping.toDomain(returnObject.body),'iBizBusinessCentral-Quote-Get')"
)
@ApiOperation
(
value
=
"根据商机获取报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机获取报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}"
)
public
ResponseEntity
<
QuoteDTO
>
getByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
Quote
domain
=
quoteService
.
get
(
quote_id
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据商机检查报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据商机检查报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
checkKey
(
quoteMapping
.
toDomain
(
quotedto
)));
}
@ApiOperation
(
value
=
"根据商机获取报价单草稿"
,
tags
=
{
"报价单"
},
notes
=
"根据商机获取报价单草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/quotes/getdraft"
)
public
ResponseEntity
<
QuoteDTO
>
getDraftByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
)
{
Quote
domain
=
new
Quote
();
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteMapping
.
toDto
(
quoteService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-Default-all')"
)
@ApiOperation
(
value
=
"根据商机获取DEFAULT"
,
tags
=
{
"报价单"
}
,
notes
=
"根据商机获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/quotes/fetchdefault"
)
public
ResponseEntity
<
List
<
QuoteDTO
>>
fetchQuoteDefaultByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
QuoteSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
Quote
>
domains
=
quoteService
.
searchDefault
(
context
)
;
List
<
QuoteDTO
>
list
=
quoteMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-Default-all')"
)
@ApiOperation
(
value
=
"根据商机查询DEFAULT"
,
tags
=
{
"报价单"
}
,
notes
=
"根据商机查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/searchdefault"
)
public
ResponseEntity
<
Page
<
QuoteDTO
>>
searchQuoteDefaultByOpportunity
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
Quote
>
domains
=
quoteService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quoteMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedto),'iBizBusinessCentral-Quote-Create')"
)
@ApiOperation
(
value
=
"根据联系人商机建立报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机建立报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes"
)
@Transactional
public
ResponseEntity
<
QuoteDTO
>
createByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
quoteService
.
create
(
domain
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedtos),'iBizBusinessCentral-Quote-Create')"
)
@ApiOperation
(
value
=
"根据联系人商机批量建立报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机批量建立报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedto),'iBizBusinessCentral-Quote-Save')"
)
@ApiOperation
(
value
=
"根据联系人商机保存报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机保存报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/save"
)
public
ResponseEntity
<
Boolean
>
saveByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedtos),'iBizBusinessCentral-Quote-Save')"
)
@ApiOperation
(
value
=
"根据联系人商机批量保存报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机批量保存报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.get(#quote_id),'iBizBusinessCentral-Quote-Remove')"
)
@ApiOperation
(
value
=
"根据联系人商机删除报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机删除报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
remove
(
quote_id
));
}
@PreAuthorize
(
"hasPermission(this.quoteService.getQuoteByIds(#ids),'iBizBusinessCentral-Quote-Remove')"
)
@ApiOperation
(
value
=
"根据联系人商机批量删除报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机批量删除报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByContactOpportunity
(
@RequestBody
List
<
String
>
ids
)
{
quoteService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.get(#quote_id),'iBizBusinessCentral-Quote-Update')"
)
@ApiOperation
(
value
=
"根据联系人商机更新报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机更新报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}"
)
@Transactional
public
ResponseEntity
<
QuoteDTO
>
updateByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
domain
.
setQuoteid
(
quote_id
);
quoteService
.
update
(
domain
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.getQuoteByEntities(this.quoteMapping.toDomain(#quotedtos)),'iBizBusinessCentral-Quote-Update')"
)
@ApiOperation
(
value
=
"根据联系人商机批量更新报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机批量更新报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.quoteMapping.toDomain(returnObject.body),'iBizBusinessCentral-Quote-Get')"
)
@ApiOperation
(
value
=
"根据联系人商机获取报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机获取报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}"
)
public
ResponseEntity
<
QuoteDTO
>
getByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
Quote
domain
=
quoteService
.
get
(
quote_id
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据联系人商机检查报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机检查报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
checkKey
(
quoteMapping
.
toDomain
(
quotedto
)));
}
@ApiOperation
(
value
=
"根据联系人商机获取报价单草稿"
,
tags
=
{
"报价单"
},
notes
=
"根据联系人商机获取报价单草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/getdraft"
)
public
ResponseEntity
<
QuoteDTO
>
getDraftByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
)
{
Quote
domain
=
new
Quote
();
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteMapping
.
toDto
(
quoteService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-Default-all')"
)
@ApiOperation
(
value
=
"根据联系人商机获取DEFAULT"
,
tags
=
{
"报价单"
}
,
notes
=
"根据联系人商机获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/fetchdefault"
)
public
ResponseEntity
<
List
<
QuoteDTO
>>
fetchQuoteDefaultByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
QuoteSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
Quote
>
domains
=
quoteService
.
searchDefault
(
context
)
;
List
<
QuoteDTO
>
list
=
quoteMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-Default-all')"
)
@ApiOperation
(
value
=
"根据联系人商机查询DEFAULT"
,
tags
=
{
"报价单"
}
,
notes
=
"根据联系人商机查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/searchdefault"
)
public
ResponseEntity
<
Page
<
QuoteDTO
>>
searchQuoteDefaultByContactOpportunity
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
Quote
>
domains
=
quoteService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quoteMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedto),'iBizBusinessCentral-Quote-Create')"
)
@ApiOperation
(
value
=
"根据客户联系人商机建立报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机建立报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes"
)
@Transactional
public
ResponseEntity
<
QuoteDTO
>
createByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
quoteService
.
create
(
domain
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedtos),'iBizBusinessCentral-Quote-Create')"
)
@ApiOperation
(
value
=
"根据客户联系人商机批量建立报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机批量建立报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedto),'iBizBusinessCentral-Quote-Save')"
)
@ApiOperation
(
value
=
"根据客户联系人商机保存报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机保存报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/save"
)
public
ResponseEntity
<
Boolean
>
saveByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.quoteMapping.toDomain(#quotedtos),'iBizBusinessCentral-Quote-Save')"
)
@ApiOperation
(
value
=
"根据客户联系人商机批量保存报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机批量保存报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.get(#quote_id),'iBizBusinessCentral-Quote-Remove')"
)
@ApiOperation
(
value
=
"根据客户联系人商机删除报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机删除报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
remove
(
quote_id
));
}
@PreAuthorize
(
"hasPermission(this.quoteService.getQuoteByIds(#ids),'iBizBusinessCentral-Quote-Remove')"
)
@ApiOperation
(
value
=
"根据客户联系人商机批量删除报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机批量删除报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByAccountContactOpportunity
(
@RequestBody
List
<
String
>
ids
)
{
quoteService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.get(#quote_id),'iBizBusinessCentral-Quote-Update')"
)
@ApiOperation
(
value
=
"根据客户联系人商机更新报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机更新报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}"
)
@Transactional
public
ResponseEntity
<
QuoteDTO
>
updateByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDTO
quotedto
)
{
Quote
domain
=
quoteMapping
.
toDomain
(
quotedto
);
domain
.
setOpportunityid
(
opportunity_id
);
domain
.
setQuoteid
(
quote_id
);
quoteService
.
update
(
domain
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quoteService.getQuoteByEntities(this.quoteMapping.toDomain(#quotedtos)),'iBizBusinessCentral-Quote-Update')"
)
@ApiOperation
(
value
=
"根据客户联系人商机批量更新报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机批量更新报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
List
<
QuoteDTO
>
quotedtos
)
{
List
<
Quote
>
domainlist
=
quoteMapping
.
toDomain
(
quotedtos
);
for
(
Quote
domain:
domainlist
){
domain
.
setOpportunityid
(
opportunity_id
);
}
quoteService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.quoteMapping.toDomain(returnObject.body),'iBizBusinessCentral-Quote-Get')"
)
@ApiOperation
(
value
=
"根据客户联系人商机获取报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机获取报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}"
)
public
ResponseEntity
<
QuoteDTO
>
getByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
Quote
domain
=
quoteService
.
get
(
quote_id
);
QuoteDTO
dto
=
quoteMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据客户联系人商机检查报价单"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机检查报价单"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteDTO
quotedto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteService
.
checkKey
(
quoteMapping
.
toDomain
(
quotedto
)));
}
@ApiOperation
(
value
=
"根据客户联系人商机获取报价单草稿"
,
tags
=
{
"报价单"
},
notes
=
"根据客户联系人商机获取报价单草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/getdraft"
)
public
ResponseEntity
<
QuoteDTO
>
getDraftByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
)
{
Quote
domain
=
new
Quote
();
domain
.
setOpportunityid
(
opportunity_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quoteMapping
.
toDto
(
quoteService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-Default-all')"
)
@ApiOperation
(
value
=
"根据客户联系人商机获取DEFAULT"
,
tags
=
{
"报价单"
}
,
notes
=
"根据客户联系人商机获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/fetchdefault"
)
public
ResponseEntity
<
List
<
QuoteDTO
>>
fetchQuoteDefaultByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
QuoteSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
Quote
>
domains
=
quoteService
.
searchDefault
(
context
)
;
List
<
QuoteDTO
>
list
=
quoteMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-Default-all')"
)
@ApiOperation
(
value
=
"根据客户联系人商机查询DEFAULT"
,
tags
=
{
"报价单"
}
,
notes
=
"根据客户联系人商机查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/searchdefault"
)
public
ResponseEntity
<
Page
<
QuoteDTO
>>
searchQuoteDefaultByAccountContactOpportunity
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@RequestBody
QuoteSearchContext
context
)
{
context
.
setN_opportunityid_eq
(
opportunity_id
);
Page
<
Quote
>
domains
=
quoteService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quoteMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
}
config.xml
浏览文件 @
6d1d9e56
...
@@ -37,11 +37,11 @@
...
@@ -37,11 +37,11 @@
git clone -b master $para2 ibizbusinesscentral/
git clone -b master $para2 ibizbusinesscentral/
export NODE_OPTIONS=--max-old-space-size=4096
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizbusinesscentral/
cd ibizbusinesscentral/
mvn clean package -P
businesscentral
mvn clean package -P
centralapi
cd businesscentral-
app/businesscentral-app-businesscentral
cd businesscentral-
provider/businesscentral-provider-centralapi
mvn -P
businesscentral
docker:build
mvn -P
centralapi
docker:build
mvn -P
businesscentral
docker:push
mvn -P
centralapi
docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/businesscentral-
app-businesscentral.yaml iBizEE --with-registry-auth
docker -H $para1 stack deploy --compose-file=src/main/docker/businesscentral-
provider-centralapi.yaml iBizEE --with-registry-auth
</command>
</command>
</hudson.tasks.Shell>
</hudson.tasks.Shell>
</builders>
</builders>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录