1.添加员工完成率接口
This commit is contained in:
@@ -326,4 +326,18 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectEmployeeHostsWithOperationStatus"
|
||||
resultType="cn.iocoder.yudao.module.tkdata.controller.admin.employeehosts.vo.CompletedRateVO">
|
||||
SELECT
|
||||
user_id AS userId,
|
||||
SUM(CASE WHEN operation_status = 1 THEN 1 ELSE 0 END) AS finishedNum,
|
||||
SUM(CASE WHEN operation_status = 0 THEN 1 ELSE 0 END) AS unfinishedNum,
|
||||
COUNT(*) AS totalNum
|
||||
FROM server_employee_hosts
|
||||
WHERE deleted = 0
|
||||
<if test="userId != null">
|
||||
AND user_id = #{userId}
|
||||
</if>
|
||||
GROUP BY user_id
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user