xiangpei
2024-08-15 17244068535a9163ab1fd6b3be2a794d9a857879
ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml
@@ -112,11 +112,13 @@
    <select id="ywUnitCount" resultType="java.util.Map">
        SELECT
            u.unit_name AS name,
            COUNT(tcs.id) AS num
            COUNT(tcs.id) AS num,
            100 - SUM(score) AS score
        FROM
            t_contract_score tcs
                LEFT JOIN t_yw_unit u ON tcs.unit_id = u.id
        WHERE tcs.deleted = 0
        GROUP BY tcs.unit_id
        ORDER BY score DESC
    </select>
</mapper>