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
091db407
Commit
091db407
authored
Sep 25, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-vehicle-price' into dev-tiande
parents
7de4f6a2
3e7e40e7
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
99 additions
and
24 deletions
+99
-24
ShuntApply.java
.../main/java/com/xxfc/platform/order/entity/ShuntApply.java
+7
-0
RentVehicleBO.java
...ava/com/xxfc/platform/order/pojo/order/RentVehicleBO.java
+7
-1
VehicleItemDTO.java
...va/com/xxfc/platform/order/pojo/order/VehicleItemDTO.java
+1
-1
RabbitConsumer.java
...ava/com/xxfc/platform/order/mqhandler/RabbitConsumer.java
+10
-0
ShuntApplyController.java
...va/com/xxfc/platform/order/rest/ShuntApplyController.java
+12
-1
BgShuntApplyController.java
...latform/order/rest/background/BgShuntApplyController.java
+18
-3
AbstractOrderHandle.java
.../com/xxfc/platform/order/service/AbstractOrderHandle.java
+1
-1
OrderRentVehicleService.java
.../xxfc/platform/order/service/OrderRentVehicleService.java
+33
-12
BookVehicleVO.java
...in/java/com/xxfc/platform/vehicle/pojo/BookVehicleVO.java
+6
-4
VehicleHolidayPriceInfoBiz.java
...xxfc/platform/vehicle/biz/VehicleHolidayPriceInfoBiz.java
+3
-0
VehicleModelCalendarPriceBiz.java
...fc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
+1
-1
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/ShuntApply.java
View file @
091db407
...
@@ -188,4 +188,11 @@ public class ShuntApply implements Serializable {
...
@@ -188,4 +188,11 @@ public class ShuntApply implements Serializable {
@ApiModelProperty
(
value
=
"确认申请的公司(门店)id"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"确认申请的公司(门店)id"
,
hidden
=
true
)
private
Integer
confirmCompanyId
;
private
Integer
confirmCompanyId
;
/**
* 预约记录id
*/
@Column
(
name
=
"book_record_id"
)
@ApiModelProperty
(
value
=
"预约记录id"
,
hidden
=
true
)
private
Long
bookRecordId
;
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/RentVehicleBO.java
View file @
091db407
...
@@ -22,6 +22,12 @@ public class RentVehicleBO extends OrderRentVehicleDetail implements OrderDetail
...
@@ -22,6 +22,12 @@ public class RentVehicleBO extends OrderRentVehicleDetail implements OrderDetail
private
BaseOrder
order
;
private
BaseOrder
order
;
private
VehicleModel
vehicleModel
;
private
VehicleModel
vehicleModel
;
private
BookVehicleVO
bookVehicleVO
;
private
BookVehicleVO
bookVehicleVO
;
/**
* 是否调车申请下订单
*/
private
Integer
applyOrderSign
=
0
;
/**
/**
* 是否使用出租免费天数
* 是否使用出租免费天数
*/
*/
...
@@ -87,6 +93,6 @@ public class RentVehicleBO extends OrderRentVehicleDetail implements OrderDetail
...
@@ -87,6 +93,6 @@ public class RentVehicleBO extends OrderRentVehicleDetail implements OrderDetail
this
.
startDate
=
DateUtil
.
date
(
getStartTime
());
this
.
startDate
=
DateUtil
.
date
(
getStartTime
());
this
.
endDate
=
DateUtil
.
date
(
getEndTime
());
this
.
endDate
=
DateUtil
.
date
(
getEndTime
());
this
.
startDateStr
=
DateUtil
.
formatDate
(
this
.
startDate
);
this
.
startDateStr
=
DateUtil
.
formatDate
(
this
.
startDate
);
this
.
start
DateStr
=
DateUtil
.
formatDate
(
this
.
endDate
);
this
.
end
DateStr
=
DateUtil
.
formatDate
(
this
.
endDate
);
}
}
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/VehicleItemDTO.java
View file @
091db407
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mqhandler/RabbitConsumer.java
View file @
091db407
...
@@ -3,10 +3,13 @@ package com.xxfc.platform.order.mqhandler;
...
@@ -3,10 +3,13 @@ package com.xxfc.platform.order.mqhandler;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.rabbitmq.client.Channel
;
import
com.rabbitmq.client.Channel
;
import
com.xxfc.platform.order.biz.OrderRentVehicleBiz
;
import
com.xxfc.platform.order.biz.ShuntApplyBiz
;
import
com.xxfc.platform.order.biz.ShuntApplyBiz
;
import
com.xxfc.platform.order.biz.inner.OrderCancelBiz
;
import
com.xxfc.platform.order.biz.inner.OrderCancelBiz
;
import
com.xxfc.platform.order.entity.BaseOrder
;
import
com.xxfc.platform.order.entity.BaseOrder
;
import
com.xxfc.platform.order.entity.ShuntApply
;
import
com.xxfc.platform.order.entity.ShuntApply
;
import
com.xxfc.platform.order.pojo.order.RentVehicleBO
;
import
com.xxfc.platform.order.service.OrderRentVehicleService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
...
@@ -34,6 +37,9 @@ public class RabbitConsumer {
...
@@ -34,6 +37,9 @@ public class RabbitConsumer {
@Autowired
@Autowired
ShuntApplyBiz
shuntApplyBiz
;
ShuntApplyBiz
shuntApplyBiz
;
@Autowired
OrderRentVehicleService
orderRentVehicleService
;
/**
/**
* 默认情况下,如果没有配置手动ACK, 那么Spring Data AMQP 会在消息消费完毕后自动帮我们去ACK
* 默认情况下,如果没有配置手动ACK, 那么Spring Data AMQP 会在消息消费完毕后自动帮我们去ACK
...
@@ -92,6 +98,10 @@ public class RabbitConsumer {
...
@@ -92,6 +98,10 @@ public class RabbitConsumer {
setStatus
(
ShuntApply
.
STATUS_AUTOCNL
);
setStatus
(
ShuntApply
.
STATUS_AUTOCNL
);
}});
}});
}
}
//取消预订
orderRentVehicleService
.
errorRejectVehicle
(
new
RentVehicleBO
(){{
setBookRecordId
(
shuntApply
.
getBookRecordId
());
}});
}
catch
(
BaseException
e
)
{
}
catch
(
BaseException
e
)
{
if
(
ResultCode
.
DB_OPERATION_FAIL_CODE
==
e
.
getStatus
())
{
if
(
ResultCode
.
DB_OPERATION_FAIL_CODE
==
e
.
getStatus
())
{
log
.
info
(
"取消操作被取消;订单id:"
+
shuntApply
.
getId
());
log
.
info
(
"取消操作被取消;订单id:"
+
shuntApply
.
getId
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/ShuntApplyController.java
View file @
091db407
...
@@ -25,6 +25,7 @@ import lombok.Data;
...
@@ -25,6 +25,7 @@ import lombok.Data;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
vo
.
PageDataVO
.
pageInfo
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
vo
.
PageDataVO
.
pageInfo
;
import
static
com
.
xxfc
.
platform
.
order
.
entity
.
ShuntApply
.
STATUS_CNL
;
import
static
com
.
xxfc
.
platform
.
order
.
entity
.
ShuntApply
.
STATUS_CNL
;
import
static
com
.
xxfc
.
platform
.
order
.
entity
.
ShuntApply
.
STATUS_CRT
;
import
static
com
.
xxfc
.
platform
.
order
.
entity
.
ShuntApply
.
STATUS_CRT
;
...
@@ -62,7 +63,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -62,7 +63,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
shuntApply
.
setStartCityCode
(
vehicleFeign
.
getCompanyDetail
(
shuntApply
.
getStartCompanyId
()).
getData
().
getAddrCity
());
shuntApply
.
setStartCityCode
(
vehicleFeign
.
getCompanyDetail
(
shuntApply
.
getStartCompanyId
()).
getData
().
getAddrCity
());
}
}
if
(
null
!=
shuntApply
.
getEndCompanyId
())
{
if
(
null
!=
shuntApply
.
getEndCompanyId
())
{
shuntApply
.
set
Start
CityCode
(
vehicleFeign
.
getCompanyDetail
(
shuntApply
.
getEndCompanyId
()).
getData
().
getAddrCity
());
shuntApply
.
set
End
CityCode
(
vehicleFeign
.
getCompanyDetail
(
shuntApply
.
getEndCompanyId
()).
getData
().
getAddrCity
());
}
}
shuntApply
.
setUserId
(
getCurrentUserIdInt
());
shuntApply
.
setUserId
(
getCurrentUserIdInt
());
shuntApply
.
setStatus
(
STATUS_CRT
);
shuntApply
.
setStatus
(
STATUS_CRT
);
...
@@ -153,9 +154,19 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -153,9 +154,19 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
// setDayNum(orderCalculateBiz.getIncludeDays(shuntApply.getStartTime(), shuntApply.getEndTime()));
// setDayNum(orderCalculateBiz.getIncludeDays(shuntApply.getStartTime(), shuntApply.getEndTime()));
// }};
// }};
dto
.
setVehicleId
(
shuntApply
.
getVehicleId
());
dto
.
setStartTime
(
shuntApply
.
getStartTime
());
dto
.
setEndTime
(
shuntApply
.
getEndTime
());
dto
.
setStartCompanyId
(
shuntApply
.
getStartCompanyId
());
dto
.
setEndCompanyId
(
shuntApply
.
getEndCompanyId
());
RentVehicleBO
bo
=
orderRentVehicleBiz
.
initRentVehicleBO
(
dto
);
RentVehicleBO
bo
=
orderRentVehicleBiz
.
initRentVehicleBO
(
dto
);
bo
.
setApplyOrderSign
(
SYS_TRUE
);
bo
.
setAppUserDTO
(
userFeign
.
userDetailByToken
(
BaseContextHandler
.
getToken
()).
getData
());
bo
.
setAppUserDTO
(
userFeign
.
userDetailByToken
(
BaseContextHandler
.
getToken
()).
getData
());
orderRentVehicleService
.
applyCreateOrder
(
bo
,
shuntApply
.
getOrderNo
());
orderRentVehicleService
.
applyCreateOrder
(
bo
,
shuntApply
.
getOrderNo
());
baseBiz
.
updateSelectiveById
(
new
ShuntApply
(){{
setId
(
shuntApply
.
getId
());
setStatus
(
ShuntApply
.
STATUS_ORDER
);
}});
return
ObjectRestResponse
.
succ
(
bo
.
getOrder
());
return
ObjectRestResponse
.
succ
(
bo
.
getOrder
());
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/background/BgShuntApplyController.java
View file @
091db407
...
@@ -27,6 +27,7 @@ import com.xxfc.platform.order.service.OrderRentVehicleService;
...
@@ -27,6 +27,7 @@ import com.xxfc.platform.order.service.OrderRentVehicleService;
import
com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus
;
import
com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.pojo.BookVehicleVO
;
import
com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO
;
import
com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.UsableVeicleVO
;
import
com.xxfc.platform.vehicle.pojo.vo.UsableVeicleVO
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -78,7 +79,7 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
...
@@ -78,7 +79,7 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
public
ObjectRestResponse
<
PageDataVO
<
StewardShuntApply
>>
stewardList
(
ListDTO
dto
)
{
public
ObjectRestResponse
<
PageDataVO
<
StewardShuntApply
>>
stewardList
(
ListDTO
dto
)
{
//获取该城市的申请最大和最小时间
//获取该城市的申请最大和最小时间
//获取该店铺
//获取该店铺
PageDataVO
<
ShuntApply
>
list
=
PageDataVO
.
pageInfo
(
dto
.
initQuery
(),
()
->
baseBiz
.
selectByWeekend
(
w
->
{
PageDataVO
<
S
tewardS
huntApply
>
list
=
PageDataVO
.
pageInfo
(
dto
.
initQuery
(),
()
->
baseBiz
.
selectByWeekend
(
w
->
{
if
(
null
!=
dto
.
getCityCode
())
{
if
(
null
!=
dto
.
getCityCode
())
{
w
.
andEqualTo
(
ShuntApply:
:
getStartCityCode
,
dto
.
getCityCode
());
w
.
andEqualTo
(
ShuntApply:
:
getStartCityCode
,
dto
.
getCityCode
());
}
}
...
@@ -86,6 +87,10 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
...
@@ -86,6 +87,10 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
return
w
;
return
w
;
},
" crt_time desc "
),
StewardShuntApply
.
class
);
},
" crt_time desc "
),
StewardShuntApply
.
class
);
list
.
getData
().
forEach
(
data
->
{
data
.
setVehicleModel
(
vehicleFeign
.
get
(
data
.
getModelId
()).
getData
());
});
// List<StewardShuntApply> returnList = CollUtil.newArrayList();
// List<StewardShuntApply> returnList = CollUtil.newArrayList();
//
//
// Integer companyId = getAdminUserInfo().getCompanyId();
// Integer companyId = getAdminUserInfo().getCompanyId();
...
@@ -172,20 +177,30 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
...
@@ -172,20 +177,30 @@ public class BgShuntApplyController extends BaseController<ShuntApplyBiz, ShuntA
RentVehicleBO
detail
=
new
RentVehicleBO
();
RentVehicleBO
detail
=
new
RentVehicleBO
();
detail
.
setStartTime
(
shuntApply
.
getStartTime
());
detail
.
setStartTime
(
shuntApply
.
getStartTime
());
detail
.
setEndTime
(
shuntApply
.
getEndTime
());
detail
.
setEndTime
(
shuntApply
.
getEndTime
());
detail
.
setVehicleId
(
shuntApply
.
getVehicleId
());
detail
.
setVehicleId
(
dto
.
getVehicleId
());
detail
.
setModelId
(
shuntApply
.
getModelId
());
detail
.
setModelId
(
shuntApply
.
getModelId
());
detail
.
setStartAddr
(
shuntApply
.
getStartCompanyName
());
detail
.
setStartAddr
(
shuntApply
.
getStartCompanyName
());
detail
.
setStartCompanyId
(
shuntApply
.
getStartCompanyId
());
detail
.
setStartCompanyId
(
shuntApply
.
getStartCompanyId
());
detail
.
setEndCompanyId
(
shuntApply
.
getEndCompanyId
());
detail
.
setEndCompanyId
(
shuntApply
.
getEndCompanyId
());
detail
.
setOrder
(
new
BaseOrder
(){{
setNo
(
OrderUtil
.
GetOrderNumber
(
""
,
OrderUtil
.
APP_MID
));}});
detail
.
setOrder
(
new
BaseOrder
(){{
setNo
(
OrderUtil
.
GetOrderNumber
(
""
,
OrderUtil
.
APP_MID
));}});
detail
.
setRentFreeDay
(
SYS_FALSE
);
detail
.
setBookVehicleVO
(
new
BookVehicleVO
(){{
setBookStartDate
(
DateUtil
.
date
(
shuntApply
.
getStartTime
()).
toDateStr
());
setBookEndDate
(
DateUtil
.
date
(
shuntApply
.
getEndTime
()).
toDateStr
());
setBookStartDateTime
(
DateUtil
.
date
(
shuntApply
.
getStartTime
()).
toString
());
setBookEndDateTime
(
DateUtil
.
date
(
shuntApply
.
getEndTime
()).
toString
());
}});
//预约车辆
//预约车辆
orderRentVehicleService
.
acquireVehicle
(
detail
,
null
,
VehicleBookRecordStatus
.
APPROVE
.
getCode
()
);
orderRentVehicleService
.
acquireVehicle
(
detail
,
null
,
null
);
shuntApply
.
setVehicleId
(
dto
.
getVehicleId
());
shuntApply
.
setVehicleId
(
dto
.
getVehicleId
());
shuntApply
.
setStatus
(
STATUS_CONFIRM
);
shuntApply
.
setStatus
(
STATUS_CONFIRM
);
shuntApply
.
setOrderNo
(
detail
.
getOrder
().
getNo
());
shuntApply
.
setOrderNo
(
detail
.
getOrder
().
getNo
());
shuntApply
.
setOverTime
(
DateUtil
.
offsetHour
(
DateUtil
.
date
(),
1
).
getTime
());
shuntApply
.
setOverTime
(
DateUtil
.
offsetHour
(
DateUtil
.
date
(),
1
).
getTime
());
shuntApply
.
setConfirmUserId
(
getAdminUserInfo
().
getId
());
shuntApply
.
setConfirmCompanyId
(
getAdminUserInfo
().
getCompanyId
());
shuntApply
.
setBookRecordId
(
detail
.
getBookRecordId
());
baseBiz
.
updateSelectiveByIdRe
(
shuntApply
);
baseBiz
.
updateSelectiveByIdRe
(
shuntApply
);
rabbitProduct
.
sendApplyDelayMessage
(
baseBiz
.
selectById
(
shuntApply
.
getId
()),
1000L
*
3601L
);
rabbitProduct
.
sendApplyDelayMessage
(
baseBiz
.
selectById
(
shuntApply
.
getId
()),
1000L
*
3601L
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/AbstractOrderHandle.java
View file @
091db407
...
@@ -82,7 +82,7 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
...
@@ -82,7 +82,7 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
}
}
//设置订单号
//设置订单号
if
(
StrUtil
.
isBlank
(
orderNo
))
{
if
(
StrUtil
.
is
Not
Blank
(
orderNo
))
{
baseOrder
.
setNo
(
orderNo
);
baseOrder
.
setNo
(
orderNo
);
}
else
{
}
else
{
baseOrder
.
setNo
(
OrderUtil
.
GetOrderNumber
(
""
,
OrderUtil
.
APP_MID
));
baseOrder
.
setNo
(
OrderUtil
.
GetOrderNumber
(
""
,
OrderUtil
.
APP_MID
));
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderRentVehicleService.java
View file @
091db407
...
@@ -19,6 +19,7 @@ import com.xxfc.platform.activity.feign.ActivityFeign;
...
@@ -19,6 +19,7 @@ import com.xxfc.platform.activity.feign.ActivityFeign;
import
com.xxfc.platform.order.biz.OrderCostDetailBiz
;
import
com.xxfc.platform.order.biz.OrderCostDetailBiz
;
import
com.xxfc.platform.order.biz.OrderRentVehicleBiz
;
import
com.xxfc.platform.order.biz.OrderRentVehicleBiz
;
import
com.xxfc.platform.order.biz.OrderTemplateBiz
;
import
com.xxfc.platform.order.biz.OrderTemplateBiz
;
import
com.xxfc.platform.order.biz.inner.OrderCalculateBiz
;
import
com.xxfc.platform.order.contant.enumerate.ItemTypeEnum
;
import
com.xxfc.platform.order.contant.enumerate.ItemTypeEnum
;
import
com.xxfc.platform.order.contant.enumerate.OrderCostEnum
;
import
com.xxfc.platform.order.contant.enumerate.OrderCostEnum
;
import
com.xxfc.platform.order.contant.enumerate.OrderStatusEnum
;
import
com.xxfc.platform.order.contant.enumerate.OrderStatusEnum
;
...
@@ -82,6 +83,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -82,6 +83,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
@Autowired
@Autowired
OrderTemplateBiz
orderTemplateBiz
;
OrderTemplateBiz
orderTemplateBiz
;
@Autowired
OrderCalculateBiz
orderCalculateBiz
;
@Autowired
@Autowired
ThirdFeign
thirdFeign
;
ThirdFeign
thirdFeign
;
...
@@ -247,9 +251,11 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -247,9 +251,11 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
}
}
bo
.
setAccompanyItems
(
oads
);
bo
.
setAccompanyItems
(
oads
);
if
(!
SYS_TRUE
.
equals
(
bo
.
getApplyOrderSign
()))
{
//获取可用车辆
//获取可用车辆
acquireVehicle
(
bo
,
null
,
null
);
acquireVehicle
(
bo
,
null
,
null
);
cloudTransact
=
1
;
cloudTransact
=
1
;
}
//添加随声物品项
//添加随声物品项
OrderItem
accompanyItem
=
orderItemBiz
.
initOrderItem
(
BigDecimal
.
ZERO
,
1
,
"随车物品"
,
null
,
ACCOMPANY
);
OrderItem
accompanyItem
=
orderItemBiz
.
initOrderItem
(
BigDecimal
.
ZERO
,
1
,
"随车物品"
,
null
,
ACCOMPANY
);
...
@@ -288,22 +294,29 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -288,22 +294,29 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
//判断分布式事务执行到哪里
//判断分布式事务执行到哪里
switch
(
cloudTransact
)
{
switch
(
cloudTransact
)
{
case
1
:
case
1
:
if
(!
SYS_TRUE
.
equals
(
bo
.
getApplyOrderSign
()))
{
//取消车辆预定
//取消车辆预定
//未支付,拒绝之前的预约
//未支付,拒绝之前的预约
errorRejectVehicle
(
bo
);
errorRejectVehicle
(
bo
);
}
break
;
break
;
case
2
:
case
2
:
if
(!
SYS_TRUE
.
equals
(
bo
.
getApplyOrderSign
()))
{
//取消车辆预定
//取消车辆预定
//未支付,拒绝之前的预约
//未支付,拒绝之前的预约
errorRejectVehicle
(
bo
);
errorRejectVehicle
(
bo
);
}
useOrBackFreeDays
(
bo
,
UserFeign
.
MEMBER_DAYS_WITHDRAW
);
useOrBackFreeDays
(
bo
,
UserFeign
.
MEMBER_DAYS_WITHDRAW
);
break
;
break
;
case
3
:
case
3
:
if
(!
SYS_TRUE
.
equals
(
bo
.
getApplyOrderSign
()))
{
//取消车辆预定
//取消车辆预定
//未支付,拒绝之前的预约
//未支付,拒绝之前的预约
errorRejectVehicle
(
bo
);
errorRejectVehicle
(
bo
);
}
//退还天数
//退还天数
useOrBackFreeDays
(
bo
,
UserFeign
.
MEMBER_DAYS_WITHDRAW
);
useOrBackFreeDays
(
bo
,
UserFeign
.
MEMBER_DAYS_WITHDRAW
);
...
@@ -341,7 +354,7 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -341,7 +354,7 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
}
}
}
}
p
rivate
void
errorRejectVehicle
(
RentVehicleBO
bo
)
{
p
ublic
void
errorRejectVehicle
(
RentVehicleBO
bo
)
{
//取消车辆预定
//取消车辆预定
//未支付,拒绝之前的预约
//未支付,拒绝之前的预约
RestResponse
<
Integer
>
restResponse
=
vehicleFeign
.
rentRejectVehicleBooking
(
bo
.
getBookRecordId
());
RestResponse
<
Integer
>
restResponse
=
vehicleFeign
.
rentRejectVehicleBooking
(
bo
.
getBookRecordId
());
...
@@ -384,7 +397,15 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -384,7 +397,15 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
// for (VehicleHolidayPriceInfo vhpi : vhpis) {
// for (VehicleHolidayPriceInfo vhpi : vhpis) {
// vhpi.getAllModelUse()
// vhpi.getAllModelUse()
// }
// }
List
<
VMCalendarPriceCostDTO
>
vmcpds
=
Convert
.
toList
(
VMCalendarPriceCostDTO
.
class
,
metaVmcpds
);
List
<
VMCalendarPriceCostDTO
>
vmcpds
=
CollUtil
.
newArrayList
();
Integer
includeDays
=
orderCalculateBiz
.
getIncludeDays
(
detail
.
getStartTime
(),
detail
.
getEndTime
());
for
(
VehicleModelCalendarPriceDTO
metaVmcpd
:
metaVmcpds
)
{
if
(
includeDays
>
0
)
{
vmcpds
.
add
(
BeanUtil
.
toBean
(
metaVmcpd
,
VMCalendarPriceCostDTO
.
class
));
includeDays
=
includeDays
-
1
;
}
}
//List<VMCalendarPriceCostDTO> vmcpds = Convert.toList(VMCalendarPriceCostDTO.class, metaVmcpds);
//设置Item
//设置Item
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/BookVehicleVO.java
View file @
091db407
...
@@ -24,25 +24,27 @@ public class BookVehicleVO {
...
@@ -24,25 +24,27 @@ public class BookVehicleVO {
/**
/**
* 预定目标日期(开始)
* 预定目标日期(开始)
*/
*/
@ApiModelProperty
(
"预定目标日期(开始) yyyy-MM-dd HH:mm:ss"
)
// @ApiModelProperty("预定目标日期(开始) yyyy-MM-dd HH:mm:ss")
@ApiModelProperty
(
"预定目标日期(开始) yyyy-MM-dd"
)
private
String
bookStartDate
;
private
String
bookStartDate
;
/**
/**
* 预定目标日期(结束)
* 预定目标日期(结束)
*/
*/
@ApiModelProperty
(
"预定目标日期(结束) yyyy-MM-dd HH:mm:ss"
)
// @ApiModelProperty("预定目标日期(结束) yyyy-MM-dd HH:mm:ss")
@ApiModelProperty
(
"预定目标日期(结束) yyyy-MM-dd"
)
private
String
bookEndDate
;
private
String
bookEndDate
;
/**
/**
* 预定目标日期(开始)
* 预定目标日期(开始)
*/
*/
@ApiModelProperty
(
"预定目标时间(开始)"
)
@ApiModelProperty
(
"预定目标时间(开始)
yyyy-MM-dd HH:mm:ss
"
)
private
String
bookStartDateTime
;
private
String
bookStartDateTime
;
/**
/**
* 预定目标日期(结束)
* 预定目标日期(结束)
*/
*/
@ApiModelProperty
(
"预定目标时间(结束)"
)
@ApiModelProperty
(
"预定目标时间(结束)
yyyy-MM-dd HH:mm:ss
"
)
private
String
bookEndDateTime
;
private
String
bookEndDateTime
;
/**
/**
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleHolidayPriceInfoBiz.java
View file @
091db407
...
@@ -57,6 +57,9 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
...
@@ -57,6 +57,9 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
@Autowired
@Autowired
VehicleCommonPriceInfoBiz
vehicleCommonPriceInfoBiz
;
VehicleCommonPriceInfoBiz
vehicleCommonPriceInfoBiz
;
@Autowired
VehicleModelCalendarPriceBiz
vehicleModelCalendarPriceBiz
;
@Override
@Override
public
UserFeign
getUserFeign
()
{
public
UserFeign
getUserFeign
()
{
return
userFeign
;
return
userFeign
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
View file @
091db407
...
@@ -240,7 +240,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
...
@@ -240,7 +240,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @param endLong
* @param endLong
* @return
* @return
*/
*/
p
rivate
Integer
getIncludeDays
(
Long
startLong
,
Long
endLong
)
{
p
ublic
Integer
getIncludeDays
(
Long
startLong
,
Long
endLong
)
{
Map
<
String
,
Dictionary
>
dictionaryMap
=
thirdFeign
.
dictionaryGetAll4Map
().
getData
();
Map
<
String
,
Dictionary
>
dictionaryMap
=
thirdFeign
.
dictionaryGetAll4Map
().
getData
();
Long
hourLong
=
(
60L
*
60L
*
1000L
);
Long
hourLong
=
(
60L
*
60L
*
1000L
);
Long
dayLong
=
hourLong
*
24
;
Long
dayLong
=
hourLong
*
24
;
...
...
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