| | |
| | | |
| | | <if test="placePractitioner.type == 1"> |
| | | and TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) < 18 |
| | | and jc.category_no in (180202,180201) |
| | | and jc.category_no in (180202,180201,180200) |
| | | </if> |
| | | <if test="placePractitioner.type == 2"> |
| | | and jpp.ethnicity != 1 |
| | | and jc.category_no in (180202,180201) |
| | | and jc.category_no in (180202,180201,180200) |
| | | </if> |
| | | <if test="placePractitioner.type == 3"> |
| | | and (TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) < 18 or jpp.ethnicity != 1) |
| | | and jc.category_no in (180202,180201) |
| | | and jc.category_no in (180202,180201,180200) |
| | | </if> |
| | | and jpp.is_deleted = 0 |
| | | order by jpp.id desc |
| | |
| | | <where> |
| | | <if test="placePractitioner.type == 1"> |
| | | and TIMESTAMPDIFF(year, substring(jpp.id_card, 7, 8), now()) < 18 |
| | | and jc.category_no in (180202,180201) |
| | | and jc.category_no in (180202,180201,180200) |
| | | </if> |
| | | <if test="placePractitioner.type == 2"> |
| | | and jpp.ethnicity != 1 |
| | | and jc.category_no in (180202,180201) |
| | | and jc.category_no in (180202,180201,180200) |
| | | </if> |
| | | <if test="placePractitioner.id != null ">and jpp.id = #{placePractitioner.id}</if> |
| | | <if test="placePractitioner.placeId != null ">and jpp.place_id = #{placePractitioner.placeId}</if> |