import service from "./index";
const apiAdmin = '/mediate/'

const caseManagementApi = {
    
    //========================start::案件管理======================================
    // 数据字典-金融产品类型
    getDict: data => {
        return service.service.post(`${apiAdmin}data/dict/getDict`, data, {hideLoading:true})
    },
    // 区域
    getDeptList: data => {
        return service.service.post(`${apiAdmin}company/dept/getDeptList`, data)
    },
    // 根据区域id列表查看用户列表
    getUserByDeptList: data => {
        return service.service.post(`${apiAdmin}system/user/getUserByDeptList`, data, {hideLoading:true})
    },

    // 案件各状态数量
    getCaseCount: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/getCaseCount`, data, {hideLoading:true})
    },
    // 案件状态枚举
    getMediateStatusEnum: data => {
        return service.service.get(`${apiAdmin}cases/caseInfo/getMediateStatusEnum`, {hideLoading:true})
    },

    // 案件管理列表
    getCaseInfoList: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/getCaseInfoList`, data)
    },
    // 单个删除-案件列表
    deleteCaseInfoById: data => {
        return service.service.get(`${apiAdmin}cases/caseInfo/deleteCaseInfoById?id=${data}`)
    },
    // 批量删除-案件列表
    deleteCaseBatch: data => {
        return service.service.post(`${apiAdmin}/cases/caseInfo/deleteCaseBatch`,data)
    },
    // 通过id获取案件详情
    getCaseInfoById: data => {
        return service.service.get(`${apiAdmin}cases/caseInfo/getCaseInfoById?id=${data}`,{hideLoading:true})
    },
    // 新增案件
    addCaseInfo: data => {
        return service.service.post(`${apiAdmin}/cases/caseInfo/addCaseInfo`,data)
    },
    // 编辑案件
    updateCaseInfoById: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/updateCaseInfoById`,data)
    },
    // 分配案件
    dispatchCase: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/dispatchCase`,data)
    },
    // 调解模板 type=1 话术模板 type=2
    getTemplateList: data => {
        return service.service.post(`${apiAdmin}template/getTemplateList`, data)
    },
    // 导入案件
    getImportCase: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/import`, data)
    },
    // 导出案件模板
    getExportTemplate: data => {
        return service.postFile(`${apiAdmin}cases/caseInfo/exportTemplate`, data)
    },

    // 调解记录-调解成功1/调解失败0
    updateResultStatus: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/updateResultStatus`, data)
    },

    // 更新调解协议文件（更新调解模板）
    updateCaseAgreement: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/updateCaseAgreement`, data)
    },

    // 调解中案件状态枚举
    getCaseStatusEnum: data => {
        return service.service.get(`${apiAdmin}cases/caseInfo/getCaseStatusEnum`)
    },

    // 根据话术id获取话术内容
    getTemplateById: data => {
        return service.service.post(`${apiAdmin}template/getTemplateById`, data)
    },
    // 暂存
    updateCaseLog: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/updateCaseLog`, data)
    },
    // 上一个案件
    getFrontCaseById: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/getFrontCaseById`, data)
    },
    // 下一个案件
    getNextCaseById: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/getNextCaseById`, data)
    },

    // 回款计划列表，没有分页
    getcase_payback_planlist: data => {
        return service.service.post(`${apiAdmin}api/case_payback_plan/list`, data, {hideLoading:true})
    },
    // 新增回款计划
    getcase_payback_save: data => {
        return service.service.post(`${apiAdmin}api/case_payback_plan/save`, data)
    },

    // 还款凭证列表
    gettraceProof_list: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/list`, data,{hideLoading:true})
    },
    // 上传还款凭证
    gettraceProof_create: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/create`, data)
    },
    // 统计总金额
    gettraceProof_statistics: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/statistics`, data)
    },
    // 校验
    gettraceProof_valid: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/valid`, data)
    },
    // 修改
    gettraceProof_edit: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/edit`, data)
    },
    // 删除
    gettraceProof_delete: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/delete`, data)
    },
    // 取消效验
    gettraceProof_cancel: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/cancel`, data)
    },
    // 还款凭证分页列表
    gettraceProof_page: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/page`, data)
    },
    // 统计回款金额
    gettraceProof_amount: data => {
        return service.service.post(`${apiAdmin}api/trace/traceProof/amount`, data)
    },
    


    // 短信模板
    getSmsTemplate: data => {
        return service.service.get(`${apiAdmin}api/trace/sms/template`,{hideLoading:true})
    },
    // 发送短信
    smsSend: data => {
        return service.service.post(`${apiAdmin}api/trace/sms/send`, data)
    },
    // 重试
    smsRetry: data => {
        return service.service.post(`${apiAdmin}api/trace/sms/retry`, data)
    },
    // 取消
    smsCancel: data => {
        return service.service.post(`${apiAdmin}api/trace/sms/cancel`, data)
    },
    // 批量发送短信
    smsBatchSend: data => {
        return service.service.post(`${apiAdmin}api/trace/sms/batch-send`, data)
    },
    
    // 发起-文书送达
    traceServedCreate: data => {
        return service.service.post(`${apiAdmin}api/trace/traceServed/create`, data)
    },
    // 批量发起-文书送达
    traceServedBatchCreate: data => {
        return service.service.post(`${apiAdmin}api/trace/traceServed/batch-create`, data)
    },
    // 取消
    traceServedBatchCancel: data => {
        return service.service.post(`${apiAdmin}api/trace/traceServed/cancel`, data)
    },
    // 重试
    traceServedBatchRetry: data => {
        return service.service.post(`${apiAdmin}api/trace/traceServed/retry`, data)
    },

    // 批量更新案件状态（在办、办结）
    updateCaseStatus: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/updateCaseStatus`, data)
    },

    // 批量发起签章
    traceSeal_launch: data => {
        return service.service.post(`${apiAdmin}api/trace/traceSeal/launch`, data)
    },
    // 批量重试
    traceSeal_retry: data => {
        return service.service.post(`${apiAdmin}api/trace/traceSeal/retry`, data)
    },
    // 批量取消
    traceSeal_cancel: data => {
        return service.service.post(`${apiAdmin}api/trace/traceSeal/cancel`, data)
    },

    // 案件文书-列表
    getCaseGenerateList: data => {
        return service.service.post(`${apiAdmin}api/trace/traceGenerate/getCaseGenerateList`, data, {hideLoading:true})
    },
    // 案件文书-上传模板
    customFileUpload: data => {
        return service.service.post(`${apiAdmin}api/trace/traceGenerate/customFile/upload`, data, {
            headers:
              {'Content-Type': 'multipart/form-data'},
          },)
    },
    // 案件文书-生成文书
    traceGenerateCreate: data => {
        return service.service.post(`${apiAdmin}api/trace/traceGenerate/create`, data)
    },
    // 案件文书-重新生成文书
    traceGenerateRetry: data => {
        return service.service.post(`${apiAdmin}api/trace/traceGenerate/retry`, data)
    },
    // 案件文书-删除
    traceGenerateDelete: data => {
        return service.service.post(`${apiAdmin}api/trace/traceGenerate/delete`, data)
    },
    // 案件文书-批量生成文书
    traceGenerateBatchCreate: data => {
        return service.service.post(`${apiAdmin}api/trace/traceGenerate/batch-create`, data)
    },
    // 案件文书-批量取消
    traceGenerateBatchCancel: data => {
        return service.service.post(`${apiAdmin}api/trace/traceGenerate/batch-cancel`, data)
    },
    // 案件文书-批量重试
    traceGenerateBatchRetry: data => {
        return service.service.post(`${apiAdmin}api/trace/traceGenerate/batch-retry`, data)
    },

    // 
    // 案件签字-发起签字
    traceSignCreate: data => {
        return service.service.post(`${apiAdmin}api/trace/traceSign/create`, data)
    },
    // 案件签字-批量发起签字
    traceSignBatchCreate: data => {
        return service.service.post(`${apiAdmin}api/trace/traceSign/batch-create`, data)
    },
    // 案件签字-撤销签字
    traceSignBatchCancel: data => {
        return service.service.post(`${apiAdmin}api/trace/traceSign/batch-cancel-by-case`, data)
    },

    // 同组的用户列表（协办员选择项）
    getCurrGroupUserList: data => {
        return service.service.get(`${apiAdmin}system/user/getCurrGroupUserList`, {hideLoading:true})
    },
    // 配置协办员
    updateAssistMediator: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/updateAssistMediator`, data)
    },

    // 人物画像-查询当前债务人画像信息
    debtorProfile_getByDebtorId: data => {
        return service.service.get(`${apiAdmin}api/portrait/debtorProfile/getByDebtorId?id=${data}`, {hideLoading:true})
    },
    // 人物画像-编辑债务人的画像信息
    debtorProfile_edit: data => {
        return service.service.post(`${apiAdmin}api/portrait/debtorProfile/edit`, data, {hideLoading:true})
    },
    // 人物画像-标签列表
    debtorProfile_labels: data => {
        return service.service.post(`${apiAdmin}api/portrait/debtorProfile/labels`, data, {hideLoading:true})
    },

    // 调解记录-新增/修改调解记录
    mediate_record_save: data => {
        return service.service.post(`${apiAdmin}case/mediate/record/save`, data)
    },
    // 调解记录-调解记录列表
    mediate_record_list: data => {
        return service.service.post(`${apiAdmin}case/mediate/record/list`, data, {hideLoading:true})
    },
    // 调解记录-删除调解记录
    mediate_record_delete: data => {
        return service.service.post(`${apiAdmin}case/mediate/record/delete`, data)
    },
    // 案件触达记录
    traceRecord_list: data => {
        return service.service.post(`${apiAdmin}api/trace/traceRecord/list`, data, {hideLoading:true})
    },
    // 案件日志记录
    mediate_record_log: data => {
        return service.service.post(`${apiAdmin}cases/process/log`, data, {hideLoading:true})
    },


    // 共债案件查询
    mediate_coobligation_list: data => {
        return service.service.post(`${apiAdmin}cases/caseInfo/joint/debt`, data, {hideLoading:true})
    },
    // 调解备注
    mediateRemark: data => {
        return service.service.post(`${apiAdmin}api/trace/calling/mediateRemark`, data, {hideLoading:true})
    },

    // 呼叫-发起批量智能外呼
    callingBatchcall: data => {
        return service.service.post(`${apiAdmin}api/trace/calling/batch-call`, data)
    },
    // 呼叫-当前呼叫队列
    callingQueue: data => {
        return service.service.post(`${apiAdmin}api/trace/calling/queue`, data)
    },
    // 呼叫-呼叫成功
    callingSuccess: data => {
        return service.service.post(`${apiAdmin}api/trace/calling/success`, data)
    },
    // 呼叫-呼叫失败
    callingFail: data => {
        return service.service.post(`${apiAdmin}api/trace/calling/fail`, data)
    },
    // 当前呼叫详情统计
    callingInfo: data => {
        return service.service.post(`${apiAdmin}api/trace/calling/info`, data)
    },
    // 今日呼叫统计
    callingTodayCount: data => {
        return service.service.post(`${apiAdmin}api/trace/calling/todayCount`, data)
    },
    // 当前调解员案件列表
    callingCaseList: data => {
        return service.service.post(`${apiAdmin}api/trace/calling/caseList`, data)
    },



    // 视频快开提醒
    videoCall: data => {
        return service.service.get(`${apiAdmin}api/trace/video/videoCall`, {hideLoading:true})
    },
    
    //========================end::案件管理======================================
}
export default caseManagementApi;