| | |
| | | END |
| | | </sql> |
| | | |
| | | <!-- 当前执行方式:首次随访 current_preachform 为空时,取 preachform 的第一个执行方式兜底 --> |
| | | <sql id="effectiveCurrentPreachformExpr"> |
| | | COALESCE(NULLIF(TRIM(current_preachform), ''), TRIM(SUBSTRING_INDEX(preachform, ',', 1))) |
| | | </sql> |
| | | |
| | | <select id="selectServiceSubtaskBySendstate" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="preachform != null ">and preachform = #{preachform}</if> |
| | | <if test="currentPreachform != null ">and current_preachform = #{currentPreachform}</if> |
| | | <if test="currentPreachforms != null and currentPreachforms != ''"> |
| | | and FIND_IN_SET(<include refid="effectiveCurrentPreachformExpr"/>, #{currentPreachforms}) |
| | | </if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="textParam != null and textParam != ''">and text_param = #{textParam}</if> |
| | | <if test="bedNo != null">and bed_no = #{bedNo}</if> |
| | |
| | | #{state} |
| | | </foreach> |
| | | </if> |
| | | <if test="currentPreachforms != null and currentPreachforms != ''"> |
| | | AND FIND_IN_SET(<include refid="effectiveCurrentPreachformExpr"/>, #{currentPreachforms}) |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |