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
8d458574
Commit
8d458574
authored
Oct 23, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-background-manager' into dev
parents
86beb7c1
6355212d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
46 deletions
+57
-46
VehicleBookRecordMapper.xml
...ver/src/main/resources/mapper/VehicleBookRecordMapper.xml
+9
-0
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+48
-46
No files found.
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleBookRecordMapper.xml
View file @
8d458574
...
@@ -493,6 +493,15 @@
...
@@ -493,6 +493,15 @@
<if
test=
"status != null and status != 0 and status != -1 and status != -2 and status != 3 and status != 5 and status != 7"
>
<if
test=
"status != null and status != 0 and status != -1 and status != -2 and status != 3 and status != 5 and status != 7"
>
and v1.status = #{status}
and v1.status = #{status}
</if>
</if>
<if
test=
"status != null and status == 3 "
>
and v4.id is null and v1.status = 2
</if>
<if
test=
"status != null and status == 5 "
>
and v4.id is not null and v1.status = 2 and v4.state = 0
</if>
<if
test=
"status != null and status == 7 "
>
and v4.id is not null and v1.status = 2 and v4.state = 1
</if>
<if
test=
"status != null and status == 0 "
>
<if
test=
"status != null and status == 0 "
>
and v4.state = 0
and v4.state = 0
</if>
</if>
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
8d458574
...
@@ -44,8 +44,6 @@
...
@@ -44,8 +44,6 @@
v.`status`,
v.`status`,
v.number_plate,
v.number_plate,
v.brand,
v.brand,
-- IFNULL(v.park_branch_company_id,v.expect_destination_branch_company_id) AS subordinate_branch,
-- IFNULL(bc.name,bc1.name) AS subBranchName,
v.park_branch_company_id,
v.park_branch_company_id,
bc.name as parkBranchCompanyName,
bc.name as parkBranchCompanyName,
v.expect_destination_branch_company_id,
v.expect_destination_branch_company_id,
...
@@ -80,15 +78,13 @@
...
@@ -80,15 +78,13 @@
left join
left join
vehicle_book_info vbi on v.`id` = vbi.vehicle
vehicle_book_info vbi on v.`id` = vbi.vehicle
</if>
</if>
-- LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
-- LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
-- 停车分公司
-- 停车分公司
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
-- 目的地分公司
-- 目的地分公司
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
-- 所属分公司
-- 所属分公司
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
LEFT JOIN vehicle_book_record v2 on v2.
vehicle_id = v.id
LEFT JOIN vehicle_book_record v2 on v2.
id = (select id from vehicle_book_record where vehicle_id = v.id order by update_time DESC LIMIT 1)
LEFT JOIN vehicle_departure_log v3 on v2.id = v3.book_record_id
LEFT JOIN vehicle_departure_log v3 on v2.id = v3.book_record_id
where
where
v.is_del=0
v.is_del=0
...
@@ -116,15 +112,15 @@
...
@@ -116,15 +112,15 @@
<if
test=
"insuranceCompany !=null"
>
<if
test=
"insuranceCompany !=null"
>
and v.insurance_company = #{insuranceCompany}
and v.insurance_company = #{insuranceCompany}
</if>
</if>
<if
test=
"belongToName !=null"
>
<if
test=
"belongToName !=null
and belongToName != ''
"
>
and v.belong_to_name =
#{belongToName}
and v.belong_to_name =
like concat('%',#{belongToName},'%')
</if>
</if>
<if
test=
"vin !=null and vin != ''"
>
<if
test=
"vin !=null and vin != ''"
>
and v.vin = #{vin}
and v.vin = #{vin}
</if>
</if>
<!-- <if test="subordinateBranch !=null">-->
<!-- <if test="subordinateBranch !=null">-->
<!-- and v.subordinate_branch = #{subordinateBranch}-->
<!-- and v.subordinate_branch = #{subordinateBranch}-->
<!-- </if>-->
<!-- </if>-->
<if
test=
"code !=null"
>
<if
test=
"code !=null"
>
and v.code = #{code}
and v.code = #{code}
</if>
</if>
...
@@ -174,7 +170,6 @@
...
@@ -174,7 +170,6 @@
and bc.zone_id=#{zoneId}
and bc.zone_id=#{zoneId}
</if>
</if>
</if>
</if>
order by v.code
) r ORDER BY r.parkBranchCompanyName
) r ORDER BY r.parkBranchCompanyName
</select>
</select>
...
@@ -228,6 +223,8 @@
...
@@ -228,6 +223,8 @@
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
-- 所属分公司
-- 所属分公司
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
LEFT JOIN vehicle_book_record v2 on v2.id = (select id from vehicle_book_record where vehicle_id = v.id order by update_time DESC LIMIT 1)
LEFT JOIN vehicle_departure_log v3 on v2.id = v3.book_record_id
where
where
v.is_del=0
v.is_del=0
<if
test=
"companyList != null"
>
<if
test=
"companyList != null"
>
...
@@ -277,21 +274,27 @@
...
@@ -277,21 +274,27 @@
<if
test=
"insuranceCompany !=null"
>
<if
test=
"insuranceCompany !=null"
>
and v.insurance_company = #{insuranceCompany}
and v.insurance_company = #{insuranceCompany}
</if>
</if>
<if
test=
"belongToName !=null"
>
<if
test=
"belongToName !=null
and belongToName != ''
"
>
and v.belong_to_name =
#{belongToName}
and v.belong_to_name =
like concat('%',#{belongToName},'%')
</if>
</if>
<if
test=
"vin !=null and vin != ''"
>
<if
test=
"vin !=null and vin != ''"
>
and v.vin = #{vin}
and v.vin = #{vin}
</if>
</if>
<!-- <if test="subordinateBranch !=null">-->
<!-- <if test="subordinateBranch !=null">-->
<!-- and v.subordinate_branch = #{subordinateBranch}-->
<!-- and v.subordinate_branch = #{subordinateBranch}-->
<!-- </if>-->
<!-- </if>-->
<if
test=
"code !=null"
>
<if
test=
"code !=null"
>
and v.code = #{code}
and v.code = #{code}
</if>
</if>
<if
test=
"status !=null"
>
<if
test=
"status !=null
and status != 6 and status != 7
"
>
and v.status = #{status}
and v.status = #{status}
</if>
</if>
<if
test=
"status !=null and status == 6"
>
and v3.id is not NULL and v2.book_type = 3 and v3.state = 0
</if>
<if
test=
"status !=null and status == 7"
>
and v3.id is not NULL and v2.book_type = 6 and v3.state = 0
</if>
<if
test=
"numberPlate !=null and numberPlate != ''"
>
<if
test=
"numberPlate !=null and numberPlate != ''"
>
and v.number_plate like concat('%',#{numberPlate},'%')
and v.number_plate like concat('%',#{numberPlate},'%')
</if>
</if>
...
@@ -329,7 +332,6 @@
...
@@ -329,7 +332,6 @@
and bc.zone_id=#{zoneId}
and bc.zone_id=#{zoneId}
</if>
</if>
</if>
</if>
order by v.code
) r ORDER BY r.parkBranchCompanyName
) r ORDER BY r.parkBranchCompanyName
</select>
</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