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
392b5762
Commit
392b5762
authored
Sep 16, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-modify-cutAmount' into dev
parents
048026ec
c0660da2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
26 deletions
+36
-26
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+8
-6
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+16
-12
BaseOrderMapper.xml
...rder-server/src/main/resources/mapper/BaseOrderMapper.xml
+5
-2
OrderVehicaleCrosstownMapper.xml
...rc/main/resources/mapper/OrderVehicaleCrosstownMapper.xml
+7
-6
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
392b5762
...
...
@@ -180,7 +180,6 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
getDriverInfo
(
orderPageVo
);
}
else
if
(
orderPageVo
.
getStatus
()
>=
5
||
orderPageVo
.
getStatus
()
==
-
1
)
{
//出行中 已交车
//设置违约金金额
updateCrossRefund
(
orderPageVo
);
getDriverInfo
(
orderPageVo
);
getUserLicense
(
orderPageVo
);
}
...
...
@@ -261,10 +260,10 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
//提前的天数, 当天就算使用一天
int
noUsedDay
=
getDaysBetweenDateTime
(
nowTime
,
endTime
)
-
1
;
//退还未使用的天数,或者金额,扣除违约金,实际未使用天数的金额,最多3000元
InProgressVO
inProgressVO
=
new
InProgressVO
();
inProgressVO
.
setViolateAmount
(
new
BigDecimal
(
200
));
inProgressVO
.
setExtraAmount
(
new
BigDecimal
(
200
));
//
InProgressVO inProgressVO = orderCalculateBiz.inProgressCalculate(orderPageVO, actualDay - noUsedDay);
//
InProgressVO inProgressVO = new InProgressVO();
//
inProgressVO.setViolateAmount(new BigDecimal(200));
//
inProgressVO.setExtraAmount(new BigDecimal(200));
InProgressVO
inProgressVO
=
orderCalculateBiz
.
inProgressCalculate
(
orderPageVO
,
actualDay
-
noUsedDay
);
if
(
inProgressVO
!=
null
)
{
//消费超额金
if
(
inProgressVO
.
getExtraAmount
()
!=
null
)
{
...
...
@@ -330,7 +329,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
orderVehicleCrosstownDto
.
setLicenseName
(
orderUserLicenses
.
get
(
0
).
getLicenseName
());
orderVehicleCrosstownDto
.
setLicensePhone
(
orderUserLicenses
.
get
(
0
).
getLicensePhone
());
}
//设置
保留金
//设置
违约明细
for
(
OrderVehicleCrosstownDto
a
:
orderVehicleCrosstown
)
{
if
(
a
.
getType
()
!=
CrosstownTypeEnum
.
DEPARTURE
.
getCode
())
{
if
(
StringUtils
.
isNotBlank
(
a
.
getViolateDetail
()))
{
...
...
@@ -339,6 +338,9 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
}
}
}
if
(
StringUtils
.
isBlank
(
orderPageVo
.
getDedDetailDTO
()))
{
updateCrossRefund
(
orderPageVo
);
}
orderPageVo
.
setOrderVehicleCrosstownDto
(
orderVehicleCrosstownDto
);
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
392b5762
...
...
@@ -250,24 +250,28 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
//定损扣除费用
if
(
StringUtils
.
isNotBlank
(
orderVehicleCrosstownDto
.
getDedDetail
()))
{
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
orderVehicleCrosstownDto
.
getDedDetail
());
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonArray
.
get
(
i
).
toString
());
if
(
jsonObject
!=
null
)
{
cost
+=
Double
.
parseDouble
(
jsonObject
.
getString
(
"cost"
));
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonArray
.
get
(
i
).
toString
());
if
(
jsonObject
!=
null
)
{
cost
+=
Double
.
parseDouble
(
jsonObject
.
getString
(
"cost"
));
}
}
}
}
//延期扣除费用
if
(
StringUtils
.
isNotBlank
(
orderVehicleCrosstownDto
.
getViolateDetail
()))
{
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
orderVehicleCrosstownDto
.
getDedDetail
());
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonArray
.
get
(
i
).
toString
());
if
(
jsonObject
!=
null
)
{
if
(
jsonObject
.
getString
(
"cost"
)
!=
null
)
{
cost
+=
Double
.
parseDouble
(
jsonObject
.
getString
(
"cost"
));
}
if
(
jsonObject
.
getString
(
"excessCost"
)
!=
null
)
{
cost
+=
Double
.
parseDouble
(
jsonObject
.
getString
(
"excessCost"
));
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonArray
.
get
(
i
).
toString
());
if
(
jsonObject
!=
null
)
{
if
(
jsonObject
.
getString
(
"cost"
)
!=
null
)
{
cost
+=
Double
.
parseDouble
(
jsonObject
.
getString
(
"cost"
));
}
if
(
jsonObject
.
getString
(
"excessCost"
)
!=
null
)
{
cost
+=
Double
.
parseDouble
(
jsonObject
.
getString
(
"excessCost"
));
}
}
}
}
...
...
xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
View file @
392b5762
...
...
@@ -182,8 +182,11 @@
from base_order b
LEFT JOIN order_rent_vehicle_detail r on r.order_id = b.id
where b.type = 1
<if
test=
"userId != null"
>
and b.user_id = #{userId}
<if
test=
"userIds != null and userIds.size > 0"
>
and b.user_id in
<foreach
collection=
"userIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
<if
test=
"status != null and status == -1"
>
AND b.status = -1
...
...
xx-order/xx-order-server/src/main/resources/mapper/OrderVehicaleCrosstownMapper.xml
View file @
392b5762
...
...
@@ -26,6 +26,7 @@
<result
column=
"deduction_cost"
jdbcType=
"INTEGER"
property=
"deductionCost"
/>
<result
column=
"rest_deposit"
jdbcType=
"INTEGER"
property=
"restDeposit"
/>
<result
column=
"user_license_id"
jdbcType=
"VARCHAR"
property=
"userLicenseId"
/>
<result
column=
"violate_amount_detail"
jdbcType=
"VARCHAR"
property=
"violateDetail"
/>
</resultMap>
<resultMap
id=
"orderMap"
type=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
>
<result
column=
"id"
javaType=
"java.lang.Integer"
property=
"id"
/>
...
...
@@ -34,20 +35,20 @@
javaType=
"com.xxfc.platform.order.entity.DepositRefundRecord"
/>
</resultMap>
<select
id=
"selectByOrderId"
parameterType=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
resultType=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
>
select
*
from order_vehicle_crosstown
select
o.*, o.violate_amount_detail violateDetail
from order_vehicle_crosstown
o
<where>
<if
test=
"status != null"
>
and status = #{status}
and
o.
status = #{status}
</if>
<if
test=
"type != null"
>
and type = #{type}
and
o.
type = #{type}
</if>
<if
test=
"orderId != null"
>
and order_id = #{orderId}
and o
.o
rder_id = #{orderId}
</if>
<if
test=
"orderNo != null"
>
and order_no = #{orderNo}
and o
.o
rder_no = #{orderNo}
</if>
</where>
</select>
...
...
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