| | |
| | | FROM |
| | | ( |
| | | SELECT |
| | | b.id id, |
| | | b.create_time as createTime, |
| | | e.CODE, |
| | | e.NAME, |
| | |
| | | |
| | | UNION ALL |
| | | SELECT |
| | | t2_b.id id, |
| | | t2_b.create_time, |
| | | t2_e.CODE, |
| | | t2_e.NAME, |
| | |
| | | <if test=" record.endTime!=null "> |
| | | <![CDATA[ and #{record.endTime} >=b.create_time]]> |
| | | </if> |
| | | <if test="record.companyId != null and record.companyId !='' "> |
| | | and b.company_id = #{record.companyId} |
| | | </if> |
| | | </where> |
| | | UNION ALL |
| | | SELECT |
| | |
| | | <if test=" record.endTime!=null "> |
| | | <![CDATA[ and #{record.endTime} >= t2_b.create_time ]]> |
| | | </if> |
| | | <if test="record.companyId != null and record.companyId !='' "> |
| | | and t2_b.company_id = #{record.companyId} |
| | | </if> |
| | | </where> |
| | | ) t |
| | | |