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
52677956
Commit
52677956
authored
Nov 19, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加
parent
4ba206b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
BranchCompanyVehicleCountMapper.xml
...main/resources/mapper/BranchCompanyVehicleCountMapper.xml
+12
-13
No files found.
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyVehicleCountMapper.xml
View file @
52677956
...
@@ -13,18 +13,17 @@
...
@@ -13,18 +13,17 @@
</resultMap>
</resultMap>
<select
id=
"getAllByParam"
parameterType=
"Map"
resultType=
"com.xxfc.platform.vehicle.entity.BranchCompanyVehicleCount"
>
<select
id=
"getAllByParam"
parameterType=
"Map"
resultType=
"com.xxfc.platform.vehicle.entity.BranchCompanyVehicleCount"
>
select *, CEILING(
SELECT company_name, CEILING((
(
CASE
CASE
WHEN #{type} = 1 THEN
WHEN #{type} = 1 THEN
sum(vehicle_num) / #{dayNum}
vehicle_num / #{dayNum}
WHEN #{type} = 2 THEN
WHEN #{type} = 2 THEN
sum(vehicle_num) / #{dayNum}
vehicle_num / #{dayNum}
WHEN #{type} = 3 THEN
WHEN #{type} = 3 THEN
sum(vehicle_num) / #{dayNum}
vehicle_num / #{dayNum}
END
END
))
)
AS vehicleNum from branch_company_vehicle_count
) AS vehicleNum from branch_company_vehicle_count
<where>
<where>
<if
test=
"companyName != null and companyName != ''"
>
<if
test=
"companyName != null and companyName != ''"
>
and company_name like concat('%', #{companyName}, '%')
and company_name like concat('%', #{companyName}, '%')
...
@@ -32,7 +31,7 @@
...
@@ -32,7 +31,7 @@
<if
test=
"startTime != null and startTime != ''"
>
<if
test=
"startTime != null and startTime != ''"
>
and count_date
>
#{startTime} and count_date
<
#{endTime}
and count_date
>
#{startTime} and count_date
<
#{endTime}
</if>
</if>
</where>
</where>
GROUP BY company_name
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
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