| | |
| | | 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> |