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
e5d470bc
Commit
e5d470bc
authored
Nov 14, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev
parents
5add2249
f7e4963b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
128 additions
and
40 deletions
+128
-40
MsgBiz.java
...server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
+4
-4
InProgressVO.java
.../com/xxfc/platform/order/pojo/calculate/InProgressVO.java
+5
-0
OrderVehicleCrosstownDto.java
...c/platform/order/pojo/order/OrderVehicleCrosstownDto.java
+16
-0
CancelStartedVO.java
...a/com/xxfc/platform/order/pojo/price/CancelStartedVO.java
+8
-19
CostDetailExtend.java
.../com/xxfc/platform/order/pojo/price/CostDetailExtend.java
+32
-1
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+4
-0
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+37
-14
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+7
-0
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+8
-0
OrderVehicaleCrosstownMapper.xml
...rc/main/resources/mapper/OrderVehicaleCrosstownMapper.xml
+5
-0
VehicleActiveService.java
...a/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
+2
-2
No files found.
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
View file @
e5d470bc
...
@@ -77,7 +77,7 @@ public class MsgBiz {
...
@@ -77,7 +77,7 @@ public class MsgBiz {
Query
query
=
null
;
Query
query
=
null
;
List
<
Msg
>
msgList
=
null
;
List
<
Msg
>
msgList
=
null
;
if
(
type
!=
null
)
{
if
(
type
!=
null
)
{
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
is
(
type
));
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
is
(
type
)
.
and
(
"visible"
).
is
(
1
)
);
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
query
.
with
(
pageable
);
query
.
with
(
pageable
);
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"time"
));
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"time"
));
...
@@ -89,7 +89,7 @@ public class MsgBiz {
...
@@ -89,7 +89,7 @@ public class MsgBiz {
List
<
Integer
>
ids
=
new
ArrayList
<>();
List
<
Integer
>
ids
=
new
ArrayList
<>();
ids
.
add
(
2
);
ids
.
add
(
2
);
ids
.
add
(
4
);
ids
.
add
(
4
);
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
));
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
)
.
and
(
"visible"
).
is
(
1
)
);
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
query
.
with
(
pageable
);
query
.
with
(
pageable
);
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"time"
));
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"time"
));
...
@@ -114,7 +114,7 @@ public class MsgBiz {
...
@@ -114,7 +114,7 @@ public class MsgBiz {
List
<
Integer
>
ids
=
new
ArrayList
<>();
List
<
Integer
>
ids
=
new
ArrayList
<>();
ids
.
add
(
2
);
ids
.
add
(
2
);
ids
.
add
(
4
);
ids
.
add
(
4
);
Query
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
).
and
(
"count.praise"
).
gt
(
getNumber
()));
Query
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
).
and
(
"count.praise"
).
gt
(
getNumber
())
.
and
(
"visible"
).
is
(
1
)
);
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
query
.
with
(
pageable
);
query
.
with
(
pageable
);
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"count.praise"
));
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"count.praise"
));
...
@@ -134,7 +134,7 @@ public class MsgBiz {
...
@@ -134,7 +134,7 @@ public class MsgBiz {
if
(
id
==
null
)
{
if
(
id
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
return
ObjectRestResponse
.
paramIsEmpty
();
}
}
Query
query
=
new
Query
(
Criteria
.
where
(
"id"
).
is
(
new
ObjectId
(
id
)));
Query
query
=
new
Query
(
Criteria
.
where
(
"id"
).
is
(
new
ObjectId
(
id
))
.
and
(
"visible"
).
is
(
1
)
);
List
<
Msg
>
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
userId
);
List
<
Msg
>
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
userId
);
List
<
MsgVo
>
msgVoList
=
replaceMsgResult
(
msgList
);
List
<
MsgVo
>
msgVoList
=
replaceMsgResult
(
msgList
);
if
(
msgVoList
.
size
()
>
0
)
{
if
(
msgVoList
.
size
()
>
0
)
{
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/calculate/InProgressVO.java
View file @
e5d470bc
...
@@ -81,4 +81,9 @@ public class InProgressVO {
...
@@ -81,4 +81,9 @@ public class InProgressVO {
* 延期 详情列表
* 延期 详情列表
*/
*/
List
<
VMCalendarPriceCostDTO
>
overAmountList
=
CollUtil
.
newArrayList
();
List
<
VMCalendarPriceCostDTO
>
overAmountList
=
CollUtil
.
newArrayList
();
/**
* 违约金 费用详情列表
*/
List
<
VMCalendarPriceCostDTO
>
violateAmountList
=
CollUtil
.
newArrayList
();
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/OrderVehicleCrosstownDto.java
View file @
e5d470bc
...
@@ -6,6 +6,7 @@ import com.xxfc.platform.order.entity.OrderVehicleCrosstown;
...
@@ -6,6 +6,7 @@ import com.xxfc.platform.order.entity.OrderVehicleCrosstown;
import
com.xxfc.platform.order.pojo.DedDetailDTO
;
import
com.xxfc.platform.order.pojo.DedDetailDTO
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -81,4 +82,19 @@ public class OrderVehicleCrosstownDto extends OrderVehicleCrosstown {
...
@@ -81,4 +82,19 @@ public class OrderVehicleCrosstownDto extends OrderVehicleCrosstown {
private
Integer
showType
;
private
Integer
showType
;
/**
* 实际退还的部分押金
*/
private
String
actualDeposit
;
/**
* 实际退还剩余押金
*/
private
BigDecimal
refundOfRemainingDeposit
;
/**
* 违章扣款
*/
private
BigDecimal
violationOfCharges
;
}
}
\ No newline at end of file
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/price/CancelStartedVO.java
View file @
e5d470bc
package
com
.
xxfc
.
platform
.
order
.
pojo
.
price
;
package
com
.
xxfc
.
platform
.
order
.
pojo
.
price
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
com.xxfc.platform.order.pojo.account.OrderAccountDeduction
;
import
com.xxfc.platform.vehicle.pojo.dto.order.VMCalendarPriceCostDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.order.VMCalendarPriceCostDTO
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -24,6 +25,11 @@ public class CancelStartedVO extends CostDetailExtend {
...
@@ -24,6 +25,11 @@ public class CancelStartedVO extends CostDetailExtend {
*/
*/
private
Integer
usedDayNum
=
0
;
private
Integer
usedDayNum
=
0
;
/**
* 允许使用天数
*/
private
Integer
ableUsedDayNum
=
0
;
/**
/**
* 使用金额
* 使用金额
*/
*/
...
@@ -69,34 +75,17 @@ public class CancelStartedVO extends CostDetailExtend {
...
@@ -69,34 +75,17 @@ public class CancelStartedVO extends CostDetailExtend {
*/
*/
private
BigDecimal
damagesAmount
=
BigDecimal
.
ZERO
;
private
BigDecimal
damagesAmount
=
BigDecimal
.
ZERO
;
private
List
<
OrderAccountDeduction
>
deductionList
=
CollUtil
.
newArrayList
();
/**
/**
* 延期 详情列表
* 延期 详情列表
*/
*/
List
<
VMCalendarPriceCostDTO
>
overAmountList
=
CollUtil
.
newArrayList
();
List
<
VMCalendarPriceCostDTO
>
overAmountList
=
CollUtil
.
newArrayList
();
//标记是否单价一样
private
Integer
sameUseUnitPrice
=
1
;
//标记是否单价一样
//标记是否单价一样
private
Integer
sameOverUnitPrice
=
1
;
private
Integer
sameOverUnitPrice
=
1
;
public
void
setSameUseUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
useAmountList
)
{
this
.
sameUseUnitPrice
=
judgeSame
(
useAmountList
);
}
public
void
setSameOverUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
overAmountList
)
{
public
void
setSameOverUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
overAmountList
)
{
this
.
sameOverUnitPrice
=
judgeSame
(
overAmountList
);
this
.
sameOverUnitPrice
=
judgeSame
(
overAmountList
);
}
}
private
Integer
judgeSame
(
List
<
VMCalendarPriceCostDTO
>
useAmountList
)
{
BigDecimal
tempUnitPrice
=
null
;
for
(
VMCalendarPriceCostDTO
vmcpcd
:
useAmountList
)
{
if
(
null
==
tempUnitPrice
)
{
tempUnitPrice
=
vmcpcd
.
getPrice
();
}
else
if
(!
tempUnitPrice
.
equals
(
vmcpcd
.
getPrice
()))
{
return
0
;
}
}
return
1
;
}
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/price/CostDetailExtend.java
View file @
e5d470bc
...
@@ -42,7 +42,38 @@ public class CostDetailExtend {
...
@@ -42,7 +42,38 @@ public class CostDetailExtend {
/**
/**
* 使用(消耗)详情列表
* 使用(消耗)详情列表
*/
*/
List
<
VMCalendarPriceCostDTO
>
useAmountList
=
CollUtil
.
newArrayList
();;
List
<
VMCalendarPriceCostDTO
>
useAmountList
=
CollUtil
.
newArrayList
();
/**
* 违约金 费用详情列表
*/
List
<
VMCalendarPriceCostDTO
>
violateAmountList
=
CollUtil
.
newArrayList
();
//标记是否单价一样
private
Integer
sameUseUnitPrice
=
1
;
//标记是否单价一样
private
Integer
sameViolateUnitPrice
=
1
;
public
void
setSameUseUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
useAmountList
)
{
this
.
sameUseUnitPrice
=
judgeSame
(
useAmountList
);
}
public
void
setSameViolateUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
violateAmountList
)
{
this
.
sameViolateUnitPrice
=
judgeSame
(
violateAmountList
);
}
protected
Integer
judgeSame
(
List
<
VMCalendarPriceCostDTO
>
useAmountList
)
{
BigDecimal
tempUnitPrice
=
null
;
for
(
VMCalendarPriceCostDTO
vmcpcd
:
useAmountList
)
{
if
(
null
==
tempUnitPrice
)
{
tempUnitPrice
=
vmcpcd
.
getPrice
();
}
else
if
(!
tempUnitPrice
.
equals
(
vmcpcd
.
getPrice
()))
{
return
0
;
}
}
return
1
;
}
public
void
initParamJson
()
{
public
void
initParamJson
()
{
paramJson
=
JSONUtil
.
toJsonStr
(
this
);
paramJson
=
JSONUtil
.
toJsonStr
(
this
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
e5d470bc
...
@@ -483,10 +483,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -483,10 +483,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
csv
.
setUsedfreeDayNum
(
inProgressVO
.
getUsedfreeDays
());
csv
.
setUsedfreeDayNum
(
inProgressVO
.
getUsedfreeDays
());
csv
.
setUsedFreeAmount
(
inProgressVO
.
getUsedFreeDaysAmount
());
csv
.
setUsedFreeAmount
(
inProgressVO
.
getUsedFreeDaysAmount
());
csv
.
setHadConpon
((
StrUtil
.
isNotBlank
(
orderMQDTO
.
getCouponTickerNos
())?
Boolean
.
TRUE
:
Boolean
.
FALSE
));
csv
.
setHadConpon
((
StrUtil
.
isNotBlank
(
orderMQDTO
.
getCouponTickerNos
())?
Boolean
.
TRUE
:
Boolean
.
FALSE
));
csv
.
setAbleUsedDayNum
(
inProgressVO
.
getUseAmountList
().
size
());
csv
.
setSameUseUnitPriceFromList
(
inProgressVO
.
getUseAmountList
());
csv
.
setSameUseUnitPriceFromList
(
inProgressVO
.
getUseAmountList
());
csv
.
setSameOverUnitPriceFromList
(
inProgressVO
.
getOverAmountList
());
csv
.
setSameOverUnitPriceFromList
(
inProgressVO
.
getOverAmountList
());
csv
.
setUseAmountList
(
inProgressVO
.
getUseAmountList
());
csv
.
setUseAmountList
(
inProgressVO
.
getUseAmountList
());
csv
.
setOverAmountList
(
inProgressVO
.
getOverAmountList
());
csv
.
setOverAmountList
(
inProgressVO
.
getOverAmountList
());
csv
.
setViolateAmountList
(
inProgressVO
.
getViolateAmountList
());
if
(
csv
.
getUsedDayNum
()
==
orderMQDTO
.
getOrderRentVehicleDetail
().
getDayNum
())
{
if
(
csv
.
getUsedDayNum
()
==
orderMQDTO
.
getOrderRentVehicleDetail
().
getDayNum
())
{
csv
.
setType
(
CostDetailExtend
.
FINLISH_ONTIME
);
csv
.
setType
(
CostDetailExtend
.
FINLISH_ONTIME
);
...
@@ -499,6 +502,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -499,6 +502,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
csv
.
setDeductionList
(
oad
.
getDeductions
());
csv
.
initParamJson
();
csv
.
initParamJson
();
//设置明细
//设置明细
orderRentVehicleBiz
.
updateSelectiveByIdRe
(
new
OrderRentVehicleDetail
(){{
orderRentVehicleBiz
.
updateSelectiveByIdRe
(
new
OrderRentVehicleDetail
(){{
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
e5d470bc
...
@@ -17,12 +17,15 @@ import com.github.wxiaoqi.security.common.util.process.ResultCode;
...
@@ -17,12 +17,15 @@ 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.user.UserInfoBiz
;
import
com.xxfc.platform.activity.user.UserInfoBiz
;
import
com.xxfc.platform.order.biz.inner.OrderMsgBiz
;
import
com.xxfc.platform.order.biz.inner.OrderMsgBiz
;
import
com.xxfc.platform.order.contant.enumerate.AccountTypeEnum
;
import
com.xxfc.platform.order.contant.enumerate.CrosstownTypeEnum
;
import
com.xxfc.platform.order.contant.enumerate.CrosstownTypeEnum
;
import
com.xxfc.platform.order.contant.enumerate.DepositRefundStatus
;
import
com.xxfc.platform.order.contant.enumerate.DepositRefundStatus
;
import
com.xxfc.platform.order.contant.enumerate.OrderStatusEnum
;
import
com.xxfc.platform.order.contant.enumerate.OrderStatusEnum
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.mapper.OrderVehicaleCrosstownMapper
;
import
com.xxfc.platform.order.mapper.OrderVehicaleCrosstownMapper
;
import
com.xxfc.platform.order.pojo.DedDetailDTO
;
import
com.xxfc.platform.order.pojo.DedDetailDTO
;
import
com.xxfc.platform.order.pojo.account.OrderAccountDeduction
;
import
com.xxfc.platform.order.pojo.account.OrderAccountDetail
;
import
com.xxfc.platform.order.pojo.mq.OrderMQDTO
;
import
com.xxfc.platform.order.pojo.mq.OrderMQDTO
;
import
com.xxfc.platform.order.pojo.order.CheckUserInfoDto
;
import
com.xxfc.platform.order.pojo.order.CheckUserInfoDto
;
import
com.xxfc.platform.order.pojo.order.OrderPageVO
;
import
com.xxfc.platform.order.pojo.order.OrderPageVO
;
...
@@ -37,6 +40,7 @@ import com.xxfc.platform.vehicle.feign.VehicleFeign;
...
@@ -37,6 +40,7 @@ import com.xxfc.platform.vehicle.feign.VehicleFeign;
import
com.xxfc.platform.vehicle.pojo.CompanyDetail
;
import
com.xxfc.platform.vehicle.pojo.CompanyDetail
;
import
com.xxfc.platform.vehicle.pojo.VehicleArrivalVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleArrivalVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleDepartureVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleDepartureVo
;
import
jodd.util.StringUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.map.HashedMap
;
import
org.apache.commons.collections4.map.HashedMap
;
...
@@ -84,6 +88,9 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -84,6 +88,9 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
OrderItemBiz
orderItemBiz
;
OrderItemBiz
orderItemBiz
;
@Autowired
@Autowired
OrderMsgBiz
orderMsgBiz
;
OrderMsgBiz
orderMsgBiz
;
@Autowired
OrderAccountBiz
orderAccountBiz
;
public
OrderVehicleCrosstown
get
(
Integer
id
)
{
public
OrderVehicleCrosstown
get
(
Integer
id
)
{
return
selectById
(
id
);
return
selectById
(
id
);
...
@@ -107,31 +114,47 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -107,31 +114,47 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
}
}
}
}
}
}
if
(
value
.
getType
()
==
2
||
value
.
getType
()
==
3
)
{
if
(
value
.
getType
()
==
2
||
value
.
getType
()
==
3
)
{
List
<
Coupon
>
c
=
baseOrderBiz
.
getReturnCouponByOrderId
(
value
.
getOrderId
());
List
<
Coupon
>
c
=
baseOrderBiz
.
getReturnCouponByOrderId
(
value
.
getOrderId
());
value
.
setBackCoupons
(
c
);
value
.
setBackCoupons
(
c
);
if
(
StringUtils
.
isNotBlank
(
value
.
getDedDetail
()))
{
List
<
DedDetailDTO
>
dddList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
value
.
getDedDetail
()),
DedDetailDTO
.
class
);
value
.
setDedDetailDTOList
(
dddList
);
}
if
(
StringUtils
.
isNotBlank
(
value
.
getViolateDetail
()))
{
List
<
DedDetailDTO
>
dddList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
value
.
getViolateDetail
()),
DedDetailDTO
.
class
);
value
.
setViolateDetailList
(
dddList
);
}
}
}
if
(
StringUtils
.
isNotBlank
(
value
.
getDedDetail
()))
{
if
(
value
.
getType
()!=
1
){
List
<
DedDetailDTO
>
dddList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
value
.
getDedDetail
()),
DedDetailDTO
.
class
);
Example
example
=
new
Example
(
OrderAccount
.
class
);
value
.
setDedDetailDTOList
(
dddList
);
//获取退还部分押金和剩余押金的记录
}
example
.
createCriteria
().
andEqualTo
(
"orderId"
,
value
.
getOrderId
()).
andIn
(
"accountType"
,
Lists
.
newArrayList
(
AccountTypeEnum
.
OUT_PART_DEPOSIT
.
getCode
(),
AccountTypeEnum
.
OUT_RESIDUE_DEPOSIT
.
getCode
())
);
if
(
StringUtils
.
isNotBlank
(
value
.
getViolateDetail
()))
{
List
<
OrderAccount
>
orderAccounts
=
orderAccountBiz
.
selectByExample
(
example
);
List
<
DedDetailDTO
>
dddList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
value
.
getViolateDetail
()),
DedDetailDTO
.
class
);
if
(
CollectionUtil
.
isEmpty
(
orderAccounts
))
{
value
.
setViolateDetailList
(
dddList
);
value
.
setActualDeposit
(
"定损中"
);
}
for
(
OrderAccount
orderAccount
:
orderAccounts
)
{
if
(
AccountTypeEnum
.
OUT_PART_DEPOSIT
.
getCode
().
equals
(
orderAccount
.
getAccountType
()))
{
OrderAccountDetail
orderAccountDetail
=
JSONUtil
.
toBean
(
orderAccount
.
getAccountDetail
(),
OrderAccountDetail
.
class
);
value
.
setActualDeposit
(
orderAccountDetail
.
getDepositAmount
().
toString
());
}
if
(
AccountTypeEnum
.
OUT_RESIDUE_DEPOSIT
.
getCode
().
equals
(
orderAccount
.
getAccountType
()))
{
value
.
setRefundOfRemainingDeposit
(
orderAccount
.
getOriginalAmount
());
value
.
setViolationOfCharges
(
orderAccount
.
getDeductAmount
());
}
}
}
}
updateCrossRecord
(
value
);
updateCrossRecord
(
value
);
List
<
DepositRefundRecord
>
depositRefundRecords
=
orderDepositRefundRecordBiz
.
selectByCrossId
(
value
.
getId
());
List
<
DepositRefundRecord
>
depositRefundRecords
=
orderDepositRefundRecordBiz
.
selectByCrossId
(
value
.
getId
());
if
(
orderVehicleCrosstownDto
.
getAddress
()!=
null
&&
if
(
orderVehicleCrosstownDto
.
getAddress
()!=
null
&&
1
==
orderVehicleCrosstownDto
.
getAddress
()
&&
CollectionUtil
.
isNotEmpty
(
depositRefundRecords
))
{
1
==
orderVehicleCrosstownDto
.
getAddress
()
&&
CollectionUtil
.
isNotEmpty
(
depositRefundRecords
))
{
depositRefundRecords
=
depositRefundRecords
.
parallelStream
().
filter
(
e
->
{
depositRefundRecords
=
depositRefundRecords
.
parallelStream
().
filter
(
e
->
{
if
(
e
.
getStatus
()
==
1
)
{
if
(
e
.
getStatus
()
==
4
||
e
.
getStatus
()
==
5
||
e
.
getStatus
()
==
1
)
{
value
.
setShowType
(
1
);
return
false
;
}
if
(
e
.
getStatus
()
==
4
||
e
.
getStatus
()
==
5
)
{
value
.
setShowType
(
2
);
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
e5d470bc
...
@@ -207,16 +207,21 @@ public class OrderCalculateBiz {
...
@@ -207,16 +207,21 @@ public class OrderCalculateBiz {
BigDecimal
residueAmount
=
BigDecimal
.
ZERO
;
BigDecimal
residueAmount
=
BigDecimal
.
ZERO
;
for
(
int
i
=
useDays
;
i
<
vehicleItemDTO
.
getTotalNum
();
i
++)
{
for
(
int
i
=
useDays
;
i
<
vehicleItemDTO
.
getTotalNum
();
i
++)
{
residueAmount
=
residueAmount
.
add
(
vmcpds
.
get
(
i
).
getPrice
());
residueAmount
=
residueAmount
.
add
(
vmcpds
.
get
(
i
).
getPrice
());
inProgressVO
.
getViolateAmountList
().
add
(
vmcpds
.
get
(
i
));
}
}
String
violateDesc
=
StrUtil
.
format
(
"{}元"
,
residueAmount
.
toString
());
String
violateDesc
=
StrUtil
.
format
(
"{}元"
,
residueAmount
.
toString
());
if
(
residueDays
>=
2
)
{
if
(
residueDays
>=
2
)
{
residueDays
=
2
;
residueDays
=
2
;
residueAmount
=
BigDecimal
.
ZERO
;
residueAmount
=
BigDecimal
.
ZERO
;
inProgressVO
.
setViolateAmountList
(
CollUtil
.
newArrayList
());
for
(
int
i
=
useDays
;
i
<
(
useDays
+
residueDays
);
i
++)
{
for
(
int
i
=
useDays
;
i
<
(
useDays
+
residueDays
);
i
++)
{
residueAmount
=
residueAmount
.
add
(
vmcpds
.
get
(
i
).
getPrice
());
residueAmount
=
residueAmount
.
add
(
vmcpds
.
get
(
i
).
getPrice
());
inProgressVO
.
getViolateAmountList
().
add
(
vmcpds
.
get
(
i
));
}
}
violateDesc
+=
StrUtil
.
format
(
"(封顶{}元)"
,
residueAmount
);
violateDesc
+=
StrUtil
.
format
(
"(封顶{}元)"
,
residueAmount
);
}
}
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
);
OrderAccountDeduction
violateDeduction
=
orderAccountBiz
.
initDeduction
(
inProgressVO
.
getViolateAmount
(),
violateDesc
,
DeductionTypeEnum
.
VIOLATE_ADVANCE
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
...
@@ -240,6 +245,8 @@ public class OrderCalculateBiz {
...
@@ -240,6 +245,8 @@ public class OrderCalculateBiz {
inProgressVO
.
setViolateAmount
(
overAmount
);
inProgressVO
.
setViolateAmount
(
overAmount
);
inProgressVO
.
setViolateDesc
(
" 延期还车违约金:"
+
violateDesc
);
inProgressVO
.
setViolateDesc
(
" 延期还车违约金:"
+
violateDesc
);
inProgressVO
.
setOverAmountList
(
overAmountList
);
inProgressVO
.
setOverAmountList
(
overAmountList
);
inProgressVO
.
setViolateAmountList
(
overAmountList
);
OrderAccountDeduction
violateDeduction
=
orderAccountBiz
.
initDeduction
(
inProgressVO
.
getViolateAmount
(),
violateDesc
,
DeductionTypeEnum
.
VIOLATE_DELAY
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
OrderAccountDeduction
violateDeduction
=
orderAccountBiz
.
initDeduction
(
inProgressVO
.
getViolateAmount
(),
violateDesc
,
DeductionTypeEnum
.
VIOLATE_DELAY
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
oad
.
getDeductions
().
add
(
violateDeduction
);
oad
.
getDeductions
().
add
(
violateDeduction
);
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
e5d470bc
...
@@ -175,6 +175,8 @@ public class OrderCancelBiz {
...
@@ -175,6 +175,8 @@ public class OrderCancelBiz {
csv
.
setHadConpon
((
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
())?
Boolean
.
TRUE
:
Boolean
.
FALSE
));
csv
.
setHadConpon
((
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
())?
Boolean
.
TRUE
:
Boolean
.
FALSE
));
csv
.
setViolateAmount
(
BigDecimal
.
ZERO
);
csv
.
setViolateAmount
(
BigDecimal
.
ZERO
);
csv
.
setViolateDesc
(
""
);
csv
.
setViolateDesc
(
""
);
csv
.
setAbleUsedDayNum
(
inProgressVO
.
getUseAmountList
().
size
());
csv
.
setSameUseUnitPriceFromList
(
inProgressVO
.
getUseAmountList
());
csv
.
setSameUseUnitPriceFromList
(
inProgressVO
.
getUseAmountList
());
csv
.
setSameOverUnitPriceFromList
(
inProgressVO
.
getOverAmountList
());
csv
.
setSameOverUnitPriceFromList
(
inProgressVO
.
getOverAmountList
());
csv
.
setUseAmountList
(
inProgressVO
.
getUseAmountList
());
csv
.
setUseAmountList
(
inProgressVO
.
getUseAmountList
());
...
@@ -194,6 +196,8 @@ public class OrderCancelBiz {
...
@@ -194,6 +196,8 @@ public class OrderCancelBiz {
baseOrder
.
setViolateAmount
(
csv
.
getViolateAmount
());
baseOrder
.
setViolateAmount
(
csv
.
getViolateAmount
());
baseOrder
.
setExtraAmount
(
inProgressVO
.
getExtraAmount
());
baseOrder
.
setExtraAmount
(
inProgressVO
.
getExtraAmount
());
//最后设置DeductionList
csv
.
setDeductionList
(
oad
.
getDeductions
());
csv
.
initParamJson
();
csv
.
initParamJson
();
//orderTemplateBiz.handleCostDetailExtend(csv);
//orderTemplateBiz.handleCostDetailExtend(csv);
orvd
.
handelCostDetailExtend
(
csv
);
orvd
.
handelCostDetailExtend
(
csv
);
...
@@ -226,6 +230,10 @@ public class OrderCancelBiz {
...
@@ -226,6 +230,10 @@ public class OrderCancelBiz {
CancelNoStartVO
cnsv
=
new
CancelNoStartVO
(){{
CancelNoStartVO
cnsv
=
new
CancelNoStartVO
(){{
setViolateAmount
(
deduction
.
getAmount
());
setViolateAmount
(
deduction
.
getAmount
());
setViolateDesc
(
deduction
.
getName
());
setViolateDesc
(
deduction
.
getName
());
//设置违约金日期费用列表
setViolateAmountList
(
vehicleItemDTO
.
getVehicleDetail
());
setSameViolateUnitPriceFromList
(
vehicleItemDTO
.
getVehicleDetail
());
}};
}};
//设置订单数据
//设置订单数据
...
...
xx-order/xx-order-server/src/main/resources/mapper/OrderVehicaleCrosstownMapper.xml
View file @
e5d470bc
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
<select
id=
"selectByOrderId"
parameterType=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
resultType=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
>
<select
id=
"selectByOrderId"
parameterType=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
resultType=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
>
select o.*, o.violate_amount_detail violateDetail
select o.*, o.violate_amount_detail violateDetail
from order_vehicle_crosstown o
from order_vehicle_crosstown o
<where>
<where>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
and o.status = #{status}
and o.status = #{status}
...
@@ -48,6 +49,9 @@
...
@@ -48,6 +49,9 @@
<if
test=
"orderId != null"
>
<if
test=
"orderId != null"
>
and o.order_id = #{orderId}
and o.order_id = #{orderId}
</if>
</if>
<if
test=
"address != null and address== 1"
>
and o.type != 1
</if>
<if
test=
"orderNo != null"
>
<if
test=
"orderNo != null"
>
and o.order_no = #{orderNo}
and o.order_no = #{orderNo}
</if>
</if>
...
@@ -65,4 +69,5 @@
...
@@ -65,4 +69,5 @@
where order_no = #{no} and type = #{type}
where order_no = #{no} and type = #{type}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
View file @
e5d470bc
...
@@ -256,7 +256,7 @@ public class VehicleActiveService {
...
@@ -256,7 +256,7 @@ public class VehicleActiveService {
bookVehicleVo
.
setBookEndDate
(
null
);
bookVehicleVo
.
setBookEndDate
(
null
);
bookVehicleVo
.
setUnbookStartDate
(
actualArrivalDate
.
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setUnbookStartDate
(
actualArrivalDate
.
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setUnbookEndDate
(
arrivalDate
.
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setUnbookEndDate
(
arrivalDate
.
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setRemark
(
bookVehicleVo
.
getRemark
()
+
" 用户提前还车,取消剩余天数, 初始预定结束时间是,"
+
new
DateTime
(
vehicleBookRecord
.
getBookEndDate
()).
toString
(
DATE_TIME_FORMATTER
));
bookVehicleVo
.
setRemark
(
bookVehicleVo
.
getRemark
()
==
null
?
""
:
bookVehicleVo
.
getRemark
()
+
" 用户提前还车,取消剩余天数, 初始预定结束时间是,"
+
new
DateTime
(
vehicleBookRecord
.
getBookEndDate
()).
toString
(
DATE_TIME_FORMATTER
));
vehicleBookRecord
.
setRemark
(
bookVehicleVo
.
getRemark
());
vehicleBookRecord
.
setRemark
(
bookVehicleVo
.
getRemark
());
try
{
try
{
Boolean
hasSuc
=
vehicleBiz
.
unbookVehicle
(
bookVehicleVo
);
Boolean
hasSuc
=
vehicleBiz
.
unbookVehicle
(
bookVehicleVo
);
...
@@ -268,7 +268,7 @@ public class VehicleActiveService {
...
@@ -268,7 +268,7 @@ public class VehicleActiveService {
log
.
error
(
e
.
getMessage
(),
e
);;
log
.
error
(
e
.
getMessage
(),
e
);;
}
}
}
else
if
(
actualArrivalDate
.
compareTo
(
arrivalDate
)
>
0
)
{
//实际还车时间大于预计还车时间
}
else
if
(
actualArrivalDate
.
compareTo
(
arrivalDate
)
>
0
)
{
//实际还车时间大于预计还车时间
vehicleBookRecord
.
setRemark
(
vehicleBookRecord
.
getRemark
()
+
" 用户延期还车,实际占用日期"
);
vehicleBookRecord
.
setRemark
(
vehicleBookRecord
.
getRemark
()
==
null
?
""
:
vehicleBookRecord
.
getRemark
()
+
" 用户延期还车,实际占用日期"
);
}
}
updateBookRecordStatus
(
vehicleBookRecord
,
2
);
updateBookRecordStatus
(
vehicleBookRecord
,
2
);
departureLog
.
setMileageEnd
(
arrivalVo
.
getMileage
());
departureLog
.
setMileageEnd
(
arrivalVo
.
getMileage
());
...
...
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