import request from '@/utils/request'

// 资产一张图-债务预警-左上-负债概况
export function debtOverview (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetLiabilities/fzgk',
    method: 'get',
    params: query
  })
}

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

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

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

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

// 河南资源一张图-预警分析-左中-资源不规范出租预警
export function warningForNonStandardRentalOfResources (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetWarning/zcbgfczyj',
    method: 'get',
    params: query
  })
}

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

// 资产一张图-债务分析-左上-债务概况分析
export function debtOverviewAnalysis (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetAnalysis/zwhkfx',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务分析-左下-债务趋势分析
export function debtTrendAnalysis (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetAnalysis/zwqsfx',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务分析-左下-债务趋势分析
export function rankingOfDebtAmount (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetAnalysis/zwjepm',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务分析-右中-债务变化排名
export function debtChangeRanking (deptId, year, type) {
  let query = {
    deptId,
    year,
    type
  }
  return request({
    url: 'api/home/xixia/assetAnalysis/zwbhpm',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务分析-右下-债务超标分析
export function analysisOfExcessiveDebt (deptId, year) {
  let query = {
    deptId,
    year,
    zwRate: 40
  }
  return request({
    url: 'api/home/xixia/assetAnalysis/zwcbfx',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务分析-中下-7指标
export function debtAnalysis (deptId, year) {
  let query = {
    deptId,
    year,
    zwRate: 40
  }
  return request({
    url: 'api/home/xixia/assetAnalysis/zczwfxzb',
    method: 'get',
    params: query
  })
}

// 资产一张图-左上-固定资产概况分析
export function analysisOfFixedAssetOverview (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/asset/gdzcgkfx',
    method: 'get',
    params: query
  })
}

// 资产一张图-左中-固定资产类型分析
export function analysisOfFixedAssetTypes (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/asset/gdzclxfx',
    method: 'get',
    params: query
  })
}

// 资产一张图-左下-经营性资产分析
export function analysisOfOperatingAssets (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/asset/jyxzcfx',
    method: 'get',
    params: query
  })
}

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

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

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

// 资产一张图-中下-7指标
export function indicatorBelowAverage (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/asset/zczb',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务预警-左中-负债分布
export function distributionOfLiabilities (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetLiabilities/fzfb',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务预警-左下-负债组织清单
export function listDebtOrganizations (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetLiabilities/fzzzqd',
    method: 'get',
    params: query
  })
}

//资产一张图-债务预警-右上-债务概况
export function debtOverview2 (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetLiabilities/zwgk',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务预警-左下-负债组织清单
export function listDebtOrganizations2 (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetLiabilities/zwzzqd',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务分析-左中-债务类别分析
export function debtCategoryAnalysis (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetAnalysis/zwlxfx',
    method: 'get',
    params: query
  })
}

// 资产一张图-债务预警-右中-债务分布
export function debtDistribution (deptId, year) {
  let query = {
    deptId,
    year
  }
  return request({
    url: 'api/home/xixia/assetLiabilities/zwfb',
    method: 'get',
    params: query
  })
}

// 查询固定资产详细
export function getPermanent(id, parms) {
  return request({
    url: 'api/asset/permanent/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'
  })
}
