| | |
| | | <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"/> |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where del_flag = 0 |
| | | <if test="subId != null ">and id = #{subId}</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="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="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> |
| | |
| | | deptname, |
| | | sendstate, |
| | | preachform, |
| | | current_preachform, |
| | | excep, |
| | | nurse_id, |
| | | nurse_name, |
| | |
| | | ORDER BY groupCode |
| | | </select> |
| | | |
| | | <!-- 宣教统计:按病区或科室分组,统计发送总量、发送成功量(sendstate=6)、已读量(finishtime不为空) --> |
| | | <select id="getHeLibraryCount" parameterType="com.smartor.domain.VO.HeLibraryCountVO" resultType="map"> |
| | | SELECT |
| | | <choose> |
| | | <when test="hospitaldistrictcodes != null and hospitaldistrictcodes.size() > 0"> |
| | | leavehospitaldistrictcode AS groupCode, |
| | | leavehospitaldistrictname AS groupName, |
| | | </when> |
| | | <otherwise> |
| | | deptcode AS groupCode, |
| | | deptname AS groupName, |
| | | </otherwise> |
| | | </choose> |
| | | COUNT(*) AS totalCount, |
| | | SUM(CASE WHEN sendstate = 6 THEN 1 ELSE 0 END) AS sendSuccessCount, |
| | | SUM(CASE WHEN finishtime IS NOT NULL THEN 1 ELSE 0 END) AS readCount |
| | | FROM service_subtask |
| | | WHERE del_flag = 0 |
| | | AND service_type = 4 |
| | | <if test="starttime != null">AND starttime >= #{starttime}</if> |
| | | <if test="endtime != null">AND endtime <= #{endtime}</if> |
| | | <if test="visittime != null">AND DATE(visit_time) = DATE(#{visittime})</if> |
| | | <if test="finishtime != null">AND DATE(finishtime) = DATE(#{finishtime})</if> |
| | | <if test="hospType != null and hospType != ''">AND hosp_type = #{hospType}</if> |
| | | <choose> |
| | | <when test="hospitaldistrictcodes != null and hospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="hospitaldistrictcodes" item="code" open="(" separator="," close=")"> |
| | | #{code} |
| | | </foreach> |
| | | GROUP BY leavehospitaldistrictcode, leavehospitaldistrictname |
| | | ORDER BY groupCode |
| | | </when> |
| | | <otherwise> |
| | | <if test="deptcodes != null and deptcodes.size() > 0"> |
| | | AND deptcode IN |
| | | <foreach collection="deptcodes" item="code" open="(" separator="," close=")"> |
| | | #{code} |
| | | </foreach> |
| | | </if> |
| | | GROUP BY deptcode, deptname |
| | | ORDER BY groupCode |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | </mapper> |