| | |
| | | ROUND(avg(d.score), 2) AS totalScore |
| | | FROM service_subtask_detail d |
| | | JOIN service_task t ON d.taskid = t.taskid |
| | | WHERE t.service_type IN (6, 14) |
| | | WHERE t.service_type IN (14) |
| | | AND t.del_flag = 0 |
| | | AND d.del_flag = 0 |
| | | AND d.create_time >= #{startFinishTime} |
| | |
| | | WHERE s.del_flag = '0' |
| | | AND d.del_flag = '0' |
| | | AND s.sendstate = 6 |
| | | AND s.service_type = #{serviceType} |
| | | <if test="serviceTypes != null and serviceTypes.size() > 0"> |
| | | AND service_type IN |
| | | <foreach collection="serviceTypes" item="serviceType" open="(" separator="," |
| | | close=")"> |
| | | #{serviceType} |
| | | </foreach> |
| | | </if> |
| | | <!-- <!– 只取公式里的五档权重,空值/0/未答等既不进分子也不进分母 –>--> |
| | | <!-- AND CAST(d.score AS DECIMAL(10,4)) IN (1, 0.8, 0.6, 0.4, 0.2)--> |
| | | <!-- 同一子任务同一题目只保留最新一条,避免重答被重复计入项数 --> |
| | |
| | | <if test="endFinishTime != null"> |
| | | AND s.finishtime < DATE_ADD(#{endFinishTime}, INTERVAL 1 DAY) |
| | | </if> |
| | | <if test="questionText != null and questionText != ''">and d.questiontext like concat('%', #{questionText}, |
| | | '%') |
| | | </if> |
| | | <choose> |
| | | <when test='dimensionType == "2"'> |
| | | AND s.leavehospitaldistrictcode IS NOT NULL AND s.leavehospitaldistrictcode <> '' |