| | |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskScriptCount" id="ServiceSubtaskScriptCountResult"> |
| | | <result property="scriptid" column="scriptid"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="scriptContent" column="script_content"/> |
| | | <result property="completedQuantity" column="completed_quantity"/> |
| | | <result property="allQuantity" column="all_quantity"/> |
| | |
| | | <result property="optionText" column="option_text"/> |
| | | <result property="chosenQuantity" column="chosen_quantity"/> |
| | | <result property="chosenPercentage" column="chosen_percentage"/> |
| | | <result property="options" column="options"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceSubtaskVo"> |
| | |
| | | resultMap="ServiceSubtaskScriptCountResult"> |
| | | SELECT |
| | | a.id as scriptid, |
| | | a.templateid as templateid, |
| | | a.script_content, |
| | | b.completed_quantity, |
| | | b.all_quantity, |
| | | <if test="type == 1"> |
| | | '' as options, |
| | | </if> |
| | | <if test="type == 2"> |
| | | c.options, |
| | | </if> |
| | | ROUND(b.completed_quantity/b.all_quantity,2) as completed_percentage |
| | | FROM |
| | | <if test="type == 1"> |
| | |
| | | </if> |
| | | group by ssd.scriptid) b |
| | | ON a.id = b.scriptid |
| | | <!-- 统计问卷 --> |
| | | <if test="type == 2"> |
| | | LEFT JOIN ( |
| | | SELECT target.scriptid,GROUP_CONCAT(optioncontent) as options |
| | | FROM svy_task_template_targetoption target |
| | | group by target.scriptid |
| | | ) c ON a.scriptid = c.scriptid |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsScriptItemDetails" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |