import request from '@/utils/request'

//查询当前系统最高级的deptId
export function getTopDeptId(query) {
  return request({
    url: '/enforce/website/getTopDeptId',
    method: 'get',
    params: query
  })
}

//查询新闻管理列表固定条数
export function news(number,deptId,limit) {
  return request({
    url: '/enforce/website/news/'+number+'/'+deptId+'/'+limit,
    method: 'get'
  })
}

//查询方案公开固定条数
export function scheme(deptId,limit) {
  return request({
    url: '/enforce/website/scheme/'+deptId+'/'+limit,
    method: 'get'
  })
}

//查询举报留言
export function communicate(query) {
  return request({
    url: '/enforce/website/communicate/list',
    method: 'get',
    params: query
  })
}

// 查询举报留言列表
export function listCommunicate(query) {
  return request({
    url: '/enforce/communicate/list',
    method: 'get',
    params: query
  })
}

//查询农用品管理列表
export function productList(query) {
  return request({
    url: '/enforce/website/product/list',
    method: 'get',
    params: query
  })
}

// 删除方案管理
export function delScheme(id) {
  return request({
    url: '/enforce/scheme/remove/' + id,
    method: 'get'
  })
}

//查询新闻管理列表分页
export function newsList(query) {
  return request({
    url: '/enforce/website/newsList',
    method: 'get',
    params: query
  })
}

//查询新闻详情
export function newsDetail(id) {
  return request({
    url: '/enforce/website/news/'+id,
    method: 'get'
  })
}

//查询方案公开固定条数
export function schemeList(query) {
  return request({
    url: '/enforce/website/scheme/list',
    method: 'get',
    params: query
  })
}

//获取方案管理详细信息
export function schemeDetail(id) {
  return request({
    url: '/enforce/website/scheme/get/'+id,
    method: 'get'
  })
}

// 查询案件登记列表
export function listCase(query) {
  return request({
    url: '/enforce/case/list',
    method: 'get',
    params: query
  })
}

// 查询案件登记详细
export function getCase(id) {
  return request({
    url: '/enforce/case/get/' + id,
    method: 'get'
  })
}

// 查询方案管理列表不分页
export function schemeOptionList(query) {
  return request({
    url: '/enforce/scheme/schemeList',
    method: 'get',
    params: query
  })
}

// 查询部门下拉树结构
export function treeselect() {
  return request({
    url: '/system/dept/treeselect',
    method: 'get'
  })
}

// 查询案件勘察详细
export function getSurveyByCaseId(caseId) {
  return request({
    url: '/enforce/survey/getSurveyByCaseId/' + caseId,
    method: 'get'
  })
}

// 查询立案信息详细
export function getputRecordByCaseId(caseId) {
  return request({
    url: '/enforce/putrecord/getputRecordByCaseId/' + caseId,
    method: 'get'
  })
}

// caseId查询抽样信息详细
export function getSamplingByCaseId(caseId) {
  return request({
    url: '/enforce/sampling/getSamplingByCaseId/' + caseId,
    method: 'get'
  })
}

// 查询农业执法-案件-取证信息详细
export function getEvidenceByCaseId(caseId) {
  return request({
    url: '/enforce/evidence/getEvidenceByCaseId/' + caseId,
    method: 'get'
  })
}

// 查询抽样产品检测结果详细
export function getReportByGoodsId(goodsId) {
  return request({
    url: '/enforce/report/getReportByGoodsId/' + goodsId,
    method: 'get'
  })
}

// 查询执法人员管理列表
export function getEnforcerList(query) {
  return request({
    url: '/enforce/enforcer/allList',
    method: 'get',
    params: query
  })
}

// 查询农业执法-案件-处理信息详细
export function getTreatByCaseId(caseId) {
  return request({
    url: '/enforce/treat/getTreatByCaseId/' + caseId,
    method: 'get'
  })
}

// 查询裁决信息详细
export function getDecisionByCaseId(caseId) {
  return request({
    url: '/enforce/decision/getDecisionByCaseId/' + caseId,
    method: 'get'
  })
}

// 查询执行信息详细
export function getExecuteByCaseId(caseId) {
  return request({
    url: '/enforce/execute/getExecuteByCaseId/' + caseId,
    method: 'get'
  })
}

// 查询结案信息详细
export function getEndingByCaseId(caseId) {
  return request({
    url: '/enforce/ending/getEndingByCaseId/' + caseId,
    method: 'get'
  })
}

// 查询执法进度历史列表不分页
export function progressList(query) {
  return request({
    url: '/enforce/progress/progressList',
    method: 'get',
    params: query
  })
}

// 查询用户个人信息
export function getUserProfile() {
  return request({
    url: '/system/user/profile/get',
    method: 'get'
  })
}

// 用户密码重置
export function updateUserPwd(data) {
  return request({
    url: '/system/user/profile/updatePwd',
    method: 'post',
    params: data
  })
}

// 查询举报留言详细
export function getCommunicate(id) {
  return request({
    url: '/enforce/communicate/get/' + id,
    method: 'get'
  })
}

// 修改举报留言
export function updateCommunicate(data) {
  return request({
    url: '/enforce/communicate/edit',
    method: 'post',
    data: data
  })
}

// 查询方案管理列表
export function listScheme(query) {
  return request({
    url: '/enforce/scheme/list',
    method: 'get',
    params: query
  })
}

// 查询方案管理详细
export function getScheme(id) {
  return request({
    url: '/enforce/scheme/get/' + id,
    method: 'get'
  })
}

// 修改方案管理
export function updateScheme(data) {
  return request({
    url: '/enforce/scheme/edit',
    method: 'post',
    data: data
  })
}

// 待办事项列表
export function processTaskList(query) {
  return request({
    url: '/activiti/process/taskList',
    method: 'get',
    params: query
  })
}

// 新增配置
export function listModelCustom(data) {
  return request({
    url: '/activiti/modelCustom/list',
    method: 'get',
    params: data
  })
}

// 查询农业执法-案件-备案信息详细
export function getOnrecordByCaseId(caseId) {
  return request({
    url: '/enforce/onrecord/getOnrecordByCaseId/' + caseId,
    method: 'get'
  })
}

// 查询农业执法-案件-备案信息详细
export function communicateAdd(data) {
  return request({
    url: '/enforce/website/communicate/add',
    method: 'post',
    data: data
  })
}

// 查询农业执法-案件-备案信息详细
export function getPersonalByUserId(userId) {
  return request({
    url: '/enforce/personal/getPersonalByUserId/' + userId,
    method: 'get'
  })
}

// 查询农业执法-案件-备案信息详细
export function getCompanyByUserId(userId) {
  return request({
    url: '/enforce/company/getCompanyByUserId/' + userId,
    method: 'get'
  })
}

// 个体户通过手机号码查询是否已经存在个体户的基本信息
export function personalList(data) {
  return request({
    url: '/enforce/personal/personalList',
    method: 'get',
    params: data
  })
}

// 企业通过负责人手机号码查询是否已经存在企业基本信息
export function companyList(data) {
  return request({
    url: '/enforce/company/companyList',
    method: 'get',
    params: data
  })
}

// 存在基本信息，将手机号等信息注册成账号
export function createUser(data) {
  return request({
    url: '/enforce/personal/createUser',
    method: 'post',
    data: data
  })
}

// 存在基本信息，将手机号等信息注册成账号
export function companyCreateUser(data) {
  return request({
    url: '/enforce/company/createUser',
    method: 'post',
    data: data
  })
}

// 查询部门下拉树结构
export function treeselectUser() {
  return request({
    url: '/enforce/website/treeselect',
    method: 'get'
  })
}

// 修改农业执法-监管对象(企业)
export function updateCompany(data) {
  return request({
    url: '/enforce/company/edit',
    method: 'post',
    data: data
  })
}

// 修改农业执法-监管对象(个体户)
export function updatePersonal(data) {
  return request({
    url: '/enforce/personal/edit',
    method: 'post',
    data: data
  })
}
