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
e3cc0618
Commit
e3cc0618
authored
Aug 17, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消预定和出车的bug
parent
9d964acd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
26 deletions
+17
-26
OrderTourDetail.java
.../java/com/xxfc/platform/order/entity/OrderTourDetail.java
+2
-1
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+7
-21
BackStageOrderController.java
...om/xxfc/platform/order/rest/BackStageOrderController.java
+8
-4
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/OrderTourDetail.java
View file @
e3cc0618
package
com
.
xxfc
.
platform
.
order
.
entity
;
package
com
.
xxfc
.
platform
.
order
.
entity
;
import
com.github.wxiaoqi.security.admin.vo.AppUserVo
;
import
com.github.wxiaoqi.security.admin.vo.AppUserVo
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -245,5 +246,5 @@ public class OrderTourDetail implements Serializable {
...
@@ -245,5 +246,5 @@ public class OrderTourDetail implements Serializable {
private
Integer
isOutside
;
private
Integer
isOutside
;
@Transient
@Transient
private
List
<
AppUserVo
>
userVoList
;
private
List
<
TourUser
>
userVoList
;
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
e3cc0618
...
@@ -26,6 +26,7 @@ import com.xxfc.platform.order.pojo.order.OrderPageVO;
...
@@ -26,6 +26,7 @@ import com.xxfc.platform.order.pojo.order.OrderPageVO;
import
com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
;
import
com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
;
import
com.xxfc.platform.order.pojo.order.QueryOrderDTO
;
import
com.xxfc.platform.order.pojo.order.QueryOrderDTO
;
import
com.xxfc.platform.order.rest.BaseOrderController
;
import
com.xxfc.platform.order.rest.BaseOrderController
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.dto.SendMsgDTO
;
import
com.xxfc.platform.universal.dto.SendMsgDTO
;
...
@@ -179,18 +180,11 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
...
@@ -179,18 +180,11 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
orderPageVo
.
setVehicalNumberPlat
(
response
.
getData
().
getNumberPlate
());
orderPageVo
.
setVehicalNumberPlat
(
response
.
getData
().
getNumberPlate
());
}
}
}
else
if
(
orderPageVo
.
getOrderTourDetail
()
!=
null
)
{
}
else
if
(
orderPageVo
.
getOrderTourDetail
()
!=
null
)
{
List
<
Integer
>
ids
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotBlank
(
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
()))
{
if
(
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
().
contains
(
","
))
{
List
<
TourUser
>
list
=
tourFeign
.
getTourUsers
(
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
()).
getData
();
String
[]
strings
=
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
().
split
(
","
);
for
(
int
i
=
0
;
i
<
strings
.
length
;
i
++)
{
ids
.
add
(
Integer
.
parseInt
(
StringUtils
.
isNotBlank
(
strings
[
i
])
?
strings
[
i
]
:
"0"
));
}
}
else
{
ids
.
add
(
Integer
.
parseInt
(
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
()));
}
List
<
AppUserVo
>
list
=
userFeign
.
getByUserIds
(
ids
).
getData
();
orderPageVo
.
getOrderTourDetail
().
setUserVoList
(
list
==
null
||
list
.
size
()
<=
0
?
new
ArrayList
<>()
:
list
);
orderPageVo
.
getOrderTourDetail
().
setUserVoList
(
list
==
null
||
list
.
size
()
<=
0
?
new
ArrayList
<>()
:
list
);
}
}
}
//设置保留金
//设置保留金
Map
<
String
,
Dictionary
>
dictionaryMap
=
thirdFeign
.
dictionaryGetAll4Map
().
getData
();
Map
<
String
,
Dictionary
>
dictionaryMap
=
thirdFeign
.
dictionaryGetAll4Map
().
getData
();
BigDecimal
illegalReserve
=
new
BigDecimal
(
dictionaryMap
.
get
(
APP_ORDER
+
"_"
+
DictionaryKey
.
ILLEGAL_RESERVE
).
getDetail
());
BigDecimal
illegalReserve
=
new
BigDecimal
(
dictionaryMap
.
get
(
APP_ORDER
+
"_"
+
DictionaryKey
.
ILLEGAL_RESERVE
).
getDetail
());
...
@@ -268,19 +262,11 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
...
@@ -268,19 +262,11 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
orderPageVo
.
setVehicalNumberPlat
(
restResponse
.
getData
().
getNumberPlate
());
orderPageVo
.
setVehicalNumberPlat
(
restResponse
.
getData
().
getNumberPlate
());
}
}
}
else
if
(
orderPageVo
.
getOrderTourDetail
()
!=
null
)
{
}
else
if
(
orderPageVo
.
getOrderTourDetail
()
!=
null
)
{
List
<
Integer
>
ids
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotBlank
(
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
()))
{
if
(
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
().
contains
(
","
))
{
List
<
TourUser
>
list
=
tourFeign
.
getTourUsers
(
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
()).
getData
();
String
[]
strings
=
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
().
split
(
","
);
for
(
int
i
=
0
;
i
<
strings
.
length
;
i
++)
{
ids
.
add
(
Integer
.
parseInt
(
StringUtils
.
isNotBlank
(
strings
[
i
])
?
strings
[
i
]
:
"0"
));
}
}
else
{
ids
.
add
(
Integer
.
parseInt
(
orderPageVo
.
getOrderTourDetail
().
getTourUserIds
()));
}
List
<
AppUserVo
>
list
=
userFeign
.
getByUserIds
(
ids
).
getData
();
orderPageVo
.
getOrderTourDetail
().
setUserVoList
(
list
==
null
||
list
.
size
()
<=
0
?
new
ArrayList
<>()
:
list
);
orderPageVo
.
getOrderTourDetail
().
setUserVoList
(
list
==
null
||
list
.
size
()
<=
0
?
new
ArrayList
<>()
:
list
);
}
}
}
//设置保留金
//设置保留金
Map
<
String
,
Dictionary
>
dictionaryMap
=
thirdFeign
.
dictionaryGetAll4Map
().
getData
();
Map
<
String
,
Dictionary
>
dictionaryMap
=
thirdFeign
.
dictionaryGetAll4Map
().
getData
();
BigDecimal
illegalReserve
=
new
BigDecimal
(
dictionaryMap
.
get
(
APP_ORDER
+
"_"
+
DictionaryKey
.
ILLEGAL_RESERVE
).
getDetail
());
BigDecimal
illegalReserve
=
new
BigDecimal
(
dictionaryMap
.
get
(
APP_ORDER
+
"_"
+
DictionaryKey
.
ILLEGAL_RESERVE
).
getDetail
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BackStageOrderController.java
View file @
e3cc0618
...
@@ -25,6 +25,8 @@ import com.xxfc.platform.order.entity.OrderRentVehicleDetail;
...
@@ -25,6 +25,8 @@ import com.xxfc.platform.order.entity.OrderRentVehicleDetail;
import
com.xxfc.platform.order.pojo.OrderAccompanyDTO
;
import
com.xxfc.platform.order.pojo.OrderAccompanyDTO
;
import
com.xxfc.platform.order.pojo.order.*
;
import
com.xxfc.platform.order.pojo.order.*
;
import
com.xxfc.platform.order.service.OrderRentVehicleService
;
import
com.xxfc.platform.order.service.OrderRentVehicleService
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus
;
import
com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
...
@@ -78,6 +80,9 @@ public class BackStageOrderController extends CommonBaseController implements Us
...
@@ -78,6 +80,9 @@ public class BackStageOrderController extends CommonBaseController implements Us
@Autowired
@Autowired
UserFeign
userFeign
;
UserFeign
userFeign
;
@Autowired
TourFeign
tourFeign
;
@Resource
@Resource
VehicleFeign
vehicleFeign
;
VehicleFeign
vehicleFeign
;
...
@@ -180,10 +185,9 @@ public class BackStageOrderController extends CommonBaseController implements Us
...
@@ -180,10 +185,9 @@ public class BackStageOrderController extends CommonBaseController implements Us
if
(
startResponse
.
getData
()
!=
null
)
{
if
(
startResponse
.
getData
()
!=
null
)
{
orderPageVO
.
setStartCompanyName
(
startResponse
.
getData
().
getName
());
orderPageVO
.
setStartCompanyName
(
startResponse
.
getData
().
getName
());
}
}
List
<
Integer
>
tourUserIds
=
Arrays
.
asList
(
orderPageVO
.
getOrderTourDetail
().
getTourUserIds
().
split
(
","
)).
parallelStream
().
map
(
s
->
Integer
.
valueOf
(
s
.
trim
())).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isNotBlank
(
orderPageVO
.
getOrderTourDetail
().
getTourUserIds
()))
{
ObjectRestResponse
<
List
<
AppUserVo
>>
users
=
userFeign
.
getByUserIds
(
tourUserIds
);
List
<
TourUser
>
tourUsers
=
tourFeign
.
getTourUsers
(
orderPageVO
.
getOrderTourDetail
().
getTourUserIds
()).
getData
();
if
(
users
.
getData
()
!=
null
)
{
orderPageVO
.
getOrderTourDetail
().
setUserVoList
(
tourUsers
==
null
||
tourUsers
.
size
()
<=
0
?
new
ArrayList
<>()
:
tourUsers
);
orderPageVO
.
getOrderTourDetail
().
setUserVoList
(
users
.
getData
()
==
null
?
users
.
getData
()
:
new
ArrayList
<>());
}
}
}
}
...
...
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