| | |
| | | </foreach> |
| | | </if> |
| | | <if test=" visitDeptCodes != null and visitDeptCodes.size()>0"> |
| | | and visit_dept_name IN |
| | | and visit_dept_code IN |
| | | <foreach collection="visitDeptCodes" item="visitDeptCode" open="(" separator="," |
| | | close="))"> |
| | | #{visitDeptCode} |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test=" visitDeptCodes != null and visitDeptCodes.size()>0"> |
| | | OR visit_dept_name IN |
| | | OR visit_dept_code IN |
| | | <foreach collection="visitDeptCodes" item="visitDeptCode" open="(" separator="," |
| | | close="))"> |
| | | #{visitDeptCode} |
| | |
| | | <if test="sort != null and sort==6">order by admindate desc</if> |
| | | <if test="sort != null and sort==7">order by visit_time asc</if> |
| | | <if test="sort != null and sort==8">order by visit_time desc</if> |
| | | <if test="sort != null and sort==9">order by sendname asc</if> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | <select id="getCompensateServiceSubtaskList" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | |
| | | </if> |
| | | <if test="managementDoctorCode != null">and management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="managementDoctor != null">and management_doctor like concat('%',#{managementDoctor}, '%')</if> |
| | | <if test="visitCount != null and visitCount == 1"> |
| | | AND visit_count = 1 |
| | | </if> |
| | | <if test="visitCount != null and visitCount > 1"> |
| | | AND visit_count > 1 |
| | | </if> |
| | | <if test="groupKey != null and groupKey != ''"> |
| | | AND ${groupKey} IN |
| | | <foreach collection="groupKeyList" item="key" open="(" separator="," |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | select sendstate,starttime,endtime,nurse_name,phone,sex,task_name,sendname,leavediagname,visit_time FROM |
| | | service_subtask WHERE del_flag=0 |
| | | and service_type != 4 |
| | | <if test="leavediagname != null">and leavediagname like concat('%',#{leavediagname}, '%')</if> |
| | | <if test="sendname != null">and sendname like concat('%',#{sendname}, '%')</if> |
| | | <if test="taskName != null">and task_name like concat('%',#{taskName}, '%')</if> |
| | |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="visitCount != null and visitCount == 1"> |
| | | AND visit_count = 1 |
| | | </if> |
| | | <if test="visitCount != null and visitCount > 1"> |
| | | AND visit_count > 1 |
| | | </if> |
| | | <if test="groupKey != null and groupKey != '' and groupKeyList != null and groupKeyList.size>0"> |
| | | AND ${groupKey} IN |
| | | <foreach collection="groupKeyList" item="key" open="(" separator="," |
| | |
| | | <!-- 目前只统计语音和问卷 --> |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="visitCount != null and visitCount == 1"> |
| | | AND visit_count = 1 |
| | | </if> |
| | | <if test="visitCount != null and visitCount > 1"> |
| | | AND visit_count > 1 |
| | | </if> |
| | | <if test="groupKey != null and groupKey != ''"> |
| | | group by ${groupKey} |
| | |
| | | FROM service_subtask |
| | | WHERE DATE_FORMAT(finishtime, '%Y-%m-%d') >= #{startDate} |
| | | AND DATE_FORMAT(finishtime, '%Y-%m-%d') <= #{endDate} |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | GROUP BY deptname |
| | | </select> |
| | | |
| | |
| | | <if test="excep != null "> |
| | | AND excep = #{excep} |
| | | </if> |
| | | <if test="taskName != null and taskName != ''"> |
| | | AND task_name like concat('%', #{taskName}, '%') |
| | | </if> |
| | | <if test="visitCount != null and visitCount == 1"> |
| | | AND visit_count = 1 |
| | | </if> |