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
d0e67a05
Commit
d0e67a05
authored
Nov 06, 2020
by
unset
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-chw' into dev-chw
parents
e0e49a8b
ab4a0069
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
6 deletions
+47
-6
OrderUtil.java
...va/com/github/wxiaoqi/security/common/util/OrderUtil.java
+1
-1
CompanyInfoBiz.java
...com/github/wxiaoqi/security/admin/biz/CompanyInfoBiz.java
+19
-0
InProgressVO.java
.../com/xxfc/platform/order/pojo/calculate/InProgressVO.java
+9
-0
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+17
-4
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+1
-1
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/OrderUtil.java
View file @
d0e67a05
...
@@ -40,7 +40,7 @@ public class OrderUtil {
...
@@ -40,7 +40,7 @@ public class OrderUtil {
if
(
orderIndex
.
intValue
()
>
9999
)
{
if
(
orderIndex
.
intValue
()
>
9999
)
{
orderIndex
=
new
AtomicInteger
(
1
);
orderIndex
=
new
AtomicInteger
(
1
);
}
}
String
indexString
=
String
.
format
(
"%s%s%04d"
,
currTime
,
midFix
,
orderIndex
);
String
indexString
=
String
.
format
(
"%s%s%04d"
,
currTime
,
midFix
,
orderIndex
.
intValue
()
);
return
indexString
;
return
indexString
;
}
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/CompanyInfoBiz.java
View file @
d0e67a05
...
@@ -54,6 +54,9 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
...
@@ -54,6 +54,9 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
@Autowired
@Autowired
GroupBiz
groupBiz
;
GroupBiz
groupBiz
;
@Autowired
AppUserRelationBiz
userRelationBiz
;
public
static
final
String
CODE
=
"SHOP-"
;
public
static
final
String
CODE
=
"SHOP-"
;
...
@@ -76,6 +79,7 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
...
@@ -76,6 +79,7 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
//初始化商家账号
//初始化商家账号
addUser
(
id
);
addUser
(
id
);
//初始化店铺
//初始化店铺
setInviterAccount
(
companyInfoApply
);
BranchCompany
branchCompany
=
getBranchCompanyInfo
();
BranchCompany
branchCompany
=
getBranchCompanyInfo
();
branchCompany
.
setCompanyId
(
id
);
branchCompany
.
setCompanyId
(
id
);
branchCompany
.
setInviterAccount
(
companyInfoApply
.
getInviterAccount
());
branchCompany
.
setInviterAccount
(
companyInfoApply
.
getInviterAccount
());
...
@@ -86,6 +90,21 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
...
@@ -86,6 +90,21 @@ public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{
return
id
;
return
id
;
}
}
//app上级用户为店铺推荐人
public
void
setInviterAccount
(
CompanyInfoApply
companyInfoApply
){
Integer
inviterAccount
=
companyInfoApply
.
getInviterAccount
()
==
null
?
0
:
companyInfoApply
.
getInviterAccount
();
if
(
inviterAccount
==
0
){
Integer
appUserId
=
companyInfoApply
.
getAppUserId
()
==
null
?
0
:
companyInfoApply
.
getAppUserId
();
if
(
appUserId
>
0
){
AppUserRelation
appUserRelation
=
userRelationBiz
.
getRelationByUserId
(
appUserId
);
if
(
appUserRelation
!=
null
){
companyInfoApply
.
setInviterAccount
(
appUserRelation
.
getParentId
());
}
}
}
}
//初始化店铺信息
//初始化店铺信息
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/calculate/InProgressVO.java
View file @
d0e67a05
...
@@ -11,6 +11,15 @@ import java.util.List;
...
@@ -11,6 +11,15 @@ import java.util.List;
@Data
@Data
public
class
InProgressVO
{
public
class
InProgressVO
{
public
static
final
int
VIOLATE_TYPE_NOT
=
0
;
public
static
final
int
VIOLATE_TYPE_ADVANCE
=
1
;
public
static
final
int
VIOLATE_TYPE_DELAY
=
2
;
/**
* 违约类型 0--没违约;1--提前还车;2--延期还车
*/
Integer
violateType
=
0
;
/**
/**
* 违约金
* 违约金
*/
*/
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
d0e67a05
...
@@ -46,6 +46,8 @@ import java.util.List;
...
@@ -46,6 +46,8 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
xxfc
.
platform
.
order
.
pojo
.
calculate
.
InProgressVO
.
VIOLATE_TYPE_ADVANCE
;
import
static
com
.
xxfc
.
platform
.
order
.
pojo
.
calculate
.
InProgressVO
.
VIOLATE_TYPE_DELAY
;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.*;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.*;
/**
/**
...
@@ -278,9 +280,11 @@ public class OrderCalculateBiz implements CalculateInterface {
...
@@ -278,9 +280,11 @@ public class OrderCalculateBiz implements CalculateInterface {
violateDesc
+=
StrUtil
.
format
(
"(封顶{}元)"
,
residueAmount
);
violateDesc
+=
StrUtil
.
format
(
"(封顶{}元)"
,
residueAmount
);
}
}
inProgressVO
.
setViolateType
(
VIOLATE_TYPE_ADVANCE
);
inProgressVO
.
setViolateAmount
(
residueAmount
);
inProgressVO
.
setViolateAmount
(
residueAmount
);
inProgressVO
.
setViolateDesc
(
" 提前还车违约金:"
+
violateDesc
);
inProgressVO
.
setViolateDesc
(
" 提前还车违约金:"
+
violateDesc
);
OrderAccountDeduction
violateDeduction
=
orderAccountBiz
.
initDeduction
(
inProgressVO
.
getViolateAmount
(),
violateDesc
,
DeductionTypeEnum
.
VIOLATE_ADVANCE
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
//提前还车 修改ORIGIN_DEPOSIT 为 ORIGIN_ORDER_DEPOSIT
OrderAccountDeduction
violateDeduction
=
orderAccountBiz
.
initDeduction
(
inProgressVO
.
getViolateAmount
(),
violateDesc
,
DeductionTypeEnum
.
VIOLATE_ADVANCE
,
OrderAccountDeduction
.
ORIGIN_ORDER_DEPOSIT
);
oad
.
getDeductions
().
add
(
violateDeduction
);
oad
.
getDeductions
().
add
(
violateDeduction
);
}
else
if
(
realResidueDays
.
equals
(
0
))
{
//准时还车
}
else
if
(
realResidueDays
.
equals
(
0
))
{
//准时还车
//设置消耗费用列表
//设置消耗费用列表
...
@@ -301,6 +305,7 @@ public class OrderCalculateBiz implements CalculateInterface {
...
@@ -301,6 +305,7 @@ public class OrderCalculateBiz implements CalculateInterface {
.
map
(
VMCalendarPriceCostDTO:
:
getPrice
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
multiply
(
new
BigDecimal
(
2
+
""
));
.
map
(
VMCalendarPriceCostDTO:
:
getPrice
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
multiply
(
new
BigDecimal
(
2
+
""
));
//超过的天数 价格 * 200%
//超过的天数 价格 * 200%
inProgressVO
.
setViolateType
(
VIOLATE_TYPE_DELAY
);
inProgressVO
.
setViolateAmount
(
overAmount
);
inProgressVO
.
setViolateAmount
(
overAmount
);
inProgressVO
.
setViolateDesc
(
" 延期还车违约金:"
+
violateDesc
);
inProgressVO
.
setViolateDesc
(
" 延期还车违约金:"
+
violateDesc
);
inProgressVO
.
setOverAmountList
(
overAmountList
);
inProgressVO
.
setOverAmountList
(
overAmountList
);
...
@@ -349,9 +354,17 @@ public class OrderCalculateBiz implements CalculateInterface {
...
@@ -349,9 +354,17 @@ public class OrderCalculateBiz implements CalculateInterface {
public
InProgressVO
calculateOrderComplete
(
BaseOrder
baseOrder
,
OrderRentVehicleDetail
orvd
,
OrderAccountDetail
oad
,
VehicleItemDTO
vehicleItemDTO
,
Integer
useDays
,
Boolean
isCancel
)
{
public
InProgressVO
calculateOrderComplete
(
BaseOrder
baseOrder
,
OrderRentVehicleDetail
orvd
,
OrderAccountDetail
oad
,
VehicleItemDTO
vehicleItemDTO
,
Integer
useDays
,
Boolean
isCancel
)
{
InProgressVO
inProgressVO
=
inProgressCalculate
(
baseOrder
,
vehicleItemDTO
,
orvd
,
useDays
,
oad
,
isCancel
);
InProgressVO
inProgressVO
=
inProgressCalculate
(
baseOrder
,
vehicleItemDTO
,
orvd
,
useDays
,
oad
,
isCancel
);
//定金 - (额外消费金额 + 违约金)
//后修改为提前还车 订单款扣,延期还车 押金扣
oad
.
setDepositAmount
(
orvd
.
getDeposit
().
subtract
(
inProgressVO
.
getExtraAmount
().
add
(
inProgressVO
.
getViolateAmount
())));
if
(
InProgressVO
.
VIOLATE_TYPE_ADVANCE
==
inProgressVO
.
getViolateType
())
{
oad
.
setOrderAmount
(
inProgressVO
.
getRefundOrderAmount
());
//定金 - (额外消费金额)
oad
.
setDepositAmount
(
orvd
.
getDeposit
().
subtract
(
inProgressVO
.
getExtraAmount
()));
//订单款 - 违约金
oad
.
setOrderAmount
(
inProgressVO
.
getRefundOrderAmount
().
subtract
(
inProgressVO
.
getViolateAmount
()));
}
else
{
//定金 - (额外消费金额 + 违约金)
oad
.
setDepositAmount
(
orvd
.
getDeposit
().
subtract
(
inProgressVO
.
getExtraAmount
().
add
(
inProgressVO
.
getViolateAmount
())));
oad
.
setOrderAmount
(
inProgressVO
.
getRefundOrderAmount
());
}
oad
.
setOriginDepositAmount
(
orvd
.
getDeposit
());
oad
.
setOriginDepositAmount
(
orvd
.
getDeposit
());
oad
.
setOriginOrderAmount
(
baseOrder
.
getGoodsAmount
().
subtract
(
baseOrder
.
getCouponAmount
()));
oad
.
setOriginOrderAmount
(
baseOrder
.
getGoodsAmount
().
subtract
(
baseOrder
.
getCouponAmount
()));
return
inProgressVO
;
return
inProgressVO
;
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
d0e67a05
...
@@ -1192,7 +1192,7 @@
...
@@ -1192,7 +1192,7 @@
* 原(大于预约结束时间,小于预约开始时间的预约记录)
* 原(大于预约结束时间,小于预约开始时间的预约记录)
* 相交叉(大于预约开始时间,小于预约结束时间的预约记录)
* 相交叉(大于预约开始时间,小于预约结束时间的预约记录)
-->
-->
<if
test=
"recordIntersection == null "
>
<if
test=
"recordIntersection == null
or recordIntersection != true
"
>
left join (
left join (
<include
refid=
"aroundBookRecord"
></include>
<include
refid=
"aroundBookRecord"
></include>
) abr on v.`id` = abr.vehicle_id
) abr on v.`id` = abr.vehicle_id
...
...
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