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
d3d0c79a
Commit
d3d0c79a
authored
Nov 22, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆信息统计
parent
f49101e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
BranchCompanyVehicleCountMapper.xml
...main/resources/mapper/BranchCompanyVehicleCountMapper.xml
+10
-3
No files found.
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyVehicleCountMapper.xml
View file @
d3d0c79a
...
@@ -3,8 +3,14 @@
...
@@ -3,8 +3,14 @@
<mapper
namespace=
"com.xxfc.platform.vehicle.mapper.BranchCompanyVehicleCountMapper"
>
<mapper
namespace=
"com.xxfc.platform.vehicle.mapper.BranchCompanyVehicleCountMapper"
>
<select
id=
"getAllCountInfo"
parameterType=
"Map"
resultType=
"com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo"
>
<select
id=
"getAllCountInfo"
parameterType=
"Map"
resultType=
"com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo"
>
SELECT c.company_id, c.count_year, c.count_month,c.count_date, b.`name` as companyName,sum(c.vehicle_num) as vehicle_num from branch_company_vehicle_count c
SELECT
LEFT JOIN branch_company b on b.id = c.company_id
c.company_id as companyId,
c.count_date as countDate,
b.`name` AS companyName,
sum(c.vehicle_num) as vehicleNum
FROM
branch_company_vehicle_count c
LEFT JOIN branch_company b ON b.id = c.company_id
<where>
<where>
<if
test =
"companyId != null"
>
<if
test =
"companyId != null"
>
and c.company_id = #{companyId}
and c.company_id = #{companyId}
...
@@ -16,7 +22,8 @@
...
@@ -16,7 +22,8 @@
and c.count_date
<
= #{endTime}
and c.count_date
<
= #{endTime}
</if>
</if>
</where>
</where>
GROUP BY c.company_id,c.count_date
GROUP BY c.id
ORDER BY c.company_id
</select>
</select>
<select
id=
"countByMonth"
resultType=
"com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo"
parameterType=
"Map"
>
<select
id=
"countByMonth"
resultType=
"com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo"
parameterType=
"Map"
>
...
...
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