| | |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | orgid, |
| | | pid, |
| | | guid, |
| | | text_param, |
| | |
| | | leaveicd10code, |
| | | orgid, |
| | | visit_type, |
| | | management_doctor, |
| | | management_doctor_code, |
| | | continue_flag, |
| | | continue_time_now, |
| | | continue_content, |
| | |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="continueFlag != null ">and continue_flag = #{continueFlag}</if> |
| | | <if test="continueTimeNow != null ">and continue_time_now = #{continueTimeNow,jdbcType=TIMESTAMP}</if> |
| | |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="subId != null"> |
| | | AND id = #{subId} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | <if test="subId != null">and id = #{subId}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="visitTime != null"> |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{visitTime},'%y%m%d') |
| | | </if> |
| | | <if test="visitTime != null">and date_format(visit_time,'%y%m%d') <= date_format(#{visitTime},'%y%m%d')</if> |
| | | <if test="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | <if test="continueFlag != null ">and continue_flag = #{continueFlag}</if> |
| | | <if test="continueTimeNow != null ">and continue_time_now = #{continueTimeNow,jdbcType=TIMESTAMP}</if> |
| | |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where del_flag = 0 |
| | | and sendstate != 5 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="visitTime != null"> |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{visitTime},'%y%m%d') |
| | | </if> |
| | | <if test="subId != null"> |
| | | AND id = #{subId} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | <if test="visitTime != null">and date_format(visit_time,'%y%m%d') <= date_format(#{visitTime},'%y%m%d') </if> |
| | | <if test="subId != null">and id = #{subId} </if> |
| | | <if test="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | <if test="continueFlag != null ">and continue_flag = #{continueFlag}</if> |
| | | <if test="continueTimeNow != null ">and continue_time_now = #{continueTimeNow,jdbcType=TIMESTAMP}</if> |
| | |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where del_flag = 0 |
| | | and sendstate = 5 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | <if test="visitTime != null"> |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(DATE_ADD(#{visitTime}, INTERVAL 1 DAY),'%y%m%d') |
| | | </if> |
| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | <if test="createStartTime != null and createEndTime != null">and create_time BETWEEN #{createStartTime} AND |
| | | #{createEndTime} |
| | | </if> |
| | |
| | | DATE_FORMAT(b.create_time, '%Y-%m-%d') LIKE CONCAT(#{createTimeNew}, '%') |
| | | </if> |
| | | <if test="sendstate != null ">and b.sendstate = #{sendstate}</if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and b.orgid = #{orgid} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and b.orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and b.campusid = #{campusid}</if> |
| | | </select> |
| | | |
| | | <select id="selectTimelyRate" parameterType="com.smartor.domain.ServiceSubtask" resultType="double"> |
| | |
| | | AND ss.visit_time < DATE_ADD(#{endtime}, INTERVAL 1 DAY) |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">AND ss.orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and ss.campusid = #{campusid}</if> |
| | | <if test="deptcode != null and deptcode != ''">and ss.deptcode = #{deptcode}</if> |
| | | <if test="deptname != null and deptname != ''">and ss.deptname = #{deptname}</if> |
| | | <if test="isabnormal != null">and ss.isabnormal = #{isabnormal}</if> |
| | |
| | | where 1=1 |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | </update> |
| | | |
| | | <update id="updateServiceSubtaskByCondition" parameterType="com.smartor.domain.ServiceSubtask"> |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | and a.del_flag = '0' |
| | | and b.del_flag = '0' |
| | | and a.appltype = '3' |
| | | <if test="orgid != null and orgid != ''"> |
| | | and a.orgid = #{orgid} |
| | | </if> |
| | | <if test="taskId != null"> |
| | | and a.task_id = #{taskId} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and a.orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and b.campusid = #{campusid}</if> |
| | | <if test="taskId != null">and a.task_id = #{taskId}</if> |
| | | <if test="taskName != null and taskName != ''"> |
| | | and a.task_name like concat('%', #{taskName}, '%') |
| | | </if> |
| | |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">AND |
| | | leavehospitaldistrictcode IN |
| | |
| | | AND t.del_flag=0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and t.orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and t.campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND t.leavehospitaldistrictcode IN |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND ss.orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | AND ss.campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND ss.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | and ss.del_flag=0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and ss.orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and ss.campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND ss.leavehospitaldistrictcode IN |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | AND campusid = #{campusid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="code" open="(" separator="," close=")"> |
| | |
| | | AND deptcode IS NOT NULL AND deptcode != '' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | AND campusid = #{campusid} |
| | | </if> |
| | | <if test="deptcodes != null and deptcodes.size() > 0"> |
| | | AND deptcode IN |
| | |
| | | AND service_type = 4 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="sendstate != null"> |
| | | AND sendstate = #{sendstate} |
| | |
| | | AND service_type = 4 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | <if test="sendstate != null"> |
| | | AND sendstate = #{sendstate} |
| | |
| | | SELECT questiontext, |
| | | d.taskid, |
| | | s.deptname, |
| | | d.create_time as createTime, |
| | | s.leavehospitaldistrictname, |
| | | d.targetvalue, |
| | | d.asrtext, |
| | | COUNT(d.asrtext) AS answercount, |
| | | SUM(d.score) AS singleScore |
| | | d.score AS singleScore |
| | | FROM service_subtask_detail d, |
| | | service_task s |
| | | WHERE d.taskid = s.taskid |
| | | AND deptname IS NOT NULL |
| | | AND leavehospitaldistrictname IS NOT NULL |
| | | <if test="endFinishTime != null"> |
| | | AND create_time < #{endFinishTime} |
| | | AND d.create_time < #{endFinishTime} |
| | | </if> |
| | | <if test="startFinishTime != null"> |
| | | AND create_time >= #{startFinishTime} |
| | | AND d.create_time >= #{startFinishTime} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | |
| | | </if> |
| | | GROUP BY d.questiontext, |
| | | d.taskid, |
| | | d.score, |
| | | s.deptname, |
| | | d.targetvalue, |
| | | d.create_time, |
| | | s.leavehospitaldistrictname, |
| | | d.asrtext |
| | | ORDER BY d.taskid |
| | | </select> |