| | |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskCategoryCount" id="ServiceSubtaskCategoryCountResult"> |
| | | <result property="month" column="month"/> |
| | | <result property="serviceType" column="service_type"/> |
| | | <result property="subTaskId" column="subTaskId"/> |
| | | <result property="completedCount" column="completed_count"/> |
| | | <result property="allCount" column="all_count"/> |
| | | <result property="completedPercent" column="completed_percent"/> |
| | | <result property="name" column="name"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskScriptCount" id="ServiceSubtaskScriptCountResult"> |
| | | <result property="scriptid" column="scriptid"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="scriptType" column="script_type"/> |
| | | <result property="scriptContent" column="script_content"/> |
| | | <result property="subtaskType" column="subtask_type"/> |
| | | <result property="completedQuantity" column="completed_quantity"/> |
| | | <result property="allQuantity" column="all_quantity"/> |
| | | <result property="completedPercentage" column="completed_percentage"/> |
| | | <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_type, |
| | | a.script_content, |
| | | b.subtask_type, |
| | | b.completed_quantity, |
| | | b.all_quantity, |
| | | ROUND(b.completed_quantity/b.all_quantity,2) as completed_percentage |
| | |
| | | INNER JOIN( |
| | | SELECT |
| | | ssd.scriptid AS scriptid, |
| | | ss.type as subtask_type, |
| | | SUM(CASE WHEN IFNULL(ssd.matchedtext,ssd.asrtext) IS NOT NULL |
| | | AND IFNULL(ssd.matchedtext,ssd.asrtext) != '' THEN 1 |
| | | ELSE 0 END) AS completed_quantity, |