import request from '@/utils/httpRequest'
// import { ASSESS_PATH as prefix } from "../AppPath";
import { FINANCE_PATH as prefix } from "../AppPath";

export default class ProgramProjectListInfoService {
	getOverArchiveFlag () {
		return request({
			url: prefix + "/program/projectList/getOverArchiveFlag",
			method: "get",
		})
	}
  list (params) {
    return request({
      url: prefix + '/program/projectList/list',
      method: 'get',
      params: params
    })
  }
  list2 (params) {
    return request({
      url: prefix + '/program/projectList/list2',
      method: 'get',
      params: params
    })
  }
  list2022 (params) {
    return request({
      url: prefix + '/program/projectList/list2022',
      method: 'get',
      params: params
    })
  }
  exportFile (params) {
    return request({
      url: prefix + '/program/projectList/exportFile',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
  queryById (id) {
    return request({
      url: prefix + '/program/projectList/findById',
      method: 'get',
      params: {id: id}
    })
  }
  findByIdAudit (id) {
    return request({
      url: prefix + '/program/projectList/findByIdAudit',
      method: 'get',
      params: {id: id}
    })
  }
  findByIdArchive (id) {
    return request({
      url: prefix + '/program/projectList/findByIdArchive',
      method: 'get',
      params: {id: id}
    })
  }
  save (inputForm) {
    return request({
      url: prefix + `/program/projectList/save`,
      method: 'post',
      data: inputForm
    })
  }
  save2022 (inputForm) {
    return request({
      url: prefix + `/program/projectList/save2022`,
      method: 'post',
      data: inputForm
    })
  }
  saveForm (inputForm) {
    return request({
      url: prefix + `/program/projectList/saveForm`,
      method: 'post',
      data: inputForm
    })
  }
  saveFormThree (inputForm) {
    return request({
      url: prefix + `/program/projectList/saveFormThree`,
      method: 'post',
      data: inputForm
    })
  }
  saveFormArchive (inputForm) {
    return request({
      url: prefix + `/program/projectList/saveFormArchive`,
      method: 'post',
      data: inputForm
    })
  }
  delete (ids) {
    return request({
      url: prefix + '/program/projectList/deleteById',
      method: 'get',
      params: {id: ids}
    })
  }
  deleteAll (ids) {
    return request({
      url: prefix + '/program/projectList/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }
  findContractPageList (params) {
    return request({
      url: prefix + '/program/projectList/findContractPageList',
      method: 'get',
      params: params
    })
  }
  updateStatusById (data) {
    return request({
      url: prefix + '/program/projectList/updateStatusById',
      method: 'post',
      data: data
    })
  }
  updateStatusByAuditId (data) {
    return request({
      url: prefix + '/program/projectList/updateStatusByAuditId',
      method: 'post',
      data: data
    })
  }
  updateStatusByArchiveId (data) {
    return request({
      url: prefix + '/program/projectList/updateStatusByArchiveId',
      method: 'post',
      data: data
    })
  }
  saveReportNo (id) {
    return request({
      url: prefix + '/program/projectList/saveReportNo',
      method: 'get',
      params: {id: id}
    })
  }
  /* 一级校审文档下载 */
  downloadFirstAuditTpl (id, auditId1) {
    return request({
      url: prefix + '/program/projectList/downloadFirstAuditTpl',
      method: 'get',
      params: {id: id, auditId1: auditId1},
      responseType: 'blob'
    })
  }
  /* 二级校审文档下载 */
  downloadSecondAuditTpl (id, auditId2) {
    return request({
      url: prefix + '/program/projectList/downloadSecondAuditTpl',
      method: 'get',
      params: {id: id, auditId2: auditId2},
      responseType: 'blob'
    })
  }
  /* 三级校审文档下载 */
  downloadThirdlyAuditTpl (id, auditId3) {
    return request({
      url: prefix + '/program/projectList/downloadThirdlyAuditTpl',
      method: 'get',
      params: {id: id, auditId3: auditId3},
      responseType: 'blob'
    })
  }
  /* 三级校审文档下载 */
  downloadProofreadAuditTpl (id) {
    return request({
      url: prefix + '/program/projectList/downloadProofreadAuditTpl',
      method: 'get',
      params: {id: id},
      responseType: 'blob'
    })
  }
  /* 三级校审文档下载 */
  downloadAuditRecordFormAfterBindingTpl (id) {
    return request({
      url: prefix + '/program/projectList/downloadAuditRecordFormAfterBindingTpl',
      method: 'get',
      params: {id: id},
      responseType: 'blob'
    })
  }
  /* 三级校审文档下载 */
  downloadReportAusstellungTpl (id) {
    return request({
      url: prefix + '/program/projectList/downloadReportAusstellungTpl',
      method: 'get',
      params: {id: id},
      responseType: 'blob'
    })
  }
  getHaveProjectIds () {
    return request({
      url: prefix + '/program/projectList/getHaveProjectIds',
      method: 'get'
    })
  }
  findByProIdAndLevel (programId, auditLevel) {
    return request({
      url: prefix + '/program/projectList/findByProIdAndLevel',
      method: 'get',
      params: {programId: programId, auditLevel: auditLevel}
    })
  }
}
