import request from '@/config/axios'

export interface ProjectProfitVO {
  projectId: number
  projectName: string
  contractSignedFlag: boolean
  contractAmount?: number
  finalSettlementAmount?: number
  comprehensivePlanningAmount?: number
  subcontractPlanningAmount?: number
  majorOutputValue?: number
  majorExpectedPerformance?: number
  innovationOutputRate?: number
  innovationOutputValue?: number
  otherCost?: number
  profitLossValue?: number
  profitLossRate?: number
  projectStartYear?: number
  createTime?: string
}

export interface ProjectProfitPageReqVO extends PageParam {
  projectName?: string
  contractSignedFlag?: boolean
  projectStartYear?: number
  createTime?: string[]
}

export const getProjectProfitPage = (params: ProjectProfitPageReqVO) => {
  return request.get({ url: '/tjt/profit/page', params })
}

export const getProjectProfit = (projectId: number) => {
  return request.get({ url: '/tjt/profit/get', params: { projectId } })
}
