import request from "@/utils/request";

/**
 * 设备监控
 */
export function deviceMonitor() {
  return request({
    url: "/data/device",
    method: "POST",
  });
}

// 每日产量统计 num为天数

export function dailyProduction(num: number) {
  return request({
    url: `/data/everyDayProduction/${num}`,
    method: "get",
  });
}

// 每日产量统计

export function stationProduction() {
  return request({
    url: `/data/station/list`,
    method: "get",
  });
}

// 不合格产品分布
export function unqualifiedProduct() {
  return request({
    url: "/data/badProdtDis",
    method: "POST",
  });
}

//缺陷分布图
export function defectDistribution() {
  return request({
    url: "/data/bug",
    method: "POST",
  });
}

//订单信息-生产计划完成情况
export function productionPlan() {
  return request({
    url: "/data/production/plan/list",
    method: "GET",
  });
}

// 物料情况
export function materialSituation() {
  return request({
    url: "/data/material",
    method: "POST",
  });
}

// 关重件生产进度
export function productionSchedule() {
  return request({
    url: "/data/important",
    method: "POST",
  });
}

//生产任务统计
export function productionStatistics() {
  return request({
    url: "/data/orderStatistics",
    method: "POST",
  });
}

// 生产量情况
export function productionQuantity() {
  return request({
    url: "/data/productionInfo",
    method: "POST",
  });
}

// 质量异常
export function qualityException() {
  return request({
    url: "/data/qualityAbnormal",
    method: "POST",
  });
}

// 今日检验任务
export function todayInspectionDetail() {
  return request({
    url: `/data/check`,
    method: "POST",
  });
}

// 产量统计
export function productionStatisticsDetail() {
  return request({
    url: `/data/material/finish`,
    method: "POST",
  });
}

//当前生产订单进度
export function currentProductionSchedule() {
  return request({
    url: `/data/order/finish`,
    method: "POST",
  });
}

// 第n周生产订单完成情况
export function weekProductionSchedule(num?: number) {
  return request({
    url: `/data/workOrder/finish`,
    method: "POST",
  });
}

//不良top10
export function top10UnqualifiedProduct() {
  return request({
    url: `/data/bad`,
    method: "POST",
  });
}

// 班组出勤统计
export function teamAttendance() {
  return request({
    url: `/data/attendance/statistics/list`, // 班组出勤统计
    method: "get", // 请求方法
  });
}

// 生产计划情况
export function productionPlanList() {
  return request({
    url: `/data/production/plan/list`,
    method: "get",
  });
}

// 成品入库情况
export function productStorageFinishedSituation() {
  return request({
    url: `/data/finishProductIn/list`,
    method: "POST",
    data: {},
  });
}

// 微电子车间公告
export function microelectronicWorkshopNotice() {
  return request({
    url: `/data/message/list`,
    method: "get",
  });
}
