import request from '@/utils/request'


// 获取本人学生信息
export function getMyStuInfo() { 
	return request({
	  'url': '/routine/disciplinaryApplication/getMyStuInfo',
	  'method': 'get'
	})
}

// 获取处分相关信息
export function getPenaltyNumber(penaltyNumber) { 
	return request({
	  'url': '/routine/relieve/getPenaltyNumber/' + penaltyNumber,
	  'method': 'get'
	})
}

export function addRelieve(data) { 
	return request({
	  'url': '/routine/relieve/add', 
	  'method': 'post',
	  'data': data
	})
}

export function save(data) { 
	return request({
	  'url': '/routine/relieve/save', 
	  'method': 'post',
	  'data': data
	})
}

// 处分记录列表
export function list(data) {
	return request({
	  'url': '/routine/disciplinaryApplication/list',
	  'method': 'get',
	  'data':data
	})
}
// 通过学号获取学生信息
export function getStuInfoByStuNo(id) {
	return request({
	  'url': '/routine/disciplinaryApplication/getStuInfo/'+id,
	  'method': 'get'
	})
}
//处分详情信息
export function getDisciplinaryApplicationByProcInsId(id) {
	return request({
	  'url': '/routine/disciplinaryApplication/getDisciplinaryApplicationByProcInsId/'+id,
	  'method': 'get'
	})
}
//审批流程
export function getFlowRecord(query) {
	return request({
	  'url': '/routine/disciplinaryApplication/flowRecord',
	  'method': 'get',
	  data:query
	})
}
//保存处分信息
export function savePunishment(data) { 
	return request({
	  'url': '/routine/disciplinaryApplication/save', 
	  'method': 'post',
	  'data': data
	})
}
//提交处分信息
export function submitPunishment(data) {
	 
	return request({
	  'url': '/routine/disciplinaryApplication/add', 
	  'method': 'post',
	  'data': data
	})
}

//删除违纪材料
export function deleteImg(data) {
	return request({
	  'url': '/affix/delete', 
	  'method': 'post',
	  'data': data
	})
}

// // 审核进度
// export function flowRecord(query) {
// 	return request({
// 	  'url': '/flowable/task/flowRecord', 
// 	  'method': 'get',
// 	  'data': query
// 	})
// }



//解除处分

// 解除处分记录列表
export function relieveList(data) {
	return request({
	  'url': '/routine/relieve/list',
	  'method': 'get',
	  'data':data
	})
}
// 解除处分记录详情
export function relieveDetail(id) {
	return request({
	  'url': '/routine/relieve/getStuDisciplinaryRelieveByProcInsId/'+id,
	  'method': 'get',
	})
}

// 修改学生解除处分申请
export function updateRelieve(data) {
  return request({
    url: '/routine/relieve/update',
    method: 'post',
    data: data
  })
}

