import request from '@/utils/request'

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

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

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

//查询举报留言
export function communicate(query) {
  return request({
    url: '/open/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: '/open/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: '/open/enforce/website/newsList',
    method: 'get',
    params: query
  })
}

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

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

//获取方案管理详细信息
export function schemeDetail(id) {
  return request({
    url: '/open/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: '/open/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: '/open/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
  })
}
// 查询农业执法-监管对象(个体户)列表
export function listPersonal(query) {
  return request({
    url: '/enforce/personal/list',
    method: 'get',
    params: query
  })
}
// 查询农业执法-监管对象(个体户)详细
export function getPersonal(id) {
  return request({
    url: '/enforce/personal/get/' + id,
    method: 'get'
  })
}
// 查询农业执法-监管对象(企业)列表
export function listCompany(query) {
  return request({
    url: '/enforce/company/list',
    method: 'get',
    params: query
  })
}
// 查询农业执法-监管对象(企业)详细
export function getCompany(id) {
  return request({
    url: '/enforce/company/get/' + id,
    method: 'get'
  })
}
// 根据deptId查询所在地区
export function getDeptName(id) {
  return request({
    url: '/system/dept/get/' + id,
    method: 'get'
  })
}
// 执法依据列表查询
export function getNewsList(query) {
  return request({
    url: '/open/enforce/website/newsList',
    method: 'get',
    params: query
  })
}
// 查询农用品管理列表
export function listProduct(query) {
  return request({
    url: '/enforce/product/list',
    method: 'get',
    params: query
  })
}
// 查询种子信息列表
export function listSeed(query) {
  return request({
    url: '/enforce/seed/list',
    method: 'get',
    params: query
  })
}
// 查询肥料信息列表
export function listFertilizer(query) {
  return request({
    url: '/enforce/fertilizer/list',
    method: 'get',
    params: query
  })
}
// 查询兽药信息列表
export function listGmp(query) {
  return request({
    url: '/enforce/gmp/list',
    method: 'get',
    params: query
  })
}
// 查询兽药信息列表
export function listFeed(query) {
  return request({
    url: '/enforce/feed/list',
    method: 'get',
    params: query
  })
}
// 查询农产品信息列表
export function listAgri(query) {
  return request({
    url: '/enforce/agri/list',
    method: 'get',
    params: query
  })
}
// 执法依据类型
export function enforceNewsType(query) {
  return request({
    url: '/open/enforce/website/data/type/enforce_news_type/002',
    method: 'get',
    params: query
  })
}
// 查询案件勘察列表
export function listSurvey(query) {
  return request({
    url: '/enforce/survey/list',
    method: 'get',
    params: query
  })
}
// 查询执法人员管理列表
export function listEnforcer(query) {
  return request({
    url: '/enforce/enforcer/list',
    method: 'get',
    params: query
  })
}
// 修改案件勘察
export function updateSurvey(data) {
  return request({
    url: '/enforce/survey/edit',
    method: 'post',
    data: data
  })
}
// 新增案件勘察
export function addSurvey(data) {
  return request({
    url: '/enforce/survey/add',
    method: 'post',
    data: data
  })
}
// 案件退回,从勘察退回至登记
export function returnCase(data) {
  return request({
    url: '/enforce/case/returnCase',
    method: 'post',
    data: data
  })
}

// 案件退回,从勘察退回至登记
export function addCase(data) {
  return request({
    url: '/enforce/case/add',
    method: 'post',
    data: data
  })
}
// 新增执法进度历史
export function addProgress(data) {
  return request({
    url: '/enforce/progress/add',
    method: 'post',
    data: data
  })
}
// 任务查看列表
export function caseTasklist(query) {
  return request({
    url: '/enforce/case/caseTasklist',
    method: 'get',
    params: query
  })
}
//上传全局方法附件
export function commonUpload(data) {
  return request({
    url: '/common/upload',
    method: 'post',
    header: { "Content-Type": 'application/x-www-form-urlencoded' },
    data: data
  })
}
// 新增勘察打卡
export function addClockin(data) {
  return request({
    url: '/enforce/clockin/add',
    method: 'post',
    data: data
  })
}
// 查询勘察打卡列表
export function clockinList(query) {
  return request({
    url: '/enforce/clockin/list',
    method: 'get',
    params: query
  })
}
// 查询勘察打卡详情
export function clockinGet(id) {
  return request({
    url: '/enforce/clockin/get/'+ id,
    method: 'get',
  })
}
// 已上传文件列表查询
export function attachmentList(query) {
  return request({
    url: '/enforce/progress/attachmentList',
    method: 'get',
    params: query
  })
}
// 各个节点附件上传保存方法
export function attachmentEdit(data) {
  return request({
    url: '/enforce/progress/attachmentEdit',
    method: 'post',
    data: data
  })
}
// 修改案件登记
export function updateCase(data) {
  return request({
    url: '/enforce/case/edit',
    method: 'post',
    data: data
  })
}
// 新增农业执法-案件-备案信息
export function addOnrecord(data) {
  return request({
    url: '/enforce/onrecord/add',
    method: 'post',
    data: data
  })
}
// 新增立案信息
export function addPutrecord(data) {
  return request({
    url: '/enforce/putrecord/add',
    method: 'post',
    data: data
  })
}

// 修改立案信息
export function updatePutrecord(data) {
  return request({
    url: '/enforce/putrecord/edit',
    method: 'post',
    data: data
  })
}

// 新增抽样信息
export function addSampling(data) {
  return request({
    url: '/enforce/sampling/add',
    method: 'post',
    data: data
  })
}

// 修改抽样信息
export function updateSampling(data) {
  return request({
    url: '/enforce/sampling/edit',
    method: 'post',
    data: data
  })
}

// 新增农业执法-案件-取证信息
export function addEvidence(data) {
  return request({
    url: '/enforce/evidence/add',
    method: 'post',
    data: data
  })
}

// 修改农业执法-案件-取证信息
export function updateEvidence(data) {
  return request({
    url: '/enforce/evidence/edit',
    method: 'post',
    data: data
  })
}

// 查询处理流程关联办理人员列表
export function caseHandlerList(query) {
  return request({
    url: '/enforce/caseHandler/caseHandlerList',
    method: 'get',
    params: query
  })
}

// 删除案件登记
export function delCase(id) {
  return request({
    url: '/enforce/case/remove/' + id,
    method: 'get'
  })
}

// 执法人员签到次数查询
export function enforceLockinCount(query) {
  return request({
    url: '/enforce/clockin/enforceLockinCount',
    method: 'get',
    params: query
  })
}

// 查询案件编号
export function getCaseNum(query) {
  return request({
    url: '/enforce/survey/getCaseNum',
    method: 'get',
    params: query
  })
}

// 查询手机监控
export function getMonitor(query) {
  return request({
    url: '/enforce/monitor/query',
    method: 'get',
    params: query
  })
}

// 查询案件下拉列表
export function getCaseList(query) {
  return request({
    url: '/enforce/case/getCaseList',
    method: 'get',
    params: query
  })
}

// 查询案件文书列表
export function getCaseDocumentList(query) {
  return request({
    url: '/enforce/case/getCaseDocumentList',
    method: 'get',
    params: query
  })
}

// 生成下载协助调查函
export function createAssistPDF(query) {
  return request({
    url: '/enforce/assist/createPDF',
    method: 'post',
    params: query
  })
}

// 生成现场检查(勘察)笔录PDF
export function createSurveyPDF(query) {
  return request({
    url: '/enforce/survey/createPDF',
    method: 'post',
    params: query
  })
}

// 生成立案相关PDF
export function createPutrecordPDF(query) {
  return request({
    url: '/enforce/putrecord/createPDF',
    method: 'post',
    params: query
  })
}

// 生成现场检查(勘察)笔录PDF
export function createOnrecordPDF(query) {
  return request({
    url: '/enforce/onrecord/createPDF',
    method: 'post',
    params: query
  })
}

// 生成抽样产品相关PDF
export function createSamplingPDF(query) {
  return request({
    url: '/enforce/sampling/createPDF',
    method: 'post',
    params: query
  })
}

// 生成PDF
export function createTreatPDF(query) {
  return request({
    url: '/enforce/treat/createPDF',
    method: 'post',
    params: query
  })
}

// 生成PDF
export function createDecisionPDF(query) {
  return request({
    url: '/enforce/decision/createPDF',
    method: 'post',
    params: query
  })
}

// 生成现场检查(勘察)笔录PDF
export function createEvidencePDF(query) {
  return request({
    url: '/enforce/evidence/createPDF',
    method: 'post',
    params: query
  })
}

// 生成PDF
export function createExecutePDF(query) {
  return request({
    url: '/enforce/execute/createPDF',
    method: 'post',
    params: query
  })
}

// 生成PDF
export function createEndingPDF(query) {
  return request({
    url: '/enforce/ending/createPDF',
    method: 'post',
    params: query
  })
}

// 案件中止调查PDF
export function createBreakPDF(query) {
  return request({
    url: '/enforce/break/createPDF',
    method: 'post',
    params: query
  })
}

// 案件恢复调查PDF
export function createResumePDF(query) {
  return request({
    url: '/enforce/resume/createPDF',
    method: 'post',
    params: query
  })
}

// 案件数量
export function caseNumberAll(query) {
  return request({
    url: '/enforce/bigData/caseNumberAll',
    method: 'get',
    params: query
  })
}

// 案件分类统计
export function caseTypeAccount(query) {
  return request({
    url: '/enforce/bigData/caseTypeAccount',
    method: 'get',
    params: query
  })
}

// 案件来源分析
export function caseSourceTypeAccount(query) {
  return request({
    url: '/home/enforceStatistic/caseSourceTypeAccount',
    method: 'get',
    params: query
  })
}

// 案件来源分析
export function casePreMonthNum(query) {
  return request({
    url: '/enforce/bigData/casePreMonthNum',
    method: 'get',
    params: query
  })
}

// 各乡镇案件地图坐标点分布
export function casePointList(query) {
  return request({
    url: '/enforce/bigData/casePointList',
    method: 'get',
    params: query
  })
}

// 用户上传签字
export function electronicSignature(data) {
  return request({
    url: '/system/user/profile/electronicSignature',
    method: 'post',
    data: data
  })
}

