| | |
| | | ( |
| | | SELECT |
| | | t.*, |
| | | ( CASE WHEN t.unrectifyCount = 0 THEN -1 WHEN t.unrectifyCount = t.hdTocalCount THEN 2 ELSE 1 END ) rectificationStatus |
| | | ( CASE WHEN t.unRectifyCount = t.hdTocalCount THEN - 1 WHEN t.rectifyCount = t.hdTocalCount THEN 2 ELSE 1 END ) rectificationStatus |
| | | FROM |
| | | ( |
| | | SELECT |
| | | s.*, |
| | | count( h.`status` = -1 OR NULL ) unRectifyCount, |
| | | count( h.`status` = - 1 OR NULL ) unRectifyCount, |
| | | count( h.`status` = 1 OR NULL ) rectifyCount, |
| | | count( h.`status` ) hdTocalCount, |
| | | count( h.LEVEL = 1 OR NULL ) sameAsCount, |
| | |
| | | ) t |
| | | ) l |
| | | LEFT JOIN company AS co ON l.checked_company_id = co.id |
| | | where 1=1 |
| | | WHERE |
| | | 1 =1 |
| | | <if test="params.inspectionName != null and params.inspectionName != ''"> |
| | | and l.inspection_name like concat("%",#{params.inspectionName},"%") |
| | | </if> |