Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
1466aa02
Commit
1466aa02
authored
Nov 13, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql优化
parent
6844858f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
JGStatisticsMapper.xml
...tics-api/src/main/resources/mapper/JGStatisticsMapper.xml
+16
-6
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/JGStatisticsMapper.xml
View file @
1466aa02
...
@@ -1126,6 +1126,7 @@
...
@@ -1126,6 +1126,7 @@
SELECT code, name FROM tz_equipment_category
SELECT code, name FROM tz_equipment_category
),
),
filtered_data AS (
filtered_data AS (
<if
test=
"treeValue != null or dto.businessTypeCode == 'sy_dj'"
>
SELECT
SELECT
tjur.sequence_nbr AS sequenceNbr,
tjur.sequence_nbr AS sequenceNbr,
'使用登记' AS businessType,
'使用登记' AS businessType,
...
@@ -1167,12 +1168,17 @@
...
@@ -1167,12 +1168,17 @@
<if
test=
"dto.equCategoryCode != null and dto.equCategoryCode != ''"
>
<if
test=
"dto.equCategoryCode != null and dto.equCategoryCode != ''"
>
AND ri.EQU_CATEGORY = #{dto.equCategoryCode}
AND ri.EQU_CATEGORY = #{dto.equCategoryCode}
</if>
</if>
<if
test=
"dto.status != null and dto.status != '
'"
>
<if
test=
"dto.status != null and dto.status != '' and dto.status != '6616
'"
>
AND tjur.status = #{dto.status}
and tjur.status != '已完成'
</if>
</if>
<if
test=
"dto.status != null and dto.status != '' and dto.status == '6616'"
>
and tjur.status = '已完成'
</if>
</if>
<if
test=
"treeValue != null"
>
UNION ALL
UNION ALL
</if>
<if
test=
"treeValue != null or dto.businessTypeCode == 'car_cyl_dj'"
>
SELECT DISTINCT
SELECT DISTINCT
tjvi.sequence_nbr AS sequenceNbr,
tjvi.sequence_nbr AS sequenceNbr,
'车用气瓶登记' AS businessType,
'车用气瓶登记' AS businessType,
...
@@ -1213,8 +1219,12 @@
...
@@ -1213,8 +1219,12 @@
<if
test=
"dto.equCategoryCode != null and dto.equCategoryCode != ''"
>
<if
test=
"dto.equCategoryCode != null and dto.equCategoryCode != ''"
>
AND ri.EQU_CATEGORY = #{dto.equCategoryCode}
AND ri.EQU_CATEGORY = #{dto.equCategoryCode}
</if>
</if>
<if
test=
"dto.status != null and dto.status != ''"
>
<if
test=
"dto.status != null and dto.status != '' and dto.status != '6616'"
>
AND tjvi.status = #{dto.status}
and tjvi.status != '已完成'
</if>
<if
test=
"dto.status != null and dto.status != '' and dto.status == '6616'"
>
and tjvi.status = '已完成'
</if>
</if>
</if>
)
)
SELECT * FROM filtered_data ORDER BY createDate DESC
SELECT * FROM filtered_data ORDER BY createDate DESC
...
...
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