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
2caf93e1
Commit
2caf93e1
authored
Aug 27, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into lb_dev
parents
c6391f39
a529a501
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
18 deletions
+26
-18
CompanyBaseBiz.java
...in/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
+1
-1
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+5
-0
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+0
-2
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+20
-15
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/CompanyBaseBiz.java
View file @
2caf93e1
...
...
@@ -127,7 +127,7 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
BigDecimal
latitude
=
companyVo
.
getLatitude
();
BigDecimal
longitude
=
companyVo
.
getLongitude
();
if
(
state
==
1
&&(
StringUtils
.
isBlank
(
companyVo
.
getAddrDetail
())||
StringUtils
.
isBlank
(
companyVo
.
getImages
())||
StringUtils
.
isBlank
(
companyVo
.
getDescribes
())
||
StringUtils
.
isBlank
(
companyVo
.
getLeaderContactInfo
())||
latitude
==
null
||
longitude
==
null
)){
||
latitude
==
null
||
longitude
==
null
)){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"上架时参数不能为空"
);
}
CompanyBase
companyBase
=
new
CompanyBase
();
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
2caf93e1
...
...
@@ -1028,6 +1028,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
if
(
MapUtils
.
isNotEmpty
(
yearMonthAndParam
)){
params
.
put
(
"yearMonthAndParam"
,
yearMonthAndParam
);
String
bitStr
=
""
;
for
(
String
key
:
yearMonthAndParam
.
keySet
())
{
bitStr
+=
"1"
;
}
params
.
put
(
"yearMonthAndParamBitStr"
,
bitStr
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
2caf93e1
...
...
@@ -75,8 +75,6 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use
@Autowired
BranchCompanyBiz
branchCompanyBiz
;
@Autowired
VehicleBookHourInfoBiz
vehicleBookHourInfoBiz
;
public
UserFeign
getUserFeign
()
{
return
userFeign
;
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
2caf93e1
...
...
@@ -344,7 +344,7 @@
</select>
<select
id=
"selectByNumberPlate"
resultType=
"com.xxfc.platform.vehicle.entity.Vehicle"
>
select * from vehicle
where number_plate = #{numberPlate} and
is_del=0
where number_plate = #{numberPlate} and is_del=0
</select>
<select
id=
"selectById"
resultMap=
"searchModel"
>
...
...
@@ -523,16 +523,14 @@
<!-- yearNo4Where 标识时间参数不用于where条件,用于select部分 -->
<if
test=
" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true"
>
,(max(
<foreach
collection=
"yearMonthAndParam"
index=
"yearMonth"
item=
"andOperation"
separator=
"and"
>
<include
refid=
"yearMonthAndParamSql"
></include>
</foreach>
vbi.bit_str = #{yearMonthAndParamBitStr}
<!-- 租车列表 不过滤前后预约记录不符的车辆 但是合并标示车型是否有车 即 hasVehicle-->
<if
test=
"withoutRecordWhere != null and withoutRecordWhere = 1 and startCompanyId != null and endCompanyId != null "
>
and (abr.to_lift_company is null or abr.to_lift_company = #{startCompanyId})
and (abr.to_return_company is null or abr.to_return_company = #{endCompanyId})
</if>
)
)as hasVehicle
)
as hasVehicle
</if>
<if
test=
"lon != null and lat != null"
>
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance
...
...
@@ -604,9 +602,9 @@
<if
test=
"lon != null and lat != null"
>
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance
</if>
<if
test=
" yearMonthAndParam !=null "
>
,ifnull(vbi.booked_date,0) as booked_date
</if
>
<!-- <if test=" yearMonthAndParam !=null ">--
>
<!-- ,ifnull(vbi.booked_date,0) as booked_date-->
<!-- </if>--
>
<include
refid=
"searchUsableSql"
/>
<if
test=
"lon != null and lat != null"
>
order by
...
...
@@ -618,8 +616,18 @@
<sql
id=
"searchUsableSql"
>
from vehicle v
<if
test=
" yearMonthAndParam !=null "
>
left join
vehicle_book_info vbi on v.`id` = vbi.vehicle
left join (
select
vbi.vehicle,
BIT_OR(
CONCAT(
<foreach
collection=
"yearMonthAndParam"
index=
"yearMonth"
item=
"andOperation"
separator=
","
>
<include
refid=
"yearMonthAndParamSql"
></include>
</foreach>
)
) as bit_str
from vehicle_book_info vbi group by vbi.vehicle
) vbi on v.`id` = vbi.vehicle
</if>
left join vehicle_model vm on v.model_id = vm.id
left join branch_company bc on v.park_branch_company_id = bc.id
...
...
@@ -634,11 +642,8 @@
<where>
<!-- 若需根据预定日期条件查询,针对换为位操作 -->
<!-- yearNo4Where 标识时间参数是否用于where条件 -->
<if
test=
" yearMonthAndParam !=null and yearNo4Where == null"
>
<foreach
collection=
"yearMonthAndParam"
index=
"yearMonth"
item=
"andOperation"
>
and
<include
refid=
"yearMonthAndParamSql"
></include>
</foreach>
<if
test=
" yearMonthAndParam !=null and yearMonthAndParam != null and yearNo4Where == null"
>
vbi.bit_str = #{yearMonthAndParamBitStr}
</if>
<!-- 根据前后record 过滤车辆 -->
...
...
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