| | |
| | | <if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename}, |
| | | '%') |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null"> |
| | | <if test="startOutHospTime != null"> |
| | | AND date_format(endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endOutHospTime != null"> |
| | | AND date_format(endtime,'%y%m%d') <= date_format(#{endOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test=" leaveldeptcodes != null"> |
| | | <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | AND deptcode IN |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |
| | |
| | | <if test="remark != null">and remark = #{remark}</if> |
| | | <if test="suggest != null">and suggest = #{suggest}</if> |
| | | </where> |
| | | order by update_time desc,id desc |
| | | <if test="serviceType != null and serviceType != ''and serviceType != '2'and serviceType != '3'">order by |
| | | long_send_time desc |
| | | </if> |
| | | <if test="serviceType != null and serviceType != ''and serviceType == '2'">order by endtime desc</if> |
| | | <if test="serviceType != null and serviceType != ''and serviceType == '3'">order by admindate desc</if> |
| | | -- order by update_time desc,id desc |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult"> |
| | |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | | <if test="sex != null">sex = #{sex},</if> |
| | | <if test="sendstate != null ">sendstate = #{sendstate},</if> |
| | | <if test="age != null">age = #{age},</if> |
| | | <if test="sfzh != null">sfzh = #{sfzh},</if> |
| | | <if test="addr != null">addr = #{addr},</if> |