|
|
|
@ -54,13 +54,30 @@ |
|
|
|
project.report_name as reportName, |
|
|
|
project.report_name as reportName, |
|
|
|
project.report_type as reportType, |
|
|
|
project.report_type as reportType, |
|
|
|
flow.report_code as work, |
|
|
|
flow.report_code as work, |
|
|
|
flow.areport_time as time, |
|
|
|
<choose> |
|
|
|
|
|
|
|
<when test="code == 'first'"> |
|
|
|
|
|
|
|
<!-- 待办恢复后显示较新的流转/重新进窗时间,兼容缺失时间。 --> |
|
|
|
|
|
|
|
COALESCE(GREATEST(flow.areport_time, reentry.reentryTime), |
|
|
|
|
|
|
|
flow.areport_time, reentry.reentryTime) as time, |
|
|
|
|
|
|
|
</when> |
|
|
|
|
|
|
|
<otherwise> |
|
|
|
|
|
|
|
flow.areport_time as time, |
|
|
|
|
|
|
|
</otherwise> |
|
|
|
|
|
|
|
</choose> |
|
|
|
flow.approver_state as approverState, |
|
|
|
flow.approver_state as approverState, |
|
|
|
flow.report_link as flowCode, |
|
|
|
flow.report_link as flowCode, |
|
|
|
flow.report_id as warningId, |
|
|
|
flow.report_id as warningId, |
|
|
|
(CASE WHEN flow.type = 'warning' THEN 1 ELSE 0 END) as isWarning |
|
|
|
(CASE WHEN flow.type = 'warning' THEN 1 ELSE 0 END) as isWarning |
|
|
|
FROM report_flow flow |
|
|
|
FROM report_flow flow |
|
|
|
LEFT JOIN report_project project ON project.id = flow.report_id |
|
|
|
LEFT JOIN report_project project ON project.id = flow.report_id |
|
|
|
|
|
|
|
<if test="code == 'first'"> |
|
|
|
|
|
|
|
LEFT JOIN ( |
|
|
|
|
|
|
|
SELECT report_id, MAX(crt_time) as reentryTime |
|
|
|
|
|
|
|
FROM inform_message |
|
|
|
|
|
|
|
WHERE node = '重新进窗' |
|
|
|
|
|
|
|
GROUP BY report_id |
|
|
|
|
|
|
|
) reentry ON reentry.report_id = project.id |
|
|
|
|
|
|
|
</if> |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
flow.is_init IS NULL |
|
|
|
flow.is_init IS NULL |
|
|
|
AND project.delete_flag = 0 |
|
|
|
AND project.delete_flag = 0 |
|
|
|
@ -77,7 +94,7 @@ |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</where> |
|
|
|
ORDER BY flow.areport_time DESC |
|
|
|
ORDER BY time DESC |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getProjectTabWorkVo" resultType="com.biutag.supervision.pojo.vo.work.ProjectTabWorkVo"> |
|
|
|
<select id="getProjectTabWorkVo" resultType="com.biutag.supervision.pojo.vo.work.ProjectTabWorkVo"> |
|
|
|
|