// src/api/mes/modeStation/modeStation.ts
import request from '@/config/axios'

export interface HolidayVO {
  holidayType?: string
  theDay: string
  startTime?: string
  endTime?: string
  remark?: string
  createTime?: Date
}

export interface PageParam {
  pageNo: number
  pageSize: number
}

// 查询工作流模式列表
export const getHolidayPage = async (params: PageParam) => {
  return await request.get({ url: '/iscs/holiday/getHolidayPage', params })
}
// 查询当前月的信息
export const getHolidayList = async (params: PageParam) => {
  return await request.get({ url: '/iscs/holiday/getHolidayList', params })
}
// 获取工作流模式详细信息
export const selectHolidayById = async (id: number) => {
  return await request.get({ url: '/iscs/holiday/selectHolidayById', params: { id: id } })
}

// 单一修改工作流模式
export const updateHoliday = async (data: HolidayVO) => {
  return await request.put({ url: '/iscs/holiday/updateHoliday', data })
}
// 批量修改工作流模式
export const updateHolidayList = async (data: HolidayVO) => {
  return await request.post({ url: '/iscs/holiday/updateHolidayList', data })
}

// 删除工作流模式
export const deleteHolidayList = async (ids: number) => {
  return await request.delete({
    url: '/iscs/holiday/deleteHolidayList?ids='+ids,
  })
}
