import request from '/@/utils/request';

/**
 * 分页查询班级总结列表
 * @param query
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/classsummary/page',
    method: 'get',
    params: query
  });
};

/**
 * 新增班级总结
 * @param data
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/classsummary',
    method: 'post',
    data
  });
};

/**
 * 获取详情
 * @param id
 */
export const getDetail = (id: string) => {
  return request({
    url: '/stuwork/classsummary/detail',
    method: 'get',
    params: { id }
  });
};

/**
 * 编辑班级总结
 * @param data
 */
export const editObj = (data: any) => {
  return request({
    url: '/stuwork/classsummary/edit',
    method: 'post',
    data
  });
};

/**
 * 删除班级总结
 * @param ids
 */
export const delObj = (ids: string[]) => {
  return request({
    url: '/stuwork/classsummary/delete',
    method: 'post',
    data: ids
  });
};

/**
 * 初始化班级总结数据
 * @param data
 */
export const initClassSummary = (data: any) => {
  return request({
    url: '/stuwork/classsummary/init',
    method: 'post',
    data
  });
};

/**
 * 查询班级总结统计列表
 * @param data
 */
export const getStatisticsList = (data: any) => {
  return request({
    url: '/stuwork/classsummary/statisticsList',
    method: 'get',
    params: data
  });
};
