import http from '@/http'

export const getUnitList = data => http.post('/api/v1/organization/list', data) // 单位列表java
export const getOrgLevelByLevel = params => http.post(params.parentCode ? `/api/v1/organization/get-child-list?parentCode=${params.parentCode}` : '/api/v1/organization/get-child-list?parentCode') // 获取组织架构的树状结构（单位筛选列表）java

/**
 * @param {object} data - 接口参数
 * @param {boolean} data.needMember - 是否需要组织成员列表
 * @param {string} data.parentCode - 父组织code
 * */
export const getOrgOrUser = data => http.post('/api/v1/organization/synthesize-list', data) // 获取组织架构的树状结构（单位筛选列表）java

/**
 * @param {object} data - 接口参数
 * @param {boolean} data.needMember - 是否需要组织成员列表
 * @param {string} data.parentCode - 父组织code
 * */
export const getOrgTree = data => http.post('/api/v1/organization/tree-list', data) // 获取组织架构的树状结构（单位筛选列表）java

export const getFinancialCode = data => http.post('/api/v1/fiscal-code/fiscal-and-seal/get-configure', data) // 获取财政编码
export const fiscalAndSealSet = data => http.post('/api/v1/fiscal-code/fiscal-and-seal/configure', data) // 财政/印章编码配置java
