import request from '@/utils/request'

export function xrForceDeregisterSpeList(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterSpe/list',
    method: 'post',
    data
  })
}

export function baseinfoListByRegOrg(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterSpe/baseinfoListByRegOrg',
    method: 'post',
    data
  })
}

export function xrForceDeregisterSpeSaveIvdAcceptNew(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterSpe/saveIvdAcceptList',
    method: 'post',
    data
  })
}

export function xrForceDeregisterSpeListByBizSeqNo(params) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterSpe/listByBizSeqNo',
    method: 'get',
    params
  })
}

export function getForceDeregisterContent(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterSpe/getForceDeregisterContent',
    method: 'post',
    data
  })
}

export function xrForceDeregisterSpeProcessControl(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterSpe/processControl',
    method: 'post',
    data
  })
}

export function xrForceDeregisterRemList(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterRem/list',
    method: 'post',
    data
  })
}

export function forceSpePageByRegOrg(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterRem/forceSpePageByRegOrg',
    method: 'post',
    data
  })
}

export function xrForceDeregisterRemSaveIvdAcceptNew(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterRem/saveIvdAcceptList',
    method: 'post',
    data
  })
}

export function xrForceDeregisterRemByBizSeqNo(params) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterRem/selectByBizSeqNo',
    method: 'get',
    params
  })
}

export function xrForceDeregisterRemProcessControl(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterRem/processControl',
    method: 'post',
    data
  })
}

export function xrForceDeregisterGetApprovalFormByBizSeqNo(params) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregister/getApprovalFormByBizSeqNo',
    method: 'get',
    params
  })
}

export function getDecisionContent(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregister/getDecisionContent',
    method: 'post',
    data
  })
}

export function getForceNoticeContent(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregister/getForceNoticeContent',
    method: 'post',
    data
  })
}

export function xrLiccanRecTaskList(data) {
  return request({
    useResponseData: true,
    url: '/XrLiccanRecTask/list',
    method: 'post',
    data
  })
}

export function pageForceResByRegOrg(data) {
  return request({
    useResponseData: true,
    url: '/XrLiccanRecTask/pageForceResByRegOrg',
    method: 'post',
    data
  })
}

export function xrLiccanRecTaskSaveIvdAcceptNew(data) {
  return request({
    useResponseData: true,
    url: '/XrLiccanRecTask/saveIvdAcceptList',
    method: 'post',
    data
  })
}

export function XrLiccanRecTaskByBizSeqNo(params) {
  return request({
    useResponseData: true,
    url: '/XrLiccanRecTask/selectByBizSeqNo',
    method: 'get',
    params
  })
}

export function generateLiccanSta(data) {
  return request({
    useResponseData: true,
    url: '/XrLiccanRecTask/generateLiccanSta',
    method: 'post',
    data
  })
}

export function XrLiccanRecTaskProcessControl(data) {
  return request({
    useResponseData: true,
    url: '/XrLiccanRecTask/processControl',
    method: 'post',
    data
  })
}

export function xrLiccanRecTaskGetApprovalFormByBizSeqNo(params) {
  return request({
    useResponseData: true,
    url: '/XrLiccanRecTask/getApprovalFormByBizSeqNo',
    method: 'get',
    params
  })
}

export function xrForceDeregisterByBizSeqNo(params) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregister/selectByBizSeqNo',
    method: 'get',
    params
  })
}

export function generateDecisionContent(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterRem/generateDecisionContent',
    method: 'post',
    data
  })
}

export function xrForceDeregisterRemGetApprovalFormByBizSeqNo(params) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterRem/getApprovalFormByBizSeqNo',
    method: 'get',
    params
  })
}

export function forceDeregisterPageByRegOrg(data) {
  return request({
    useResponseData: true,
    url: '/XrForceDeregisterSpe/forceDeregisterPageByRegOrg',
    method: 'post',
    data
  })
}
export function isTaskCreater(params) {
  return request({
    useResponseData: true,
    url: '/xrTaskList/isTaskCreater',
    method: 'get',
    params
  })
}

export function xrBaseCodeList(data) {
  return request({
    useResponseData: true,
    url: '/constant/list',
    method: 'post',
    data
  }).then((data) => {
    return data.map((item) => {
      return {
        ...item,
        value: item.code,
        label: item.name
      }
    })
  })
}

export function xrAttachmentDelLawFile(params) {
  return request({
    useResponseData: true,
    url: '/attachment/delLawFile',
    method: 'post',
    params
  })
}

export function xrAttachmentListByBizSepNo(data) {
  return request({
    useResponseData: true,
    url: '/attachment/listByBizSepNo',
    method: 'post',
    data
  })
}

export function xrOpinionListByBizSeqNo(params) {
  return request({
    useResponseData: true,
    url: '/xrOpinion/listByBizSeqNo',
    method: 'post',
    params
  })
}

export function getOrgunits(orgNumber, orgLevel) {
  return request({
    useResponseData: true,
    url: '/user/getOrgunits',
    method: 'post',
    params: {
      orgNumber,
      orgLevel
    }
  })
}
export function getIsUserProp() {
  return request({
    useResponseData: true,
    url: '/user/getIsUserProp',
    method: 'get'
  })
}
