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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
170 additions
and
198 deletions
+170
-198
SafetyProblemTracingMapper.xml
.../src/main/resources/mapper/SafetyProblemTracingMapper.xml
+49
-25
IdxBizJgProjectContraptionMapper.xml
...ain/resources/mapper/IdxBizJgProjectContraptionMapper.xml
+121
-173
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 @@
...
@@ -4,72 +4,96 @@
<select
id=
"queryForSafetyProblemTracingPage"
<select
id=
"queryForSafetyProblemTracingPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.SafetyProblemTracingDto"
>
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.SafetyProblemTracingDto"
>
select
SELECT
spt.*,
spt.*,
case when spt."problem_status_code" = '0' then '红'
CASE
else '绿' end hiddenDangersLevel,
WHEN spt.problem_status_code = '0' THEN '红'
(select extend::json->>'pic' from cb_data_dictionary where type = 'ISSUE_TYPE' and code = spt.problem_type_code) problemTypePic
ELSE '绿'
from tzs_safety_problem_tracing spt
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>
<where>
spt.is_delete = false
spt.is_delete = FALSE
<if
test=
"problemModel.problemNum != null and problemModel.problemNum != ''"
>
<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>
<if
test=
"problemModel.problemStatus != null and problemModel.problemStatus != ''"
>
<if
test=
"problemModel.problemStatus != null and problemModel.problemStatus != ''"
>
and
spt.problem_status = #{problemModel.problemStatus}
AND
spt.problem_status = #{problemModel.problemStatus}
</if>
</if>
<if
test=
"problemModel.equipListCode != null and problemModel.equipListCode != ''"
>
<if
test=
"problemModel.equipListCode != null and problemModel.equipListCode != ''"
>
and
spt.equip_list_code = #{problemModel.equipListCode}
AND
spt.equip_list_code = #{problemModel.equipListCode}
</if>
</if>
<if
test=
"problemModel.equCategoryCode != null and problemModel.equCategoryCode != ''"
>
<if
test=
"problemModel.equCategoryCode != null and problemModel.equCategoryCode != ''"
>
and
spt.equ_category_code = #{problemModel.equCategoryCode}
AND
spt.equ_category_code = #{problemModel.equCategoryCode}
</if>
</if>
<if
test=
"problemModel.sourceTypeCode != null and problemModel.sourceTypeCode != ''"
>
<if
test=
"problemModel.sourceTypeCode != null and problemModel.sourceTypeCode != ''"
>
and
spt.source_type_code = #{problemModel.sourceTypeCode}
AND
spt.source_type_code = #{problemModel.sourceTypeCode}
</if>
</if>
<if
test=
"problemModel.problemLevelCode != null and problemModel.problemLevelCode != ''"
>
<if
test=
"problemModel.problemLevelCode != null and problemModel.problemLevelCode != ''"
>
and
spt.problem_level_code = #{problemModel.problemLevelCode}
AND
spt.problem_level_code = #{problemModel.problemLevelCode}
</if>
</if>
<if
test=
"problemModel.problemTypeCode != null and problemModel.problemTypeCode != ''"
>
<if
test=
"problemModel.problemTypeCode != null and problemModel.problemTypeCode != ''"
>
and
spt.problem_type_code = #{problemModel.problemTypeCode}
AND
spt.problem_type_code = #{problemModel.problemTypeCode}
</if>
</if>
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.beginDate != null"
>
<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')
to_char(#{problemModel.problemTimeRange.beginDate}::timestamp, 'YYYY-MM-DD')
</if>
</if>
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.endDate != null"
>
<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')
to_char(#{problemModel.problemTimeRange.endDate}::timestamp, 'YYYY-MM-DD')
</if>
</if>
<if
test=
"problemModel.problemDesc != null and problemModel.problemDesc != ''"
>
<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>
<if
test=
"problemModel.sourceId != null and problemModel.sourceId != ''"
>
<if
test=
"problemModel.sourceId != null and problemModel.sourceId != ''"
>
and
spt.source_id = #{problemModel.sourceId}
AND
spt.source_id = #{problemModel.sourceId}
</if>
</if>
<if
test=
"problemModel.governingBodyOrgCode != null and problemModel.governingBodyOrgCode != ''"
>
<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>
<if
test=
"problemModel.governingBodyCode != null and problemModel.governingBodyCode != ''"
>
<if
test=
"problemModel.governingBodyCode != null and problemModel.governingBodyCode != ''"
>
and
spt.governing_body_code = #{problemModel.governingBodyCode}
AND
spt.governing_body_code = #{problemModel.governingBodyCode}
</if>
</if>
<if
test=
"problemModel.principalUnit != null and problemModel.principalUnit != ''"
>
<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>
<if
test=
"problemModel.principalUnitType != null and problemModel.principalUnitType != ''"
>
<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>
<if
test=
"problemModel.hiddenDangersLevel != null and problemModel.hiddenDangersLevel != ''"
>
<if
test=
"problemModel.hiddenDangersLevel != null and problemModel.hiddenDangersLevel != ''"
>
and
spt.problem_status_code = #{problemModel.hiddenDangersLevel}
AND
spt.problem_status_code = #{problemModel.hiddenDangersLevel}
</if>
</if>
<if
test=
"problemModel.regionCode != null and problemModel.regionCode != ''"
>
<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>
<if
test=
"problemModel.problemStatusCode != null and problemModel.problemStatusCode != ''"
>
<if
test=
"problemModel.problemStatusCode != null and problemModel.problemStatusCode != ''"
>
and
spt.problem_status_code = #{problemModel.problemStatusCode}
AND
spt.problem_status_code = #{problemModel.problemStatusCode}
</if>
</if>
</where>
</where>
order by spt.create_date desc
ORDER BY spt.create_date DESC
</select>
</select>
<select
id=
"queryEquipListByProblemId"
resultType=
"java.util.Map"
>
<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
...
@@ -90,40 +90,28 @@
...
@@ -90,40 +90,28 @@
</resultMap>
</resultMap>
<select
id=
"countContraptionInUseTimesForEdit"
resultMap=
"projectContraptionResultMap"
>
<select
id=
"countContraptionInUseTimesForEdit"
resultMap=
"projectContraptionResultMap"
>
SELECT
SELECT
project_contraption_id,
pl.project_contraption_id,
SUM(inUseNumber) inUseNumber
COALESCE(SUM(CASE WHEN ur.project_contraption_id IS NOT NULL THEN 1 ELSE 0 END), 0)
FROM (
+ COALESCE(SUM(CASE WHEN ins.project_contraption_id IS NOT NULL THEN 1 ELSE 0 END), 0) AS inUseNumber
SELECT
a.project_contraption_id,
COUNT(1) as inUseNumber
FROM
FROM
tzs_jg_use_registration a
UNNEST(
WHERE a.project_contraption_id in
ARRAY[
<foreach
collection =
'projectContraptionIdList'
item=
'id'
index=
'index'
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"projectContraptionIdList"
item=
"id"
separator=
","
>
#{id}
</foreach>
AND a.is_delete = 0
AND (a.status
<![CDATA[ <> ]]>
'使用单位待提交' and a.status
<![CDATA[ <> ]]>
'一级受理已驳回' and a.status
<![CDATA[ <> ]]>
'使用单位已撤回' and a.status
<![CDATA[ <> ]]>
'已作废')
group by a.project_contraption_id
UNION
SELECT
a.project_contraption_id,
COUNT(1) as inUseNumber
FROM
tzs_jg_installation_notice a
WHERE a.project_contraption_id in
<foreach
collection =
'projectContraptionIdList'
item=
'id'
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{id}
#{id}
</foreach>
</foreach>
AND a.notice_status
<![CDATA[ <> ]]>
'6610'
]
AND a.notice_status
<![CDATA[ <> ]]>
'6615'
) AS pl(project_contraption_id)
AND a.notice_status
<![CDATA[ <> ]]>
'6614'
LEFT JOIN tzs_jg_use_registration ur
group by a.project_contraption_id
ON ur.project_contraption_id = pl.project_contraption_id
)
AND ur.is_delete = 0
GROUP BY project_contraption_id
AND ur.project_contraption_id != null
AND ur.status NOT IN ('使用单位待提交','一级受理已驳回','使用单位已撤回','已作废')
LEFT JOIN tzs_jg_installation_notice ins
ON ins.project_contraption_id = pl.project_contraption_id
AND ins.notice_status NOT IN ('6610','6614','6615')
GROUP BY pl.project_contraption_id
</select>
</select>
<select
id=
"countContraptionInUseTimesForDelete"
resultMap=
"projectContraptionResultMap"
>
<select
id=
"countContraptionInUseTimesForDelete"
resultMap=
"projectContraptionResultMap"
>
SELECT
SELECT
project_contraption_id,
project_contraption_id,
...
@@ -263,7 +251,8 @@
...
@@ -263,7 +251,8 @@
FROM (
FROM (
SELECT "RECORD", project_contraption_id
SELECT "RECORD", project_contraption_id
FROM idx_biz_jg_use_info
FROM idx_biz_jg_use_info
WHERE project_contraption_id = ANY(
WHERE project_contraption_id != null
AND project_contraption_id = ANY(
ARRAY[
ARRAY[
<foreach
collection=
"projectContraptionIdList"
item=
"id"
index=
"index"
separator=
","
>
<foreach
collection=
"projectContraptionIdList"
item=
"id"
index=
"index"
separator=
","
>
#{id}
#{id}
...
@@ -271,6 +260,7 @@
...
@@ -271,6 +260,7 @@
])) tu
])) tu
GROUP BY tu.project_contraption_id
GROUP BY tu.project_contraption_id
</select>
</select>
<select
id=
"queryJgProjectContraptionPage"
<select
id=
"queryJgProjectContraptionPage"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption"
>
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption"
>
select
select
...
@@ -473,172 +463,130 @@
...
@@ -473,172 +463,130 @@
<select
id=
"countContraptionInUseTimesForDeleteByIntoManagementBatch"
resultMap=
"projectContraptionResultMap"
>
<select
id=
"countContraptionInUseTimesForDeleteByIntoManagementBatch"
resultMap=
"projectContraptionResultMap"
>
SELECT
SELECT
project_contraption_id,
pc.project_contraption_id,
SUM(inUseNumber) inUseNumber
COALESCE(et.cnt,0) +
FROM (
COALESCE(ur.cnt,0) +
SELECT
COALESCE(cru.cnt,0) +
c.project_contraption_id,
COALESCE(ed.cnt,0) +
COUNT(1) AS inUseNumber
COALESCE(sc.cnt,0) +
FROM tzs_jg_equip_transfer a
COALESCE(crt.cnt,0) +
LEFT JOIN tzs_jg_equip_transfer_eq b ON b.equip_transfer_id=a.sequence_nbr
COALESCE(crn.cnt,0) +
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
COALESCE(ins.cnt,0) +
WHERE c.project_contraption_id in
COALESCE(mnt.cnt,0) +
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
COALESCE(ref.cnt,0) +
#{projectContraptionId}
COALESCE(trf.cnt,0) +
</foreach>
COALESCE(inspec.cnt,0) AS inUseNumber
AND a.is_delete = 0
AND ( a.apply_status != '6617')
GROUP BY c.project_contraption_id
UNION
SELECT
a.project_contraption_id,
COUNT(1) AS inUseNumber
FROM
FROM
tzs_jg_use_registration a
(VALUES
WHERE a.project_contraption_id in
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
separator=
","
>
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
(#{projectContraptionId})
#{projectContraptionId}
</foreach>
</foreach>
AND a.is_delete = 0
) AS pc(project_contraption_id)
AND ( a.status != '已作废')
LEFT JOIN (
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_equip_transfer a
JOIN tzs_jg_equip_transfer_eq b ON b.equip_transfer_id = a.sequence_nbr
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE a.is_delete = 0 AND a.apply_status != '6617'
GROUP BY c.project_contraption_id
) et ON et.project_contraption_id = pc.project_contraption_id
LEFT JOIN (
SELECT a.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_use_registration a
WHERE a.is_delete = 0 AND a.status != '已作废'
GROUP BY a.project_contraption_id
GROUP BY a.project_contraption_id
UNION
) ur ON ur.project_contraption_id = pc.project_contraption_id
SELECT
c.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_change_registration_unit a
FROM tzs_jg_change_registration_unit a
LEFT JOIN tzs_jg_change_registration_unit_eq b ON b.unit_change_registration_id=a.sequence_nbr
JOIN tzs_jg_change_registration_unit_eq b ON b.unit_change_registration_id = a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE c.project_contraption_id in
WHERE a.is_delete = 0 AND a.status != '已作废'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.status != '已作废')
GROUP BY c.project_contraption_id
GROUP BY c.project_contraption_id
UNION
) cru ON cru.project_contraption_id = pc.project_contraption_id
SELECT
c.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_enable_disable a
FROM tzs_jg_enable_disable a
LEFT JOIN tzs_jg_enable_disable_eq b ON b.enable_disable_apply_id=a.sequence_nbr
JOIN tzs_jg_enable_disable_eq b ON b.enable_disable_apply_id = a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE c.project_contraption_id in
WHERE a.is_delete = 0 AND a.audit_status != '已作废'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.audit_status != '已作废')
GROUP BY c.project_contraption_id
GROUP BY c.project_contraption_id
UNION
) ed ON ed.project_contraption_id = pc.project_contraption_id
SELECT
c.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_scrap_cancel a
FROM tzs_jg_scrap_cancel a
LEFT JOIN tzs_jg_scrap_cancel_eq b ON b.equip_transfer_id=a.sequence_nbr
JOIN tzs_jg_scrap_cancel_eq b ON b.equip_transfer_id = a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE c.project_contraption_id in
WHERE a.is_delete = 0 AND a.audit_status != '使用单位已撤回'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.audit_status != '使用单位已撤回')
GROUP BY c.project_contraption_id
GROUP BY c.project_contraption_id
UNION
) sc ON sc.project_contraption_id = pc.project_contraption_id
SELECT
c.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_change_registration_transfer a
FROM tzs_jg_change_registration_transfer a
LEFT JOIN tzs_jg_change_registration_transfer_eq b ON b.equip_transfer_id=a.sequence_nbr
JOIN tzs_jg_change_registration_transfer_eq b ON b.equip_transfer_id = a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE c.project_contraption_id in
WHERE a.is_delete = 0 AND a.audit_status != '使用单位已撤回'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.audit_status != '使用单位已撤回')
GROUP BY c.project_contraption_id
GROUP BY c.project_contraption_id
UNION
) crt ON crt.project_contraption_id = pc.project_contraption_id
SELECT
c.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_change_registration_name a
FROM tzs_jg_change_registration_name a
LEFT JOIN tzs_jg_change_registration_name_eq b ON b.name_change_registration_id=a.sequence_nbr
JOIN tzs_jg_change_registration_name_eq b ON b.name_change_registration_id = a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE c.project_contraption_id in
WHERE a.is_delete = 0 AND a.audit_status != '使用单位已撤回'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.audit_status != '使用单位已撤回')
GROUP BY c.project_contraption_id
GROUP BY c.project_contraption_id
UNION
) crn ON crn.project_contraption_id = pc.project_contraption_id
SELECT
a.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT a.project_contraption_id, COUNT(1) AS cnt
FROM
FROM tzs_jg_installation_notice a
tzs_jg_installation_notice a
WHERE a.notice_status != '6617'
WHERE a.project_contraption_id in
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND (a.notice_status != '6617')
GROUP BY a.project_contraption_id
GROUP BY a.project_contraption_id
UNION
) ins ON ins.project_contraption_id = pc.project_contraption_id
SELECT
c.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_maintain_notice a
FROM tzs_jg_maintain_notice a
LEFT JOIN tzs_jg_maintain_notice_eq b ON b.equip_transfer_id=a.sequence_nbr
JOIN tzs_jg_maintain_notice_eq b ON b.equip_transfer_id = a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE c.project_contraption_id in
WHERE a.is_delete = 0 AND a.notice_status != '6617'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.notice_status != '6617')
GROUP BY c.project_contraption_id
GROUP BY c.project_contraption_id
UNION
) mnt ON mnt.project_contraption_id = pc.project_contraption_id
SELECT
c.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_reform_notice a
FROM tzs_jg_reform_notice a
LEFT JOIN tzs_jg_reform_notice_eq b ON b.equip_transfer_id=a.sequence_nbr
JOIN tzs_jg_reform_notice_eq b ON b.equip_transfer_id = a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE c.project_contraption_id in
WHERE a.is_delete = 0 AND a.notice_status != '6617'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.notice_status != '6617')
GROUP BY c.project_contraption_id
GROUP BY c.project_contraption_id
UNION
) ref ON ref.project_contraption_id = pc.project_contraption_id
SELECT
c.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT c.project_contraption_id, COUNT(1) AS cnt
FROM tzs_jg_transfer_notice a
FROM tzs_jg_transfer_notice a
LEFT JOIN tzs_jg_transfer_notice_eq b ON b.equip_transfer_id=a.sequence_nbr
JOIN tzs_jg_transfer_notice_eq b ON b.equip_transfer_id = a.sequence_nbr
LEFT JOIN idx_biz_jg_use_info c ON b.equ_id=c.record
JOIN idx_biz_jg_use_info c ON b.equ_id = c.record
WHERE c.project_contraption_id in
WHERE a.is_delete = 0 AND a.notice_status != '6617'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND a.is_delete = 0
AND ( a.notice_status != '6617')
GROUP BY c.project_contraption_id
GROUP BY c.project_contraption_id
UNION
) trf ON trf.project_contraption_id = pc.project_contraption_id
SELECT
a.project_contraption_id,
LEFT JOIN (
COUNT(1) AS inUseNumber
SELECT a.project_contraption_id, COUNT(1) AS cnt
FROM tz_jyjc_inspection_application a
FROM tz_jyjc_inspection_application a
WHERE a.project_contraption_id in
WHERE a.status != '6617'
<foreach
collection=
"projectContraptionIdList"
item=
"projectContraptionId"
index=
'index'
open=
"("
close=
")"
separator=
","
>
#{projectContraptionId}
</foreach>
AND ( a.status != '6617')
GROUP BY a.project_contraption_id
GROUP BY a.project_contraption_id
) GROUP BY
project_contraption_id
) inspec ON inspec.project_contraption_id = pc.
project_contraption_id
</select>
</select>
<select
id=
"selectPipelineListByProjectContraptionId"
<select
id=
"selectPipelineListByProjectContraptionId"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline"
>
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsPipeline"
>
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