-- 昨日注册员工数
SELECT COUNT(0) as '昨日注册员工数' FROM wuc_user WHERE DATE_ADD(CURDATE(),INTERVAL -1 day) = DATE(create_time) and is_del = 0;
SELECT COUNT(0) as '昨日注册员工数' FROM wuc_user WHERE TO_DAYS(NOW()) - TO_DAYS(create_time) = 1 and is_del = 0;
-- 截止昨日已注册员工数
SELECT COUNT(0) as '截止昨日已注册员工数' FROM wuc_user WHERE DATE_ADD(CURDATE(),INTERVAL -1 day) >= DATE(create_time) and is_del = 0;
-- 项目员工总数
SELECT COUNT(0) as '项目员工总数' FROM wuc_user_project_info where is_del = 0;
-- 昨日记工人数
SELECT COUNT(0) as '昨日记工人数' FROM wuc_labourer_work_record WHERE DATE_ADD(CURDATE(),INTERVAL -1 day) = DATE(create_time) and is_del = 0;
-- 截止昨日已记工员工数
SELECT COUNT(0) as '截止昨日已记工员工数' FROM wuc_labourer_work_record WHERE DATE_ADD(CURDATE(),INTERVAL -1 day) >= DATE(create_time) and is_del = 0;
-- 记工确认数
SELECT COUNT(0) as '记工确认数' from wuc_labourer_work_record where confirm_status = 3 and is_del = 0;
-- 记工总数
SELECT COUNT(0) as '记工总数' from wuc_labourer_work_record where is_del = 0;
-- 注册班组数
SELECT COUNT(0) as '注册班组数' from wuc_labourer_team where is_del = 0 and header_id is null;
-- 今日注册班组数
SELECT COUNT(0) as '今日注册班组数' from wuc_labourer_team where TO_DAYS(create_time) = TO_DAYS(NOW()) and is_del = 0 and header_id is null;
-- 合同完成数
SELECT COUNT(0) as '合同完成数' from wuc_labourer_contract_check where confirm_status = 3 and is_del = 0;
-- 今日合同完成数
SELECT COUNT(0) as '今日合同完成数' from wuc_labourer_contract_check where confirm_status = 3 and TO_DAYS(employee_check_time) = TO_DAYS(NOW()) and is_del = 0;