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
eaa362f3
Commit
eaa362f3
authored
Sep 24, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/master-modify-cutAmount' into dev
parents
24619540
2ff59309
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
84 deletions
+101
-84
OrderViolateEnum.java
...fc/platform/order/contant/enumerate/OrderViolateEnum.java
+0
-1
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+27
-17
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+8
-12
OrderMsgBiz.java
...n/java/com/xxfc/platform/order/biz/inner/OrderMsgBiz.java
+2
-1
VehicleModelQueryCondition.java
...xfc/platform/vehicle/pojo/VehicleModelQueryCondition.java
+4
-1
VehicleModelBiz.java
...n/java/com/xxfc/platform/vehicle/biz/VehicleModelBiz.java
+3
-1
VehicleModelMapper.xml
...e-server/src/main/resources/mapper/VehicleModelMapper.xml
+57
-51
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/OrderViolateEnum.java
View file @
eaa362f3
...
...
@@ -7,7 +7,6 @@ import java.util.Map;
public
enum
OrderViolateEnum
{
BEFORE
(
1
,
"提前"
),
AFTER
(
2
,
"延期"
),
EXCESS
(
3
,
"消费超额金"
)
;
/**
* 编码
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
eaa362f3
...
...
@@ -344,7 +344,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}});
if
(
null
==
crosstown
)
{
throw
new
BaseException
(
ResultCode
.
PARAM_ILLEGAL_CODE
,
Sets
.
newSet
(
"退款第一部分押金失败,获取不了还车/定损记录,订单号:"
+
orderMQDTO
.
getId
(
)));
throw
new
BaseException
(
ResultCode
.
PARAM_ILLEGAL_CODE
,
Sets
.
newSet
(
StrUtil
.
format
(
"退款第一部分押金失败,获取不了还车/定损记录,订单号:{}, crosstownTypeEnum: {}"
,
orderMQDTO
.
getId
(),
crosstownTypeEnum
)));
}
if
(
null
==
crosstown
.
getRestDeposit
()
...
...
@@ -365,12 +365,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
handleDedRefundDesc
=
handleDed
(
crosstown
,
handleDedRefundDesc
,
csv
);
if
(
csv
.
getDamagesAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
oad
.
getDeductions
().
add
(
initDeduction
(
c
rosstown
.
getDeductionCos
t
(),
handleDedRefundDesc
,
DeductionTypeEnum
.
DAMAGES
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
)
initDeduction
(
c
sv
.
getDamagesAmoun
t
(),
handleDedRefundDesc
,
DeductionTypeEnum
.
DAMAGES
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
)
);
}
//剩余押金 = 押金 - 违章保证金 - 定损金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
illegalReserve
).
subtract
(
c
rosstown
.
getDeductionCos
t
()));
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
illegalReserve
).
subtract
(
c
sv
.
getDamagesAmoun
t
()));
handleCrosstownDetail
(
crosstown
,
oad
);
//退款
...
...
@@ -413,7 +413,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
handelCostDetailExtend
(
csv
);
}});
//捕捉异常
try
{
orderMsgBiz
.
handelMsgDeposit
(
orderMQDTO
.
getOrderRentVehicleDetail
(),
orderMQDTO
,
userFeign
.
userDetailById
(
orderMQDTO
.
getUserId
()).
getData
());
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
}
}
}
...
...
@@ -435,11 +440,22 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
private
void
handleCrosstownDetail
(
OrderVehicleCrosstown
crosstown
,
OrderAccountDetail
oad
)
{
try
{
if
(
null
!=
crosstown
.
getViolateDetail
())
{
List
<
DedDetailDTO
>
dddList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
crosstown
.
getViolateDetail
()
),
DedDetailDTO
.
class
);
for
(
DedDetailDTO
vio
:
dddList
)
{
DedDetailDTO
vio
=
JSONUtil
.
toBean
(
crosstown
.
getViolateDetail
(
),
DedDetailDTO
.
class
);
if
(
OrderViolateEnum
.
BEFORE
.
getCode
().
equals
(
vio
.
getType
()))
{
handleViolateDetail
(
DeductionTypeEnum
.
VIOLATE_ADVANCE
,
oad
,
vio
);
}
else
if
(
OrderViolateEnum
.
AFTER
.
getCode
().
equals
(
vio
.
getType
()))
{
handleViolateDetail
(
DeductionTypeEnum
.
VIOLATE_DELAY
,
oad
,
vio
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"crosstown.getViolateDetail() crosstown id :"
+
crosstown
.
getId
()
+
" 转换失败"
);
}
}
private
void
handleViolateDetail
(
DeductionTypeEnum
dte
,
OrderAccountDetail
oad
,
DedDetailDTO
vio
)
{
for
(
OrderAccountDeduction
deduction
:
oad
.
getDeductions
())
{
if
(
DeductionTypeEnum
.
VIOLATE_ADVANCE
.
getCode
().
equals
(
deduction
.
getType
()))
{
if
(
dte
.
getCode
().
equals
(
deduction
.
getType
()))
{
deduction
.
setName
(
vio
.
getDeductions
());
BigDecimal
diff
=
vio
.
getCost
().
subtract
(
deduction
.
getAmount
());
//修改归还押金金额
...
...
@@ -448,12 +464,6 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"crosstown.getViolateDetail() crosstown id :"
+
crosstown
.
getId
()
+
" 转换失败"
);
}
}
/**
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
eaa362f3
...
...
@@ -251,6 +251,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
if
(
StringUtils
.
isNotBlank
(
orderVehicleCrosstownDto
.
getDedDetail
()))
{
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
orderVehicleCrosstownDto
.
getDedDetail
());
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()
>
0
)
{
orderVehicleCrosstownDto
.
setDeduction
(
true
);
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonArray
.
get
(
i
).
toString
());
if
(
jsonObject
!=
null
)
{
...
...
@@ -261,10 +262,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
}
//延期扣除费用
if
(
StringUtils
.
isNotBlank
(
orderVehicleCrosstownDto
.
getViolateDetail
()))
{
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
orderVehicleCrosstownDto
.
getViolateDetail
());
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonArray
.
get
(
i
).
toString
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
orderVehicleCrosstownDto
.
getViolateDetail
());
if
(
jsonObject
!=
null
)
{
if
(
jsonObject
.
getString
(
"cost"
)
!=
null
)
{
cost
+=
Double
.
parseDouble
(
jsonObject
.
getString
(
"cost"
));
...
...
@@ -274,8 +272,6 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
}
}
}
}
}
orderVehicleCrosstownDto
.
setUserLicenseImg
(
orderVehicleCrosstownDto
.
getLicenseImg
());
//扣除费用,每次都是重新计算
BigDecimal
amount
=
new
BigDecimal
(
cost
.
toString
()).
divide
(
new
BigDecimal
(
"1"
),
2
,
BigDecimal
.
ROUND_UP
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderMsgBiz.java
View file @
eaa362f3
package
com
.
xxfc
.
platform
.
order
.
biz
.
inner
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
...
...
@@ -407,7 +408,7 @@ public class OrderMsgBiz {
residueAmount
=
BigDecimal
.
ZERO
;
}
else
{
throw
new
BaseException
(
ResultCode
.
PARAM_ILLEGAL_CODE
,
new
HashSet
<
String
>()
{{
add
(
"当前退款状态不对,订单号:"
+
baseOrder
.
getNo
(
));
add
(
StrUtil
.
format
(
"当前退款状态不对,订单号:{} baseOrder.getRefundStatus(): {}"
,
baseOrder
.
getNo
(),
baseOrder
.
getRefundStatus
()
));
}});
}
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/VehicleModelQueryCondition.java
View file @
eaa362f3
...
...
@@ -27,11 +27,14 @@ public class VehicleModelQueryCondition {
@ApiModelProperty
(
value
=
"是否删除"
)
private
Integer
isDel
;
@ApiModelProperty
(
value
=
"状态"
)
private
Integer
status
;
private
Integer
status
=
1
;
@ApiModelProperty
(
"分类逗号分割"
)
String
catasStr
;
@ApiModelProperty
(
"排除的车型id"
)
String
notInIds
;
@ApiModelProperty
(
value
=
"分类列表"
,
hidden
=
true
)
Map
<
Integer
,
List
<
VehiclePlatCata
>>
catas
;
@ApiModelProperty
(
value
=
"分类列表(1-后台,2-app和小程序)"
,
hidden
=
true
)
private
Integer
pathType
=
2
;
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelBiz.java
View file @
eaa362f3
...
...
@@ -49,7 +49,9 @@ public class VehicleModelBiz extends BaseBiz<VehicleModelMapper, VehicleModel> {
* @return
*/
public
ObjectRestResponse
findVehicleModelPage
(
VehicleModelQueryCondition
vmqc
)
{
if
(
vmqc
.
getPathType
()==
1
)
{
vmqc
.
setStatus
(
null
);
}
try
{
PageDataVO
<
VehicleModelVo
>
mPageDataVO
=
PageDataVO
.
pageInfo
(
vmqc
.
getPage
(),
vmqc
.
getLimit
(),
()
->
mapper
.
findVehicleModelPage
(
vmqc
));
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleModelMapper.xml
View file @
eaa362f3
...
...
@@ -17,19 +17,25 @@
<if
test=
"isDel !=null "
>
and isdel=#{isDel}
</if>
<if
test=
"status != null"
>
and status = #{status}
</if>
<if
test=
"vehicleName !=null and vehicleName !=''"
>
AND vmqc.name LIKE CONCAT('%',#{vehicleName},'%')
</if>
<if
test=
"vehicleType!=null and vehicleType!=''"
>
AND EXISTS (SELECT vc.vehicle_model_id FROM vehicle_cata vc WHERE vc.cata_id=#{vehicleType} AND vmqc.id=vc.vehicle_model_id )
AND EXISTS (SELECT vc.vehicle_model_id FROM vehicle_cata vc WHERE vc.cata_id=#{vehicleType} AND
vmqc.id=vc.vehicle_model_id )
</if>
<if
test=
"takeALieTheNumber!=null and takeALieTheNumber!=''"
>
AND EXISTS(SELECT vc2.vehicle_model_id FROM vehicle_cata vc2 WHERE vc2.cata_id=#{takeALieTheNumber} AND vmqc.id=vc2.vehicle_model_id)
AND EXISTS(SELECT vc2.vehicle_model_id FROM vehicle_cata vc2 WHERE vc2.cata_id=#{takeALieTheNumber} AND
vmqc.id=vc2.vehicle_model_id)
</if>
<if
test=
"catas != null"
>
...
...
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