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
ea166476
Commit
ea166476
authored
Aug 13, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改租車訂單地址,修改车辆预定时添加订单号
parent
ef6943dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
35 deletions
+59
-35
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+39
-6
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+15
-21
VehicleWarningMsgMapper.xml
...ver/src/main/resources/mapper/VehicleWarningMsgMapper.xml
+5
-8
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
ea166476
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONException
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
...
...
@@ -13,17 +14,16 @@ import com.github.wxiaoqi.security.common.exception.BaseException;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.xxfc.platform.vehicle.biz.VehicleBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleBookRecordBiz
;
import
com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleWarningMsgBiz
;
import
com.xxfc.platform.vehicle.biz.*
;
import
com.xxfc.platform.vehicle.common.BaseController
;
import
com.xxfc.platform.vehicle.common.CustomIllegalParamException
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.BookType
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.VehicleBookInfo
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
...
...
@@ -46,6 +46,7 @@ import java.util.ArrayList;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
com
.
xxfc
.
platform
.
vehicle
.
constant
.
VehicleConstant
.
USER_APP
;
import
static
com
.
xxfc
.
platform
.
vehicle
.
constant
.
VehicleConstant
.
USER_APP_NAME
;
...
...
@@ -55,7 +56,7 @@ import static com.xxfc.platform.vehicle.constant.VehicleConstant.USER_APP_NAME;
@Slf4j
@IgnoreClientToken
@Api
(
value
=
"车辆管理controller"
,
tags
={
"车辆管理接口"
})
public
class
VehicleController
extends
BaseController
<
VehicleBiz
>
{
public
class
VehicleController
extends
BaseController
<
VehicleBiz
>
implements
UserRestInterface
{
@Autowired
private
VehicleBookRecordBiz
vehicleBookRecordBiz
;
...
...
@@ -78,7 +79,11 @@ public class VehicleController extends BaseController<VehicleBiz> {
@Autowired
private
VehicleJobHandler
vehicleJobHandler
;
@Autowired
BranchCompanyBiz
branchCompanyBiz
;
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
private
static
Integer
MAX_DRIVING_LICENSE_SIZE
=
10
*
1024
*
1024
;
//10M
public
static
final
DateTimeFormatter
DEFAULT_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -450,6 +455,34 @@ public class VehicleController extends BaseController<VehicleBiz> {
@IgnoreClientToken
@IgnoreUserToken
public
ObjectRestResponse
<
Map
<
String
,
Object
>>
getVehiclePlanList
(
VehiclePlanDto
vehiclePlanDto
)
{
UserDTO
userDTO
=
getAdminUserInfo
();
if
(
userDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
,
"token失效"
);
}
List
<
Integer
>
companyList
=
Lists
.
newArrayList
();
List
<
BranchCompany
>
branchCompany
=
branchCompanyBiz
.
getListByUser
(
userDTO
);
companyList
=
branchCompany
.
stream
().
map
(
BranchCompany:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
vehiclePlanDto
.
getParkBranchCompanyId
()
!=
null
)
{
if
(
companyList
.
size
()
>
0
)
{
if
(
companyList
.
contains
(
vehiclePlanDto
.
getParkBranchCompanyId
()))
{
companyList
.
clear
();
companyList
.
add
(
vehiclePlanDto
.
getParkBranchCompanyId
());
}
else
{
return
ObjectRestResponse
.
succ
();
}
}
}
if
(
vehiclePlanDto
.
getSubordinateBranch
()
!=
null
)
{
if
(
companyList
.
size
()
>
0
)
{
if
(
companyList
.
contains
(
vehiclePlanDto
.
getSubordinateBranch
()))
{
companyList
.
clear
();
companyList
.
add
(
vehiclePlanDto
.
getSubordinateBranch
());
}
else
{
return
ObjectRestResponse
.
succ
();
}
}
}
vehiclePlanDto
.
setCompanyIds
(
companyList
);
//获取列表
PageDataVO
<
VehicleAndModelInfoVo
>
pageDataVO
=
baseBiz
.
getAllVehicle
(
vehiclePlanDto
);
//获取警告信息
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
ea166476
...
...
@@ -380,11 +380,11 @@
<if
test=
"status != null"
>
and v1.status = #{status}
</if>
<if
test=
"
subordinateBranch != null
"
>
and v1.subordinate_branch = #{subordinateBranch}
</if
>
<if
test=
"parkBranchCompanyId != null"
>
and v1.park_branch_company_id = #{parkBranchCompanyId}
<if
test=
"
companyIds != null and companyIds.size > 0
"
>
v1.park_branch_company_id in
<foreach
collection=
"companyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
<if
test=
"zoneId !=null"
>
and bc2.zone_id = #{zoneId}
...
...
@@ -461,14 +461,11 @@
<if
test=
"status != null"
>
and v1.status = #{status}
</if>
<if
test=
"subordinateBranch != null"
>
and v1.subordinate_branch = #{subordinateBranch}
</if>
<if
test=
"parkBranchCompanyId != null"
>
and v1.park_branch_company_id = #{parkBranchCompanyId}
</if>
<if
test=
"zoneId !=null"
>
and bc1.zone_id = #{zoneId}
<if
test=
"companyIds != null and companyIds.size > 0"
>
v1.park_branch_company_id in
<foreach
collection=
"companyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</where>
GROUP BY v1.status
...
...
@@ -486,14 +483,11 @@
<if
test=
"status != null"
>
and v2.status = #{status}
</if>
<if
test=
"subordinateBranch != null"
>
and v2.subordinate_branch = #{subordinateBranch}
</if>
<if
test=
"parkBranchCompanyId != null"
>
and v2.park_branch_company_id = #{parkBranchCompanyId}
</if>
<if
test=
"zoneId !=null"
>
and bc2.zone_id = #{zoneId}
<if
test=
"companyIds != null and companyIds.size > 0"
>
v2.park_branch_company_id in
<foreach
collection=
"companyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</where>
</select>
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleWarningMsgMapper.xml
View file @
ea166476
...
...
@@ -50,14 +50,11 @@
<if
test=
"status != null"
>
and v.status = #{status}
</if>
<if
test=
"subordinateBranch != null"
>
and v.subordinate_branch = #{subordinateBranch}
</if>
<if
test=
"parkBranchCompanyId != null"
>
and v.park_branch_company_id = #{parkBranchCompanyId}
</if>
<if
test=
"zoneId !=null"
>
and bc2.zone_id = #{zoneId}
<if
test=
"companyIds != null and companyIds.size > 0"
>
v.park_branch_company_id in
<foreach
collection=
"companyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</where>
</select>
...
...
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