//不巡防申请
import request from "@/utils/request";
const api = "/mosty-api/mosty-rwzx";
const api2 = "/mosty-api/mosty-base";
//新增
export function addRw(data) {
  return request({
    url: api + "/tbRwTask/inner/addRw",
    method: "POST",
    data
  });
}

//查询任务列表
export function getMySend(params) {
  return request({
    url: api + "/tbRwTask/inner/selectPage",
    method: "get",
    params
  });
}

//根据任务ID修改任务状态
export function byIdEditStatus(data) {
  return request({
    url: api + "/tbRwTask/inner/changeRwState",
    method: "post",
    data
  });
}

//查询任务列表
export function getRwList(params) {
  return request({
    url: api + '	/tbRwTask/inner/selectMyPage',
    method: 'get',
    params
  })
}
//任务完成情况排名
export function getTaskRanking(params) {
  return request({
    url: api + "/tbRwTask/inner/getTaskRanking",
    method: 'get',
    params
  })
}

//部门任务完成情况排名
export function getTaskByDept(params) {
  return request({
    url: api + "/tbRwTask/inner/getTaskByDept",
    method: 'get',
    params
  })
}
//任务数量统计
export function getDataStatistics(params) {
  return request({
    url: api + "/tbRwTask/inner/getDataStatistics",
    method: 'get',
    params
  })
}

//任务类型统计
export function getRWLXDataStatistics(params) {
  return request({
    url: api + "/tbRwTask/inner/getRWLXDataStatistics",
    method: 'get',
    params
  })
}

//根据部门deptid获取所属分县局、所属地市州
export function getOrgByDeptId(deptid) {
  return request({
    url: api2 + `/deptFeign/getOrgByDeptId/${deptid}`,
    method: 'get',
  })
}

//通过任务id查询任务详情信息
export function getTaskInfo(id) {
  return request({
    url: api +  `/tbRwTask/inner/getTaskInfo/${id}`,
    method: 'get'
  })
}


