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
980204b2
Commit
980204b2
authored
Sep 12, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):监管业务查询性能优化
parent
69205719
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
26 deletions
+50
-26
SafetyProblemTracingMapper.xml
.../src/main/resources/mapper/SafetyProblemTracingMapper.xml
+50
-26
IdxBizJgProjectContraptionMapper.xml
...ain/resources/mapper/IdxBizJgProjectContraptionMapper.xml
+0
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/SafetyProblemTracingMapper.xml
View file @
980204b2
...
...
@@ -4,72 +4,96 @@
<select
id=
"queryForSafetyProblemTracingPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.SafetyProblemTracingDto"
>
select
spt.*,
case when spt."problem_status_code" = '0' then '红'
else '绿' end hiddenDangersLevel,
(select extend::json->>'pic' from cb_data_dictionary where type = 'ISSUE_TYPE' and code = spt.problem_type_code) problemTypePic
from tzs_safety_problem_tracing spt
SELECT
spt.*,
CASE
WHEN spt.problem_status_code = '0' THEN '红'
ELSE '绿'
END AS hiddenDangersLevel,
cdd.extend::json ->> 'pic' AS problemTypePic
FROM tzs_safety_problem_tracing spt
LEFT JOIN cb_data_dictionary cdd
ON cdd.type = 'ISSUE_TYPE'
AND cdd.code = spt.problem_type_code
<where>
spt.is_delete = false
spt.is_delete = FALSE
<if
test=
"problemModel.problemNum != null and problemModel.problemNum != ''"
>
and spt.problem_num =
LIKE CONCAT('%', #{problemModel.problemNum}, '%')
AND spt.problem_num
LIKE CONCAT('%', #{problemModel.problemNum}, '%')
</if>
<if
test=
"problemModel.problemStatus != null and problemModel.problemStatus != ''"
>
and
spt.problem_status = #{problemModel.problemStatus}
AND
spt.problem_status = #{problemModel.problemStatus}
</if>
<if
test=
"problemModel.equipListCode != null and problemModel.equipListCode != ''"
>
and
spt.equip_list_code = #{problemModel.equipListCode}
AND
spt.equip_list_code = #{problemModel.equipListCode}
</if>
<if
test=
"problemModel.equCategoryCode != null and problemModel.equCategoryCode != ''"
>
and
spt.equ_category_code = #{problemModel.equCategoryCode}
AND
spt.equ_category_code = #{problemModel.equCategoryCode}
</if>
<if
test=
"problemModel.sourceTypeCode != null and problemModel.sourceTypeCode != ''"
>
and
spt.source_type_code = #{problemModel.sourceTypeCode}
AND
spt.source_type_code = #{problemModel.sourceTypeCode}
</if>
<if
test=
"problemModel.problemLevelCode != null and problemModel.problemLevelCode != ''"
>
and
spt.problem_level_code = #{problemModel.problemLevelCode}
AND
spt.problem_level_code = #{problemModel.problemLevelCode}
</if>
<if
test=
"problemModel.problemTypeCode != null and problemModel.problemTypeCode != ''"
>
and
spt.problem_type_code = #{problemModel.problemTypeCode}
AND
spt.problem_type_code = #{problemModel.problemTypeCode}
</if>
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.beginDate != null"
>
and
to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[>=]]>
AND
to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[>=]]>
to_char(#{problemModel.problemTimeRange.beginDate}::timestamp, 'YYYY-MM-DD')
</if>
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.endDate != null"
>
and
to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[<=]]>
AND
to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[<=]]>
to_char(#{problemModel.problemTimeRange.endDate}::timestamp, 'YYYY-MM-DD')
</if>
<if
test=
"problemModel.problemDesc != null and problemModel.problemDesc != ''"
>
and spt.problem_desc like
CONCAT('%', #{problemModel.problemDesc}, '%')
AND spt.problem_desc LIKE
CONCAT('%', #{problemModel.problemDesc}, '%')
</if>
<if
test=
"problemModel.sourceId != null and problemModel.sourceId != ''"
>
and
spt.source_id = #{problemModel.sourceId}
AND
spt.source_id = #{problemModel.sourceId}
</if>
<if
test=
"problemModel.governingBodyOrgCode != null and problemModel.governingBodyOrgCode != ''"
>
and spt.governing_body_org_code like
CONCAT(#{problemModel.governingBodyOrgCode}, '%')
AND spt.governing_body_org_code LIKE
CONCAT(#{problemModel.governingBodyOrgCode}, '%')
</if>
<if
test=
"problemModel.governingBodyCode != null and problemModel.governingBodyCode != ''"
>
and
spt.governing_body_code = #{problemModel.governingBodyCode}
AND
spt.governing_body_code = #{problemModel.governingBodyCode}
</if>
<if
test=
"problemModel.principalUnit != null and problemModel.principalUnit != ''"
>
and spt.principal_unit like
CONCAT('%', #{problemModel.principalUnit}, '%')
AND spt.principal_unit LIKE
CONCAT('%', #{problemModel.principalUnit}, '%')
</if>
<if
test=
"problemModel.principalUnitType != null and problemModel.principalUnitType != ''"
>
and spt.principal_unit_type like
CONCAT('%', #{problemModel.principalUnitType}, '%')
AND spt.principal_unit_type LIKE
CONCAT('%', #{problemModel.principalUnitType}, '%')
</if>
<if
test=
"problemModel.hiddenDangersLevel != null and problemModel.hiddenDangersLevel != ''"
>
and
spt.problem_status_code = #{problemModel.hiddenDangersLevel}
AND
spt.problem_status_code = #{problemModel.hiddenDangersLevel}
</if>
<if
test=
"problemModel.regionCode != null and problemModel.regionCode != ''"
>
and spt.region_code like CONCAT('%',
#{problemModel.regionCode}, '%')
AND spt.region_code LIKE CONCAT('%',
#{problemModel.regionCode}, '%')
</if>
<if
test=
"problemModel.problemStatusCode != null and problemModel.problemStatusCode != ''"
>
and
spt.problem_status_code = #{problemModel.problemStatusCode}
AND
spt.problem_status_code = #{problemModel.problemStatusCode}
</if>
</where>
order by spt.create_date desc
ORDER BY spt.create_date DESC
</select>
<select
id=
"queryEquipListByProblemId"
resultType=
"java.util.Map"
>
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgProjectContraptionMapper.xml
View file @
980204b2
This diff is collapsed.
Click to expand it.
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