| | |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </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="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </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="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | |
| | | </select> |
| | | |
| | |
| | | <if test="excep != null ">and excep = #{excep}</if> |
| | | <if test="nurseName != null ">and nurse_name = #{nurseName}</if> |
| | | <if test="score != null">and score = #{score}</if> |
| | | <!-- <if test="visitCount != null">and visit_count = #{visitCount}</if>--> |
| | | <if test="visitCount != null and visitCount == 1"> |
| | | AND visit_count = 1 |
| | | </if> |
| | |
| | | <if test="taskGuid != null">and task_guid = #{taskGuid}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | <if test="isVisitAgain != null">and is_visit_again = #{isVisitAgain}</if> |
| | | <!-- <if test="dateLimit != null and dateLimit = '1'"> and CURDATE() + 1 > long_send_time</if>--> |
| | | <!-- <if test="visitTime != null">and visit_time = #{visitTime}</if> --> |
| | | <!--<if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if> |
| | | <if test="visitDeptName != null">and visit_dept_name = #{visitDeptName}</if>--> |
| | | <if test="visitCount != null and visitCount > 1 and visitDeptCodes != null and visitDeptCodes.size() > 0"> |
| | | AND visit_dept_code IN |
| | | <foreach collection="visitDeptCodes" item="visitDeptCodes" open="(" |
| | |
| | | <if test="sort != null and sort==6">order by admindate desc</if> |
| | | <if test="sort != null and sort==7">order by visit_time asc</if> |
| | | <if test="sort != null and sort==8">order by visit_time desc</if> |
| | | |
| | | <!-- order by update_time desc,id desc --> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | <select id="getCompensateServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtaskVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | |
| | | SUM(CASE WHEN sendstate >= 3 OR sendstate = 1 THEN 1 ELSE 0 END) AS yfs, |
| | | SUM(CASE WHEN sendstate = 2 THEN 1 ELSE 0 END) AS dsf, |
| | | SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq, |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc, |
| | | SUM(CASE WHEN isabnormal IS NOT NULL AND isabnormal = 2 THEN 1 ELSE 0 END) AS jg |
| | | FROM service_subtask |
| | | where 1=1 |
| | | and del_flag = 0 |