import request from '@/assets/js/utils/request'
import { createURL } from '@/assets/js/utils/index'
/* -------------------------------------开标结果------------------------------------ */

// 配置是否公开唱标
export function updateIsPublicSing(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/updateIsPublicSing',
    method: 'post',
    data
  })
}
// 开标结果-获取项目（标段）开标一览表信息
export function getBidOpeningDetailInfo(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getBidOpeningDetailInfo',
    method: 'post',
    data
  })
}
// 开标结果-获取项目（标段）开标结果
export function getBidOpeningResultInfo(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getBidOpeningResultInfo',
    method: 'post',
    data
  })
}
// 开标结果-确认开标结果
export function getConfirmBidOpeningResultInfo(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getConfirmBidOpeningResultInfo',
    method: 'post',
    data
  })
}
/* -------------------------------------投标------------------------------------ */
// 项目经理-获取今日开标列表
export function getTodayOpeningList(data) {
  return request({
    url: '/bidprocurement/bidding-bid/bid/tenderBid/getTodayOpeningList',
    method: 'post',
    data
  })
}
// 项目经理-获取今日开标项目标段列表
export function listOpeningTenderPackagePages(data) {
  return request({
    url: '/bidprocurement/bidding-bid/bid/tenderBid/listOpeningTenderPackagePages',
    method: 'post',
    data
  })
}
// 项目经理-根基阶段id集合和开标类型获取有效投标人家次和不满足三家有效投标人标段数
export function getValidBidderSumNumberByStageIds(data) {
  return request({
    url: '/bidprocurement/bidding-bid/bid/tenderBid/getValidBidderSumNumberByStageIds',
    method: 'post',
    data
  })
}
/* -------------------------------------开标------------------------------------ */
// 根据阶段id获取该开标阶段投标人列表
export function getTenderBidderListByStageId(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getTenderBidderListByStageId',
    method: 'post',
    data
  })
}
// 判断开标时间是否已到
export function judgeOpenBidStartTimeArrived(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/judgeOpenBidStartTimeArrived',
    method: 'post',
    data
  })
}
// 项目经理-获取已开启未开启项目标段列表
export function listStartOpeningTenderPackagePages(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/listStartOpeningTenderPackagePages',
    method: 'post',
    data
  })
}

// 启动远程解密
export function startDecryptBidFile(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/startDecryptBidFile',
    method: 'post',
    data
  })
}
// 启动集中解密
export function startFocusBidOpening(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/startFocusBidOpening',
    method: 'post',
    data
  })
}

// 项目经理-获取该阶段集合下开标详情列表
export function getOpeningTenderPackageInfoListByStageIdList(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getOpeningTenderPackageInfoListByStageIdList',
    method: 'post',
    data
  })
}
// 项目经理-获取该阶段集合下已投标已签到已解密解密失败总次数
export function getValidBidderSignAndDecryptionSumNumberByStageIdList(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getValidBidderSignAndDecryptionSumNumberByStageIdList',
    method: 'post',
    data
  })
}

// 项目经理-获取该阶段已投标已签到已解密解密失败总次数
export function getValidBidderSignAndDecryptionNumberByStageId(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getValidBidderSignAndDecryptionNumberByStageId',
    method: 'post',
    data
  })
}
// 项目经理-根据阶段id查看某标段开标详情列表
export function getTenderPackageBidderByStageId(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getTenderPackageBidderByStageId',
    method: 'post',
    data
  })
}
// 项目经理-发送唱标结果(平台)
export function uploadSingingResult(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/uploadSingingResult',
    method: 'post',
    data
  })
}

// 项目经理-获取开标大厅未开启的并且满足三家投标人标段集合
export function getNotOpeningAndSatisfyThreeBidderStageIds(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getNotOpeningAndSatisfyThreeBidderStageIds',
    method: 'post',
    data
  })
}

/* -------------------------------------标书投递------------------------------------ */
// 项目经理-获取该开标时间段是否已有开启的标段
export function getOpenBidStartTimeIsStart(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getOpenBidStartTimeIsStart',
    method: 'post',
    data
  })
}
// 获取标段当前阶段开标状态
export function getOpeningStatusByStageId(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getOpeningStatusByStageId',
    method: 'post',
    data
  })
}
// 根据附件类型和业务主键获取附件集合
export function getTenderOpeningBidDecryptAttachmentList(data) {
  return request({
    url:
      '/bidprocurement/bidding-open/open/tenderOpeningBidDecryptAttachment/getTenderOpeningBidDecryptAttachmentList' +
      createURL(data),
    method: 'get'
  })
}

// 根据阶段id获取最新的开标一览表
export function getOpeningFileByStageId(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getOpeningFileByStageId',
    method: 'post',
    data
  })
}

// 发布开标通知
export function sendBidOpeningNotice(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningNotice/sendBidOpeningNotice',
    method: 'post',
    data
  })
}

// 刷新解密状态(redis)
export function refreshOpeningDecryptionStatus(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/refreshOpeningDecryptionStatus',
    method: 'post',
    data
  })
}

// 项目经理-批量发送唱标结果
export function uploadBatchSingingResult(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/uploadBatchSingingResult',
    method: 'post',
    data
  })
}

// 文件下载
export const downLoadFile = '/bidprocurement/bidding-open/open/tenderOpeningBidDecryptAttachment/downLoadFile'
// 文件预览下载//根路径+路径
export const readImageRoot = '/bidprocurement/bidding-open/open/tenderOpeningBidDecryptAttachment/readImageRoot?imagePath='

/* ================================redis版接口========================*/
// 项目经理-获取该阶段集合下已投标已签到已解密解密失败总次数   场景：【web前端】开标大厅-开标中（宫格分包）{集中解密，非集中解密公用}
export function getValidBidderSignAndDecryptionSumNumberByStageIdListByRedis(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getValidBidderSignAndDecryptionSumNumberByStageIdListByRedis',
    method: 'post',
    data
  })
}
// 项目经理-获取该阶段集合下开标详情列表  场景：【web前端】开标大厅-开标中（宫格分包）{集中解密，非集中解密公用}/开标大厅-开标中-批量唱标标段列表弹框（在宫格图点击批量唱标）
export function getOpeningTenderPackageInfoListByStageIdListByRedis(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getOpeningTenderPackageInfoListByStageIdListByRedis',
    method: 'post',
    data
  })
}
// 项目经理-获取该阶段已投标已签到已解密解密失败总次数   场景：【web前端】开标大厅-开标中-（1宫格分包点击查看包 2不分包子页面）
export function getValidBidderSignAndDecryptionNumberByStageIdByRedis(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getValidBidderSignAndDecryptionNumberByStageIdByRedis',
    method: 'post',
    data
  })
}

// 项目经理-获取该阶段集合下开标详情列表  场景：【web前端】开标大厅-开标中（宫格分包）{集中解密，非集中解密公用}/开标大厅-开标中-批量唱标标段列表弹框（-在宫格图点击批量唱标）
export function getTenderPackageBidderByStageIdByRedis(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getTenderPackageBidderByStageIdByRedis',
    method: 'post',
    data
  })
}
// 项目经理-获取该阶段集合下已投标已签到已解密解密失败总次数和标段解密详情 redis获取
export function getOpeningPackageInfoListAndDecryptionSumNumByStageIdListByRedis(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderOpeningResult/getOpeningPackageInfoListAndDecryptionSumNumByStageIdListByRedis',
    method: 'post',
    data
  })
}
// 项目经理【开启视频会议】
export function managerOpenFSMeetingRoom(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderVideoConference/managerOpenFSMeetingRoom',
    method: 'post',
    data
  })
}

// 邀请供应商加入视频会议列表(平台)
export function getRoomInvitationSupplierList(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderSupplierVideoConference/getRoomInvitationSupplierList',
    method: 'post',
    data
  })
}

// 保存项目经理是否邀请供应商参与视频(平台)
export function saveInvitationSupplierStatus(data) {
  return request({
    url: '/bidprocurement/bidding-open/open/tenderSupplierVideoConference/saveInvitationSupplierStatus',
    method: 'post',
    data
  })
}

// 获取开标监控项目列表
export function getOpenBidMonitorResultPage(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidMonitorResultPage',
    method: 'post',
    data
  })
}

// 根据项目相关数据查询关联的stageIds
export function getStageIdsByTenderId(params) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getStageIdsByTenderId',
    method: 'post',
    params
  })
}

// 获取开标前数据监控数据
export function getOpenBidTenderProjectData(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidTenderProjectData',
    method: 'post',
    data
  })
}

// 获取开标前数据监控数据
export function getOpenBidProjectNumber(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidProjectNumber',
    method: 'post',
    data
  })
}

// 标段开启及启动解密及完成情况列表
export function getOpenBidProjectOpening(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidProjectOpening',
    method: 'post',
    data
  })
}

// 签到解密家数情况
export function getOpenBidSignAndDecryptData(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidSignAndDecryptData',
    method: 'post',
    data
  })
}

// 投标人数未达到3家的标段
export function getOpenBidNoThreeData(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidNoThreeData',
    method: 'post',
    data
  })
}

// 获取标段开启未签到供应商（客户端解密）
export function getOpenBidNoSignData(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidNoSignData',
    method: 'post',
    data
  })
}

// 获取签到但未解密供应商
export function getOpenBidNoDecryptData(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidNoDecryptData',
    method: 'post',
    data
  })
}

// 商务技术标已解密经济标未投标的供应商
export function getStageOneDecStageTwoNoBidSupplier(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getStageOneDecStageTwoNoBidSupplier',
    method: 'post',
    data
  })
}

// 商务技术标解密失败投标人信息
export function getTechnicalOpeningDecFailSupplier(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getTechnicalOpeningDecFailSupplier',
    method: 'post',
    data
  })
}

// 经济标解密失败投标人信息
export function getEconomicDecFailSupplier(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getEconomicDecFailSupplier',
    method: 'post',
    data
  })
}

// 一步开标项目解密失败投标人信息
export function getOpenBidDecryptFailSupplier(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidDecryptFailSupplier',
    method: 'post',
    data
  })
}

// 商务技术标已开标但未签到的投标人
export function getTechnicalOpenedNoTechSignSupplier(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getTechnicalOpenedNoTechSignSupplier',
    method: 'post',
    data
  })
}

// 经济标已开标但未签到的投标人
export function getEconomicOpenedNoSignSupplier(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getEconomicOpenedNoSignSupplier',
    method: 'post',
    data
  })
}

// 商务技术标已签到但未解密的投标人
export function getTechnicalSignedNoDecSupplier(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getTechnicalSignedNoDecSupplier',
    method: 'post',
    data
  })
}

// 经济标已签到但未解密的投标人
export function getEconomicSignedNoDecSupplier(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getEconomicSignedNoDecSupplier',
    method: 'post',
    data
  })
}

// 获取相应标段开启，商务标、技术标、经济标解密情况
export function getOpenBidDecryptNumByType(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/getOpenBidDecryptNumByType',
    method: 'post',
    data
  })
}

// 导出开标监控查询结果
export function exportOpenBidMonitorResult(data) {
  return request({
    url: '/bidprocurement/pretcloud-statisticalanalysis/openBidMonitor/openBidMonitor/exportOpenBidMonitorResult',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

