import { BaseService, Service, service } from '/@/cool';

// 日报服务
class DailyReportService extends BaseService {
	namespace = '/admin/dailyreport/report';

	// 获取统计信息
	async getStatistics(params: any) {
		return this.request({
			url: '/statistics',
			method: 'GET',
			params
		});
	}

	// 获取未提交人员列表
	async getUnsubmittedUsers(params: any) {
		return this.request({
			url: '/unsubmitted',
			method: 'GET',
			params
		});
	}

	// 按部门统计
	async getDepartmentStatistics(params: any) {
		return this.request({
			url: '/departmentStatistics',
			method: 'GET',
			params
		});
	}

	// 导出日报
	async exportReports(params: any) {
		return this.request({
			url: '/export',
			method: 'GET',
			params
		});
	}

	// 组织建议（周/月）
	async getInsight(params: any) {
		return this.request({
			url: '/insight',
			method: 'GET',
			params
		});
	}
}

// 注册服务
service.dailyreport = {
	report: new DailyReportService()
};

export default service.dailyreport;
