import request from '@/utils/request'

// 查询物资检查计划--分页
export function listPlan(query) {
  return request({
    url: '/iscs/plan/getIsMaterialsCheckPlanPage',
    method: 'get',
    params: query
  })
}

// 新增物资检查计划
export function addPlan(data) {
  return request({
    url: '/iscs/plan/insertIsMaterialsCheckPlan',
    method: 'post',
    data: data
  })
}

// 修改物资检查计划
export function updatePlan(data) {
  return request({
    url: '/iscs/plan/updateIsMaterialsCheckPlan',
    method: 'post',
    data: data
  })
}

// 删除物资检查计划
export function deletePlan(data) {
  return request({
    url: '/iscs/plan/deleteIsMaterialsCheckPlanByPlanIds?planIds=' + data,
    method: 'post',
  })
}

// 获取检查计划详细信息
export function selectPlanById(query) {
  return request({
    url: '/iscs/plan/selectIsMaterialsCheckPlanById?planId=' + query,
    method: 'get',
  })
}

// 物资检查计划 签名分页
export function getCheckPlanCabinetList(query) {
  return request({
    url: '/iscs/plan/getCheckPlanCabinetList',
    method: 'get',
    params: query
  })
}
//自动创建检查计划接口 /dev-api/iscs/notify/updateAutomaticConfig
export function updateAutomaticConfig(data) {
  return request({
    url: '/iscs/notify/updateAutomaticConfig',
    method: 'post',
    data: data
  })
}
// 自动创建检查计划回显 /dev-api/iscs/notify/selectIsMailNotifyConfigByCode
export function selectIsMailNotifyConfigByCode(query) {
  return request({
    url: '/iscs/notify/selectIsMailNotifyConfigByCode',
    method: 'get',
    params: query
  })
}
