| | |
| | | <if test="managementDoctorCode != null ">and management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="submit != null ">and submit = #{submit}</if> |
| | | <if test="upid != null ">and upid = #{upid}</if> |
| | | <if test="visitCount != null ">and visit_count = #{visitCount}</if> |
| | | <if test="patfrom != null ">and patfrom = #{patfrom}</if> |
| | | <if test="serviceType != null ">and service_type = #{serviceType}</if> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | |
| | | <if test="groupKey != null and groupKey != ''"> |
| | | group by ${groupKey} |
| | | </if> |
| | | <if test="pageSize != null and pageNum != null"> |
| | | limit ${pageSize} OFFSET ${pageNum} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsHyperlink" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="visitCount != null and visitCount == 1"> |
| | | <!-- 首个再次随访:精确查 visit_count = 2,与统计口径一致 --> |
| | | <if test="hyperLinkInfoType == 'againFollowUpPushCountInfo'"> |
| | | AND visit_count = 2 |
| | | </if> |
| | | <!-- 其他类型保持原语义:1 首次,>1 再次 --> |
| | | <if test="hyperLinkInfoType != 'againFollowUpPushCountInfo' and visitCount != null and visitCount == 1"> |
| | | AND visit_count = 1 |
| | | </if> |
| | | <if test="visitCount != null and visitCount > 1"> |
| | | <if test="hyperLinkInfoType != 'againFollowUpPushCountInfo' and visitCount != null and visitCount > 1"> |
| | | AND visit_count > 1 |
| | | </if> |
| | | <if test="groupKey != null and groupKey != '' and groupKeyList != null and groupKeyList.size>0"> |
| | |
| | | <if test="isManuallyCalled != null"> |
| | | AND is_manually_called = #{isManuallyCalled} |
| | | </if> |
| | | <if test="suggest != null and suggest != ''"> |
| | | AND TRIM(suggest) = #{suggest} |
| | | </if> |
| | | order by endtime desc |
| | | <if test="pageSize != null and pageNum != null"> |
| | | limit ${pageSize} OFFSET ${pageNum} |