import request from "@/utils/request";
// 修改
export function updateCheckedProblem(data) {
  return request({
    url: "/postCheck/postCheckedProblem",
    method: "put",
    data: data,
  });
}

// 新增
export function addCheckedProblem(data) {
  return request({
    url: "/postCheck/postCheckedProblem",
    method: "post",
    data: data,
  });
}

// 查询详细
export function getCheckedProblem(Id) {
  return request({
    url: "/postCheck/postCheckedProblem/" + Id,
    method: "get",
  });
}
// 删除
export function delCheckedProblem(Id) {
  return request({
    url: "/postCheck/postCheckedProblem/" + Id,
    method: "delete",
  });
}

// 查询列表
export function listCheckedProblem(query) {
  return request({
    url: "/postCheck/postCheckedProblem/list",
    method: "get",
    params: query,
  });
}

// 步骤1->指定方案填写人：设置整改责任人
export function setRectificationResponsibleUserId(data) {
  return request({
    url: "/postCheck/postCheckedProblem/setRectificationResponsibleUserId",
    method: "put",
    params: data,
  });
}

// 步骤2->方案整改：整改实施人填写方案
export function updateRectificationMeasure(data) {
  return request({
    url: "/postCheck/postCheckedProblem/updateRectificationMeasure",
    method: "put",
    params: data,
  });
}
// 步骤3->指定专业部门的审核人（非必选操作）
export function setSpecialityDepartmentReviewerId(data) {
  return request({
    url: "/postCheck/postCheckedProblem/setSpecialityDepartmentReviewerId",
    method: "put",
    params: data,
  });
}
// 步骤4->审核1：部门经理审核
export function setDeptApproveTime(data) {
  return request({
    url: "/postCheck/postCheckedProblem/setDeptApproveTime",
    method: "put",
    params: data,
  });
}
// 步骤5->审核2：专业部门审核人审核
export function setSpecialityDepartmentReviewTime(data) {
  return request({
    url: "/postCheck/postCheckedProblem/setSpecialityDepartmentReviewTime",
    method: "put",
    params: data,
  });
}
// 步骤6->实施整改：上传实施照片
export function updateRectificationCompletionImg(data) {
  return request({
    url: "/postCheck/postCheckedProblem/updateRectificationCompletionImg",
    method: "put",
    params: data,
  });
}
// 步骤7->指定复查人
export function setReviewDepartmentReviewerId(data) {
  return request({
    url: "/postCheck/postCheckedProblem/setReviewDepartmentReviewerId",
    method: "put",
    params: data,
  });
}
// 步骤8->审核3：复查部门的审核人复查
export function setReviewDepartmentReviewerTime(data) {
  return request({
    url: "/postCheck/postCheckedProblem/setReviewDepartmentReviewerTime",
    method: "put",
    params: data,
  });
}
// 查询列表
export function postCheckedProblemRecord(params) {
    return request({
      url: "/postCheck/postCheckedProblemRecord/list",
      method: "get",
      params
    });
  }

export function batchImportRectification(data) {
  return request({
    url: "/postCheck/postCheckedProblem/batchImportRectification",
    method: "post",
    data: data,
  });
}

export function batchExport(params) {
  return request({
    url: "/postCheck/postCheckedProblem/batchExport",
    method: "get",
    params
  });
}
