| | |
| | | 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, |
| | |
| | | AND operation_item_id IN |
| | | <foreach collection="operationItemIds" item="operationItemIdItem" open="(" separator="," close=")"> |
| | | #{operationItemIdItem} |
| | | </foreach> |
| | | </if> |
| | | <if test="inhospids != null and inhospids.size() > 0"> |
| | | AND inhospid IN |
| | | <foreach collection="inhospids" item="inhospidItem" open="(" separator="," close=")"> |
| | | #{inhospidItem} |
| | | </foreach> |
| | | </if> |
| | | <if test="templateid != null and templateid != ''">and templateid = #{templateid}</if> |
| | |
| | | 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> |