// 督查问题模块

import request from '../utils/gw_ajax_request.js';

const baseurl = '';
// const baseurl = 'http://10.8.4.135:8872'
// const baseurl = 'http://36.250.234.48:8105'

// dc/insp/rsvrRgstr/list/type
export function getDuChaFenGongList(userId, pageSize) {
  return request({
    // url: baseurl + '/dc/insp/rsvrRgstr/list/type',
    url: baseurl + '/dc/insp/rsvrRgstr/findTree',
    method: 'POST',
    timeout: 100000,
    data: {
      pageSize: pageSize,
      pageNum: 1,
      presId: userId,
      type: 'vill', // 人饮固定为 vill
      pType: 2, // 人饮固定为 2
    },
    params: {
      pageSize: pageSize,
      pageNum: 1,
      presId: userId,
      type: 'vill', // 人饮固定为 vill
      pType: 2, // 人饮固定为 2
    },
  });
}

export function getVillageList_ny(objId, name) {
  return request({
    url: baseurl + '/dc/att/adXBase/queryTCList',
    method: 'POST',
    data: {
      objId: objId,
      name: name,
      pageNum: 1,
      pageSize: 50,
    },
    params: {
      objId: objId,
      name: name,
      pageNum: 1,
      pageSize: 50,
    },
  });
}

export function getTableId_ny(objId, persId) {
  return request({
    url: baseurl + '/dc/insp/villRgstr/getEngId',
    method: 'POST',
    data: {
      objId: objId,
      persId: persId,
    },
    params: {
      objId: objId,
      persId: persId,
    },
  });
}

export function updateTable1_ny(
  adNm,
  createTime,
  engId,
  isCenwtSupply,
  isFluexc,
  isMtarea,
  isPoverty,
  recPers2,
  recPersId,
  recPersTel,
  status,
  updateTime,
  villId,
  villageCode,
  visitDate,
  watersupplyPer,
) {
  return request({
    url: baseurl + '/dc/insp/secsurveyVlg/update',
    method: 'PUT',
    data: {
      adNm: adNm,
      createTime: createTime,
      engId: engId,
      isCenwtSupply: isCenwtSupply,
      isFluexc: isFluexc,
      isMtarea: isMtarea,
      isPoverty: isPoverty,
      recPers2: recPers2,
      recPersId: recPersId,
      recPersTel: recPersTel,
      status: status,
      updateTime: updateTime,
      villId: villId,
      villageCode: villageCode,
      visitDate: visitDate,
      watersupplyPer: watersupplyPer,
    },
  });
}

export function submitInsertCun(adName, adFcode) {
  return request({
    url: baseurl + '/dc/att/adXBase/insert',
    method: 'POST',
    data: {
      adFcode: adFcode,

      adName: adName,
    },
  });
}

export function queryCwsListByObjId(objId, name = '') {
  const param = {
    objId: objId,
    pageSize: 10000,
  };

  if (name && name != '') {
    param['name'] = name;
  }
  return request({
    url: baseurl + '/dc/att/cwsBase/queryListByObjId',
    method: 'POST',
    data: param,
  });
}

export function submitInsertGongCheng(
  cwsLoc,
  addvcd,
  effDate,
  cwsName,
  desWasuScal,
  desWasuPop,
) {
  return request({
    url: baseurl + '/dc/att/cwsBase/insert',
    method: 'POST',
    data: {
      cwsLoc: cwsLoc,

      addvcd: addvcd,
      effDate: effDate,
      compDate: effDate,
      cwsName: cwsName,
      desWasuScal: desWasuScal,
      desWasuPop: desWasuPop,
    },
  });
}

export function getSKList_xsk(data) {
  return request({
    url: baseurl + '/dc/insp/rsvrRgstr/list/page',
    method: 'POST',
    data: data,
  });
}

//河湖卫士获取填报数据
export function getList_hhws(data) {
  return request({
    url: baseurl + '/bis/insp/rvlksf/findRvlksfPage',
    method: 'POST',
    data: data,
  });
}

//疏浚沙石获取填报数据
export function getList_sjss(data) {
  return request({
    url: baseurl + '/bis/insp/dinas/findDinasPage',
    method: 'POST',
    data: data,
  });
}

//河湖卫士获取填报数据
export function getList_sltsn(data) {
  return request({
    url: baseurl + '/bis/insp/acclrt/findAcclrtPage',
    method: 'POST',
    data: data,
  });
}
//长江经济带小水电清理获取填报数据
export function getList_xshd(data) {
  return request({
    url: baseurl + '/dc/insp/rsvrRgstr/list/type',
    method: 'POST',
    data: data,
  });
}

//水库督查
//根据督查登记表ID获取三个责任人基本信息
export function getRgstrid(rgstrId) {
  return request({
    url: baseurl + '/dc/insp/basePres/get/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//根据ID获取督查水库登记表-水库检查情况-新（单表）
export function getRsvrRgstrChkInfo(id) {
  return request({
    url: baseurl + '/bis/insp/rsvr/rgstr/chk/info/getBy/' + id,
    method: 'get',
  });
}
//疏浚沙石责任人
export function getRgstridDinasDuty(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/dinas/duty/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//疏浚沙石现场
export function getRgstridDinasScenc(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/dinas/scenc/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//河湖卫士水保
export function getRgstridRvlksfSlwt(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rvlksf/slwt/' + rgstrId,
    method: 'GET',
    params: {},
  });
}
//河湖卫士水资源
export function getRgstridRvlksfWtrs(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rvlksf/wtrs/' + rgstrId,
    method: 'GET',
    params: {},
  });
}
//河湖卫士河道清障
export function getRgstridRvlksfWtpjsf(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rvlksf/wtpjsf/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//根据督查登记表ID获取三项基本信息
export function getBaseExt(rgstrId) {
  return request({
    url: baseurl + '/dc/insp/baseExt/get/' + rgstrId,
    method: 'GET',
    params: {},
  });
}
//水库工程实体
export function getProjectlist(curRgstrId) {
  return request({
    url: baseurl + '/dc/rever/project/getBy/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//安全鉴定及除险加固情况
export function getSecurityReinforce(curRgstrId) {
  return request({
    url: baseurl + '/dc/rever/project/getBy/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库运行管理情况
export function getManagelist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/safeExtManage/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库综合管理
export function getZhgllist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/xskaqZhgl/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库五个责任人情况
export function getWgzrrlist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/xskaqWgzrr/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库三个重点情况
export function getSgzdlist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/xskaqSgzd/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库日常巡查
export function getRcxclist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/xskaqRcxc/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库运行管理
export function getYxgllist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/xskaqYxgl/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库工程实体
export function getGcstlist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/xskaqGcst/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库设备设施
export function getSbsslist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/xskaqSbss/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//水库总体运行评价
export function getZtpjlist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/xskaqZtpj/get/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//效益发挥情况
export function getEffectionlist(curRgstrId) {
  return request({
    url: baseurl + '/dc/insp/revrBenefit/getBy/' + curRgstrId,
    method: 'GET',
    params: {
      rgstrId: curRgstrId,
    },
  });
}
//获取流域机构列表
export function getLyjglist() {
  return request({
    url: baseurl + '/dc/insp/base/getInspByPid?pid=001&type=001',
    method: 'GET',
    params: {},
  });
}
//添加三个责任人
export function addBasePres(obj) {
  return request({
    url: baseurl + '/dc/insp/basePres',
    method: 'POST',
    data: obj,
  });
}
//根据督查登记表ID获取三项基本信息
export function getBaseExtId(rgstrId) {
  return request({
    url: baseurl + '/dc/insp/baseExt/get',
    method: 'GET',
    params: {
      rgstrId: rgstrId,
    },
  });
}
export function getrgstrIdObject(resCode, objId) {
  return request({
    url: baseurl + '/dc/insp/rsvrRgstr/getBy/' + objId + '/' + resCode,
    method: 'GET',
    params: {
      objId: objId,
      resCode: resCode,
    },
  });
}

export function getrgstrIdObject1(resCode, recPersId) {
  return request({
    url: baseurl + '/dc/att/rsBase/crrct/' + resCode + '/' + recPersId,
    method: 'GET',
    params: {},
  });
}
//疏浚沙石基本信息
export function getrgstrIdObject_sjss(id) {
  return request({
    url: baseurl + '/att/dinas/base/getObjId/' + id,
    method: 'GET',
    params: {},
  });
}

//疏浚沙石基本信息
export function getrgstrIdObjectById_sjss(id) {
  return request({
    url: baseurl + '/bis/insp/dinas/' + id,
    method: 'GET',
    params: {},
  });
}

//河湖卫士基本信息
export function getrgstrIdObject_hhws(id) {
  return request({
    url: baseurl + '/att/rvlksf/base/objId/' + id,
    method: 'GET',
    params: {},
  });
}

//根据id获取督察对象数据
export function getrgstrIdObjectById_hhws(id) {
  return request({
    url: baseurl + '/bis/insp/rvlksf/' + id,
    method: 'GET',
    params: {},
  });
}

////水利提速年
export function getrgstrIdObject_sltsn(id, type) {
  return request({
    url: baseurl + '/att/acclrt/base/getObjId/' + type + '/' + id,
    method: 'GET',
    params: {},
  });
}

//水利提速年
export function getrgstrIdObjectById_sltsn(id) {
  return request({
    url: baseurl + '/bis/insp/acclrt/' + id,
    method: 'GET',
    params: {},
  });
}

////长江经济带小水电清理
export function getrgstrIdObject_hystjx(id) {
  return request({
    url: baseurl + '/att/hystjx/base/getObjId/' + id,
    method: 'GET',
    params: {},
  });
}

//长江经济带小水电清理
export function getrgstrIdObjectById_hystjx(id) {
  return request({
    url: baseurl + '/bis/insp/hystjx/' + id,
    method: 'GET',
    params: {},
  });
}
//长江经济带小水电清理-获取生态流量泄放情况填报信息
export function getRgstridHystjxQ(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/hystjx/q/' + rgstrId,
    method: 'GET',
  });
}
//长江经济带小水电清理-获取生态流量监测情况填报信息
export function getRgstridHystjxMon(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/hystjx/mon/' + rgstrId,
    method: 'GET',
  });
}
//长江经济带小水电清理-获取大坝安全情况填报信息
export function getRgstridHystjxSaf(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/hystjx/saf/' + rgstrId,
    method: 'GET',
  });
}

////水源地
export function getrgstrIdObject_swhsjx(id) {
  return request({
    url: baseurl + '/att/swhsjx/base/getObjId/' + id,
    method: 'GET',
    params: {},
  });
}

//水源地
export function getrgstrIdObjectById_swhsjx(id) {
  return request({
    url: baseurl + '/bis/insp/swhsjx/' + id,
    method: 'GET',
    params: {},
  });
}
//水源地-达标情况填报信息
export function getRgstridSwhsjxStn(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/swhsjx/stn/' + rgstrId,
    method: 'GET',
  });
}

////农饮工程
export function getrgstrIdObject_rdwpjx(id) {
  return request({
    url: baseurl + '/att/rdwpjx/base/getObjId/' + id,
    method: 'GET',
    params: {},
  });
}

//农饮工程
export function getrgstrIdObjectById_rdwpjx(id) {
  return request({
    url: baseurl + '/bis/insp/rdwpjx/' + id,
    method: 'GET',
    params: {},
  });
}
//农饮工程-获取安全运行管理情况填报信息
export function getRgstridrdwpjxSfo(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rdwpjx/sfo/' + rgstrId,
    method: 'GET',
  });
}
//农饮工程-获取水厂环境情况填报信息
export function getRgstridHystjxWwe(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rdwpjx/wwe/' + rgstrId,
    method: 'GET',
  });
}
//农饮工程-获取维养经费情况填报信息
export function getRgstridHystjxMtf(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rdwpjx/mtf/' + rgstrId,
    method: 'GET',
  });
}

////重点水利工程
export function getrgstrIdObject_keyjx(id) {
  return request({
    url: baseurl + '/att/keyjx/base/getObjId/' + id,
    method: 'GET',
    params: {},
  });
}
//重点水利工程
export function getrgstrIdObjectById_keyjx(id) {
  return request({
    url: baseurl + '/bis/insp/keyjx/' + id,
    method: 'GET',
    params: {},
  });
}
//重点水利工程-获取监理单位填报信息
export function getRgstridKeyjxStn(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/keyjx/stn/' + rgstrId,
    method: 'GET',
  });
}
//重点水利工程-获取施工单位填报信息
export function getRgstridHystjxBuld(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/keyjx/buld/' + rgstrId,
    method: 'GET',
  });
}
//重点水利工程-获取项目法人填报信息
export function getRgstridHystjxPres(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/keyjx/pres/' + rgstrId,
    method: 'GET',
  });
}

export function getskZouFangByrgstrId(regstrId) {
  return request({
    url: baseurl + '/dc/insp/baseView/get/' + regstrId,
    method: 'GET',
    params: {
      regstrId: regstrId,
    },
  });
}
export function getSkZouFangViewId(usrId, rgstrId) {
  return request({
    url: baseurl + '/dc/insp/baseView',
    method: 'POST',
    data: {
      recPersId: usrId,
      rgstrId: rgstrId,
    },
  });
}
// /dc/insp/baseView

export function getRenYuanListByViewId(viewId) {
  return request({
    url: baseurl + '/dc/insp/baseView',
    method: 'POST',
    data: {
      inspPreLists: [
        {
          viewPreName: name,
          knowResManager: knowResManager,
          managerComment: managerComment,
          note: note,
        },
      ],

      recPersId: usrId,

      resCode: resCode,
      rgstrId: rgstrId,
    },
  });
}

export function addZouFangRenYuanList_sk(
  name,
  knowResManager,
  managerComment,
  note,
  viewId,
  viewPreId,
  viewPreName,
) {
  return request({
    url: baseurl + '/dc/insp/preList',
    method: 'POST',
    data: {
      knowResManager: knowResManager,
      managerComment: managerComment,
      note: note,
      viewId: viewId,
      // "viewPreId": viewPreId,
      viewPreName: name,
    },
  });
}

export function updateZouFangRenYuanList_sk(
  inspPreLists,
  viewId,
  rgstrId,
  recPersId,
) {
  return request({
    url: baseurl + '/dc/insp/baseView/update',
    method: 'POST',
    data: {
      // "createTime": "2019-03-08T02:49:51.844Z",
      inspPreLists: inspPreLists,
      // "recPers2": "string",

      rgstrId: rgstrId,

      viewId: viewId,
    },
  });
}

export function getZouFangrenYuanListByViewId(viewId) {
  return request({
    url: baseurl + '/dc/insp/preList/page',
    method: 'POST',
    data: {
      pageSize: 50,
      viewId: viewId,
    },
  });
}
// /dc/insp/rsvrRgstr/delete/

export function deleteXSKByObjId(objId) {
  return request({
    url: baseurl + '/dc/insp/rsvrRgstr/delete/' + objId,
    method: 'GET',
  });
}
// 删除督查对象
export function deleteObjByObjId(objId, objType, inspGroupId, objName, plnaId) {
  return request({
    url: baseurl + '/dc/insp/obj/deleteInspObj',
    method: 'POST',
    data: {
      objId: objId,
      objType: objType,
      inspGroupId: inspGroupId,
      objName: objName,
      plnaId: plnaId,
    },
  });
}
/***
 * 以下为水闸填报先关接口
 *
 *
 *
 */
export function getSKList_sz(
  presId,
  pageSize,
  pageIndex,
  nodeId,
  rsName,
  state,
  adName,
  sttm,
  entm,
  riverId,
  engScal,
  groupId,
) {
  return request({
    url: baseurl + '/att/waga/rgstr/list/page',
    method: 'POST',
    data: {
      // "type": "rsvr",
      presId: presId,
      // "pType": "6",
      pageSize: pageSize,
      pageNum: pageIndex,
      id: nodeId,
      rsName: rsName,
      state: state,
      adName: adName,
      sttm: sttm,
      entm: entm,
      riverId: riverId,
      engScal: engScal,
      groupId: groupId,
      // 'code':adCode
    },
  });
}

//根据督查登记表ID水闸督查管理责任体系建设和落实情况管理
export function getBaseExtWaga(rgstrId) {
  return request({
    url: baseurl + '/bis/waga/mrsci/getBy/' + rgstrId,
    method: 'GET',
    params: {},
  });
}
//根据督查登记表ID水闸管理责任体系建设和落实情况管理
export function getSafe(rgstrId) {
  return request({
    url: baseurl + '/bis/waga/safeManage/getBy/' + rgstrId,
    method: 'GET',
    params: {},
  });
}
//根据督查登记表ID水闸日常管理和维护养护情况
export function getDmam(rgstrId) {
  return request({
    url: baseurl + '/bis/waga/dmamInfo/getBy/' + rgstrId,
    method: 'GET',
    params: {},
  });
}
//根据督查登记表ID水闸督查工程实体情况管理
export function getProen(rgstrId) {
  return request({
    url: baseurl + '/bis/waga/proenInfo/getBy/' + rgstrId,
    method: 'GET',
    params: {},
  });
}
// 查纠错表水闸数据
export function getSzjc(objId, resCode, groupId) {
  return request({
    url:
      baseurl +
      '/att/waga/rgstr/getBy/' +
      objId +
      '/' +
      resCode +
      '/' +
      groupId,
    method: 'GET',
    params: {
      // 'objId': objId,
      // 'resCode': resCode,
    },
  });
}
export function getLyjglistSz() {
  return request({
    url: baseurl + '/dc/insp/base/getInspByPid?pid=001',
    method: 'GET',
    params: {},
  });
}
export function getrgstrIdObjectSz(resCode, objId) {
  return request({
    url: baseurl + '/dc/insp/rsvrRgstr/getBy/' + objId + '/' + resCode,
    method: 'GET',
    params: {
      objId: objId,
      resCode: resCode,
    },
  });
}
export function deleteDcdxByObjid(objId, objType) {
  return request({
    url: '/supervision/plan/cleanObjDataByObjId',
    method: 'GET',
    params: {
      objId: objId,
      objType: objType,
    },
  });
}
/***
 * 以下为水源地填报先关接口
 *
 *
 *
 */
// 跟据id获取水源地登记表单条信息
export function getInfo_syd(id) {
  return request({
    url: baseurl + '/bis/insp/swhs/rgstr/' + id,
    method: 'get',
  });
}
// 获取水源地登记表列表
export function getList_syd(
  presId,
  pageSize,
  pageIndex,
  rsName,
  state,
  adName,
  sttm,
  entm,
  groupId,
  plnaId,
) {
  return request({
    url: baseurl + '/bis/insp/swhs/rgstr/findSwhsPage',
    method: 'post',
    data: {
      presId: presId,
      pageSize: pageSize,
      pageNum: pageIndex,
      rsName: rsName,
      state: state,
      adName: adName,
      sttm: sttm,
      entm: entm,
      groupId: groupId,
      plnaId: plnaId,
      pType: '13',
    },
  });
}
// 获取水源地登记表列表
export function getListChengGuo_syd(
  presId,
  pageSize,
  pageIndex,
  rsName,
  state,
  adName,
  sttm,
  entm,
  groupId,
  adCodes,
) {
  return request({
    url: baseurl + '/bis/insp/swhs/rgstr/findSwhsPage',
    method: 'post',
    data: {
      presId: presId,
      pageSize: pageSize,
      pageNum: pageIndex,
      rsName: rsName,
      state: state,
      adName: adName,
      sttm: sttm,
      entm: entm,
      groupId: groupId,
      adCodes: adCodes,
      pType: '13',
    },
  });
}
// 查纠错表水源地数据
export function getSydjc(code, persId) {
  return request({
    url: baseurl + '/att/swhs/base/crrct/getSwhsCrrct',
    method: 'POST',
    data: {
      code: code,
      persId: persId,
    },
  });
}
//根据督查登记表ID水源地安全保障达标落实情况
export function getAqBzDb(id) {
  return request({
    url: baseurl + '/bis/insp/swhs/rgstr/safety/getBy/' + id,
    method: 'GET',
    params: {},
  });
}
//根据督查登记表ID水源地保护措施监管情况
export function getBhCsJg(id) {
  return request({
    url: baseurl + '/bis/insp/swhs/rgstr/measures/getBy/' + id,
    method: 'GET',
    params: {},
  });
}
/***
 * 以下为水量分配先关接口
 *
 *
 *
 */
// 获取水量分配登记表列表
export function getList_slfp(
  presId,
  pageSize,
  pageIndex,
  rsName,
  state,
  adName,
  sttm,
  entm,
  groupId,
  plnaId,
) {
  return request({
    url: baseurl + '/bis/insp/wint/rgstr/findCityPage',
    method: 'post',
    data: {
      presId: presId,
      pageSize: pageSize,
      pageNum: pageIndex,
      rsName: rsName,
      state: state,
      adName: adName,
      sttm: sttm,
      entm: entm,
      groupId: groupId,
      plnaId: plnaId,
      pType: '14',
    },
  });
}

// 获取督查成果水量分配登记表列表
export function getListChengGuo_slfp(
  presId,
  pageSize,
  pageIndex,
  rsName,
  state,
  adName,
  sttm,
  entm,
  groupId,
  adCodes,
) {
  return request({
    url: baseurl + '/bis/insp/wint/rgstr/findCityPage',
    method: 'post',
    data: {
      presId: presId,
      pageSize: pageSize,
      pageNum: pageIndex,
      rsName: rsName,
      state: state,
      adName: adName,
      sttm: sttm,
      entm: entm,
      groupId: groupId,
      adCodes: adCodes,
      pType: '14',
    },
  });
}
// 跟据id获取水量分配登记表单条信息
export function getInfo_slfp(id) {
  return request({
    url: baseurl + '/bis/insp/wint/rgstr/' + id,
    method: 'get',
  });
}
//根据督查登记表ID水量分配及取用水管控情况
export function getSlFpQys(id) {
  return request({
    url: baseurl + '/bis/insp/wint/rgstr/int/info/getBy/' + id,
    method: 'GET',
    params: {},
  });
}

/***
 * 以下为节水管理与评价相关接口
 *
 *
 *
 */
// 获取节水管理与评价登记表列表
export function getList_jieshui(
  presId,
  pageSize,
  pageIndex,
  rsName,
  state,
  adName,
  sttm,
  entm,
  groupId,
  plnaId,
) {
  return request({
    url: baseurl + '/bis/insp/svwt/area/rgstr/findSvwtAreaPage',
    method: 'post',
    data: {
      presId: presId,
      pageSize: pageSize,
      pageNum: pageIndex,
      rsName: rsName,
      state: state,
      adName: adName,
      sttm: sttm,
      entm: entm,
      groupId: groupId,
      plnaId: plnaId,
      pType: '15',
    },
  });
}
// 获取节水管理与评价登记表列表
export function getList_jieshuiChengGuo(
  presId,
  pageSize,
  pageIndex,
  rsName,
  state,
  adName,
  sttm,
  entm,
  groupId,
  adCodes,
) {
  return request({
    url: baseurl + '/bis/insp/svwt/area/rgstr/findSvwtAreaPage',
    method: 'post',
    data: {
      presId: presId,
      pageSize: pageSize,
      pageNum: pageIndex,
      rsName: rsName,
      state: state,
      adName: adName,
      sttm: sttm,
      entm: entm,
      groupId: groupId,
      adCodes: adCodes,
      pType: '15',
    },
  });
}
// 跟据id获取节水管理与评价登记表单条信息
export function getInfo_jieshui(id) {
  return request({
    url: baseurl + '/bis/insp/svwt/area/rgstr/' + id,
    method: 'get',
  });
}
//根据督查登记表ID获取 附表一 节约用水管理情况
export function getJieShuiGL(id) {
  return request({
    url: baseurl + '/bis/insp/svwt/area/rgstr/wswm/getBy/' + id,
    method: 'GET',
    params: {},
  });
}

//根据督查登记表ID获取 附表二 节水评价情况
export function getJieShuiPJ(id) {
  return request({
    url: baseurl + '/bis/insp/svwt/area/rgstr/wse/getBy/' + id,
    method: 'GET',
    params: {},
  });
}
//根据objId获取堤防基础信息
export function getBaseInfoByObjId_difang(objId) {
  return request({
    url: baseurl + '/att/dikejx/base/getObjId/' + objId,
    method: 'GET',
  });
}

// 保存堤防基础信息
export function updateBaseInfo_difang(data) {
  return request({
    url: baseurl + '/bis/insp/dikejx/update',
    method: 'POST',
    data: data,
  });
}

export function getrgstrIdObject_diFang(objId) {
  return request({
    url: baseurl + '/bis/insp/dikejx/getByObjId/' + objId,
    method: 'POST',
  });
}

//根据objId获取水资源管理节水
export function getBaseInfoByObjId_szyjs(objId) {
  return request({
    url: baseurl + '/att/winjx/base/getObjId/' + objId,
    method: 'GET',
  });
}
// 保存水资源管理节水基础信息
export function updateBaseInfo_szyjs(data) {
  return request({
    url: baseurl + '/bis/insp/winjx/update',
    method: 'POST',
    data: data,
  });
}
//根据objId获取水资源节水对象填报状态
export function getrgstrIdObject_szyjs(objId) {
  return request({
    url: baseurl + '/bis/insp/winjx/getByObjId/' + objId,
    method: 'POST',
  });
}

//根据objId获取取水工程
export function getBaseInfoByObjId_qsgc(objId) {
  return request({
    url: baseurl + '/att/gtwtjx/base/getObjId/' + objId,
    method: 'GET',
  });
}

// 保存 取水工程 基础信息
export function updateBaseInfo_qsgc(data) {
  return request({
    url: baseurl + '/bis/insp/gtwtjx/update',
    method: 'POST',
    data: data,
  });
}
//根据objId获取 取水工程 对象填报状态
export function getrgstrIdObject_qsgc(objId) {
  return request({
    url: baseurl + '/bis/insp/gtwtjx/getByObjId/' + objId,
    method: 'POST',
  });
}
//根据objId获取 重点水毁工程
export function getBaseInfoByObjId_zdshgc(objId) {
  return request({
    url: baseurl + '/att/flood/base/getObjId/' + objId,
    method: 'GET',
  });
}
// 保存 重点水毁工程 基础信息
export function updateBaseInfo_zdshgc(data) {
  return request({
    url: baseurl + '/bis/insp/flood/update',
    method: 'POST',
    data: data,
  });
}

//根据objId获取 重点水毁工程 对象填报状态
export function getrgstrIdObject_zdshgc(objId) {
  return request({
    url: baseurl + '/bis/insp/flood/getByObjId/' + objId,
    method: 'POST',
  });
}

//水行政执法
//水行政执法获取登记表信息
export function getList_sxzzf(data) {
  return request({
    url: baseurl + '/bis/insp/wtgovjx/findPage',
    method: 'POST',
    data: data,
  });
}

//获取行政执法基本信息
export function getrgstrIdObjectById_sxzzf(id) {
  return request({
    url: baseurl + '/bis/insp/wtgovjx/' + id,
    method: 'GET',
    params: {},
  });
}

//获取行政执法三项制度填报项
export function getRgstridWtgovjxSys(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/wtgovjx/sys/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//获取行政执法行政处罚案卷管理
export function getRgstridWtgovjxDssr(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/wtgovjx/dssr/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//应急备用水源
//应急备用水源获取登记表信息
export function getList_yjbysy(data) {
  return request({
    url: baseurl + '/bis/insp/wtsr/findPage',
    method: 'POST',
    data: data,
  });
}

//获取应急备用水源基本信息
export function getrgstrIdObjectById_yjbysy(id) {
  return request({
    url: baseurl + '/bis/insp/wtsr/' + id,
    method: 'GET',
    params: {},
  });
}

//获取应急备用水源进度
export function getRgstridWtsrConform(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/wtsr/conform/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//水库防洪调度

//水库防洪调度获取登记表信息
export function getList_skfhdd(data) {
  return request({
    url: baseurl + '/bis/insp/rsfcojx/findPage',
    method: 'POST',
    data: data,
  });
}

//获取水库防洪调度登记表基本信息
export function getrgstrIdObjectById_skfhdd(id) {
  return request({
    url: baseurl + '/bis/insp/rsfcojx/' + id,
    method: 'GET',
    params: {},
  });
}

//获取防洪调度填报信息
export function getRgstridRsfcojxFcs(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rsfcojx/fcs/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//获取防洪调度标准化管理填报信息
export function getRgstridRsfcojxNorm(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rsfcojx/norm/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//获取防洪调度汛限水位填报信息
export function getRgstridRsfcojxTflwlii(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rsfcojx/tflwlii/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//获取防洪调度汛限水位填报信息
export function getRgstridRsfcojxOthr(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/rsfcojx/othr/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//农村饮水安全
//农村饮水安全获取登记表信息
export function getList_ncysaq(data) {
  return request({
    url: baseurl + '/bis/insp/villjx/findPage',
    method: 'POST',
    data: data,
  });
}

//获取农村饮水安全登记表基本信息
export function getrgstrIdObjectById_ncysaq(id) {
  return request({
    url: baseurl + 'bis/insp/villjx/' + id,
    method: 'GET',
    params: {},
  });
}

//堤防工程安全度汛
//堤防工程安全度汛获取登记表列表
export function getList_dfgcaqdx(data) {
  return request({
    url: baseurl + '/bis/insp/dikenjx/findPage',
    method: 'POST',
    data: data,
  });
}

//堤防工程安全度汛登记表单个信息
export function getrgstrIdObjectById_dfgcaqdx(id) {
  return request({
    url: baseurl + '/bis/insp/dikenjx/' + id,
    method: 'GET',
    params: {},
  });
}

//堤防工程安全度汛-堤容堤貌
export function getRgstridDikenjxface(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/dikenjx/face/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//堤防工程安全度汛-日常管理
export function getRgstridDikenjxday(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/dikenjx/day/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//堤防工程安全度汛-防汛准备
export function getRgstridDikenjxChkpr(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/dikenjx/chkpr/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//防洪工程整改复查
export function getList_fhgczgfc(data) {
  return request({
    url: baseurl + '/bis/insp/prjchk/findPage',
    method: 'POST',
    data: data,
  });
}

//获取防洪工程整改复查
export function getrgstrIdObjectById_fhgczgfc(id) {
  return request({
    url: baseurl + '/bis/insp/prjchk/' + id,
    method: 'GET',
    params: {},
  });
}

//水利安全生产大排查获取登记表信息
export function getList_slaqscdpc(data) {
  return request({
    url: baseurl + '/dc/insp/rsvrRgstr/list/type',
    method: 'POST',
    data: data,
  });
}

//获取水利安全生产大排查对象信息
export function getrgstrIdObjectById_slaqscdpc(id) {
  return request({
    url: baseurl + '/bis/insp/spot/' + id,
    method: 'GET',
    params: {},
  });
}

//农村供水工程获取登记表信息
export function getList_ncgsgc(data) {
  return request({
    url: baseurl + '/bis/insp/cwsjx/findPage',
    method: 'POST',
    data: data,
  });
}

//农村供水工程对象信息
export function getrgstrIdObjectById_ncgsgc(id) {
  return request({
    url: baseurl + '/bis/insp/cwsjx/' + id,
    method: 'GET',
    params: {},
  });
}

/**
 * 通用督查获取基本信息
 * @param id
 * @returns {AxiosPromise}
 */
export function getrgstrIdObject_common(id) {
  return request({
    url: baseurl + '/bis/insp/gnrl/' + id,
    method: 'GET',
    params: {},
  });
}

//堤防2022
export function getrgstrIdObjectById_dike2022(id) {
  return request({
    url: baseurl + '/bis/insp/dikejx2022/' + id,
    method: 'GET',
    params: {},
  });
}

//堤防工程2022-日常管理
export function getRgstridDikenjxday2022(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/dikejx2022/daily/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//堤防工程2022-防汛管理
export function getRgstridDikenjxFlood2022(rgstrId) {
  return request({
    url: baseurl + '/bis/insp/dikejx2022/flood/' + rgstrId,
    method: 'GET',
    params: {},
  });
}

//农村脱贫户饮水安全 获取对象信息
export function getrgstrIdObject_villsaf(id) {
  return request({
    url: baseurl + '/bis/insp/villsaf/' + id,
    method: 'GET',
    params: {},
  });
}

//农村供水工程获取登记表信息
export function getList_villsaf(data) {
  return request({
    url: baseurl + '/bis/insp/villsaf/findPage',
    method: 'POST',
    data: data,
  });
}

//农村供水工程获取登记表信息
export function getRgstrid_scene(id) {
  return request({
    url: baseurl + '/bis/insp/villsafScene/' + id,
    method: 'GET',
  });
}
