| | |
| | | a.del_flag = 0 |
| | | AND b.del_flag = 0 |
| | | AND a.idcardno IS NOT NULL |
| | | <if test="startOutHospTime != null"> |
| | | <!--<if test="startOutHospTime != null"> |
| | | AND STR_TO_DATE(b.endtime,'%Y-%m-%d') >= STR_TO_DATE(#{startOutHospTime},'%Y-%m-%d') |
| | | </if> |
| | | <if test="endOutHospTime != null"> |
| | |
| | | </if> |
| | | <if test="endInHospTime != null"> |
| | | AND STR_TO_DATE(b.starttime, '%Y-%m-%d') <= STR_TO_DATE(#{startInHospTime}, '%Y-%m-%d') |
| | | </if>--> |
| | | <if test="startOutHospTime != null ">and date_format(b.endtime,'%y%m%d') >= |
| | | date_format(#{startOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endOutHospTime != null ">and date_format(b.endtime,'%y%m%d') <= |
| | | date_format(#{endOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="startInHospTime != null ">and date_format(b.starttime,'%y%m%d') >= |
| | | date_format(#{startInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endInHospTime != null ">and date_format(b.starttime,'%y%m%d') <= |
| | | date_format(#{endInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | '%') |