| | |
| | | |
| | | <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 |
| | | a.rule_name, |
| | | COUNT(b.id) AS num, |
| | | IFNULL(-SUM(score), 0) AS score |
| | | FROM t_calculate_rule a |
| | | LEFT JOIN t_contract_score b ON b.rule_id = a.id AND auditing_status = 'PASS' AND b.deleted = 0 |
| | | WHERE a.contract_id = #{contractId} AND a.deleted = 0 |
| | | GROUP BY a.rule_name |
| | | </select> |
| | | |
| | | </mapper> |