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
3923fb1b
Commit
3923fb1b
authored
Aug 22, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jrz_dev' into base-modify
parents
265c3356
4ee0c367
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
367 additions
and
35 deletions
+367
-35
CommonConstants.java
...hub/wxiaoqi/security/common/constant/CommonConstants.java
+6
-0
CommonLogServiceImpl.java
...xiaoqi/security/common/log/Impl/CommonLogServiceImpl.java
+3
-3
BaseUserMemberVO.java
...m/github/wxiaoqi/security/admin/dto/BaseUserMemberVO.java
+3
-0
BaseUserMemberController.java
...wxiaoqi/security/admin/rest/BaseUserMemberController.java
+1
-1
BaseUserMemberMapper.xml
...-admin/src/main/resources/mapper/BaseUserMemberMapper.xml
+5
-5
OrderRefundBiz.java
...main/java/com/xxfc/platform/order/biz/OrderRefundBiz.java
+1
-1
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+1
-0
bootstrap.yml
xx-order/xx-order-server/src/main/resources/bootstrap.yml
+1
-1
TourVerificationInfoVo.java
...ava/com/xxfc/platform/tour/vo/TourVerificationInfoVo.java
+64
-0
TourGoodVerificationBiz.java
...a/com/xxfc/platform/tour/biz/TourGoodVerificationBiz.java
+41
-0
TourGoodVerificationMapper.java
...xxfc/platform/tour/mapper/TourGoodVerificationMapper.java
+13
-0
TourGoodVerificationController.java
...fc/platform/tour/rest/TourGoodVerificationController.java
+3
-0
TourVerificationController.java
...m/xxfc/platform/tour/rest/TourVerificationController.java
+53
-0
TourGoodVerificationMapper.xml
.../src/main/resources/mapper/TourGoodVerificationMapper.xml
+95
-0
ResCode.java
...a/com/xxfc/platform/vehicle/constant/ResCode/ResCode.java
+1
-0
VehicleBookRecord.java
...a/com/xxfc/platform/vehicle/entity/VehicleBookRecord.java
+1
-1
RentVehicleBookDTO.java
...va/com/xxfc/platform/vehicle/pojo/RentVehicleBookDTO.java
+38
-3
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+31
-16
VehicleBookHourInfoBiz.java
...com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
+2
-2
RentVehicleController.java
...com/xxfc/platform/vehicle/rest/RentVehicleController.java
+2
-0
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+2
-2
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/CommonConstants.java
View file @
3923fb1b
package
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
;
package
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
;
import
java.time.format.DateTimeFormatter
;
/**
/**
* Created by ace on 2017/8/29.
* Created by ace on 2017/8/29.
*/
*/
...
@@ -39,4 +41,8 @@ public class CommonConstants {
...
@@ -39,4 +41,8 @@ public class CommonConstants {
public
static
final
String
LONG_TIME
=
"HHmmss"
;
public
static
final
String
LONG_TIME
=
"HHmmss"
;
public
static
final
String
SHORT_TIME
=
"HHmm"
;
public
static
final
String
SHORT_TIME
=
"HHmm"
;
public
static
final
String
DATE_TIME_LINE
=
"yyyy-MM-dd HH:mm:ss"
;
public
static
final
String
DATE_TIME_LINE
=
"yyyy-MM-dd HH:mm:ss"
;
public
static
final
DateTimeFormatter
DATE_TIME_LINE_FORMATTER
=
DateTimeFormatter
.
ofPattern
(
DATE_TIME_LINE
);
public
static
final
DateTimeFormatter
YMR_SLASH_FORMATTER
=
DateTimeFormatter
.
ofPattern
(
YMR_SLASH
);
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/log/Impl/CommonLogServiceImpl.java
View file @
3923fb1b
...
@@ -88,9 +88,9 @@ public class CommonLogServiceImpl implements CommonLogService {
...
@@ -88,9 +88,9 @@ public class CommonLogServiceImpl implements CommonLogService {
}
}
@Override
@Override
public
void
run
()
{
public
void
run
()
{
if
(!
xxLogEntity
.
getServletPath
().
contains
(
"/vehicleInfo/app/unauth/getVehiclePlanList"
))
{
//
if(!xxLogEntity.getServletPath().contains("/vehicleInfo/app/unauth/getVehiclePlanList")) {
log
.
info
(
"用户请求信息:xxLogEntity = {}"
,
xxLogEntity
.
toString
());
//
log.info("用户请求信息:xxLogEntity = {}", xxLogEntity.toString());
}
//
}
mongoTemplate
.
insert
(
xxLogEntity
,
xxLogEntity
.
getMongoKey
());
mongoTemplate
.
insert
(
xxLogEntity
,
xxLogEntity
.
getMongoKey
());
}
}
}
}
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/BaseUserMemberVO.java
View file @
3923fb1b
...
@@ -77,4 +77,7 @@ public class BaseUserMemberVO implements Serializable {
...
@@ -77,4 +77,7 @@ public class BaseUserMemberVO implements Serializable {
@Column
(
name
=
"member_name"
)
@Column
(
name
=
"member_name"
)
private
String
memberName
;
private
String
memberName
;
private
Integer
discount
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/BaseUserMemberController.java
View file @
3923fb1b
...
@@ -39,7 +39,7 @@ public class BaseUserMemberController extends BaseController<BaseUserMemberBiz,
...
@@ -39,7 +39,7 @@ public class BaseUserMemberController extends BaseController<BaseUserMemberBiz,
*/
*/
@ApiOperation
(
value
=
"根据用户id获取用户会员信息"
)
@ApiOperation
(
value
=
"根据用户id获取用户会员信息"
)
@GetMapping
(
"/findOne/{userId}"
)
@GetMapping
(
"/findOne/{userId}"
)
public
ObjectRestResponse
<
BaseUserMemberVO
>
findOneByUserId
(
@PathVariable
Integer
userId
){
public
ObjectRestResponse
<
BaseUserMemberVO
>
findOneByUserId
(
@PathVariable
Integer
userId
)
throws
Exception
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
findOneByUserId
(
userId
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
findOneByUserId
(
userId
));
}
}
...
...
ace-modules/ace-admin/src/main/resources/mapper/BaseUserMemberMapper.xml
View file @
3923fb1b
...
@@ -37,7 +37,8 @@
...
@@ -37,7 +37,8 @@
m.total_number as totalNumber,
m.total_number as totalNumber,
m.buy_count as buyCount,
m.buy_count as buyCount,
m.valid_time as validTime,
m.valid_time as validTime,
m.member_name as `memberName`,
m.member_name as memberName,
m.discount as discount,
ml.name as name
ml.name as name
from
from
base_user_member m
base_user_member m
...
@@ -46,10 +47,9 @@
...
@@ -46,10 +47,9 @@
on
on
m.member_level =ml.level
m.member_level =ml.level
where
where
m.user_id=#{userId}
m.user_id=#{userId}
and
and
m.is_del=0
m.is_del=0
limit 1
limit 1
</select>
</select>
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderRefundBiz.java
View file @
3923fb1b
...
@@ -85,7 +85,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
...
@@ -85,7 +85,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
//判断是否定损过
//判断是否定损过
if
(
SYS_TRUE
.
equals
(
orderMQDTO
.
getOrderRentVehicleDetail
().
getFixedLossStatus
()))
{
if
(
SYS_TRUE
.
equals
(
orderMQDTO
.
getOrderRentVehicleDetail
().
getFixedLossStatus
()))
{
crosstownTypeEnum
=
CrosstownTypeEnum
.
FIXED_LOSS
.
getCode
();
crosstownTypeEnum
=
CrosstownTypeEnum
.
FIXED_LOSS
.
getCode
();
depositRefundRecordStatus
=
DepositRefundStatus
.
FIXLOSSREFUND
;
depositRefundRecordStatus
=
DepositRefundStatus
.
FIXLOSSREFUND
ARRIVAL
;
}
else
{
}
else
{
crosstownTypeEnum
=
CrosstownTypeEnum
.
ARRIVE
.
getCode
();
crosstownTypeEnum
=
CrosstownTypeEnum
.
ARRIVE
.
getCode
();
depositRefundRecordStatus
=
DepositRefundStatus
.
REFUNDARRIVAL
;
depositRefundRecordStatus
=
DepositRefundStatus
.
REFUNDARRIVAL
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
3923fb1b
...
@@ -320,6 +320,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -320,6 +320,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
depositRefundRecord
.
setTotalAmount
(
totalAmount
.
subtract
(
getAmount
()));
depositRefundRecord
.
setTotalAmount
(
totalAmount
.
subtract
(
getAmount
()));
depositRefundRecord
.
setCrosstownId
(
orderVehicleCrosstown
.
getId
());
depositRefundRecord
.
setCrosstownId
(
orderVehicleCrosstown
.
getId
());
orderDepositRefundRecordBiz
.
saveFixLossRecord
(
depositRefundRecord
);
orderDepositRefundRecordBiz
.
saveFixLossRecord
(
depositRefundRecord
);
//修改訂單狀態為定損
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FIXED_LOSS
.
getCode
());
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FIXED_LOSS
.
getCode
());
baseOrderBiz
.
updateSelectiveByIdReT
(
baseOrder
);
baseOrderBiz
.
updateSelectiveByIdReT
(
baseOrder
);
orderRentVehicleDetail
.
setFixedLossStatus
(
1
);
orderRentVehicleDetail
.
setFixedLossStatus
(
1
);
...
...
xx-order/xx-order-server/src/main/resources/bootstrap.yml
View file @
3923fb1b
...
@@ -13,7 +13,7 @@ spring:
...
@@ -13,7 +13,7 @@ spring:
cloud
:
cloud
:
nacos
:
nacos
:
config
:
config
:
server-addr
:
127.0.0.1:8848
server-addr
:
127.0.0.1:8848
, 10.1.37.166:8848
#共用配置,+ mongodb日志配置
#共用配置,+ mongodb日志配置
shared-dataids
:
common-dev.yaml,mongodb-log-dev.yaml
shared-dataids
:
common-dev.yaml,mongodb-log-dev.yaml
...
...
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/vo/TourVerificationInfoVo.java
0 → 100644
View file @
3923fb1b
package
com
.
xxfc
.
platform
.
tour
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* 旅游商品
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Data
public
class
TourVerificationInfoVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"旅游线路核销id"
)
private
Integer
verificationId
;
@ApiModelProperty
(
value
=
"旅游商品规格id"
)
private
Integer
speId
;
@ApiModelProperty
(
value
=
"开始时间"
)
private
Date
startTime
;
//结束时间
@ApiModelProperty
(
value
=
"结束时间"
)
private
Date
endTime
;
@ApiModelProperty
(
value
=
"时间区间"
)
private
String
time
;
@ApiModelProperty
(
value
=
"出发路线id"
)
private
Integer
siteId
;
@ApiModelProperty
(
value
=
"出发路线名称"
)
private
String
siteName
;
@ApiModelProperty
(
value
=
"出发路线分公司id"
)
private
Integer
companyId
;
@ApiModelProperty
(
value
=
"旅游路线id"
)
private
Integer
goodId
;
@ApiModelProperty
(
value
=
"旅游路线名称"
)
private
String
goodName
;
@ApiModelProperty
(
value
=
"出发路线分公司ids"
)
private
List
<
Integer
>
companyList
;
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodVerificationBiz.java
View file @
3923fb1b
package
com
.
xxfc
.
platform
.
tour
.
biz
;
package
com
.
xxfc
.
platform
.
tour
.
biz
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.tour.vo.TourGoodOrderFindVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderFindVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderVo
;
import
com.xxfc.platform.tour.vo.TourVerificationInfoVo
;
import
org.omg.CORBA.PUBLIC_MEMBER
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.tour.entity.TourGoodVerification
;
import
com.xxfc.platform.tour.entity.TourGoodVerification
;
import
com.xxfc.platform.tour.mapper.TourGoodVerificationMapper
;
import
com.xxfc.platform.tour.mapper.TourGoodVerificationMapper
;
...
@@ -90,4 +93,42 @@ public class TourGoodVerificationBiz extends BaseBiz<TourGoodVerificationMapper,
...
@@ -90,4 +93,42 @@ public class TourGoodVerificationBiz extends BaseBiz<TourGoodVerificationMapper,
TourGoodVerification
verfication
=
mapper
.
selectByPrimaryKey
(
tourGoodVerification
);
TourGoodVerification
verfication
=
mapper
.
selectByPrimaryKey
(
tourGoodVerification
);
return
verfication
.
getStatus
();
return
verfication
.
getStatus
();
}
}
//获取路线核销id
public
ObjectRestResponse
getVerificationList
(
TourVerificationInfoVo
tourVerificationInfoVo
){
Integer
companyId
=
tourVerificationInfoVo
.
getCompanyId
();
Integer
goodId
=
tourVerificationInfoVo
.
getGoodId
();
Integer
siteId
=
tourVerificationInfoVo
.
getSiteId
();
List
<
Integer
>
companyIds
=
tourVerificationInfoVo
.
getCompanyList
();
List
<
TourVerificationInfoVo
>
list
=
null
;
if
(
goodId
==
null
||
goodId
==
0
){
if
(
companyId
!=
null
&&
companyId
!=
0
){
list
=
mapper
.
getSiteList
(
null
,
companyId
,
null
);
if
(
list
.
size
()==
0
){
return
ObjectRestResponse
.
succ
();
}
}
else
if
(
companyIds
!=
null
&&
companyIds
.
size
()>
0
){
list
=
mapper
.
getSiteList
(
null
,
null
,
companyIds
);
}
list
=
mapper
.
getGoodList
(
list
);
}
else
{
if
(
siteId
==
null
||
siteId
==
0
){
if
(
companyId
==
null
||
companyId
==
0
){
list
=
mapper
.
getSiteList
(
goodId
,
null
,
companyIds
);
}
else
{
list
=
mapper
.
getSpeList
(
goodId
,
null
,
companyId
);
}
}
else
{
list
=
mapper
.
getSpeList
(
goodId
,
siteId
,
null
);
}
}
return
ObjectRestResponse
.
succ
(
list
);
}
//获取路线核销信息
public
ObjectRestResponse
getVerification
(
Integer
verificationId
){
return
ObjectRestResponse
.
succ
(
mapper
.
getVerification
(
verificationId
));
}
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourGoodVerificationMapper.java
View file @
3923fb1b
...
@@ -4,6 +4,7 @@ package com.xxfc.platform.tour.mapper;
...
@@ -4,6 +4,7 @@ package com.xxfc.platform.tour.mapper;
import
com.xxfc.platform.tour.entity.TourGoodVerification
;
import
com.xxfc.platform.tour.entity.TourGoodVerification
;
import
com.xxfc.platform.tour.vo.TourGoodOrderFindVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderFindVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderVo
;
import
com.xxfc.platform.tour.vo.TourVerificationInfoVo
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Update
;
import
org.apache.ibatis.annotations.Update
;
...
@@ -55,4 +56,16 @@ public interface TourGoodVerificationMapper extends Mapper<TourGoodVerification>
...
@@ -55,4 +56,16 @@ public interface TourGoodVerificationMapper extends Mapper<TourGoodVerification>
* @return
* @return
*/
*/
List
<
TourGoodOrderVo
>
findVerificationAll
(
TourGoodOrderFindVo
tourGoodOrderFindVo
);
List
<
TourGoodOrderVo
>
findVerificationAll
(
TourGoodOrderFindVo
tourGoodOrderFindVo
);
//获取旅游路线
List
<
TourVerificationInfoVo
>
getGoodList
(
@Param
(
"list"
)
List
<
TourVerificationInfoVo
>
list
);
//获取路线id列表
List
<
TourVerificationInfoVo
>
getSiteList
(
@Param
(
"goodId"
)
Integer
goodId
,
@Param
(
"companyId"
)
Integer
companyId
,
@Param
(
"companyList"
)
List
<
Integer
>
companyIds
);
//获取时间列表
List
<
TourVerificationInfoVo
>
getSpeList
(
@Param
(
"goodId"
)
Integer
goodId
,
@Param
(
"siteId"
)
Integer
siteId
,
@Param
(
"companyId"
)
Integer
companyId
);
//获取核销路线信息
TourVerificationInfoVo
getVerification
(
@Param
(
"verificationId"
)
Integer
verificationId
);
}
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodVerificationController.java
View file @
3923fb1b
...
@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.*;
...
@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping
(
"/tourGood/verfication"
)
@RequestMapping
(
"/tourGood/verfication"
)
@IgnoreClientToken
@IgnoreClientToken
public
class
TourGoodVerificationController
extends
BaseController
<
TourGoodVerificationBiz
,
TourGoodVerification
>
{
public
class
TourGoodVerificationController
extends
BaseController
<
TourGoodVerificationBiz
,
TourGoodVerification
>
{
/**
/**
* 查询订单列表
* 查询订单列表
* @param tourGoodOrderFindVo
* @param tourGoodOrderFindVo
...
@@ -67,4 +69,5 @@ public class TourGoodVerificationController extends BaseController<TourGoodVerif
...
@@ -67,4 +69,5 @@ public class TourGoodVerificationController extends BaseController<TourGoodVerif
public
Integer
selectDepartureStatusByVerificationId
(
@RequestParam
(
value
=
"verificationId"
)
Integer
verificationId
){
public
Integer
selectDepartureStatusByVerificationId
(
@RequestParam
(
value
=
"verificationId"
)
Integer
verificationId
){
return
baseBiz
.
selectDepartureStatusByVerificationId
(
verificationId
);
return
baseBiz
.
selectDepartureStatusByVerificationId
(
verificationId
);
}
}
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourVerificationController.java
0 → 100644
View file @
3923fb1b
package
com
.
xxfc
.
platform
.
tour
.
rest
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.tour.biz.TourGoodVerificationBiz
;
import
com.xxfc.platform.tour.common.TourBaseController
;
import
com.xxfc.platform.tour.vo.TourGoodOrderFindVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderVo
;
import
com.xxfc.platform.tour.vo.TourVerificationInfoVo
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
com
.
github
.
wxiaoqi
.
security
.
auth
.
common
.
constatns
.
CommonConstants
.
DATA_ALL_FALSE
;
@RestController
@RequestMapping
(
"/verfication"
)
@IgnoreClientToken
public
class
TourVerificationController
extends
TourBaseController
<
TourGoodVerificationBiz
>
{
@Autowired
VehicleFeign
vehicleFeign
;
@GetMapping
(
"/getList"
)
public
ObjectRestResponse
getList
(
TourVerificationInfoVo
tourVerificationInfoVo
){
Integer
companyId
=
tourVerificationInfoVo
.
getCompanyId
();
if
(
companyId
==
null
){
UserDTO
userDTO
=
userinfoByToken
();
if
(
userDTO
!=
null
&&
DATA_ALL_FALSE
.
equals
(
userDTO
.
getDataAll
()))
{
List
<
BranchCompany
>
companyList
=
vehicleFeign
.
companyAll
(
userDTO
.
getDataAll
(),
userDTO
.
getDataCompany
(),
userDTO
.
getDataZone
());
if
(
companyList
.
size
()>
0
){
List
<
Integer
>
companyIds
=
companyList
.
stream
().
map
(
BranchCompany:
:
getId
).
collect
(
Collectors
.
toList
());
tourVerificationInfoVo
.
setCompanyList
(
companyIds
);
}
}
}
return
baseBiz
.
getVerificationList
(
tourVerificationInfoVo
);
}
@GetMapping
(
"/info/{id}"
)
public
ObjectRestResponse
getList
(
@PathVariable
Integer
id
){
return
baseBiz
.
getVerification
(
id
);
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodVerificationMapper.xml
View file @
3923fb1b
...
@@ -38,4 +38,99 @@
...
@@ -38,4 +38,99 @@
LEFT JOIN tour_good_spe_price p ON v.spe_id=p.id
LEFT JOIN tour_good_spe_price p ON v.spe_id=p.id
WHERE s.company_id=#{companyId} and v.status=#{orderStatus} and p.start_time=#{travelDate} ORDER BY s.depart_time ) as `goodOrder`
WHERE s.company_id=#{companyId} and v.status=#{orderStatus} and p.start_time=#{travelDate} ORDER BY s.depart_time ) as `goodOrder`
</select>
</select>
<!-- 获取旅游路线id-->
<select
id=
"getGoodList"
resultType=
"com.xxfc.platform.tour.vo.TourVerificationInfoVo"
>
SELECT
v.good_id as goodId,
g.`name` as goodName
FROM
tour_good_verification v
LEFT JOIN tour_good g ON v.good_id = g.id
WHERE
v.is_del = 0
<if
test=
"list!=null and list.size != 0"
>
and v.site_id in (
<trim
suffixOverrides=
","
>
<foreach
collection=
"list"
item=
"item"
>
#{item.siteId},
</foreach>
</trim>
)
</if>
GROUP BY
v.good_id
</select>
<!--获取路线id-->
<select
id=
"getSiteList"
resultType=
"com.xxfc.platform.tour.vo.TourVerificationInfoVo"
>
SELECT
id as siteId,
name as siteName,
company_id as companyId
FROM tour_good_site
WHERE is_del=0
and type=0
<if
test=
"goodId!=null and goodId!='' "
>
and good_id=#{goodId}
</if>
<if
test=
"companyId!=null and companyId!='' "
>
and company_id=#{companyId}
</if>
<if
test=
"companyList!=null and companyList.size != 0"
>
and company_id in (
<trim
suffixOverrides=
","
>
<foreach
collection=
"companyList"
item=
"id"
>
#{id},
</foreach>
</trim>
)
</if>
order by rank desc
</select>
<!--获取时间-->
<select
id=
"getSpeList"
resultType=
"com.xxfc.platform.tour.vo.TourVerificationInfoVo"
>
SELECT
DISTINCT
v.id as verificationId,
v.spe_id as speId,
p.start_time as startTime,
p.end_time as endTime,
CONCAT(date_format(p.start_time,'%Y-%m-%d'), '~', date_format(p.end_time, '%Y-%m-%d')) as time
FROM
tour_good_verification v
LEFT JOIN tour_good_site s on v.site_id=s.id
LEFT JOIN tour_good_spe_price p ON v.spe_id=p.id
WHERE
v.is_del = 0 and v.good_id=#{goodId} and DATEDIFF(p.start_time,NOW())>0
<if
test=
"siteId!=null and siteId!='' "
>
and v.site_id=#{siteId}
</if>
<if
test=
"companyId!=null and companyId!='' "
>
and s.company_id=#{companyId}
</if>
ORDER BY
p.start_time
</select>
<!--获取核销信息-->
<select
id=
"getVerification"
resultType=
"com.xxfc.platform.tour.vo.TourVerificationInfoVo"
>
SELECT
DISTINCT
v.id as verificationId,
v.spe_id as speId,
p.start_time as startTime,
p.end_time as endTime,
CONCAT(date_format(p.start_time,'%Y-%m-%d'), '~', date_format(p.end_time, '%Y-%m-%d')) as time,
s.id as siteId,
s.name as siteName,
s.company_id as companyId,
v.good_id as goodId,
g.`name` as goodName
FROM
tour_good_verification v
LEFT JOIN tour_good_site s on v.site_id=s.id
LEFT JOIN tour_good_spe_price p ON v.spe_id=p.id
LEFT JOIN tour_good g ON v.good_id=g.id
WHERE v.id=#{verificationId}
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/constant/ResCode/ResCode.java
View file @
3923fb1b
...
@@ -23,6 +23,7 @@ public enum ResCode {
...
@@ -23,6 +23,7 @@ public enum ResCode {
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
(
103001
,
"车辆预定申请已被审批"
),
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
(
103001
,
"车辆预定申请已被审批"
),
VEHICLE_BOOKED_RECORD_STATUS_CHANGED
(
103002
,
"车辆预定申请状态已变更"
),
VEHICLE_BOOKED_RECORD_STATUS_CHANGED
(
103002
,
"车辆预定申请状态已变更"
),
VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED
(
103003
,
"请输入仪表盘内当前显示的公里数"
),
VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED
(
103003
,
"请输入仪表盘内当前显示的公里数"
),
VEHICLE_BOOKED_RECORD_NOT_EXIST
(
103004
,
"预定记录不存在"
),
CHECKUSER_AND_PHONE_NOT_NULL
(
103999
,
"收车或交车人姓名和电话不能为空"
),
CHECKUSER_AND_PHONE_NOT_NULL
(
103999
,
"收车或交车人姓名和电话不能为空"
),
USERNAME_AND_TELE_NOT_NULL
(
104000
,
"使用人和电话不能为空"
),
USERNAME_AND_TELE_NOT_NULL
(
104000
,
"使用人和电话不能为空"
),
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehicleBookRecord.java
View file @
3923fb1b
...
@@ -176,7 +176,7 @@ public class VehicleBookRecord {
...
@@ -176,7 +176,7 @@ public class VehicleBookRecord {
private
Integer
haveViolation
;
private
Integer
haveViolation
;
/**
/**
*
订单号
*
租车订单号或者旅游路线id
*/
*/
private
String
orderNo
;
private
String
orderNo
;
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/RentVehicleBookDTO.java
View file @
3923fb1b
...
@@ -4,9 +4,16 @@ import com.github.wxiaoqi.security.common.vo.PageParam;
...
@@ -4,9 +4,16 @@ import com.github.wxiaoqi.security.common.vo.PageParam;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.time.Instant
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.ZoneOffset
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
DATE_TIME_LINE_FORMATTER
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
YMR_SLASH_FORMATTER
;
@Data
@Data
public
class
RentVehicleBookDTO
extends
PageParam
{
public
class
RentVehicleBookDTO
extends
PageParam
{
//根据车型、时间、距离,门店,预定车辆
//根据车型、时间、距离,门店,预定车辆
...
@@ -57,9 +64,6 @@ public class RentVehicleBookDTO extends PageParam {
...
@@ -57,9 +64,6 @@ public class RentVehicleBookDTO extends PageParam {
@ApiModelProperty
(
"订单号"
)
@ApiModelProperty
(
"订单号"
)
private
String
orderNo
;
private
String
orderNo
;
@ApiModelProperty
(
"停靠公司id"
)
Integer
parkBranchCompanyId
;
@ApiModelProperty
(
"指定车牌"
)
@ApiModelProperty
(
"指定车牌"
)
String
numberPlate
;
String
numberPlate
;
...
@@ -71,4 +75,35 @@ public class RentVehicleBookDTO extends PageParam {
...
@@ -71,4 +75,35 @@ public class RentVehicleBookDTO extends PageParam {
*/
*/
@ApiModelProperty
(
"随车物品id以及数量 List<Map<id,数量>>"
)
@ApiModelProperty
(
"随车物品id以及数量 List<Map<id,数量>>"
)
Map
<
Integer
,
Integer
>
selectedAccItem
;
Map
<
Integer
,
Integer
>
selectedAccItem
;
@ApiModelProperty
(
"停靠公司id"
)
Integer
parkBranchCompanyId
;
@ApiModelProperty
(
"开始公司id"
)
Integer
startCompanyId
;
@ApiModelProperty
(
"结束公司id"
)
Integer
endCompanyId
;
@ApiModelProperty
(
"扩展开始时间"
)
String
startDateExtend
;
@ApiModelProperty
(
"扩展结束时间"
)
String
endDateExtend
;
public
void
setBookStartDate
(
String
bookStartDate
)
{
this
.
bookStartDate
=
bookStartDate
;
//首次设置
if
(
null
==
this
.
startDateExtend
)
{
this
.
startDateExtend
=
YMR_SLASH_FORMATTER
.
format
(
LocalDate
.
parse
(
bookStartDate
,
YMR_SLASH_FORMATTER
).
minusDays
(
1L
));
}
}
public
void
setBookEndDate
(
String
bookEndDate
)
{
this
.
bookEndDate
=
bookEndDate
;
//首次设置
if
(
null
==
this
.
endDateExtend
)
{
this
.
endDateExtend
=
YMR_SLASH_FORMATTER
.
format
(
LocalDate
.
parse
(
bookEndDate
,
YMR_SLASH_FORMATTER
).
plusDays
(
1L
));
}
}
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
3923fb1b
...
@@ -458,9 +458,18 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -458,9 +458,18 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
vehicleBookRecordBiz
.
save
(
vehicleBookRecord
);
vehicleBookRecordBiz
.
save
(
vehicleBookRecord
);
}
else
{
}
else
{
vehicleBookRecord
=
vehicleBookRecordBiz
.
selectById
(
bookVehicleVo
.
getVehicleBookRecordId
());
vehicleBookRecord
=
vehicleBookRecordBiz
.
selectById
(
bookVehicleVo
.
getVehicleBookRecordId
());
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
if
(
vehicleBookRecord
==
null
)
{
vehicleBookRecord
.
setBookEndDate
(
endDay
.
toDate
());
throw
new
BaseException
(
ResCode
.
VEHICLE_BOOKED_RECORD_NOT_EXIST
.
getDesc
(),
ResCode
.
VEHICLE_BOOKED_RECORD_NOT_EXIST
.
getCode
());
vehicleBookRecordBiz
.
updateSelectiveByIdRe
(
vehicleBookRecord
);
}
else
{
//先取消预定,然后再修改
bookVehicleVo
.
setUnbookStartDate
(
bookVehicleVo
.
getBookStartDate
());
bookVehicleVo
.
setUnbookEndDate
(
bookVehicleVo
.
getBookEndDate
());
unbookVehicle
(
bookVehicleVo
);
vehicleBookRecord
.
setBookStartDate
(
startDay
.
toDate
());
vehicleBookRecord
.
setBookEndDate
(
endDay
.
toDate
());
vehicleBookRecordBiz
.
updateSelectiveByIdRe
(
vehicleBookRecord
);
}
}
}
// //添加预定时间记录
// //添加预定时间记录
...
@@ -510,9 +519,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -510,9 +519,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
Integer
andOperationFactor
=
andOpratorParam
.
get
(
"andOperationFactor"
);
Integer
andOperationFactor
=
andOpratorParam
.
get
(
"andOperationFactor"
);
Integer
andOperationRs
=
andOpratorParam
.
get
(
"andOperationRs"
);
Integer
andOperationRs
=
andOpratorParam
.
get
(
"andOperationRs"
);
if
(
vehicleBookInfo
!=
null
&&
vehicleBookInfo
.
getBookedDate
()
!=
null
&&
if
(
vehicleBookInfo
!=
null
&&
vehicleBookInfo
.
getBookedDate
()
!=
null
&&
((
vehicleBookInfo
.
getBookedDate
()
&
andOperationFactor
)
!=
andOperationRs
)){
((
vehicleBookInfo
.
getBookedDate
()
&
andOperationFactor
)
!=
andOperationRs
)){
//已经被预定
//当天已经被预定检查小时是否也被预定
//当天已经被预定检查小时是否也被预定
return
filterHourInfoBooked
(
vehicleId
,
hourInfo
);
return
filterHourInfoBooked
(
vehicleId
,
hourInfo
);
}
else
if
((
vehicleBookInfo
.
getBookedDate
()
&
andOperationFactor
)
==
0
){
//未被预定,查看时间是否被预定
return
filterHourInfoBooked
(
vehicleId
,
hourInfo
);
}
}
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
@@ -787,13 +798,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -787,13 +798,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
stringBuilder
.
append
(
"保养"
);
stringBuilder
.
append
(
"保养"
);
break
;
break
;
}
}
//
List<VehicleBookRecordVo> vehicleBookRecordVos = vehicleBookRecordBiz.selectByVehicleId(vehicleId);
List
<
VehicleBookRecordVo
>
vehicleBookRecordVos
=
vehicleBookRecordBiz
.
selectByVehicleId
(
vehicleId
);
//
if(vehicleBookRecordVos != null && vehicleBookRecordVos.size() > 0) {
if
(
vehicleBookRecordVos
!=
null
&&
vehicleBookRecordVos
.
size
()
>
0
)
{
//
stringBuilder.append("中,使用人:");
stringBuilder
.
append
(
"中,使用人:"
);
//
stringBuilder.append(vehicleBookRecordVos.get(0).getVehicleUsername());
stringBuilder
.
append
(
vehicleBookRecordVos
.
get
(
0
).
getVehicleUsername
());
//
stringBuilder.append(" 使用人电话:");
stringBuilder
.
append
(
" 使用人电话:"
);
//
stringBuilder.append(vehicleBookRecordVos.get(0).getVehicleUserPhone());
stringBuilder
.
append
(
vehicleBookRecordVos
.
get
(
0
).
getVehicleUserPhone
());
//
}
}
return
stringBuilder
.
toString
();
return
stringBuilder
.
toString
();
}
}
...
@@ -907,7 +918,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -907,7 +918,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
if
((
vehicleBookHourInfos
.
get
(
0
).
getBookedHour
()
&
~
entry
.
getValue
())
==
0
)
{
if
((
vehicleBookHourInfos
.
get
(
0
).
getBookedHour
()
&
~
entry
.
getValue
())
==
0
)
{
if
(!
flag
)
{
//解决重复执行的问题
if
(!
flag
)
{
//解决重复执行的问题
Integer
effected
=
vehicleBookInfoMapper
.
updateBookedInfo
(
params
);
Integer
effected
=
vehicleBookInfoMapper
.
updateBookedInfo
(
params
);
if
(
effected
<
0
)
{
if
(
effected
<
1
)
{
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
flag
=
true
;
flag
=
true
;
...
@@ -1158,8 +1169,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1158,8 +1169,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
List
<
String
>
notBookedDates
=
Lists
.
newArrayList
();
List
<
String
>
notBookedDates
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotBlank
(
dto
.
getStartDate
())&&
if
(
StringUtils
.
isNotBlank
(
dto
.
getStartDate
())&&
StringUtils
.
isNotBlank
(
dto
.
getEndDate
()))
{
StringUtils
.
isNotBlank
(
dto
.
getEndDate
()))
{
notBookedDates
=
convertDatePeriod2List
(
dto
.
getStartDate
(),
// notBookedDates = convertDatePeriod2List(dto.getStartDate(),
dto
.
getEndDate
());
// dto.getEndDate());
notBookedDates
=
convertDatePeriod2List
(
dto
.
getStartDateExtend
(),
dto
.
getEndDateExtend
());
}
}
//若传入预定信息查询条件,则查询对应月份预定信息查询条件(不超过3个月)
//若传入预定信息查询条件,则查询对应月份预定信息查询条件(不超过3个月)
...
@@ -1185,8 +1198,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1185,8 +1198,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
List
<
String
>
notBookedDates
=
Lists
.
newArrayList
();
List
<
String
>
notBookedDates
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotBlank
(
dto
.
getBookEndDate
())&&
if
(
StringUtils
.
isNotBlank
(
dto
.
getBookEndDate
())&&
StringUtils
.
isNotBlank
(
dto
.
getBookEndDate
()))
{
StringUtils
.
isNotBlank
(
dto
.
getBookEndDate
()))
{
notBookedDates
=
convertDatePeriod2List
(
dto
.
getBookStartDate
(),
// notBookedDates = convertDatePeriod2List(dto.getBookStartDate(),
dto
.
getBookEndDate
());
// dto.getBookEndDate());
notBookedDates
=
convertDatePeriod2List
(
dto
.
getStartDateExtend
(),
dto
.
getEndDateExtend
());
}
}
//若传入预定信息查询条件,则查询对应月份预定信息查询条件(不超过3个月)
//若传入预定信息查询条件,则查询对应月份预定信息查询条件(不超过3个月)
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
View file @
3923fb1b
...
@@ -151,8 +151,8 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
...
@@ -151,8 +151,8 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
int
b
=
24
;
Integer
a
=
b
&
4
;
Integer
a
=
7936
&
2047
;
System
.
out
.
println
(
a
);
System
.
out
.
println
(
a
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/RentVehicleController.java
View file @
3923fb1b
...
@@ -163,6 +163,8 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
...
@@ -163,6 +163,8 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
dto
.
setLimit
(
1
);
dto
.
setLimit
(
1
);
dto
.
setPage
(
1
);
dto
.
setPage
(
1
);
dto
.
setParkBranchCompanyId
(
dto
.
getLiftCompany
());
dto
.
setParkBranchCompanyId
(
dto
.
getLiftCompany
());
dto
.
setStartCompanyId
(
dto
.
getLiftCompany
());
dto
.
setEndCompanyId
(
dto
.
getEndCompanyId
());
//查询可车辆信息
//查询可车辆信息
PageDataVO
<
Vehicle
>
pageDataVO
=
vehicleBiz
.
searchUsableVehicle
(
dto
);
PageDataVO
<
Vehicle
>
pageDataVO
=
vehicleBiz
.
searchUsableVehicle
(
dto
);
if
(
pageDataVO
.
getData
().
size
()
<=
0
)
{
if
(
pageDataVO
.
getData
().
size
()
<=
0
)
{
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
3923fb1b
...
@@ -639,9 +639,9 @@
...
@@ -639,9 +639,9 @@
<!-- yearNo4Where 标识时间参数是否用于where条件 -->
<!-- yearNo4Where 标识时间参数是否用于where条件 -->
<if
test=
"startCompanyId != null and endCompanyId != null "
>
<if
test=
"startCompanyId != null and endCompanyId != null "
>
and (
and (
(abr.to_lift_company
=
null or abr.to_lift_company = #{startCompanyId})
(abr.to_lift_company
is
null or abr.to_lift_company = #{startCompanyId})
and
and
(abr.to_return_company
=
null or abr.to_return_company = #{endCompanyId})
(abr.to_return_company
is
null or abr.to_return_company = #{endCompanyId})
)
)
</if>
</if>
<if
test=
" modelId != null "
>
<if
test=
" modelId != 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