/**
 * @Author: zhangtq 2452618307@qq.com
 * @Date: 2024-11-21 09:24:30
 * @LastEditors: zhangtq 2452618307@qq.com
 * @LastEditTime: 2024-11-28 11:58:46
 * @FilePath: src/api/violation/violation.js
 * @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
 */
import request from '@/utils/request'

export function exportViolationInfo() {
  return '/project/violationManagement/exportViolationInfo'
}

export function exportViolationPunishInfo() {
  return '/project/violationManagement/exportViolationPunishInfo'
}
export function exportProViolationStatisticsList() {
  return '/project/violationManagement/exportProViolationStatisticsList'
}
export function exportViolationTypeStatisticsList() {
  return '/project/violationManagement/exportViolationTypeStatisticsList'
}



// 违规信息列表
export function getViolationList(params) {
  return request({
    url: '/project/violationManagement/getViolationList',
    method: 'get',
    params: params
  })
}
//获取违章照片公用方法
export function getViolationPhoto(params) {
  return request({
    url: '/project/violationManagement/getViolationPhoto',
    method: 'get',
    params: params
  })
}
//获取违章类型  下拉框
export function getTypeOfViolationSelect(params) {
  return request({
    url: '/project/violationManagement/getTypeOfViolationSelect',
    method: 'get',
    params: params
  })
}
//查询在建工程下拉选
export function getUnderConstructionProSelect(params) {
  return request({
    url: '/project/violationManagement/getUnderConstructionProSelect',
    method: 'get',
    params: params
  })
}
// 根据工程id查询承包商
export function getConsByProIdSelect(params) {
  return request({
    url: '/project/violationManagement/getConsByProIdSelect',
    method: 'get',
    params: params
  })
}
//根据承包商id查询人员名称
export function getPersonByConsIdSelect(params) {
  return request({
    url: '/project/violationManagement/getPersonByConsIdSelect',
    method: 'get',
    params: params
  })
}
//新增违章信息
export function addViolation(data) {
  return request({
    url: '/project/violationManagement/addViolation',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    data
  })
}
//获取违章详情
export function getViolationDetail(params) {
  return request({
    url: '/project/violationManagement/getViolationDetail',
    method: 'get',
    params: params
  })
}
//下发处罚单
export function addIssueFine(data) {
  return request({
    url: '/project/violationManagement/addIssueFine',
    method: 'post',
    data: data
  })
}
//获取违章处罚列表
export function getViolationPunishList(params) {
  return request({
    url: '/project/violationManagement/getViolationPunishList',
    method: 'get',
    params: params
  })
}
export function getViolationPunishApprovalList(params) {
  return request({
    url: '/project/violationManagement/getViolationPunishApprovalList',
    method: 'get',
    params: params
  })
}
//处罚回传
export function violationBackKickback(data) {
  return request({
    url: '/project/violationManagement/violationBackKick',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    data
  })
}
//获取处罚详情
export function getViolationPunishDetails(params) {
  return request({
    url: '/project/violationManagement/getViolationPunishDetails',
    method: 'get',
    params: params
  })
}
//获取工程违章处罚统计
export function getProViolationStatistics(params) {
  return request({
    url: '/project/violationManagement/getProViolationStatistics',
    method: 'get',
    params: params
  })
}
//获取违章类型统计
export function getViolationTypeStatistics(params) {
  return request({
    url: '/project/violationManagement/getViolationTypeStatistics',
    method: 'get',
    params: params
  })
}
//根据id获取部门人员
export function getDeptPersonById(params) {
  return request({
    url: '/project/violationManagement/getDeptPersonById',
    method: 'get',
    params: params
  })
}

export function PreviewViolation(params){
  return request({
    url: '/project/violationManagement/PreviewViolation',
    method: 'get',
    params: params
  })
}


export function addViolationInfo(params){
  return request({
    url: '/project/violationManagement/addViolationInfo',
    method: 'post',
    data: params
  })
}
