| | |
| | | |
| | | <select id="page" resultMap="BaseResultMap"> |
| | | SELECT |
| | | tcr.contract_id, |
| | | tyu.unit_name, |
| | | tc.name, |
| | | tcr.id, |
| | |
| | | WHERE tcr.id = #{id} |
| | | </select> |
| | | |
| | | <select id="exportData" resultType="com.ycl.platform.domain.excel.CalculateExport"> |
| | | SELECT |
| | | SUBSTRING_INDEX(rule_name, '/', 1) AS rule_name, |
| | | COUNT(*) AS num, |
| | | SUM(score) AS score, |
| | | (100 - SUM(score)) AS surplusScore |
| | | FROM t_contract_score |
| | | WHERE contract_id = #{contractId} AND auditing_status = 'PASS' AND deleted = 0 |
| | | GROUP BY SUBSTRING_INDEX(rule_name, '/', 1) |
| | | </select> |
| | | |
| | | </mapper> |