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
e22c5da7
Commit
e22c5da7
authored
Aug 24, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lb_dev' into base-modify
parents
24002ca2
cd73ee4f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
11 deletions
+21
-11
UsableVeicleDTO.java
.../java/com/xxfc/platform/vehicle/pojo/UsableVeicleDTO.java
+3
-0
BranchCompanyStockApplyInfoMapper.xml
...in/resources/mapper/BranchCompanyStockApplyInfoMapper.xml
+1
-1
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+17
-10
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/UsableVeicleDTO.java
View file @
e22c5da7
...
...
@@ -54,6 +54,9 @@ public class UsableVeicleDTO extends PageParam {
@ApiModelProperty
(
hidden
=
true
)
Boolean
yearNo4Where
;
@ApiModelProperty
(
hidden
=
true
)
Integer
withoutRecordWhere
=
1
;
public
void
setStartDateTamp
(
Long
startDateTamp
)
{
this
.
startDateTamp
=
startDateTamp
;
this
.
startDate
=
DEFAULT_DATE_TIME_FORMATTER
.
format
(
LocalDateTime
.
ofInstant
(
Instant
.
ofEpochMilli
(
startDateTamp
),
ZoneOffset
.
ofHours
(
8
)));
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyStockApplyInfoMapper.xml
View file @
e22c5da7
...
...
@@ -17,7 +17,7 @@
<select
id=
"selectVoAll"
resultType=
"com.xxfc.platform.vehicle.pojo.BranchCompanyStockApplyInfoVo"
>
select a.*, b.company_name
from branch_company_stock_apply_info a
left join
branch_company_stock_info
b on a.company_id = b.id
left join
`company_base`
b on a.company_id = b.id
order by a.create_time desc
</select>
</mapper>
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
e22c5da7
...
...
@@ -522,11 +522,17 @@
</if>
<!-- 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>
) as hasVehicle
,(max(
<foreach
collection=
"yearMonthAndParam"
index=
"yearMonth"
item=
"andOperation"
separator=
"and"
>
<include
refid=
"yearMonthAndParamSql"
></include>
</foreach>
<!-- 租车列表 不过滤前后预约记录不符的车辆 但是合并标示车型是否有车 即 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
</if>
<if
test=
"lon != null and lat != null"
>
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance
...
...
@@ -557,7 +563,7 @@
) > 0
</if>
)
<!-- union 所有车型 -->
<!-- union 所有
下架
车型 -->
<if
test=
"startCompanyId != null or parkBranchCompanyId != null "
>
union
(select vm.id as model_id, bc.id as company_id
...
...
@@ -635,14 +641,15 @@
</foreach>
</if>
<!-- 若需根据预定日期条件查询,针对换为位操作 -->
<!-- yearNo4Where 标识时间参数是否用于where条件 -->
<!-- 根据前后record 过滤车辆 -->
<if
test=
"startCompanyId != null and endCompanyId != null "
>
and (
<if
test=
"withoutRecordWhere == 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>
</if>
<if
test=
" modelId != null "
>
and v.model_id = #{modelId}
...
...
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