import request from '@/utils/request'

// 查询劳资投诉列表
export function listFlowLabourInfo(query) {
  return request({
    url: '/flow/flowLabourInfo/list',
    method: 'get',
    params: query
  })
}

// 查询劳资投诉详细
export function getFlowLabourInfo(id) {
  return request({
    url: '/flow/flowLabourInfo/' + id,
    method: 'get'
  })
}

// 新增劳资投诉
export function addFlowLabourInfo(data) {
  return request({
    url: '/flow/flowLabourInfo',
    method: 'post',
    data: data
  })
}

// 修改劳资投诉
export function updateFlowLabourInfo(data) {
  return request({
    url: '/flow/flowLabourInfo',
    method: 'put',
    data: data
  })
}

// 删除劳资投诉
export function delFlowLabourInfo(id) {
  return request({
    url: '/flow/flowLabourInfo/' + id,
    method: 'delete'
  })
}

//分组统计
export function findGroupCountByApprove(query) {
  return request({
    url: '/flow/flowLabourInfo/findGroupCountByApprove',
    method: 'get',
    params: query
  })
}

// 查询我的劳资投诉列表
export function findMyFlowLabours(cardId) {
  return request({
    url: '/flow/flowLabourInfo/findMyFlowLabours/' + cardId,
    method: 'get'
  })
}

// 查询劳资投诉进度列表
export function findMyFlowLabourNodes(flowId) {
  return request({
    url: '/flow/flowLabourAuditNode/findMyFlowLabourNodes/' + flowId,
    method: 'get'
  })
}

//审批劳资预警
export function flowLabourAuditNode(data) {
  return request({
    url: '/flow/flowLabourAuditNode',
    method: 'put',
    data: data
  })
}

