待办中心-法规认证流程-待办流程(平台件数据)

This commit is contained in:
zhn
2023-09-15 15:21:49 +08:00
parent fd2ef61884
commit 5d788afc91
@@ -267,34 +267,6 @@
process_info_detail pid
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' and pid.end_time is not null and pid.user_id = #{params.currentUserId} order by pid.end_time asc limit 1
) as end_time,
<!--(
case when flow_type = '21' then
(
SELECT
pci.end_time
FROM
project_certification_inventory pci
WHERE
pci.project_library_id = pi.id
AND ( pci.flow_status = 'List to be checked' OR pci.flow_status = 'Refusal of responsible person' )
ORDER BY
pci.end_time ASC
LIMIT 1
)
when flow_type = '10' then
(
SELECT
pid.end_time
FROM
process_info_detail pid
WHERE
pid.process_info_id = pi.id
AND pid.STATUS = 'NotDone'
ORDER BY
pid.end_time ASC
LIMIT 1
) end
)AS end_time,-->
pi.STATUS,
pi.prc_num,
pi.prc_name,
@@ -324,6 +296,108 @@
#{item}
</foreach>
and plb.platform is null
union
SELECT
pi.id,
pi.project_library_id,
pi.project_laws_inventory_id,
pi.buss_document_library_id,
pi.acti_proc_inst_id,
plb.project_name_id AS project_name,
pyni.year_name,
pli.serial_number,
pli.title,
bdl.title_en,
<if test="params.cut == 'cn'">
concat(pli.serial_number,' ',pli.title) as standard_info,
</if>
<if test="params.cut == 'en'">
concat(pli.serial_number,' ',bdl.title_en) as standard_info,
</if>
(case pi.flow_type when '32' THEN '2' when '34' THEN '4' else pi.flow_type END) as flow_type,
pi.create_by,
pi.end_time,
pi.STATUS,
pi.prc_num,
pi.prc_name,
plb.project_name_id,
plb.target_market,
plb.studio_engineer,
plb.project_version,
plb.parent_id
FROM
process_info pi
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
where
(
pi.id IN (
SELECT
pid.process_info_id
FROM
process_info_detail pid
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
)
)
AND pi.flow_type IN
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and plb.platform is not null
union
SELECT
pi.id,
pi.project_library_id,
pi.project_laws_inventory_id,
pi.buss_document_library_id,
pi.acti_proc_inst_id,
plb.project_name_id AS project_name,
pyni.year_name,
'--' as serial_number,
'--' as standard_info,
'' as title,
'' as title_en,
pi.flow_type,
pi.create_by,
(
select
pid.end_time
from
process_info_detail pid
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' and pid.end_time is not null and pid.user_id = #{params.currentUserId} order by pid.end_time asc limit 1
) as end_time,
pi.STATUS,
pi.prc_num,
pi.prc_name,
plb.project_name_id,
plb.target_market,
plb.studio_engineer,
plb.project_version,
plb.parent_id
FROM
process_info pi
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
WHERE
(
pi.id IN (
SELECT
pid.process_info_id
FROM
process_info_detail pid
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
)
)
AND pi.flow_type IN
<foreach collection="params.qdqrFlowTypeValue" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and plb.platform is not null
)temp
<include refid="BaseQuerySql"/>
order by