|
|
@ -134,38 +134,21 @@ |
|
|
|
`level` = 2 |
|
|
|
and rec_status = 0 |
|
|
|
) c2 on c1.`code` = c2.parent_code |
|
|
|
<if test="code != null and code != ''"> |
|
|
|
<if test="nums == 0"> |
|
|
|
and (c2.`report_type`in (0)) |
|
|
|
</if> |
|
|
|
<if test="nums == 14"> |
|
|
|
and (c2.`report_type`in (0,1)) |
|
|
|
</if> |
|
|
|
<if test="nums == 90"> |
|
|
|
and (c2.`report_type`in (0,1)) |
|
|
|
</if> |
|
|
|
<if test="nums == 180"> |
|
|
|
and (c2.`report_type`in (2)) |
|
|
|
</if> |
|
|
|
<if test="nums == 365"> |
|
|
|
and (c2.`report_type`in (2)) |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
WHERE |
|
|
|
c1.`level` = 1 |
|
|
|
and c1.rec_status = 0 |
|
|
|
<if test="code != null and code != ''"> |
|
|
|
and (c1.`code` = #{code} or c2.`code` = #{code}) |
|
|
|
and (c1.`code` = #{code}) |
|
|
|
</if> |
|
|
|
<if test="code==null or code==''"> |
|
|
|
<if test="nums == 0"> |
|
|
|
and (c1.`report_type`in (0)) |
|
|
|
and (c1.`report_type`in (0,1)) |
|
|
|
</if> |
|
|
|
<if test="nums == 14"> |
|
|
|
and (c1.`report_type`in (0,1)) |
|
|
|
and (c1.`report_type`in (1)) |
|
|
|
</if> |
|
|
|
<if test="nums == 90"> |
|
|
|
and (c1.`report_type`in (0,1)) |
|
|
|
and (c1.`report_type`in (1)) |
|
|
|
</if> |
|
|
|
<if test="nums == 180"> |
|
|
|
and (c1.`report_type`in (2)) |
|
|
|