import request from '@/utils/request'

// ========== 事故对象 ==========
export function listObjAcci(query) { return request({ url: '/acci/objacci/list', method: 'get', params: query }) }
export function getObjAcci(guid) { return request({ url: '/acci/objacci/' + guid, method: 'get' }) }
export function addObjAcci(data) { return request({ url: '/acci/objacci', method: 'post', data: data }) }

export function compoundSaveAcci(data) { return request({ url: '/acci/objacci/compoundSave', method: 'post', data: data }) }

export function fastReportAcci(guid) { return request({ url: '/acci/bisaccimont/fastReport', method: 'post', params: { guid } }) }
export function updateObjAcci(data) { return request({ url: '/acci/objacci', method: 'put', data: data }) }
export function delObjAcci(guids) { return request({ url: '/acci/objacci/' + guids, method: 'delete' }) }

// ========== 事故快报 ==========
export function listBisAcciExpRep(query) { return request({ url: '/acci/bisacciexprep/list', method: 'get', params: query }) }
export function getBisAcciExpRep(guid) { return request({ url: '/acci/bisacciexprep/' + guid, method: 'get' }) }
export function addBisAcciExpRep(data) { return request({ url: '/acci/bisacciexprep', method: 'post', data: data }) }
export function updateBisAcciExpRep(data) { return request({ url: '/acci/bisacciexprep', method: 'put', data: data }) }
export function delBisAcciExpRep(guids) { return request({ url: '/acci/bisacciexprep/' + guids, method: 'delete' }) }

// ========== 事故报告 ==========
export function listBisAcciRep(query) { return request({ url: '/acci/bisaccirep/list', method: 'get', params: query }) }
export function getBisAcciRep(guid) { return request({ url: '/acci/bisaccirep/' + guid, method: 'get' }) }
export function addBisAcciRep(data) { return request({ url: '/acci/bisaccirep', method: 'post', data: data }) }
export function updateBisAcciRep(data) { return request({ url: '/acci/bisaccirep', method: 'put', data: data }) }
export function delBisAcciRep(guids) { return request({ url: '/acci/bisaccirep/' + guids, method: 'delete' }) }

// ========== 事故督办 ==========
export function listBisAcciRecRep(query) { return request({ url: '/acci/bisaccirecrep/list', method: 'get', params: query }) }
export function getBisAcciRecRep(guid) { return request({ url: '/acci/bisaccirecrep/' + guid, method: 'get' }) }
export function addBisAcciRecRep(data) { return request({ url: '/acci/bisaccirecrep', method: 'post', data: data }) }
export function updateBisAcciRecRep(data) { return request({ url: '/acci/bisaccirecrep', method: 'put', data: data }) }
export function delBisAcciRecRep(guids) { return request({ url: '/acci/bisaccirecrep/' + guids, method: 'delete' }) }

// ========== 事故进展 ==========
export function listBisAcciProg(query) { return request({ url: '/acci/bisacciprog/list', method: 'get', params: query }) }
export function getBisAcciProg(guid) { return request({ url: '/acci/bisacciprog/' + guid, method: 'get' }) }
export function addBisAcciProg(data) { return request({ url: '/acci/bisacciprog', method: 'post', data: data }) }
export function updateBisAcciProg(data) { return request({ url: '/acci/bisacciprog', method: 'put', data: data }) }
export function delBisAcciProg(guids) { return request({ url: '/acci/bisacciprog/' + guids, method: 'delete' }) }

// ========== 事故月报 ==========
export function listBisAcciMont(query) { return request({ url: '/acci/bisaccimont/list', method: 'get', params: query }) }
export function getBisAcciMont(guid) { return request({ url: '/acci/bisaccimont/' + guid, method: 'get' }) }
export function addBisAcciMont(data) { return request({ url: '/acci/bisaccimont', method: 'post', data: data }) }
export function updateBisAcciMont(data) { return request({ url: '/acci/bisaccimont', method: 'put', data: data }) }
export function delBisAcciMont(guids) { return request({ url: '/acci/bisaccimont/' + guids, method: 'delete' }) }
export function checkBisAcciMont(data) { return request({ url: '/acci/bisaccimont/check', method: 'put', data: data }) }
export function returnBisAcciMont(data) { return request({ url: '/acci/bisaccimont/return', method: 'put', data: data }) }
export function revokeBisAcciMont(data) { return request({ url: '/acci/bisaccimont/revoke', method: 'put', data: data }) }
export function lockBisAcciMont(data) { return request({ url: '/acci/bisaccimont/lock', method: 'put', data: data }) }

export function batchUnlockAcciMont(guids) { return request({ url: '/acci/bisaccimont/batchUnlock', method: 'put', params: { guids: guids.join(',') } }) }

export function urgeAcciMont(orgGuid, repMonth) { return request({ url: '/acci/bisaccimont/urge', method: 'post', params: { orgGuid, repMonth } }) }

// ========== 事故调查 ==========
export function listBisAcciInve(query) { return request({ url: '/acci/bisacciinve/list', method: 'get', params: query }) }
export function getBisAcciInve(guid) { return request({ url: '/acci/bisacciinve/' + guid, method: 'get' }) }
export function addBisAcciInve(data) { return request({ url: '/acci/bisacciinve', method: 'post', data: data }) }
export function updateBisAcciInve(data) { return request({ url: '/acci/bisacciinve', method: 'put', data: data }) }
export function delBisAcciInve(guids) { return request({ url: '/acci/bisacciinve/' + guids, method: 'delete' }) }

// ========== 事故考核 ==========
export function listBisAcciAssess(query) { return request({ url: '/acci/bisacciassess/list', method: 'get', params: query }) }
export function getBisAcciAssess(id) { return request({ url: '/acci/bisacciassess/' + id, method: 'get' }) }
export function addBisAcciAssess(data) { return request({ url: '/acci/bisacciassess', method: 'post', data: data }) }
export function updateBisAcciAssess(data) { return request({ url: '/acci/bisacciassess', method: 'put', data: data }) }
export function delBisAcciAssess(ids) { return request({ url: '/acci/bisacciassess/' + ids, method: 'delete' }) }

// ========== 事故考核记录 ==========
export function listBisAcciAssessRec(query) { return request({ url: '/acci/bisacciassessrec/list', method: 'get', params: query }) }
export function getBisAcciAssessRec(id) { return request({ url: '/acci/bisacciassessrec/' + id, method: 'get' }) }
export function addBisAcciAssessRec(data) { return request({ url: '/acci/bisacciassessrec', method: 'post', data: data }) }
export function updateBisAcciAssessRec(data) { return request({ url: '/acci/bisacciassessrec', method: 'put', data: data }) }
export function delBisAcciAssessRec(ids) { return request({ url: '/acci/bisacciassessrec/' + ids, method: 'delete' }) }

// ========== 事故共享(安监总局) ==========
export function listSawfAcci(query) { return request({ url: '/acci/sawfacci/list', method: 'get', params: query }) }
export function getSawfAcci(guid) { return request({ url: '/acci/sawfacci/' + guid, method: 'get' }) }
export function addSawfAcci(data) { return request({ url: '/acci/sawfacci', method: 'post', data: data }) }
export function updateSawfAcci(data) { return request({ url: '/acci/sawfacci', method: 'put', data: data }) }
export function delSawfAcci(guids) { return request({ url: '/acci/sawfacci/' + guids, method: 'delete' }) }

// ========== 安全生产许可证 ==========
export function listSawfSafeSupe(query) { return request({ url: '/acci/sawfsafesupe/list', method: 'get', params: query }) }
export function getSawfSafeSupe(guid) { return request({ url: '/acci/sawfsafesupe/' + guid, method: 'get' }) }
export function addSawfSafeSupe(data) { return request({ url: '/acci/sawfsafesupe', method: 'post', data: data }) }
export function updateSawfSafeSupe(data) { return request({ url: '/acci/sawfsafesupe', method: 'put', data: data }) }
export function delSawfSafeSupe(guids) { return request({ url: '/acci/sawfsafesupe/' + guids, method: 'delete' }) }

// ========== 事故共享(水利部) ==========
export function listMwrAcci(query) { return request({ url: '/acci/mwracci/list', method: 'get', params: query }) }
export function getMwrAcci(guid) { return request({ url: '/acci/mwracci/' + guid, method: 'get' }) }
export function addMwrAcci(data) { return request({ url: '/acci/mwracci', method: 'post', data: data }) }
export function updateMwrAcci(data) { return request({ url: '/acci/mwracci', method: 'put', data: data }) }
export function delMwrAcci(guids) { return request({ url: '/acci/mwracci/' + guids, method: 'delete' }) }

// ========== 水利信用事故 ==========
export function listMwrCredAcci(query) { return request({ url: '/acci/mwrcredacci/list', method: 'get', params: query }) }
export function getMwrCredAcci(guid) { return request({ url: '/acci/mwrcredacci/' + guid, method: 'get' }) }
export function addMwrCredAcci(data) { return request({ url: '/acci/mwrcredacci', method: 'post', data: data }) }
export function updateMwrCredAcci(data) { return request({ url: '/acci/mwrcredacci', method: 'put', data: data }) }
export function delMwrCredAcci(guids) { return request({ url: '/acci/mwrcredacci/' + guids, method: 'delete' }) }

// ========== 业务操作接口 ==========

// 事故催报
export function pushForwardObjAcci(data) { return request({ url: '/acci/objacci/pushForward', method: 'put', data: data }) }

// 事故补报
export function insertRepBisAcciExpRep(data) { return request({ url: '/acci/objacci/insertRep', method: 'post', data: data }) }

// 批量上报
export function batchReportObjAcci(data) { return request({ url: '/acci/objacci/batchReport', method: 'put', data: data }) }

// 上报率进度
export function getReportProgress(query) { return request({ url: '/acci/objacci/reportProgress', method: 'get', params: query }) }

// 待办事项
export function getAcciTodoList() { return request({ url: '/acci/objacci/todoList', method: 'get' }) }

// 移动端上报
export function mobileSaveObjAcci(data) { return request({ url: '/acci/objacci/mobile/save', method: 'post', data: data }) }

// 统计汇总
export function getAcciSummary(query) { return request({ url: '/acci/objacci/summary', method: 'get', params: query }) }

// 按类别统计
export function getAcciByCategory(query) { return request({ url: '/acci/objacci/byCategory', method: 'get', params: query }) }

// 月报状态树
export function getAcciTreeData() { return request({ url: '/acci/bisaccimont/treeData', method: 'get' }) }

// 月报汇总统计
export function getAcciMontSummary(query) { return request({ url: '/acci/bisaccimont/montSummary', method: 'get', params: query }) }

// 月报加锁状态
export function getAcciLockStatus(query) { return request({ url: '/acci/bisaccimont/lockStatus', method: 'get', params: query }) }

// 上级上报状态
export function getAcciParentStatus(query) { return request({ url: '/acci/bisaccimont/parentStatus', method: 'get', params: query }) }

// 移动端月报撤销
export function mobileCancelBisAcciMont(data) { return request({ url: '/acci/bisaccimont/mobile/cancel', method: 'put', data: data }) }

// 查询撤销原因
export function getAcciRevokReason(guid) { return request({ url: '/acci/bisaccimont/revokReason/' + guid, method: 'get' }) }

// 事故统计报表
export function listAcciStat(query) { return request({ url: '/acci/objacci/statList', method: 'get', params: query }) }
