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
6cb105d3
Commit
6cb105d3
authored
Oct 29, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-chw' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev-chw
parents
7038c739
486f7673
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
16 deletions
+73
-16
ShuntApply.java
.../main/java/com/xxfc/platform/order/entity/ShuntApply.java
+10
-0
RentVehicleBO.java
...ava/com/xxfc/platform/order/pojo/order/RentVehicleBO.java
+12
-0
VehicleItemDTO.java
...va/com/xxfc/platform/order/pojo/order/VehicleItemDTO.java
+23
-0
ShuntApplyController.java
...va/com/xxfc/platform/order/rest/ShuntApplyController.java
+24
-13
OrderRentVehicleService.java
.../xxfc/platform/order/service/OrderRentVehicleService.java
+4
-3
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/ShuntApply.java
View file @
6cb105d3
...
@@ -216,4 +216,14 @@ public class ShuntApply implements Serializable {
...
@@ -216,4 +216,14 @@ public class ShuntApply implements Serializable {
@Column
(
name
=
"goods_type"
)
@Column
(
name
=
"goods_type"
)
@ApiModelProperty
(
"商品类型 1--房车;2--机车;3--游艇"
)
@ApiModelProperty
(
"商品类型 1--房车;2--机车;3--游艇"
)
private
Integer
goodsType
;
private
Integer
goodsType
;
@Column
(
name
=
"brand_name"
)
@ApiModelProperty
(
"品牌名称"
)
private
Integer
brandName
;
@Column
(
name
=
"category_name"
)
@ApiModelProperty
(
"型号名称"
)
private
Integer
categoryName
;
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/RentVehicleBO.java
View file @
6cb105d3
...
@@ -90,10 +90,22 @@ public class RentVehicleBO extends OrderRentVehicleDetail implements OrderDetail
...
@@ -90,10 +90,22 @@ public class RentVehicleBO extends OrderRentVehicleDetail implements OrderDetail
*/
*/
private
String
endDateStr
;
private
String
endDateStr
;
/**
* 开始时间字符串
*/
private
String
startDateTimeStr
;
/**
* 结束时间字符串
*/
private
String
endDateTimeStr
;
public
void
initDate
()
{
public
void
initDate
()
{
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
.
endDateStr
=
DateUtil
.
formatDate
(
this
.
endDate
);
this
.
endDateStr
=
DateUtil
.
formatDate
(
this
.
endDate
);
this
.
startDateTimeStr
=
DateUtil
.
formatDateTime
(
this
.
startDate
);
this
.
endDateTimeStr
=
DateUtil
.
formatDateTime
(
this
.
endDate
);
}
}
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/VehicleItemDTO.java
View file @
6cb105d3
...
@@ -176,6 +176,29 @@ public class VehicleItemDTO extends OrderItem {
...
@@ -176,6 +176,29 @@ public class VehicleItemDTO extends OrderItem {
return
mapFreeDays
;
return
mapFreeDays
;
}
}
public
void
initDetail
()
{
if
(
StrUtil
.
isNotBlank
(
getDetail
()))
{
List
<
VehicleModelCalendarPriceDTO
>
metaList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
getDetail
()),
VehicleModelCalendarPriceDTO
.
class
);
//计算消费金额
List
<
VMCalendarPriceCostDTO
>
list
=
Convert
.
toList
(
VMCalendarPriceCostDTO
.
class
,
metaList
);
// ParamDTO paramDTO = initParam(ableFreeDays, list);
BigDecimal
tempUnitPrice
=
null
;
this
.
sameUnitPrice
=
1
;
for
(
VMCalendarPriceCostDTO
dto
:
list
)
{
if
(
null
==
tempUnitPrice
)
{
tempUnitPrice
=
dto
.
getPrice
();
}
else
if
(
!
tempUnitPrice
.
equals
(
dto
.
getPrice
()))
{
this
.
sameUnitPrice
=
0
;
}
//直接设置价格
dto
.
setFreeAndConsumeAmount
(
dto
.
getPrice
(),
BigDecimal
.
ZERO
);
}
setCutNum
(
0
);
setOffsetNum
(
0
);
setDetail
(
JSONUtil
.
parseArray
(
list
).
toString
());
}
}
public
void
initDetail
(
Integer
ableFreeDays
)
{
public
void
initDetail
(
Integer
ableFreeDays
)
{
if
(
StrUtil
.
isNotBlank
(
getDetail
()))
{
if
(
StrUtil
.
isNotBlank
(
getDetail
()))
{
List
<
VehicleModelCalendarPriceDTO
>
metaList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
getDetail
()),
VehicleModelCalendarPriceDTO
.
class
);
List
<
VehicleModelCalendarPriceDTO
>
metaList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
getDetail
()),
VehicleModelCalendarPriceDTO
.
class
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/ShuntApplyController.java
View file @
6cb105d3
...
@@ -28,6 +28,8 @@ import com.xxfc.platform.order.pojo.order.OrderPageVO;
...
@@ -28,6 +28,8 @@ import com.xxfc.platform.order.pojo.order.OrderPageVO;
import
com.xxfc.platform.order.pojo.order.RentVehicleBO
;
import
com.xxfc.platform.order.pojo.order.RentVehicleBO
;
import
com.xxfc.platform.order.pojo.order.add.AddRentVehicleDTO
;
import
com.xxfc.platform.order.pojo.order.add.AddRentVehicleDTO
;
import
com.xxfc.platform.order.service.OrderRentVehicleService
;
import
com.xxfc.platform.order.service.OrderRentVehicleService
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.VehicleBrand
;
import
com.xxfc.platform.vehicle.entity.VehicleCategory
;
import
com.xxfc.platform.vehicle.entity.VehicleCategory
;
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
;
...
@@ -93,6 +95,13 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -93,6 +95,13 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
if
(
null
!=
shuntApply
.
getEndCompanyId
())
{
if
(
null
!=
shuntApply
.
getEndCompanyId
())
{
shuntApply
.
setEndCityCode
(
vehicleFeign
.
getCompanyDetail
(
shuntApply
.
getEndCompanyId
()).
getData
().
getAddrCity
());
shuntApply
.
setEndCityCode
(
vehicleFeign
.
getCompanyDetail
(
shuntApply
.
getEndCompanyId
()).
getData
().
getAddrCity
());
}
}
// if(null != shuntApply.getCategoryId()) {
// VehicleCategory vehicleCategory = vehicleFeign.getVehicleCategory(shuntApply.getCategoryId()).getData();
// shuntApply.setCategoryName(vehicleCategory.getName());
// }else if{
//
// }
shuntApply
.
setUserId
(
getCurrentUserIdInt
());
shuntApply
.
setUserId
(
getCurrentUserIdInt
());
shuntApply
.
setStatus
(
STATUS_CRT
);
shuntApply
.
setStatus
(
STATUS_CRT
);
return
add
(
shuntApply
);
return
add
(
shuntApply
);
...
@@ -134,11 +143,11 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -134,11 +143,11 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
w
.
andEqualTo
(
ShuntApply:
:
getUserId
,
dto
.
getUserId
());
w
.
andEqualTo
(
ShuntApply:
:
getUserId
,
dto
.
getUserId
());
return
w
;
return
w
;
},
" crt_time desc "
),
ShuntApplyVO
.
class
);
},
" crt_time desc "
),
ShuntApplyVO
.
class
);
pages
.
getData
().
forEach
(
data
->
{
//
pages.getData().forEach(data -> {
if
(
null
!=
data
.
getCategoryId
())
{
//
if(null != data.getCategoryId()) {
data
.
setVehicleCategory
(
vehicleFeign
.
getVehicleCategory
(
data
.
getCategoryId
()).
getData
());
//
data.setVehicleCategory(vehicleFeign.getVehicleCategory(data.getCategoryId()).getData());
}
//
}
});
//
});
return
ObjectRestResponse
.
succ
(
pages
);
return
ObjectRestResponse
.
succ
(
pages
);
}
}
...
@@ -193,6 +202,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -193,6 +202,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
// VehicleModel vehicleModel;
// VehicleModel vehicleModel;
OrderPageVO
orderPageVO
;
OrderPageVO
orderPageVO
;
VehicleCategory
vehicleCategory
;
VehicleCategory
vehicleCategory
;
VehicleBrand
vehicleBrand
;
}
}
@Data
@Data
...
@@ -222,11 +232,11 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -222,11 +232,11 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
return
w
;
return
w
;
},
" crt_time desc "
),
StewardShuntApply
.
class
);
},
" crt_time desc "
),
StewardShuntApply
.
class
);
list
.
getData
().
forEach
(
data
->
{
//
list.getData().forEach(data -> {
if
(
null
!=
data
.
getCategoryId
())
{
//
if(null != data.getCategoryId()) {
data
.
setVehicleCategory
(
vehicleFeign
.
getVehicleCategory
(
data
.
getCategoryId
()).
getData
());
//
data.setVehicleCategory(vehicleFeign.getVehicleCategory(data.getCategoryId()).getData());
}
//
}
});
//
});
return
ObjectRestResponse
.
succ
(
list
);
return
ObjectRestResponse
.
succ
(
list
);
}
}
...
@@ -352,9 +362,9 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -352,9 +362,9 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
}),
ShuntApplyController
.
ShuntApplyVO
.
class
);
}),
ShuntApplyController
.
ShuntApplyVO
.
class
);
pages
.
getData
().
forEach
(
data
->
{
pages
.
getData
().
forEach
(
data
->
{
if
(
null
!=
data
.
getCategoryId
())
{
//
if(null != data.getCategoryId()) {
data
.
setVehicleCategory
(
vehicleFeign
.
getVehicleCategory
(
data
.
getCategoryId
()).
getData
());
//
data.setVehicleCategory(vehicleFeign.getVehicleCategory(data.getCategoryId()).getData());
}
//
}
if
(
StrUtil
.
isNotBlank
(
data
.
getOrderNo
()))
{
if
(
StrUtil
.
isNotBlank
(
data
.
getOrderNo
()))
{
Map
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
();
Map
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
();
...
@@ -390,5 +400,6 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -390,5 +400,6 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
public
static
class
StewardShuntApply
extends
ShuntApply
{
public
static
class
StewardShuntApply
extends
ShuntApply
{
List
<
UsableVeicleVO
>
vehicles
;
List
<
UsableVeicleVO
>
vehicles
;
VehicleCategory
vehicleCategory
;
VehicleCategory
vehicleCategory
;
VehicleBrand
vehicleBrand
;
}
}
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderRentVehicleService.java
View file @
6cb105d3
...
@@ -216,9 +216,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -216,9 +216,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
bo
.
getOrder
().
setStatus
(
OrderStatusEnum
.
ORDER_UNPAY
.
getCode
());
bo
.
getOrder
().
setStatus
(
OrderStatusEnum
.
ORDER_UNPAY
.
getCode
());
//设置订单图片
//设置订单图片
bo
.
getOrder
().
setPicture
(
StrUtil
.
isNotBlank
(
bo
.
getVehicle
Model
().
getCoverPic
())?
bo
.
getVehicleModel
().
getCoverPic
():
bo
.
getVehicleModel
().
getPicture
());
bo
.
getOrder
().
setPicture
(
StrUtil
.
isNotBlank
(
bo
.
getVehicle
().
getCover
())?
bo
.
getVehicle
().
getCover
():
bo
.
getVehicle
().
getPicture
());
//设置订单名称
//设置订单名称
bo
.
getOrder
().
setName
(
bo
.
getVehicle
Model
().
getName
());
bo
.
getOrder
().
setName
(
bo
.
getVehicle
().
getName
());
//分布式事务执行标记
//分布式事务执行标记
Integer
cloudTransact
=
0
;
Integer
cloudTransact
=
0
;
...
@@ -626,7 +626,8 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
...
@@ -626,7 +626,8 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
// vmcpds = vehicleOrderItem.getVehicleDetail();
// vmcpds = vehicleOrderItem.getVehicleDetail();
// detail.setFreeDays(freeDayNum);
// detail.setFreeDays(freeDayNum);
vehicleOrderItem
.
initDetail
(
0
);
vehicleOrderItem
.
initDetail
();
vmcpds
=
vehicleOrderItem
.
getVehicleDetail
();
vehicleHourNum
=
detail
.
getHourNum
();
vehicleHourNum
=
detail
.
getHourNum
();
//计算价格
//计算价格
...
...
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