import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

  // 查询待审核的日报列表
  export function getDailyByProjectAndWeekInfo(projectId,weekNum,from,to) {
    return request({
      url: '/week/getDaily/'+ projectId+"/"+ weekNum +"/"+from+"/"+to,
      method: 'get'
    })
  }
  
    // 查询待审核的日报列表
    export function getReauditDailys(userId,projectId,weekNum,from,to) {
      return request({
        url: '/week/getReAuditDailys/' +userId+'/' + projectId+"/"+ weekNum +"/"+from+"/"+to,
        method: 'get'
      })
    }

    // 周报查询（单元负责人）
    export function selectDailyByProjectAndFromTo(projectId,from,to) {
      return request({
        url: '/week/selectDaily/' + projectId +"/"+from+"/"+to,
        method: 'get'
      })
    }
    
      // 周报审核
  export function examineAllDailys(dailtReportList,weekNum,region) {
    return request({
      url: '/week/examineAll/' + weekNum+'/'+region,
      method: 'post',
      data:dailtReportList

    })
  }
// 周报补审
  export function examineReAuditAllDailys(userId,dailtReportList,weekNum,region) {
    return request({
      url: '/week/reauditExamineAll/'+userId+'/' + weekNum+'/'+region,
      method: 'post',
      data:dailtReportList
    })
  }

  // 周报删除
  export function delWeekReport(userId,weekNum,region,from,to) {
    return request({
      url: '/week/delWeek/'+ userId+'/' + weekNum+'/'+region +'/'+from +'/'+to,
      method: 'get'
    })
  }

        // // 员工过滤的周报审核
        // export function examineByFilter(dailtReportList,weekNum) {
        //   return request({
        //     url: '/week/examineByFilter/' + weekNum ,
        //     method: 'post',
        //     data:dailtReportList
        //   })
        // }

    // 查询周的日期信息
    export function getWeekInfo() {
        return request({
          url: '/week/getWeekInfo',
          method: 'get'
        })
      }

    // 查询昨天的期别信息
    export function getWeekInfo2() {
        return request({
          url: '/week/getWeekInfo2',
          method: 'get'
        })
      }

      // 查询所有的周号以及起止日信息
    export function getAllWeekInfo() {
      return request({
        url: '/week/getAllWeekInfo',
        method: 'get'
      })
    }

  
  // 查询b1表内容
  export function getB1(projectId,from,to) {
    return request({
      url: '/week/getB1' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  

  // 查询b1表内容（补审日报）
  export function getreauditB1(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB1/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }

  // 查询b2表内容
  export function getB2(projectId,from,to) {
    return request({
      url: '/week/getB2' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }

  // 查询b2表内容（补审日报）
  export function getreauditB2(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB2/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }

    // 查询b3表内容
    export function getB3(projectId,from,to) {
      return request({
        url: '/week/getB3' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
        method: 'get'
      })
    }
  // 查询b3表内容（补审日报）
  export function getreauditB3(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB3/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b4表内容
  export function getB4(projectId,from,to) {
    return request({
      url: '/week/getB4' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }

  // 查询b4表内容（补审日报）
  export function getreauditB4(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB4/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b6表内容
  export function getB6(projectId,from,to) {
    return request({
      url: '/week/getB6' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b6表内容（补审日报）
  export function getreauditB6(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB6/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b7表内容
  export function getB7(projectId,from,to) {
    return request({
      url: '/week/getB7' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b7表内容（补审日报）
  export function getreauditB7(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB7/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b8表内容
  export function getB8(projectId,from,to) {
    return request({
      url: '/week/getB8' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b8表内容（补审日报）
  export function getreauditB8(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB8/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b9表内容
  export function getB9(projectId,from,to) {
    return request({
      url: '/week/getB9' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b9表内容（补审日报）
  export function getreauditB9(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB9/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b10表内容
  export function getB10(projectId,from,to) {
    return request({
      url: '/week/getB10' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b10表内容（补审日报）
  export function getreauditB10(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB10/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b11表内容
  export function getB11(projectId,from,to) {
    return request({
      url: '/week/getB11' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b11表内容（补审日报）
  export function getreauditB11(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB11/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b12表内容
  export function getB12(projectId,from,to) {
    return request({
      url: '/week/getB12' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b12表内容（补审日报）
  export function getreauditB12(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB12/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b13表内容
  export function getB13(projectId,from,to) {
    return request({
      url: '/week/getB13' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b13表内容（补审日报）
  export function getreauditB13(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB13/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }
  // 查询b14表内容
  export function getB14(projectId,from,to) {
    return request({
      url: '/week/getB14' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b14表内容（补审日报）
  export function getreauditB14(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB14/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }

  // 查询b15表内容
  export function getB15(projectId,from,to) {
    return request({
      url: '/week/getB15' +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(from) +'/'+parseStrEmpty(to),
      method: 'get'
    })
  }
  // 查询b15表内容（补审日报）
  export function getreauditB15(userId,projectId,dateAt) {
    return request({
      url: '/week/getreauditB15/' +parseStrEmpty(userId) +'/'+parseStrEmpty(projectId)+'/'+parseStrEmpty(dateAt),
      method: 'get'
    })
  }


  // 导出
  export function getExport(projectId,dateReion) {
    return request({
      url: '/week/export/' + projectId + '/' + dateReion,
      method: 'get'
    })
  }