import request from '@/utils/request'

// 河南资源一张图-预警分析-左上-资源处置预警(分页)
export function resourceFisposalWarning (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resourceWarning/zyczyj',
    method: 'get',
    params: query
  })
}

// 河南资源一张图-预警分析-左下-资源长期闲置预警
export function longTermIdleResourceWarning (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resourceWarning/zccqxzyj',
    method: 'get',
    params: query
  })
}

// 河南资源一张图-预警分析-右上-合同结款到期预警(分页)
export function contractPaymentDueWarning (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resourceWarning/htjkdqyj',
    method: 'get',
    params: query
  })
}

// 河南资源一张图-预警分析-右中-合同到期预警
export function contractExpirationWarning (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resourceWarning/htdqyj',
    method: 'get',
    params: query
  })
}

// 河南资源一张图-预警分析-右下-合同长期未执行预警
export function longTermContractNonExecutionWarning (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resourceWarning/htcqwzxyj',
    method: 'get',
    params: query
  })
}

// 资源一张图-左上-资源概况分析
export function resourceOverviewAnalysis (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resource/zygkfx',
    method: 'get',
    params: query
  })
}

// 资源一张图-左中-资源类型分析
export function resourceTypeAnalysis (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resource/zylxfx',
    method: 'get',
    params: query
  })
}

// 资源一张图-左下-资源发包分析
export function resourceOutsourcingAnalysis (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resource/zyfbfx',
    method: 'get',
    params: query
  })
}

// 资源一张图-右上-合同类型分析
export function analysisContractTypes (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resource/htgkfx',
    method: 'get',
    params: query
  })
}

// 资源一张图-右中-合同数量/金额排名分析
export function rankinganalysisofcontractquantityandamount (deptId, year, num) {
  let query = {
    deptId,
    year,
    num
  }
  return request({
    url: 'api/home/xixia/resource/htsljepmfx',
    method: 'get',
    params: query
  })
}

// 资源一张图-右下-合同不规范管理排名分析
export function Rankinganalysisofstandardcontractmanagement (deptId, year, num) {
  let query = {
    deptId,
    year,
    num
  }
  return request({
    url: 'api/home/xixia/resource/htbgfglpmfx',
    method: 'get',
    params: query
  })
}

// 资源一张图-中下-资源分析
export function Resources (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/resource/zyfx',
    method: 'get',
    params: query
  })
}

// 资源一张图-中地图-资源列表
export function ResourceList (deptId, year, useType = 2) {
  let query = {
    deptId,
    useType,
    year
  }
  return request({
    url: 'api/home/xixia/resource/zyList',
    method: 'get',
    params: query
  })
}
// 查询资源性资产详细
export function getResource(id, parms) {
  return request({
    url: '/asset/resource/get/' + id,
    method: 'get',
    params: parms,
  })
}

// 查询固定资产详细
export function attachmentQuery( params ) {
  return request({
    url: 'api/system/attachment/query',
    method: 'get',
    params: params,
  })
}

// 查询合同信息详细
export function getInfo(id) {
  return request({
    url: 'api/contraction/info/get/' + id,
    method: 'get'
  })
}
