| | |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="campusid" column="campusid"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="taskGuid" column="task_guid"/> |
| | |
| | | <if test="senderdetail != null and senderdetail != ''">and senderdetail = #{senderdetail}</if> |
| | | <if test="type != null and type != ''">and type = #{type}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="sendstates != null and sendstates.size() > 0"> |
| | | AND sendstate IN |
| | | <foreach collection="sendstates" item="state" open="(" separator="," close=")"> |
| | | #{state} |
| | | </foreach> |
| | | </if> |
| | | <!-- taskIds筛选 --> |
| | | <if test="taskIds != null and taskIds.size() > 0"> |
| | | AND taskid IN |
| | |
| | | <if test="isupload != null">isupload,</if> |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | <if test="campusid != null">campusid,</if> |
| | | <if test="pid != null">pid,</if> |
| | | <if test="guid != null">guid,</if> |
| | | <if test="textParam != null">text_param,</if> |
| | |
| | | <if test="isupload != null">#{isupload},</if> |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | <if test="campusid != null">#{campusid},</if> |
| | | <if test="pid != null">#{pid},</if> |
| | | <if test="guid != null">#{guid},</if> |
| | | <if test="textParam != null">#{textParam},</if> |
| | |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="campusid != null">campusid = #{campusid},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="textParam != null">text_param = #{textParam},</if> |
| | |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="campusid != null">campusid = #{campusid},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="textParam != null">text_param = #{textParam},</if> |
| | |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | | <if test="sex != null">sex = #{sex},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="sendstate != null ">sendstate = #{sendstate},</if> |
| | | <if test="age != null">age = #{age},</if> |
| | | <if test="sfzh != null">sfzh = #{sfzh},</if> |
| | |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="campusid != null">campusid = #{campusid},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="visitCount != null">visit_count = #{visitCount},</if> |
| | |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="campusid != null">campusid = #{campusid},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="textParam != null">text_param = #{textParam},</if> |
| | |
| | | <if test="pageSize != null and pageNum != null"> |
| | | limit ${pageSize} OFFSET ${pageNum} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsHyperlink" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult"> |
| | | select id, |
| | | visit_count, |
| | | is_visit_again, |
| | | type, |
| | | orgid, |
| | | drcode, |
| | | drname, |
| | | leavehospitaldistrictcode, |
| | | leavehospitaldistrictname, |
| | | deptcode, |
| | | deptname, |
| | | sendstate, |
| | | preachform, |
| | | current_preachform, |
| | | excep, |
| | | nurse_id, |
| | | nurse_name, |
| | | taskid, |
| | | task_name, |
| | | visit_time, |
| | | finishtime, |
| | | endtime, |
| | | senddate, |
| | | suggest, |
| | | result, |
| | | templateid, |
| | | templatename, |
| | | patid, |
| | | sendname, |
| | | send_type, |
| | | recordid, |
| | | exrecallcount, |
| | | continue_flag, |
| | | continue_time_now, |
| | | continue_content, |
| | | continue_count, |
| | | continue_time_next, |
| | | task_situation |
| | | from service_subtask |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </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="deptcodes != null and deptcodes.size() > 0"> |
| | | AND deptcode IN |
| | | <foreach collection="deptcodes" item="deptcode" open="(" separator="," |
| | | close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="serviceType != null and serviceType.size() > 0"> |
| | | AND service_type IN |
| | | <foreach collection="serviceType" item="serviceType" open="(" separator="," |
| | | close=")"> |
| | | #{serviceType} |
| | | </foreach> |
| | | </if> |
| | | <if test="startTime != null and endTime!=null"> |
| | | AND visit_time >= DATE(#{startTime}) |
| | | AND visit_time < DATE_ADD(DATE(#{endTime}), INTERVAL 1 DAY) |
| | | </if> |
| | | <if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if> |
| | | <if test="visitDeptName != null">and visit_dept_name = #{visitDeptName}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | <if test="continueFlag != null ">and continue_flag = #{continueFlag}</if> |
| | | <if test="continueTimeNow != null ">and continue_time_now = #{continueTimeNow,jdbcType=TIMESTAMP}</if> |
| | | <if test="continueCount != null ">and continue_count = #{continueCount}</if> |
| | | <if test="continueTimeNext != null ">and continue_time_next = #{continueTimeNext,jdbcType=TIMESTAMP}</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="," |
| | | close=")"> |
| | | #{key} |
| | | </foreach> |
| | | </if> |
| | | AND sendstate IS NOT NULL |
| | | <if test="sendstates != null and sendstates.size() > 0"> |
| | | AND sendstate IN |
| | | <foreach collection="sendstates" item="state" open="(" separator="," close=")"> |
| | | #{state} |
| | | </foreach> |
| | | </if> |
| | | <if test="currentPreachform != null"> |
| | | AND current_preachform = #{currentPreachform} |
| | | <if test="followUpCountStyle != null and followUpCountStyle = '1'"> |
| | | AND sendstate != 4 |
| | | </if> |
| | | </if> |
| | | <if test="excep != null and excep != ''"> |
| | | AND excep = #{excep} |
| | | </if> |
| | | <if test="taskSituation != null"> |
| | | AND task_situation = #{taskSituation} |
| | | </if> |
| | | <if test="drcode != null and drcode != ''"> |
| | | AND drcode = #{drcode} |
| | | </if> |
| | | <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''"> |
| | | AND leavehospitaldistrictcode = #{leavehospitaldistrictcode} |
| | | </if> |
| | | <if test="deptcode != null and deptcode != ''"> |
| | | AND deptcode = #{deptcode} |
| | | </if> |
| | | <if test="pageSize != null and pageNum != null"> |
| | | limit ${pageSize} OFFSET ${pageNum} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsJoy" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | |
| | | </select> |
| | | |
| | | </mapper> |
| | | |