Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
12161800
提交
12161800
编写于
6月 22, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lab_gzf 部署微服务接口
上级
e7cca149
变更
6
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
567 行增加
和
20 行删除
+567
-20
QuoteDetail.java
...bizlab/businesscentral/core/sales/domain/QuoteDetail.java
+2
-2
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+16
-16
Dockerfile
...esscentral-provider-centralapi/src/main/docker/Dockerfile
+1
-1
businesscentral-provider-centralapi.yaml
.../src/main/docker/businesscentral-provider-centralapi.yaml
+15
-1
QuoteDetailResource.java
.../businesscentral/centralapi/rest/QuoteDetailResource.java
+528
-0
config.xml
config.xml
+5
-0
未找到文件。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/sales/domain/QuoteDetail.java
浏览文件 @
12161800
...
...
@@ -362,7 +362,7 @@ public class QuoteDetail extends EntityMP implements Serializable {
@JsonProperty
(
"productoverridden"
)
private
Integer
productoverridden
;
/**
*
Product Name
*
产品名称
*/
@TableField
(
value
=
"productname"
)
@JSONField
(
name
=
"productname"
)
...
...
@@ -868,7 +868,7 @@ public class QuoteDetail extends EntityMP implements Serializable {
}
/**
* 设置 [
Product Name
]
* 设置 [
产品名称
]
*/
public
void
setProductname
(
String
productname
){
this
.
productname
=
productname
;
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
12161800
...
...
@@ -466,7 +466,7 @@
<!--输出实体[QUOTEDETAIL]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-quotedetail-
4
-8"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-quotedetail-
10
-8"
>
<createTable
tableName=
"QUOTEDETAIL"
>
<column
name=
"OWNERIDTYPE"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -4514,7 +4514,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-3
49
-54"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-3
55
-54"
>
<createTable
tableName=
"ACCOUNT"
>
<column
name=
"ADDRESS1_PRIMARYCONTACTNAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -10773,19 +10773,19 @@
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"SEMIANNUALFISCALCALENDAR"
constraintName=
"DER1N_SEMIANNUALFISCALCALENDAR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[QUOTEDETAIL]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
4
-134"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
10
-134"
>
<addForeignKeyConstraint
baseColumnNames=
"PRODUCTID"
baseTableName=
"QUOTEDETAIL"
constraintName=
"DER1N_QUOTEDETAIL__PRODUCT__PR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRODUCTID"
referencedTableName=
"PRODUCT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
4
-135"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
10
-135"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTBUNDLEIDREF"
baseTableName=
"QUOTEDETAIL"
constraintName=
"DER1N_QUOTEDETAIL__QUOTEDETAIL"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"QUOTEDETAILID"
referencedTableName=
"QUOTEDETAIL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
4
-136"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
10
-136"
>
<addForeignKeyConstraint
baseColumnNames=
"QUOTEID"
baseTableName=
"QUOTEDETAIL"
constraintName=
"DER1N_QUOTEDETAIL__QUOTE__QUOT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"QUOTEID"
referencedTableName=
"QUOTE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
4
-137"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
10
-137"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"QUOTEDETAIL"
constraintName=
"DER1N_QUOTEDETAIL__TRANSACTION"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
4
-138"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-quotedetail-
10
-138"
>
<addForeignKeyConstraint
baseColumnNames=
"UOMID"
baseTableName=
"QUOTEDETAIL"
constraintName=
"DER1N_QUOTEDETAIL__UOM__UOMID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"UOMID"
referencedTableName=
"UOM"
validate=
"true"
/>
</changeSet>
<!--输出实体[QUARTERLYFISCALCALENDAR]外键关系 -->
...
...
@@ -11137,31 +11137,31 @@
<addForeignKeyConstraint
baseColumnNames=
"METRICID"
baseTableName=
"GOAL"
constraintName=
"DER1N_GOAL__METRIC__METRICID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"METRICID"
referencedTableName=
"METRIC"
validate=
"true"
/>
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-255"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-255"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__ACCOUNT__PARENT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-256"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-256"
>
<addForeignKeyConstraint
baseColumnNames=
"PRIMARYCONTACTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__CONTACT__PRIMAR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-257"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-257"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-258"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-258"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-259"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-259"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-260"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-260"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-261"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-261"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-262"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-262"
>
<addForeignKeyConstraint
baseColumnNames=
"TERRITORYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TERRITORY__TERR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TERRITORYID"
referencedTableName=
"TERRITORY"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
49
-263"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
55
-263"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[KNOWLEDGEARTICLEVIEWS]外键关系 -->
...
...
businesscentral-provider/businesscentral-provider-centralapi/src/main/docker/Dockerfile
浏览文件 @
12161800
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
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
businesscentral-provider/businesscentral-provider-centralapi/src/main/docker/businesscentral-provider-centralapi.yaml
浏览文件 @
12161800
...
...
@@ -3,9 +3,23 @@ services:
businesscentral-provider-centralapi
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-provider-centralapi:latest
ports
:
-
"
8081:8081
"
-
"
10310:10310
"
networks
:
-
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
:
resources
:
limits
:
...
...
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/QuoteDetailResource.java
浏览文件 @
12161800
...
...
@@ -158,5 +158,533 @@ public class QuoteDetailResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quotedetailMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据报价单获取报价单产品草稿"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单获取报价单产品草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/quotes/{quote_id}/quotedetails/getdraft"
)
public
ResponseEntity
<
QuoteDetailDTO
>
getDraftByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
QuoteDetail
domain
=
new
QuoteDetail
();
domain
.
setQuoteid
(
quote_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailMapping
.
toDto
(
quotedetailService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.get(#quotedetail_id),'iBizBusinessCentral-QuoteDetail-Update')"
)
@ApiOperation
(
value
=
"根据报价单更新报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单更新报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
@Transactional
public
ResponseEntity
<
QuoteDetailDTO
>
updateByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
domain
.
setQuotedetailid
(
quotedetail_id
);
quotedetailService
.
update
(
domain
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.getQuotedetailByEntities(this.quotedetailMapping.toDomain(#quotedetaildtos)),'iBizBusinessCentral-QuoteDetail-Update')"
)
@ApiOperation
(
value
=
"根据报价单批量更新报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单批量更新报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildto),'iBizBusinessCentral-QuoteDetail-Save')"
)
@ApiOperation
(
value
=
"根据报价单保存报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单保存报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/quotes/{quote_id}/quotedetails/save"
)
public
ResponseEntity
<
Boolean
>
saveByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildtos),'iBizBusinessCentral-QuoteDetail-Save')"
)
@ApiOperation
(
value
=
"根据报价单批量保存报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单批量保存报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/quotes/{quote_id}/quotedetails/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.get(#quotedetail_id),'iBizBusinessCentral-QuoteDetail-Remove')"
)
@ApiOperation
(
value
=
"根据报价单删除报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单删除报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
remove
(
quotedetail_id
));
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.getQuotedetailByIds(#ids),'iBizBusinessCentral-QuoteDetail-Remove')"
)
@ApiOperation
(
value
=
"根据报价单批量删除报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单批量删除报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByQuote
(
@RequestBody
List
<
String
>
ids
)
{
quotedetailService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据报价单检查报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单检查报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/quotes/{quote_id}/quotedetails/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
checkKey
(
quotedetailMapping
.
toDomain
(
quotedetaildto
)));
}
@PostAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(returnObject.body),'iBizBusinessCentral-QuoteDetail-Get')"
)
@ApiOperation
(
value
=
"根据报价单获取报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单获取报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
public
ResponseEntity
<
QuoteDetailDTO
>
getByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
)
{
QuoteDetail
domain
=
quotedetailService
.
get
(
quotedetail_id
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildto),'iBizBusinessCentral-QuoteDetail-Create')"
)
@ApiOperation
(
value
=
"根据报价单建立报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单建立报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/quotes/{quote_id}/quotedetails"
)
@Transactional
public
ResponseEntity
<
QuoteDetailDTO
>
createByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
quotedetailService
.
create
(
domain
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildtos),'iBizBusinessCentral-QuoteDetail-Create')"
)
@ApiOperation
(
value
=
"根据报价单批量建立报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据报价单批量建立报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-QuoteDetail-Default-all')"
)
@ApiOperation
(
value
=
"根据报价单获取DEFAULT"
,
tags
=
{
"报价单产品"
}
,
notes
=
"根据报价单获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/quotes/{quote_id}/quotedetails/fetchdefault"
)
public
ResponseEntity
<
List
<
QuoteDetailDTO
>>
fetchQuoteDetailDefaultByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
QuoteDetailSearchContext
context
)
{
context
.
setN_quoteid_eq
(
quote_id
);
Page
<
QuoteDetail
>
domains
=
quotedetailService
.
searchDefault
(
context
)
;
List
<
QuoteDetailDTO
>
list
=
quotedetailMapping
.
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-QuoteDetail-Default-all')"
)
@ApiOperation
(
value
=
"根据报价单查询DEFAULT"
,
tags
=
{
"报价单产品"
}
,
notes
=
"根据报价单查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/quotes/{quote_id}/quotedetails/searchdefault"
)
public
ResponseEntity
<
Page
<
QuoteDetailDTO
>>
searchQuoteDetailDefaultByQuote
(
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailSearchContext
context
)
{
context
.
setN_quoteid_eq
(
quote_id
);
Page
<
QuoteDetail
>
domains
=
quotedetailService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quotedetailMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据商机报价单获取报价单产品草稿"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单获取报价单产品草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/getdraft"
)
public
ResponseEntity
<
QuoteDetailDTO
>
getDraftByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
QuoteDetail
domain
=
new
QuoteDetail
();
domain
.
setQuoteid
(
quote_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailMapping
.
toDto
(
quotedetailService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.get(#quotedetail_id),'iBizBusinessCentral-QuoteDetail-Update')"
)
@ApiOperation
(
value
=
"根据商机报价单更新报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单更新报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
@Transactional
public
ResponseEntity
<
QuoteDetailDTO
>
updateByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
domain
.
setQuotedetailid
(
quotedetail_id
);
quotedetailService
.
update
(
domain
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.getQuotedetailByEntities(this.quotedetailMapping.toDomain(#quotedetaildtos)),'iBizBusinessCentral-QuoteDetail-Update')"
)
@ApiOperation
(
value
=
"根据商机报价单批量更新报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单批量更新报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildto),'iBizBusinessCentral-QuoteDetail-Save')"
)
@ApiOperation
(
value
=
"根据商机报价单保存报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单保存报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/save"
)
public
ResponseEntity
<
Boolean
>
saveByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildtos),'iBizBusinessCentral-QuoteDetail-Save')"
)
@ApiOperation
(
value
=
"根据商机报价单批量保存报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单批量保存报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.get(#quotedetail_id),'iBizBusinessCentral-QuoteDetail-Remove')"
)
@ApiOperation
(
value
=
"根据商机报价单删除报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单删除报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
remove
(
quotedetail_id
));
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.getQuotedetailByIds(#ids),'iBizBusinessCentral-QuoteDetail-Remove')"
)
@ApiOperation
(
value
=
"根据商机报价单批量删除报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单批量删除报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByOpportunityQuote
(
@RequestBody
List
<
String
>
ids
)
{
quotedetailService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据商机报价单检查报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单检查报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
checkKey
(
quotedetailMapping
.
toDomain
(
quotedetaildto
)));
}
@PostAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(returnObject.body),'iBizBusinessCentral-QuoteDetail-Get')"
)
@ApiOperation
(
value
=
"根据商机报价单获取报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单获取报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
public
ResponseEntity
<
QuoteDetailDTO
>
getByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
)
{
QuoteDetail
domain
=
quotedetailService
.
get
(
quotedetail_id
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildto),'iBizBusinessCentral-QuoteDetail-Create')"
)
@ApiOperation
(
value
=
"根据商机报价单建立报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单建立报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails"
)
@Transactional
public
ResponseEntity
<
QuoteDetailDTO
>
createByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
quotedetailService
.
create
(
domain
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildtos),'iBizBusinessCentral-QuoteDetail-Create')"
)
@ApiOperation
(
value
=
"根据商机报价单批量建立报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据商机报价单批量建立报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-QuoteDetail-Default-all')"
)
@ApiOperation
(
value
=
"根据商机报价单获取DEFAULT"
,
tags
=
{
"报价单产品"
}
,
notes
=
"根据商机报价单获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/fetchdefault"
)
public
ResponseEntity
<
List
<
QuoteDetailDTO
>>
fetchQuoteDetailDefaultByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
QuoteDetailSearchContext
context
)
{
context
.
setN_quoteid_eq
(
quote_id
);
Page
<
QuoteDetail
>
domains
=
quotedetailService
.
searchDefault
(
context
)
;
List
<
QuoteDetailDTO
>
list
=
quotedetailMapping
.
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-QuoteDetail-Default-all')"
)
@ApiOperation
(
value
=
"根据商机报价单查询DEFAULT"
,
tags
=
{
"报价单产品"
}
,
notes
=
"根据商机报价单查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/searchdefault"
)
public
ResponseEntity
<
Page
<
QuoteDetailDTO
>>
searchQuoteDetailDefaultByOpportunityQuote
(
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailSearchContext
context
)
{
context
.
setN_quoteid_eq
(
quote_id
);
Page
<
QuoteDetail
>
domains
=
quotedetailService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quotedetailMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据联系人商机报价单获取报价单产品草稿"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单获取报价单产品草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/getdraft"
)
public
ResponseEntity
<
QuoteDetailDTO
>
getDraftByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
QuoteDetail
domain
=
new
QuoteDetail
();
domain
.
setQuoteid
(
quote_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailMapping
.
toDto
(
quotedetailService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.get(#quotedetail_id),'iBizBusinessCentral-QuoteDetail-Update')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单更新报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单更新报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
@Transactional
public
ResponseEntity
<
QuoteDetailDTO
>
updateByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
domain
.
setQuotedetailid
(
quotedetail_id
);
quotedetailService
.
update
(
domain
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.getQuotedetailByEntities(this.quotedetailMapping.toDomain(#quotedetaildtos)),'iBizBusinessCentral-QuoteDetail-Update')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单批量更新报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单批量更新报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildto),'iBizBusinessCentral-QuoteDetail-Save')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单保存报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单保存报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/save"
)
public
ResponseEntity
<
Boolean
>
saveByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildtos),'iBizBusinessCentral-QuoteDetail-Save')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单批量保存报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单批量保存报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.get(#quotedetail_id),'iBizBusinessCentral-QuoteDetail-Remove')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单删除报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单删除报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
remove
(
quotedetail_id
));
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.getQuotedetailByIds(#ids),'iBizBusinessCentral-QuoteDetail-Remove')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单批量删除报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单批量删除报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByContactOpportunityQuote
(
@RequestBody
List
<
String
>
ids
)
{
quotedetailService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据联系人商机报价单检查报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单检查报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
checkKey
(
quotedetailMapping
.
toDomain
(
quotedetaildto
)));
}
@PostAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(returnObject.body),'iBizBusinessCentral-QuoteDetail-Get')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单获取报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单获取报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
public
ResponseEntity
<
QuoteDetailDTO
>
getByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
)
{
QuoteDetail
domain
=
quotedetailService
.
get
(
quotedetail_id
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildto),'iBizBusinessCentral-QuoteDetail-Create')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单建立报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单建立报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails"
)
@Transactional
public
ResponseEntity
<
QuoteDetailDTO
>
createByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
quotedetailService
.
create
(
domain
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildtos),'iBizBusinessCentral-QuoteDetail-Create')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单批量建立报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据联系人商机报价单批量建立报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-QuoteDetail-Default-all')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单获取DEFAULT"
,
tags
=
{
"报价单产品"
}
,
notes
=
"根据联系人商机报价单获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/fetchdefault"
)
public
ResponseEntity
<
List
<
QuoteDetailDTO
>>
fetchQuoteDetailDefaultByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
QuoteDetailSearchContext
context
)
{
context
.
setN_quoteid_eq
(
quote_id
);
Page
<
QuoteDetail
>
domains
=
quotedetailService
.
searchDefault
(
context
)
;
List
<
QuoteDetailDTO
>
list
=
quotedetailMapping
.
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-QuoteDetail-Default-all')"
)
@ApiOperation
(
value
=
"根据联系人商机报价单查询DEFAULT"
,
tags
=
{
"报价单产品"
}
,
notes
=
"根据联系人商机报价单查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/searchdefault"
)
public
ResponseEntity
<
Page
<
QuoteDetailDTO
>>
searchQuoteDetailDefaultByContactOpportunityQuote
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@RequestBody
QuoteDetailSearchContext
context
)
{
context
.
setN_quoteid_eq
(
quote_id
);
Page
<
QuoteDetail
>
domains
=
quotedetailService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quotedetailMapping
.
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}/quotes/{quote_id}/quotedetails/getdraft"
)
public
ResponseEntity
<
QuoteDetailDTO
>
getDraftByAccountContactOpportunityQuote
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
)
{
QuoteDetail
domain
=
new
QuoteDetail
();
domain
.
setQuoteid
(
quote_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailMapping
.
toDto
(
quotedetailService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.get(#quotedetail_id),'iBizBusinessCentral-QuoteDetail-Update')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单更新报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单更新报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
@Transactional
public
ResponseEntity
<
QuoteDetailDTO
>
updateByAccountContactOpportunityQuote
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
,
@RequestBody
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
domain
.
setQuotedetailid
(
quotedetail_id
);
quotedetailService
.
update
(
domain
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.getQuotedetailByEntities(this.quotedetailMapping.toDomain(#quotedetaildtos)),'iBizBusinessCentral-QuoteDetail-Update')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单批量更新报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单批量更新报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByAccountContactOpportunityQuote
(
@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
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildto),'iBizBusinessCentral-QuoteDetail-Save')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单保存报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单保存报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/save"
)
public
ResponseEntity
<
Boolean
>
saveByAccountContactOpportunityQuote
(
@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
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
save
(
domain
));
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildtos),'iBizBusinessCentral-QuoteDetail-Save')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单批量保存报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单批量保存报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByAccountContactOpportunityQuote
(
@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
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.get(#quotedetail_id),'iBizBusinessCentral-QuoteDetail-Remove')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单删除报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单删除报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByAccountContactOpportunityQuote
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
remove
(
quotedetail_id
));
}
@PreAuthorize
(
"hasPermission(this.quotedetailService.getQuotedetailByIds(#ids),'iBizBusinessCentral-QuoteDetail-Remove')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单批量删除报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单批量删除报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByAccountContactOpportunityQuote
(
@RequestBody
List
<
String
>
ids
)
{
quotedetailService
.
removeBatch
(
ids
);
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}/quotes/{quote_id}/quotedetails/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByAccountContactOpportunityQuote
(
@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
QuoteDetailDTO
quotedetaildto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
quotedetailService
.
checkKey
(
quotedetailMapping
.
toDomain
(
quotedetaildto
)));
}
@PostAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(returnObject.body),'iBizBusinessCentral-QuoteDetail-Get')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单获取报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单获取报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/{quotedetail_id}"
)
public
ResponseEntity
<
QuoteDetailDTO
>
getByAccountContactOpportunityQuote
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
@PathVariable
(
"quotedetail_id"
)
String
quotedetail_id
)
{
QuoteDetail
domain
=
quotedetailService
.
get
(
quotedetail_id
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildto),'iBizBusinessCentral-QuoteDetail-Create')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单建立报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单建立报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails"
)
@Transactional
public
ResponseEntity
<
QuoteDetailDTO
>
createByAccountContactOpportunityQuote
(
@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
QuoteDetailDTO
quotedetaildto
)
{
QuoteDetail
domain
=
quotedetailMapping
.
toDomain
(
quotedetaildto
);
domain
.
setQuoteid
(
quote_id
);
quotedetailService
.
create
(
domain
);
QuoteDetailDTO
dto
=
quotedetailMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.quotedetailMapping.toDomain(#quotedetaildtos),'iBizBusinessCentral-QuoteDetail-Create')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单批量建立报价单产品"
,
tags
=
{
"报价单产品"
},
notes
=
"根据客户联系人商机报价单批量建立报价单产品"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByAccountContactOpportunityQuote
(
@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
List
<
QuoteDetailDTO
>
quotedetaildtos
)
{
List
<
QuoteDetail
>
domainlist
=
quotedetailMapping
.
toDomain
(
quotedetaildtos
);
for
(
QuoteDetail
domain:
domainlist
){
domain
.
setQuoteid
(
quote_id
);
}
quotedetailService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-QuoteDetail-Default-all')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单获取DEFAULT"
,
tags
=
{
"报价单产品"
}
,
notes
=
"根据客户联系人商机报价单获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/fetchdefault"
)
public
ResponseEntity
<
List
<
QuoteDetailDTO
>>
fetchQuoteDetailDefaultByAccountContactOpportunityQuote
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@PathVariable
(
"opportunity_id"
)
String
opportunity_id
,
@PathVariable
(
"quote_id"
)
String
quote_id
,
QuoteDetailSearchContext
context
)
{
context
.
setN_quoteid_eq
(
quote_id
);
Page
<
QuoteDetail
>
domains
=
quotedetailService
.
searchDefault
(
context
)
;
List
<
QuoteDetailDTO
>
list
=
quotedetailMapping
.
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-QuoteDetail-Default-all')"
)
@ApiOperation
(
value
=
"根据客户联系人商机报价单查询DEFAULT"
,
tags
=
{
"报价单产品"
}
,
notes
=
"根据客户联系人商机报价单查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/{quote_id}/quotedetails/searchdefault"
)
public
ResponseEntity
<
Page
<
QuoteDetailDTO
>>
searchQuoteDetailDefaultByAccountContactOpportunityQuote
(
@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
QuoteDetailSearchContext
context
)
{
context
.
setN_quoteid_eq
(
quote_id
);
Page
<
QuoteDetail
>
domains
=
quotedetailService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
quotedetailMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
config.xml
浏览文件 @
12161800
...
...
@@ -37,6 +37,11 @@
git clone -b master $para2 ibizbusinesscentral/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizbusinesscentral/
mvn clean package -Pcentralapi
cd businesscentral-provider/businesscentral-provider-centralapi
mvn -Pcentralapi docker:build
mvn -Pcentralapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/businesscentral-provider-centralapi.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录