|
|
@ -119,11 +119,12 @@ |
|
|
|
r1.id, |
|
|
|
r1.`code`, |
|
|
|
r1.`name`, |
|
|
|
r2.id as subentryId, |
|
|
|
r2.`code` as subentryCode, |
|
|
|
r2.`name` as subentryName |
|
|
|
if(r2.id is null,r1.id,r2.id) as subentryId, |
|
|
|
if(r2.`code` is null,r1.`code`,r2.`code`) as subentryCode, |
|
|
|
if(r2.`name` is null,r1.`name`,r2.`name`) as subentryName |
|
|
|
FROM |
|
|
|
t_ht_report r1, |
|
|
|
t_ht_report r1 |
|
|
|
LEFT JOIN |
|
|
|
( |
|
|
|
SELECT |
|
|
|
id, |
|
|
@ -136,10 +137,9 @@ |
|
|
|
type = 3 |
|
|
|
and is_show = 1 |
|
|
|
and is_del = 0 |
|
|
|
) r2 |
|
|
|
) r2 on r1.`code` = r2.parent_code |
|
|
|
WHERE |
|
|
|
r1.`code` = r2.parent_code |
|
|
|
and r1.type = 2 |
|
|
|
r1.type = 2 |
|
|
|
and r1.is_show = 1 |
|
|
|
and r1.is_del = 0 |
|
|
|
</select> |
|
|
|