Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
4dc95f26
Commit
4dc95f26
authored
Oct 20, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
dd727160
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
19 deletions
+34
-19
ConfigFeign.java
...rc/main/java/com/xxfc/platform/app/feign/ConfigFeign.java
+3
-0
CompanyWalletDetailDTO.java
.../xxfc/platform/order/pojo/dto/CompanyWalletDetailDTO.java
+22
-15
OrderRentVehicleService.java
.../xxfc/platform/order/service/OrderRentVehicleService.java
+9
-4
No files found.
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/feign/ConfigFeign.java
View file @
4dc95f26
...
@@ -22,6 +22,9 @@ public interface ConfigFeign {
...
@@ -22,6 +22,9 @@ public interface ConfigFeign {
//旅游提前天数
//旅游提前天数
public
static
final
int
TYPE_TOUR_DAYS
=
99
;
public
static
final
int
TYPE_TOUR_DAYS
=
99
;
public
static
final
int
TYPE_ORDER_EXTRACT
=
66
;
@RequestMapping
(
value
=
"/cofig/app/unauth/types"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/cofig/app/unauth/types"
,
method
=
RequestMethod
.
GET
)
ObjectRestResponse
<
List
<
Cofig
>>
getAllByType
(
@RequestParam
(
"types"
)
String
types
);
ObjectRestResponse
<
List
<
Cofig
>>
getAllByType
(
@RequestParam
(
"types"
)
String
types
);
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/dto/CompanyWalletDetailDTO.java
View file @
4dc95f26
...
@@ -74,10 +74,6 @@ public class CompanyWalletDetailDTO{
...
@@ -74,10 +74,6 @@ public class CompanyWalletDetailDTO{
private
BigDecimal
violateAmount
=
BigDecimal
.
ZERO
;
private
BigDecimal
violateAmount
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"车辆收益比例"
)
private
BigDecimal
vehicleExtract
=
new
BigDecimal
(
1
);
@ApiModelProperty
(
"订单抽成比例"
)
@ApiModelProperty
(
"订单抽成比例"
)
private
BigDecimal
orderExtract
=
new
BigDecimal
(
1
);
private
BigDecimal
orderExtract
=
new
BigDecimal
(
1
);
...
@@ -87,13 +83,11 @@ public class CompanyWalletDetailDTO{
...
@@ -87,13 +83,11 @@ public class CompanyWalletDetailDTO{
//算出来
//算出来
@ApiModelProperty
(
"车辆租赁费"
)
@ApiModelProperty
(
"车辆费用"
)
private
BigDecimal
rentVehicleAmount
;
private
BigDecimal
vehicleAmount
;
public
BigDecimal
getVehicleAmount
(){
public
BigDecimal
getRentVehicleAmount
(){
return
orderAmount
.
subtract
(
closedVehicleAmout
).
subtract
(
damageSafeAmount
).
subtract
(
deposit
).
subtract
(
comssion
);
return
(
orderAmount
.
subtract
(
closedVehicleAmout
).
subtract
(
damageSafeAmount
).
subtract
(
deposit
).
subtract
(
comssion
)).
multiply
(
vehicleExtract
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
}
}
...
@@ -102,7 +96,7 @@ public class CompanyWalletDetailDTO{
...
@@ -102,7 +96,7 @@ public class CompanyWalletDetailDTO{
public
BigDecimal
getOrderComssion
(){
public
BigDecimal
getOrderComssion
(){
return
(
orderAmount
.
subtract
(
closedVehicleAmout
).
subtract
(
damageSafeAmount
).
subtract
(
deposit
).
subtract
(
comssion
)
).
multiply
(
orderExtract
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
return
getViolateAmount
(
).
multiply
(
orderExtract
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
}
}
...
@@ -111,21 +105,34 @@ public class CompanyWalletDetailDTO{
...
@@ -111,21 +105,34 @@ public class CompanyWalletDetailDTO{
public
BigDecimal
getPlatformComssion
(){
public
BigDecimal
getPlatformComssion
(){
return
(
orderAmount
.
subtract
(
closedVehicleAmout
).
subtract
(
damageSafeAmount
).
subtract
(
deposit
).
subtract
(
comssion
)).
multiply
(
platformExtract
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
return
getViolateAmount
().
multiply
(
platformExtract
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
}
//算出来
@ApiModelProperty
(
"车辆租赁费"
)
private
BigDecimal
rentVehicleAmount
;
public
BigDecimal
getRentVehicleAmount
(){
return
getVehicleAmount
().
subtract
(
getOrderComssion
()).
subtract
(
getPlatformComssion
());
}
}
@ApiModelProperty
(
"出发门店金额"
)
@ApiModelProperty
(
"出发门店金额"
)
private
BigDecimal
startCompanyAmount
;
private
BigDecimal
startCompanyAmount
;
public
BigDecimal
getStartCompanyAmount
(){
public
BigDecimal
getStartCompanyAmount
(){
return
getOrder
Amount
();
return
getOrder
Comssion
();
}
}
@ApiModelProperty
(
"
出发
门店金额"
)
@ApiModelProperty
(
"
收车
门店金额"
)
private
BigDecimal
endCompanyAmount
;
private
BigDecimal
endCompanyAmount
;
...
@@ -139,7 +146,7 @@ public class CompanyWalletDetailDTO{
...
@@ -139,7 +146,7 @@ public class CompanyWalletDetailDTO{
private
BigDecimal
vehicleCompanyAmount
;
private
BigDecimal
vehicleCompanyAmount
;
public
BigDecimal
getVehicleCompanyAmount
(){
public
BigDecimal
getVehicleCompanyAmount
(){
return
damageSafeAmount
.
add
(
getRentVehicleAmount
()).
add
(
lossSpecifiedAmount
).
add
(
breakRulesRegulation
);
return
getVehicleAmount
().
add
(
damageSafeAmount
).
add
(
lossSpecifiedAmount
).
add
(
breakRulesRegulation
).
add
(
violateAmount
);
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderRentVehicleService.java
View file @
4dc95f26
...
@@ -16,6 +16,8 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
...
@@ -16,6 +16,8 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.activity.entity.Coupon
;
import
com.xxfc.platform.activity.entity.Coupon
;
import
com.xxfc.platform.activity.feign.ActivityFeign
;
import
com.xxfc.platform.activity.feign.ActivityFeign
;
import
com.xxfc.platform.app.entity.Cofig
;
import
com.xxfc.platform.app.feign.ConfigFeign
;
import
com.xxfc.platform.order.biz.OrderCostDetailBiz
;
import
com.xxfc.platform.order.biz.OrderCostDetailBiz
;
import
com.xxfc.platform.order.biz.OrderRentVehicleBiz
;
import
com.xxfc.platform.order.biz.OrderRentVehicleBiz
;
import
com.xxfc.platform.order.biz.OrderTemplateBiz
;
import
com.xxfc.platform.order.biz.OrderTemplateBiz
;
...
@@ -92,6 +94,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -92,6 +94,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
@Autowired
@Autowired
ActivityFeign
activityFeign
;
ActivityFeign
activityFeign
;
@Autowired
ConfigFeign
configFeign
;
@PostConstruct
@PostConstruct
public
void
init
(){
public
void
init
(){
...
@@ -127,13 +132,13 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -127,13 +132,13 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
}
}
public
void
initDetailSecond
(
RentVehicleBO
bo
)
{
public
void
initDetailSecond
(
RentVehicleBO
bo
)
{
CompanyWalletDetailDTO
companyWalletDetailDTO
=
new
CompanyWalletDetailDTO
();
Cofig
cofig
=
configFeign
.
getAllByType
(
ConfigFeign
.
TYPE_ORDER_EXTRACT
+
""
).
getData
().
get
(
0
);
CompanyWalletDetailDTO
companyWalletDetailDTO
=
JSONUtil
.
toBean
(
cofig
.
getParams
(),
CompanyWalletDetailDTO
.
class
);
//下单
//下单
companyWalletDetailDTO
.
setClosedVehicleAmout
(
BigDecimal
.
ZERO
);
//收车服务费
/*
companyWalletDetailDTO.setClosedVehicleAmout(BigDecimal.ZERO);//收车服务费
companyWalletDetailDTO.setPlatformCompanyId(0);//平台门店
companyWalletDetailDTO.setPlatformCompanyId(0);//平台门店
companyWalletDetailDTO.setOrderExtract(BigDecimal.ZERO);//订单抽成比例
companyWalletDetailDTO.setOrderExtract(BigDecimal.ZERO);//订单抽成比例
companyWalletDetailDTO
.
setPlatformExtract
(
BigDecimal
.
ZERO
);
//平台抽成比例
companyWalletDetailDTO.setPlatformExtract(BigDecimal.ZERO);//平台抽成比例*/
companyWalletDetailDTO
.
setVehicleExtract
(
BigDecimal
.
ZERO
);
//车辆收益比例
initDictionary
();
initDictionary
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment