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
f30adf44
Commit
f30adf44
authored
Nov 13, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改租车订单
parent
83fbd9b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
14 deletions
+58
-14
OrderVehicleCrosstownDto.java
...c/platform/order/pojo/order/OrderVehicleCrosstownDto.java
+16
-0
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+37
-14
OrderVehicaleCrosstownMapper.xml
...rc/main/resources/mapper/OrderVehicaleCrosstownMapper.xml
+5
-0
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/OrderVehicleCrosstownDto.java
View file @
f30adf44
...
@@ -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
;
...
@@ -79,4 +80,19 @@ public class OrderVehicleCrosstownDto extends OrderVehicleCrosstown {
...
@@ -79,4 +80,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-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
f30adf44
...
@@ -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.OrderPageVO
;
import
com.xxfc.platform.order.pojo.order.OrderPageVO
;
import
com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
;
import
com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
;
...
@@ -36,6 +39,7 @@ import com.xxfc.platform.vehicle.feign.VehicleFeign;
...
@@ -36,6 +39,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
;
...
@@ -83,6 +87,9 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -83,6 +87,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
);
...
@@ -106,31 +113,47 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -106,31 +113,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
(
"order_id"
,
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/resources/mapper/OrderVehicaleCrosstownMapper.xml
View file @
f30adf44
...
@@ -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
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