feat(credit): 添加企业信用模块功能
- 在应用配置中注册公司管理页面路由 - 实现首页轮播图组件优化,支持CSS尺寸转换和图片加载 - 新增企业ID修正API功能 - 实现信用模块数据权限控制工具 - 添加客户、联系人、数据查询等页面配置 - 完善行政许可、破产重整、分支机构等信用数据模型 - 实现各类信用数据的增删改查和导入导出接口 - 建立企业信用数据完整管理功能体系
This commit is contained in:
28
src/api/credit/companyId.ts
Normal file
28
src/api/credit/companyId.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult } from '@/api';
|
||||
|
||||
/**
|
||||
* 修正某个信用模块数据的主体企业归属(按名称匹配回填 companyId)
|
||||
*
|
||||
* 后端约定: POST /api/credit/{module}/company-id/refresh
|
||||
* 例如: module = "credit-judgment-debtor"
|
||||
*/
|
||||
export async function refreshCreditCompanyId(
|
||||
module: string,
|
||||
params?: {
|
||||
onlyNull?: boolean;
|
||||
limit?: number;
|
||||
}
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
`/credit/${module}/company-id/refresh`,
|
||||
undefined,
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
171
src/api/credit/creditAdministrativeLicense/index.ts
Normal file
171
src/api/credit/creditAdministrativeLicense/index.ts
Normal file
@@ -0,0 +1,171 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditAdministrativeLicense,
|
||||
CreditAdministrativeLicenseParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询行政许可
|
||||
*/
|
||||
export async function pageCreditAdministrativeLicense(
|
||||
params: CreditAdministrativeLicenseParam
|
||||
) {
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<CreditAdministrativeLicense>>
|
||||
>('/credit/credit-administrative-license/page', {
|
||||
params: withCreditUserScope(params)
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询行政许可列表
|
||||
*/
|
||||
export async function listCreditAdministrativeLicense(
|
||||
params?: CreditAdministrativeLicenseParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditAdministrativeLicense[]>>(
|
||||
'/credit/credit-administrative-license',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加行政许可
|
||||
*/
|
||||
export async function addCreditAdministrativeLicense(
|
||||
data: CreditAdministrativeLicense
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-administrative-license',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改行政许可
|
||||
*/
|
||||
export async function updateCreditAdministrativeLicense(
|
||||
data: CreditAdministrativeLicense
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-administrative-license',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行政许可
|
||||
*/
|
||||
export async function removeCreditAdministrativeLicense(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-administrative-license/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除行政许可
|
||||
*/
|
||||
export async function removeBatchCreditAdministrativeLicense(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-administrative-license/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询行政许可
|
||||
*/
|
||||
export async function getCreditAdministrativeLicense(id: number) {
|
||||
const res = await request.get<ApiResult<CreditAdministrativeLicense>>(
|
||||
'/credit/credit-administrative-license/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入行政许可
|
||||
*/
|
||||
export async function importCreditAdministrativeLicense(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-administrative-license/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史行政许可
|
||||
*/
|
||||
export async function importCreditAdministrativeLicenseHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-administrative-license/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditAdministrativeLicense/model/index.ts
Normal file
59
src/api/credit/creditAdministrativeLicense/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 行政许可
|
||||
*/
|
||||
export interface CreditAdministrativeLicense {
|
||||
// ID
|
||||
id?: number;
|
||||
// 决定文书/许可编号
|
||||
code?: string;
|
||||
// 决定文书/许可证名称
|
||||
name?: string;
|
||||
// 许可状态
|
||||
statusText?: string;
|
||||
// 许可类型
|
||||
type?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 有效期自
|
||||
validityStart?: string;
|
||||
// 有效期至
|
||||
validityEnd?: string;
|
||||
// 许可机关
|
||||
licensingAuthority?: string;
|
||||
// 许可内容
|
||||
licenseContent?: string;
|
||||
// 数据来源单位
|
||||
dataSourceUnit?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 行政许可搜索条件
|
||||
*/
|
||||
export interface CreditAdministrativeLicenseParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
156
src/api/credit/creditBankruptcy/index.ts
Normal file
156
src/api/credit/creditBankruptcy/index.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditBankruptcy, CreditBankruptcyParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询破产重整
|
||||
*/
|
||||
export async function pageCreditBankruptcy(params: CreditBankruptcyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditBankruptcy>>>(
|
||||
'/credit/credit-bankruptcy/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询破产重整列表
|
||||
*/
|
||||
export async function listCreditBankruptcy(params?: CreditBankruptcyParam) {
|
||||
const res = await request.get<ApiResult<CreditBankruptcy[]>>(
|
||||
'/credit/credit-bankruptcy',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加破产重整
|
||||
*/
|
||||
export async function addCreditBankruptcy(data: CreditBankruptcy) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-bankruptcy',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改破产重整
|
||||
*/
|
||||
export async function updateCreditBankruptcy(data: CreditBankruptcy) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-bankruptcy',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除破产重整
|
||||
*/
|
||||
export async function removeCreditBankruptcy(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-bankruptcy/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除破产重整
|
||||
*/
|
||||
export async function removeBatchCreditBankruptcy(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-bankruptcy/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询破产重整
|
||||
*/
|
||||
export async function getCreditBankruptcy(id: number) {
|
||||
const res = await request.get<ApiResult<CreditBankruptcy>>(
|
||||
'/credit/credit-bankruptcy/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入破产重整
|
||||
*/
|
||||
export async function importCreditBankruptcy(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-bankruptcy/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史破产重整
|
||||
*/
|
||||
export async function importCreditBankruptcyHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-bankruptcy/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
51
src/api/credit/creditBankruptcy/model/index.ts
Normal file
51
src/api/credit/creditBankruptcy/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 破产重整
|
||||
*/
|
||||
export interface CreditBankruptcy {
|
||||
// ID
|
||||
id?: number;
|
||||
// 案号
|
||||
code?: string;
|
||||
// 案件类型
|
||||
type?: string;
|
||||
// 当事人
|
||||
party?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 经办法院
|
||||
court?: string;
|
||||
// 公开日期
|
||||
publicDate?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 破产重整搜索条件
|
||||
*/
|
||||
export interface CreditBankruptcyParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
127
src/api/credit/creditBranch/index.ts
Normal file
127
src/api/credit/creditBranch/index.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditBranch, CreditBranchParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询分支机构
|
||||
*/
|
||||
export async function pageCreditBranch(params: CreditBranchParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditBranch>>>(
|
||||
'/credit/credit-branch/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分支机构列表
|
||||
*/
|
||||
export async function listCreditBranch(params?: CreditBranchParam) {
|
||||
const res = await request.get<ApiResult<CreditBranch[]>>(
|
||||
'/credit/credit-branch',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加分支机构
|
||||
*/
|
||||
export async function addCreditBranch(data: CreditBranch) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-branch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分支机构
|
||||
*/
|
||||
export async function updateCreditBranch(data: CreditBranch) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-branch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分支机构
|
||||
*/
|
||||
export async function removeCreditBranch(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-branch/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除分支机构
|
||||
*/
|
||||
export async function removeBatchCreditBranch(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-branch/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询分支机构
|
||||
*/
|
||||
export async function getCreditBranch(id: number) {
|
||||
const res = await request.get<ApiResult<CreditBranch>>(
|
||||
'/credit/credit-branch/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入分支机构
|
||||
*/
|
||||
export async function importCreditBranch(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-branch/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
51
src/api/credit/creditBranch/model/index.ts
Normal file
51
src/api/credit/creditBranch/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分支机构
|
||||
*/
|
||||
export interface CreditBranch {
|
||||
// ID
|
||||
id?: number;
|
||||
// 分支机构名称
|
||||
name?: string;
|
||||
// 负责人
|
||||
curator?: string;
|
||||
// 地区
|
||||
region?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 成立日期
|
||||
establishDate?: string;
|
||||
// 状态
|
||||
statusText?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分支机构搜索条件
|
||||
*/
|
||||
export interface CreditBranchParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
163
src/api/credit/creditBreachOfTrust/index.ts
Normal file
163
src/api/credit/creditBreachOfTrust/index.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditBreachOfTrust, CreditBreachOfTrustParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询失信被执行人
|
||||
*/
|
||||
export async function pageCreditBreachOfTrust(
|
||||
params: CreditBreachOfTrustParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditBreachOfTrust>>>(
|
||||
'/credit/credit-breach-of-trust/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询失信被执行人列表
|
||||
*/
|
||||
export async function listCreditBreachOfTrust(
|
||||
params?: CreditBreachOfTrustParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditBreachOfTrust[]>>(
|
||||
'/credit/credit-breach-of-trust',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加失信被执行人
|
||||
*/
|
||||
export async function addCreditBreachOfTrust(data: CreditBreachOfTrust) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改失信被执行人
|
||||
*/
|
||||
export async function updateCreditBreachOfTrust(data: CreditBreachOfTrust) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除失信被执行人
|
||||
*/
|
||||
export async function removeCreditBreachOfTrust(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除失信被执行人
|
||||
*/
|
||||
export async function removeBatchCreditBreachOfTrust(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询失信被执行人
|
||||
*/
|
||||
export async function getCreditBreachOfTrust(id: number) {
|
||||
const res = await request.get<ApiResult<CreditBreachOfTrust>>(
|
||||
'/credit/credit-breach-of-trust/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入失信被执行人
|
||||
*/
|
||||
export async function importCreditBreachOfTrust(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史失信被执行人
|
||||
*/
|
||||
export async function importCreditBreachOfTrustHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditBreachOfTrust/model/index.ts
Normal file
59
src/api/credit/creditBreachOfTrust/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 失信被执行人
|
||||
*/
|
||||
export interface CreditBreachOfTrust {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 失信被执行人搜索条件
|
||||
*/
|
||||
export interface CreditBreachOfTrustParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
156
src/api/credit/creditCaseFiling/index.ts
Normal file
156
src/api/credit/creditCaseFiling/index.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCaseFiling, CreditCaseFilingParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询司法大数据
|
||||
*/
|
||||
export async function pageCreditCaseFiling(params: CreditCaseFilingParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCaseFiling>>>(
|
||||
'/credit/credit-case-filing/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询司法大数据列表
|
||||
*/
|
||||
export async function listCreditCaseFiling(params?: CreditCaseFilingParam) {
|
||||
const res = await request.get<ApiResult<CreditCaseFiling[]>>(
|
||||
'/credit/credit-case-filing',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加司法大数据
|
||||
*/
|
||||
export async function addCreditCaseFiling(data: CreditCaseFiling) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司法大数据
|
||||
*/
|
||||
export async function updateCreditCaseFiling(data: CreditCaseFiling) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除司法大数据
|
||||
*/
|
||||
export async function removeCreditCaseFiling(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditCaseFiling(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询司法大数据
|
||||
*/
|
||||
export async function getCreditCaseFiling(id: number) {
|
||||
const res = await request.get<ApiResult<CreditCaseFiling>>(
|
||||
'/credit/credit-case-filing/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入司法大数据
|
||||
*/
|
||||
export async function importCreditCaseFiling(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史立案信息司法大数据
|
||||
*/
|
||||
export async function importCreditCaseFilingHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditCaseFiling/model/index.ts
Normal file
59
src/api/credit/creditCaseFiling/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 司法大数据
|
||||
*/
|
||||
export interface CreditCaseFiling {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditCaseFilingParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
138
src/api/credit/creditCompany/index.ts
Normal file
138
src/api/credit/creditCompany/index.ts
Normal file
@@ -0,0 +1,138 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCompany, CreditCompanyParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询企业
|
||||
*/
|
||||
export async function pageCreditCompany(params: CreditCompanyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCompany>>>(
|
||||
'/credit/credit-company/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询企业列表
|
||||
*/
|
||||
export async function listCreditCompany(params?: CreditCompanyParam) {
|
||||
const res = await request.get<ApiResult<CreditCompany[]>>(
|
||||
'/credit/credit-company',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加企业
|
||||
*/
|
||||
export async function addCreditCompany(data: CreditCompany) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-company',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业
|
||||
*/
|
||||
export async function updateCreditCompany(data: CreditCompany) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-company',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业
|
||||
*/
|
||||
export async function removeCreditCompany(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-company/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除企业
|
||||
*/
|
||||
export async function removeBatchCreditCompany(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-company/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询企业
|
||||
*/
|
||||
export async function getCreditCompany(id: number) {
|
||||
const res = await request.get<ApiResult<CreditCompany>>(
|
||||
'/credit/credit-company/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入企业
|
||||
*/
|
||||
export async function importCreditCompany(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-company/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据企业匹配名称查询关联信息
|
||||
*/
|
||||
export async function getCompanyRelatedInfo(params: CreditCompanyParam) {
|
||||
const res = await request.get<ApiResult<CreditCompany>>(
|
||||
'/credit/credit-company/related',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
189
src/api/credit/creditCompany/model/index.ts
Normal file
189
src/api/credit/creditCompany/model/index.ts
Normal file
@@ -0,0 +1,189 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 企业
|
||||
*/
|
||||
export interface CreditCompany {
|
||||
// ID
|
||||
id?: number;
|
||||
// 原文件导入名称
|
||||
name?: string;
|
||||
// 系统匹配企业名称
|
||||
matchName?: string;
|
||||
// 统一社会信用代码
|
||||
code?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 类型
|
||||
type?: number;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 登记状态
|
||||
registrationStatus?: string;
|
||||
// 法定代表人
|
||||
legalPerson?: string;
|
||||
// 注册资本
|
||||
registeredCapital?: string;
|
||||
// 实缴资本
|
||||
paidinCapital?: string;
|
||||
// 成立日期
|
||||
establishDate?: string;
|
||||
// 企业地址
|
||||
address?: string;
|
||||
// 电话
|
||||
tel?: string;
|
||||
// 更多电话
|
||||
moreTel?: string;
|
||||
// 邮箱
|
||||
email?: string;
|
||||
// 更多邮箱
|
||||
moreEmail?: string;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所属省份
|
||||
province?: string;
|
||||
// 所属城市
|
||||
city?: string;
|
||||
// 所属区县
|
||||
region?: string;
|
||||
// 企业(机构)类型
|
||||
institutionType?: string;
|
||||
// 纳税人识别号
|
||||
taxpayerCode?: string;
|
||||
// 注册号
|
||||
registrationNumber?: string;
|
||||
// 组织机构代码
|
||||
organizationalCode?: string;
|
||||
// 参保人数
|
||||
numberOfInsuredPersons?: string;
|
||||
// 参保人数所属年报
|
||||
annualReport?: string;
|
||||
// 营业期限
|
||||
businessTerm?: string;
|
||||
// 国标行业门类
|
||||
nationalStandardIndustryCategories?: string;
|
||||
// 国标行业大类
|
||||
nationalStandardIndustryCategories2?: string;
|
||||
// 国标行业中类
|
||||
nationalStandardIndustryCategories3?: string;
|
||||
// 国标行业小类
|
||||
nationalStandardIndustryCategories4?: string;
|
||||
// 企查查行业门类
|
||||
nationalStandardIndustryCategories5?: string;
|
||||
// 企查查行业大类
|
||||
nationalStandardIndustryCategories6?: string;
|
||||
// 企查查行业中类
|
||||
nationalStandardIndustryCategories7?: string;
|
||||
// 企查查行业小类
|
||||
nationalStandardIndustryCategories8?: string;
|
||||
// 企业规模
|
||||
companySize?: string;
|
||||
// 曾用名
|
||||
formerName?: string;
|
||||
// 英文名
|
||||
englishName?: string;
|
||||
// 官网
|
||||
domain?: string;
|
||||
// 通信地址
|
||||
mailingAddress?: string;
|
||||
// 企业简介
|
||||
companyProfile?: string;
|
||||
// 经营范围
|
||||
natureOfBusiness?: string;
|
||||
// 登记机关
|
||||
registrationAuthority?: string;
|
||||
// 纳税人资质
|
||||
taxpayerQualification?: string;
|
||||
// 最新年报年份
|
||||
latestAnnualReportYear?: string;
|
||||
// 最新年报营业收入
|
||||
latestAnnualReportOnOperatingRevenue?: string;
|
||||
// 企查分
|
||||
enterpriseScoreCheck?: string;
|
||||
// 信用等级
|
||||
creditRating?: string;
|
||||
// 科创分
|
||||
cechnologyScore?: string;
|
||||
// 科创等级
|
||||
cechnologyLevel?: string;
|
||||
// 是否小微企业
|
||||
smallEnterprise?: string;
|
||||
// 记录数
|
||||
creditAdministrativeLicense?: number;
|
||||
// 记录数
|
||||
creditBankruptcy?: number;
|
||||
// 记录数
|
||||
creditBranch?: number;
|
||||
// 记录数
|
||||
creditBreachOfTrust?: number;
|
||||
// 记录数
|
||||
creditCaseFiling?: number;
|
||||
// 记录数
|
||||
creditCompetitor?: number;
|
||||
// 记录数
|
||||
creditCourtAnnouncement?: number;
|
||||
// 记录数
|
||||
creditCourtSession?: number;
|
||||
// 记录数
|
||||
creditCustomer?: number;
|
||||
// 记录数
|
||||
creditDeliveryNotice?: number;
|
||||
// 记录数
|
||||
creditExternal?: number;
|
||||
// 记录数
|
||||
creditFinalVersion?: number;
|
||||
// 记录数
|
||||
creditGqdj?: number;
|
||||
// 记录数
|
||||
creditHistoricalLegalPerson?: number;
|
||||
// 记录数
|
||||
creditJudgmentDebtor?: number;
|
||||
// 记录数
|
||||
creditJudicialDocument?: number;
|
||||
// 记录数
|
||||
creditJudiciary?: number;
|
||||
// 记录数
|
||||
creditMediation?: number;
|
||||
// 记录数
|
||||
creditNearbyCompany?: number;
|
||||
// 记录数
|
||||
creditPatent?: number;
|
||||
// 记录数
|
||||
creditRiskRelation?: number;
|
||||
// 记录数
|
||||
creditSupplier?: number;
|
||||
// 记录数
|
||||
creditSuspectedRelationship?: number;
|
||||
// 记录数
|
||||
creditUser?: number;
|
||||
// 记录数
|
||||
creditXgxf?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业搜索条件
|
||||
*/
|
||||
export interface CreditCompanyParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
129
src/api/credit/creditCompetitor/index.ts
Normal file
129
src/api/credit/creditCompetitor/index.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCompetitor, CreditCompetitorParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询竞争对手
|
||||
*/
|
||||
export async function pageCreditCompetitor(params: CreditCompetitorParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCompetitor>>>(
|
||||
'/credit/credit-competitor/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询竞争对手列表
|
||||
*/
|
||||
export async function listCreditCompetitor(params?: CreditCompetitorParam) {
|
||||
const res = await request.get<ApiResult<CreditCompetitor[]>>(
|
||||
'/credit/credit-competitor',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加竞争对手
|
||||
*/
|
||||
export async function addCreditCompetitor(data: CreditCompetitor) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-competitor',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改竞争对手
|
||||
*/
|
||||
export async function updateCreditCompetitor(data: CreditCompetitor) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-competitor',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除竞争对手
|
||||
*/
|
||||
export async function removeCreditCompetitor(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-competitor/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除竞争对手
|
||||
*/
|
||||
export async function removeBatchCreditCompetitor(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-competitor/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询竞争对手
|
||||
*/
|
||||
export async function getCreditCompetitor(id: number) {
|
||||
const res = await request.get<ApiResult<CreditCompetitor>>(
|
||||
'/credit/credit-competitor/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入竞争对手
|
||||
*/
|
||||
export async function importCreditCompetitor(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-competitor/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
53
src/api/credit/creditCompetitor/model/index.ts
Normal file
53
src/api/credit/creditCompetitor/model/index.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 竞争对手
|
||||
*/
|
||||
export interface CreditCompetitor {
|
||||
// 序号
|
||||
id?: number;
|
||||
// 企业名称
|
||||
name?: string;
|
||||
// 法定代表人
|
||||
legalRepresentative?: string;
|
||||
// 注册资本
|
||||
registeredCapital?: string;
|
||||
// 成立日期
|
||||
establishmentDate?: string;
|
||||
// 登记状态
|
||||
registrationStatus?: string;
|
||||
// 所属行业
|
||||
industry?: string;
|
||||
// 所属省份
|
||||
province?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 竞争对手搜索条件
|
||||
*/
|
||||
export interface CreditCompetitorParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
170
src/api/credit/creditCourtAnnouncement/index.ts
Normal file
170
src/api/credit/creditCourtAnnouncement/index.ts
Normal file
@@ -0,0 +1,170 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditCourtAnnouncement,
|
||||
CreditCourtAnnouncementParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询法院公告司法大数据
|
||||
*/
|
||||
export async function pageCreditCourtAnnouncement(
|
||||
params: CreditCourtAnnouncementParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCourtAnnouncement>>>(
|
||||
'/credit/credit-court-announcement/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询法院公告司法大数据列表
|
||||
*/
|
||||
export async function listCreditCourtAnnouncement(
|
||||
params?: CreditCourtAnnouncementParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditCourtAnnouncement[]>>(
|
||||
'/credit/credit-court-announcement',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加法院公告司法大数据
|
||||
*/
|
||||
export async function addCreditCourtAnnouncement(
|
||||
data: CreditCourtAnnouncement
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改法院公告司法大数据
|
||||
*/
|
||||
export async function updateCreditCourtAnnouncement(
|
||||
data: CreditCourtAnnouncement
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除法院公告司法大数据
|
||||
*/
|
||||
export async function removeCreditCourtAnnouncement(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除法院公告司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditCourtAnnouncement(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询法院公告司法大数据
|
||||
*/
|
||||
export async function getCreditCourtAnnouncement(id: number) {
|
||||
const res = await request.get<ApiResult<CreditCourtAnnouncement>>(
|
||||
'/credit/credit-court-announcement/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入法院公告司法大数据
|
||||
*/
|
||||
export async function importCreditCourtAnnouncement(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史开庭公告
|
||||
*/
|
||||
export async function importCreditCourtAnnouncementHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-court-announcement/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditCourtAnnouncement/model/index.ts
Normal file
59
src/api/credit/creditCourtAnnouncement/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 法院公告司法大数据
|
||||
*/
|
||||
export interface CreditCourtAnnouncement {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 法院公告司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditCourtAnnouncementParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
156
src/api/credit/creditCourtSession/index.ts
Normal file
156
src/api/credit/creditCourtSession/index.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCourtSession, CreditCourtSessionParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询开庭公告司法大数据
|
||||
*/
|
||||
export async function pageCreditCourtSession(params: CreditCourtSessionParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCourtSession>>>(
|
||||
'/credit/credit-court-session/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询开庭公告司法大数据列表
|
||||
*/
|
||||
export async function listCreditCourtSession(params?: CreditCourtSessionParam) {
|
||||
const res = await request.get<ApiResult<CreditCourtSession[]>>(
|
||||
'/credit/credit-court-session',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加开庭公告司法大数据
|
||||
*/
|
||||
export async function addCreditCourtSession(data: CreditCourtSession) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-court-session',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改开庭公告司法大数据
|
||||
*/
|
||||
export async function updateCreditCourtSession(data: CreditCourtSession) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-court-session',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除开庭公告司法大数据
|
||||
*/
|
||||
export async function removeCreditCourtSession(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-court-session/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除开庭公告司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditCourtSession(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-court-session/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询开庭公告司法大数据
|
||||
*/
|
||||
export async function getCreditCourtSession(id: number) {
|
||||
const res = await request.get<ApiResult<CreditCourtSession>>(
|
||||
'/credit/credit-court-session/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入开庭公告司法大数据
|
||||
*/
|
||||
export async function importCreditCourtSession(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-court-session/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史开庭公告司法大数据
|
||||
*/
|
||||
export async function importCreditCourtSessionHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-court-session/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditCourtSession/model/index.ts
Normal file
59
src/api/credit/creditCourtSession/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 开庭公告司法大数据
|
||||
*/
|
||||
export interface CreditCourtSession {
|
||||
// ID
|
||||
id?: number;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 数据类型
|
||||
// dataType?: string;
|
||||
// 原告/上诉人
|
||||
// plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
// appellee?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 涉案金额
|
||||
// involvedAmount?: string;
|
||||
// 数据状态
|
||||
// dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开庭公告司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditCourtSessionParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
127
src/api/credit/creditCustomer/index.ts
Normal file
127
src/api/credit/creditCustomer/index.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCustomer, CreditCustomerParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询客户
|
||||
*/
|
||||
export async function pageCreditCustomer(params: CreditCustomerParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCustomer>>>(
|
||||
'/credit/credit-customer/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户列表
|
||||
*/
|
||||
export async function listCreditCustomer(params?: CreditCustomerParam) {
|
||||
const res = await request.get<ApiResult<CreditCustomer[]>>(
|
||||
'/credit/credit-customer',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加客户
|
||||
*/
|
||||
export async function addCreditCustomer(data: CreditCustomer) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-customer',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
*/
|
||||
export async function updateCreditCustomer(data: CreditCustomer) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-customer',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
*/
|
||||
export async function removeCreditCustomer(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-customer/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除客户
|
||||
*/
|
||||
export async function removeBatchCreditCustomer(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-customer/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询客户
|
||||
*/
|
||||
export async function getCreditCustomer(id: number) {
|
||||
const res = await request.get<ApiResult<CreditCustomer>>(
|
||||
'/credit/credit-customer/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入客户
|
||||
*/
|
||||
export async function importCreditCustomer(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-customer/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
49
src/api/credit/creditCustomer/model/index.ts
Normal file
49
src/api/credit/creditCustomer/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 客户
|
||||
*/
|
||||
export interface CreditCustomer {
|
||||
// ID
|
||||
id?: number;
|
||||
// 客户
|
||||
name?: string;
|
||||
// 状态
|
||||
statusTxt?: string;
|
||||
// 销售金额(万元)
|
||||
price?: string;
|
||||
// 公开日期
|
||||
publicDate?: string;
|
||||
// 数据来源
|
||||
dataSource?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户搜索条件
|
||||
*/
|
||||
export interface CreditCustomerParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
163
src/api/credit/creditDeliveryNotice/index.ts
Normal file
163
src/api/credit/creditDeliveryNotice/index.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditDeliveryNotice, CreditDeliveryNoticeParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询送达公告司法大数据
|
||||
*/
|
||||
export async function pageCreditDeliveryNotice(
|
||||
params: CreditDeliveryNoticeParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditDeliveryNotice>>>(
|
||||
'/credit/credit-delivery-notice/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询送达公告司法大数据列表
|
||||
*/
|
||||
export async function listCreditDeliveryNotice(
|
||||
params?: CreditDeliveryNoticeParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditDeliveryNotice[]>>(
|
||||
'/credit/credit-delivery-notice',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加送达公告司法大数据
|
||||
*/
|
||||
export async function addCreditDeliveryNotice(data: CreditDeliveryNotice) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-delivery-notice',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改送达公告司法大数据
|
||||
*/
|
||||
export async function updateCreditDeliveryNotice(data: CreditDeliveryNotice) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-delivery-notice',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除送达公告司法大数据
|
||||
*/
|
||||
export async function removeCreditDeliveryNotice(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-delivery-notice/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除送达公告司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditDeliveryNotice(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-delivery-notice/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询送达公告司法大数据
|
||||
*/
|
||||
export async function getCreditDeliveryNotice(id: number) {
|
||||
const res = await request.get<ApiResult<CreditDeliveryNotice>>(
|
||||
'/credit/credit-delivery-notice/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入送达公告司法大数据
|
||||
*/
|
||||
export async function importCreditDeliveryNotice(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-delivery-notice/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史送达公告司法大数据
|
||||
*/
|
||||
export async function importCreditDeliveryNoticeHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-delivery-notice/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditDeliveryNotice/model/index.ts
Normal file
59
src/api/credit/creditDeliveryNotice/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 送达公告司法大数据
|
||||
*/
|
||||
export interface CreditDeliveryNotice {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 送达公告司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditDeliveryNoticeParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
127
src/api/credit/creditExternal/index.ts
Normal file
127
src/api/credit/creditExternal/index.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditExternal, CreditExternalParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询对外投资
|
||||
*/
|
||||
export async function pageCreditExternal(params: CreditExternalParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditExternal>>>(
|
||||
'/credit/credit-external/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询对外投资列表
|
||||
*/
|
||||
export async function listCreditExternal(params?: CreditExternalParam) {
|
||||
const res = await request.get<ApiResult<CreditExternal[]>>(
|
||||
'/credit/credit-external',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加对外投资
|
||||
*/
|
||||
export async function addCreditExternal(data: CreditExternal) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-external',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改对外投资
|
||||
*/
|
||||
export async function updateCreditExternal(data: CreditExternal) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-external',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除对外投资
|
||||
*/
|
||||
export async function removeCreditExternal(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-external/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除对外投资
|
||||
*/
|
||||
export async function removeBatchCreditExternal(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-external/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询对外投资
|
||||
*/
|
||||
export async function getCreditExternal(id: number) {
|
||||
const res = await request.get<ApiResult<CreditExternal>>(
|
||||
'/credit/credit-external/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入对外投资
|
||||
*/
|
||||
export async function importCreditExternal(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-external/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
67
src/api/credit/creditExternal/model/index.ts
Normal file
67
src/api/credit/creditExternal/model/index.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 对外投资
|
||||
*/
|
||||
export interface CreditExternal {
|
||||
// ID
|
||||
id?: number;
|
||||
// 被投资企业名称
|
||||
name?: string;
|
||||
// 企业状态(如存续、注销等)
|
||||
statusTxt?: string;
|
||||
// 法定代表人姓名
|
||||
legalRepresentative?: string;
|
||||
// 注册资本(金额)
|
||||
registeredCapital?: string;
|
||||
// 成立日期
|
||||
establishmentDate?: string;
|
||||
// 持股比例
|
||||
shareholdingRatio?: string;
|
||||
// 认缴出资额
|
||||
subscribedInvestmentAmount?: string;
|
||||
// 认缴出资日期
|
||||
subscribedInvestmentDate?: string;
|
||||
// 间接持股比例
|
||||
indirectShareholdingRatio?: string;
|
||||
// 投资日期
|
||||
investmentDate?: string;
|
||||
// 所属地区
|
||||
region?: string;
|
||||
// 所属行业
|
||||
industry?: string;
|
||||
// 投资数量
|
||||
investmentCount?: number;
|
||||
// 关联产品/机构
|
||||
relatedProductsInstitutions?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对外投资搜索条件
|
||||
*/
|
||||
export interface CreditExternalParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
156
src/api/credit/creditFinalVersion/index.ts
Normal file
156
src/api/credit/creditFinalVersion/index.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditFinalVersion, CreditFinalVersionParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询终本案件
|
||||
*/
|
||||
export async function pageCreditFinalVersion(params: CreditFinalVersionParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditFinalVersion>>>(
|
||||
'/credit/credit-final-version/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询终本案件列表
|
||||
*/
|
||||
export async function listCreditFinalVersion(params?: CreditFinalVersionParam) {
|
||||
const res = await request.get<ApiResult<CreditFinalVersion[]>>(
|
||||
'/credit/credit-final-version',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加终本案件
|
||||
*/
|
||||
export async function addCreditFinalVersion(data: CreditFinalVersion) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-final-version',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改终本案件
|
||||
*/
|
||||
export async function updateCreditFinalVersion(data: CreditFinalVersion) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-final-version',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除终本案件
|
||||
*/
|
||||
export async function removeCreditFinalVersion(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-final-version/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除终本案件
|
||||
*/
|
||||
export async function removeBatchCreditFinalVersion(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-final-version/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询终本案件
|
||||
*/
|
||||
export async function getCreditFinalVersion(id: number) {
|
||||
const res = await request.get<ApiResult<CreditFinalVersion>>(
|
||||
'/credit/credit-final-version/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入终本案件
|
||||
*/
|
||||
export async function importCreditFinalVersion(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-final-version/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史终本案件
|
||||
*/
|
||||
export async function importCreditFinalVersionHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-final-version/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
48
src/api/credit/creditFinalVersion/model/index.ts
Normal file
48
src/api/credit/creditFinalVersion/model/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 终本案件
|
||||
*/
|
||||
export interface CreditFinalVersion {
|
||||
// ID
|
||||
id?: number;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
appellee?: string;
|
||||
plaintiffAppellant?: string;
|
||||
unfulfilledAmount?: string;
|
||||
involvedAmount?: string;
|
||||
courtName?: string;
|
||||
occurrenceTime?: string;
|
||||
finalDate?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 终本案件搜索条件
|
||||
*/
|
||||
export interface CreditFinalVersionParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
151
src/api/credit/creditGqdj/index.ts
Normal file
151
src/api/credit/creditGqdj/index.ts
Normal file
@@ -0,0 +1,151 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditGqdj, CreditGqdjParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询股权冻结
|
||||
*/
|
||||
export async function pageCreditGqdj(params: CreditGqdjParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditGqdj>>>(
|
||||
'/credit/credit-gqdj/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询股权冻结列表
|
||||
*/
|
||||
export async function listCreditGqdj(params?: CreditGqdjParam) {
|
||||
const res = await request.get<ApiResult<CreditGqdj[]>>(
|
||||
'/credit/credit-gqdj',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加股权冻结
|
||||
*/
|
||||
export async function addCreditGqdj(data: CreditGqdj) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-gqdj',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改股权冻结
|
||||
*/
|
||||
export async function updateCreditGqdj(data: CreditGqdj) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-gqdj',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除股权冻结
|
||||
*/
|
||||
export async function removeCreditGqdj(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-gqdj/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除股权冻结
|
||||
*/
|
||||
export async function removeBatchCreditGqdj(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-gqdj/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询股权冻结
|
||||
*/
|
||||
export async function getCreditGqdj(id: number) {
|
||||
const res = await request.get<ApiResult<CreditGqdj>>(
|
||||
'/credit/credit-gqdj/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入股权冻结
|
||||
*/
|
||||
export async function importCreditGqdj(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-gqdj/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史股权冻结
|
||||
*/
|
||||
export async function importCreditGqdjHistory(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-gqdj/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
65
src/api/credit/creditGqdj/model/index.ts
Normal file
65
src/api/credit/creditGqdj/model/index.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 股权冻结
|
||||
*/
|
||||
export interface CreditGqdj {
|
||||
// ID
|
||||
id?: number;
|
||||
// 执行通知文书号
|
||||
caseNumber?: string;
|
||||
// 被执行人
|
||||
appellee?: string;
|
||||
// 冻结股权标的企业
|
||||
plaintiffAppellant?: string;
|
||||
// 被执行人持有股权、其他投资权益数额
|
||||
involvedAmount?: string;
|
||||
// 执行法院
|
||||
courtName?: string;
|
||||
// 类型
|
||||
dataType?: string;
|
||||
// 状态
|
||||
dataStatus?: string;
|
||||
// 冻结日期自
|
||||
freezeDateStart?: string;
|
||||
// 冻结日期至
|
||||
freezeDateEnd?: string;
|
||||
// 公示日期
|
||||
publicDate?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 股权冻结搜索条件
|
||||
*/
|
||||
export interface CreditGqdjParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
144
src/api/credit/creditHistoricalLegalPerson/index.ts
Normal file
144
src/api/credit/creditHistoricalLegalPerson/index.ts
Normal file
@@ -0,0 +1,144 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditHistoricalLegalPerson,
|
||||
CreditHistoricalLegalPersonParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询历史法定代表人
|
||||
*/
|
||||
export async function pageCreditHistoricalLegalPerson(
|
||||
params: CreditHistoricalLegalPersonParam
|
||||
) {
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<CreditHistoricalLegalPerson>>
|
||||
>('/credit/credit-historical-legal-person/page', {
|
||||
params: withCreditUserScope(params)
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询历史法定代表人列表
|
||||
*/
|
||||
export async function listCreditHistoricalLegalPerson(
|
||||
params?: CreditHistoricalLegalPersonParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditHistoricalLegalPerson[]>>(
|
||||
'/credit/credit-historical-legal-person',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加历史法定代表人
|
||||
*/
|
||||
export async function addCreditHistoricalLegalPerson(
|
||||
data: CreditHistoricalLegalPerson
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-historical-legal-person',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改历史法定代表人
|
||||
*/
|
||||
export async function updateCreditHistoricalLegalPerson(
|
||||
data: CreditHistoricalLegalPerson
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-historical-legal-person',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除历史法定代表人
|
||||
*/
|
||||
export async function removeCreditHistoricalLegalPerson(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-historical-legal-person/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除历史法定代表人
|
||||
*/
|
||||
export async function removeBatchCreditHistoricalLegalPerson(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-historical-legal-person/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询历史法定代表人
|
||||
*/
|
||||
export async function getCreditHistoricalLegalPerson(id: number) {
|
||||
const res = await request.get<ApiResult<CreditHistoricalLegalPerson>>(
|
||||
'/credit/credit-historical-legal-person/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史法定代表人
|
||||
*/
|
||||
export async function importCreditHistoricalLegalPerson(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-historical-legal-person/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
47
src/api/credit/creditHistoricalLegalPerson/model/index.ts
Normal file
47
src/api/credit/creditHistoricalLegalPerson/model/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 历史法定代表人
|
||||
*/
|
||||
export interface CreditHistoricalLegalPerson {
|
||||
// ID
|
||||
id?: number;
|
||||
// 名称
|
||||
name?: string;
|
||||
// 任职日期
|
||||
registerDate?: string;
|
||||
// 卸任日期
|
||||
publicDate?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史法定代表人搜索条件
|
||||
*/
|
||||
export interface CreditHistoricalLegalPersonParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
185
src/api/credit/creditJudgmentDebtor/index.ts
Normal file
185
src/api/credit/creditJudgmentDebtor/index.ts
Normal file
@@ -0,0 +1,185 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditJudgmentDebtor, CreditJudgmentDebtorParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询被执行人
|
||||
*/
|
||||
export async function pageCreditJudgmentDebtor(
|
||||
params: CreditJudgmentDebtorParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditJudgmentDebtor>>>(
|
||||
'/credit/credit-judgment-debtor/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询被执行人列表
|
||||
*/
|
||||
export async function listCreditJudgmentDebtor(
|
||||
params?: CreditJudgmentDebtorParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditJudgmentDebtor[]>>(
|
||||
'/credit/credit-judgment-debtor',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加被执行人
|
||||
*/
|
||||
export async function addCreditJudgmentDebtor(data: CreditJudgmentDebtor) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改被执行人
|
||||
*/
|
||||
export async function updateCreditJudgmentDebtor(data: CreditJudgmentDebtor) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除被执行人
|
||||
*/
|
||||
export async function removeCreditJudgmentDebtor(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除被执行人
|
||||
*/
|
||||
export async function removeBatchCreditJudgmentDebtor(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询被执行人
|
||||
*/
|
||||
export async function getCreditJudgmentDebtor(id: number) {
|
||||
const res = await request.get<ApiResult<CreditJudgmentDebtor>>(
|
||||
'/credit/credit-judgment-debtor/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入被执行人
|
||||
*/
|
||||
export async function importCreditJudgmentDebtor(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史被执行人
|
||||
*/
|
||||
export async function importCreditJudgmentDebtorHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修正被执行人主体企业归属(按企业名称匹配回填 companyId)
|
||||
*
|
||||
* 后端: POST /api/credit/credit-judgment-debtor/company-id/refresh
|
||||
* - onlyNull: 默认 true,仅更新 companyId 为空的数据
|
||||
* - limit: 可选,限制处理条数
|
||||
*/
|
||||
export async function refreshCreditJudgmentDebtorCompanyId(params?: {
|
||||
onlyNull?: boolean;
|
||||
limit?: number;
|
||||
}) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judgment-debtor/company-id/refresh',
|
||||
undefined,
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
65
src/api/credit/creditJudgmentDebtor/model/index.ts
Normal file
65
src/api/credit/creditJudgmentDebtor/model/index.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 被执行人
|
||||
*/
|
||||
export interface CreditJudgmentDebtor {
|
||||
// ID
|
||||
id?: number;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
//
|
||||
name?: string;
|
||||
// 证件号/组织机构代码
|
||||
code?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 立案日期
|
||||
occurrenceTime?: string;
|
||||
// 执行标的(元)
|
||||
amount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
// 历史ID
|
||||
historyId?: number;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 被执行人名称
|
||||
name1?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 被执行人搜索条件
|
||||
*/
|
||||
export interface CreditJudgmentDebtorParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
168
src/api/credit/creditJudicialDocument/index.ts
Normal file
168
src/api/credit/creditJudicialDocument/index.ts
Normal file
@@ -0,0 +1,168 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditJudicialDocument,
|
||||
CreditJudicialDocumentParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询裁判文书司法大数据
|
||||
*/
|
||||
export async function pageCreditJudicialDocument(
|
||||
params: CreditJudicialDocumentParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditJudicialDocument>>>(
|
||||
'/credit/credit-judicial-document/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询裁判文书司法大数据列表
|
||||
*/
|
||||
export async function listCreditJudicialDocument(
|
||||
params?: CreditJudicialDocumentParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditJudicialDocument[]>>(
|
||||
'/credit/credit-judicial-document',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加裁判文书司法大数据
|
||||
*/
|
||||
export async function addCreditJudicialDocument(data: CreditJudicialDocument) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judicial-document',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改裁判文书司法大数据
|
||||
*/
|
||||
export async function updateCreditJudicialDocument(
|
||||
data: CreditJudicialDocument
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-judicial-document',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除裁判文书司法大数据
|
||||
*/
|
||||
export async function removeCreditJudicialDocument(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judicial-document/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除裁判文书司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditJudicialDocument(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judicial-document/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询裁判文书司法大数据
|
||||
*/
|
||||
export async function getCreditJudicialDocument(id: number) {
|
||||
const res = await request.get<ApiResult<CreditJudicialDocument>>(
|
||||
'/credit/credit-judicial-document/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入裁判文书司法大数据
|
||||
*/
|
||||
export async function importCreditJudicialDocument(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judicial-document/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史裁判文书
|
||||
*/
|
||||
export async function importCreditJudicialDocumentHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judicial-document/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
67
src/api/credit/creditJudicialDocument/model/index.ts
Normal file
67
src/api/credit/creditJudicialDocument/model/index.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 裁判文书司法大数据
|
||||
*/
|
||||
export interface CreditJudicialDocument {
|
||||
// ID
|
||||
id?: number;
|
||||
// 文书标题
|
||||
title?: string;
|
||||
// 文书类型
|
||||
documentType?: string;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 发布日期
|
||||
releaseDate?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 被告/被上诉人
|
||||
defendantAppellee?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 裁判文书司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditJudicialDocumentParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
127
src/api/credit/creditJudiciary/index.ts
Normal file
127
src/api/credit/creditJudiciary/index.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditJudiciary, CreditJudiciaryParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询司法案件
|
||||
*/
|
||||
export async function pageCreditJudiciary(params: CreditJudiciaryParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditJudiciary>>>(
|
||||
'/credit/credit-judiciary/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询司法案件列表
|
||||
*/
|
||||
export async function listCreditJudiciary(params?: CreditJudiciaryParam) {
|
||||
const res = await request.get<ApiResult<CreditJudiciary[]>>(
|
||||
'/credit/credit-judiciary',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加司法案件
|
||||
*/
|
||||
export async function addCreditJudiciary(data: CreditJudiciary) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judiciary',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司法案件
|
||||
*/
|
||||
export async function updateCreditJudiciary(data: CreditJudiciary) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-judiciary',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除司法案件
|
||||
*/
|
||||
export async function removeCreditJudiciary(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judiciary/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除司法案件
|
||||
*/
|
||||
export async function removeBatchCreditJudiciary(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-judiciary/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询司法案件
|
||||
*/
|
||||
export async function getCreditJudiciary(id: number) {
|
||||
const res = await request.get<ApiResult<CreditJudiciary>>(
|
||||
'/credit/credit-judiciary/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入司法案件
|
||||
*/
|
||||
export async function importCreditJudiciaries(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-judiciary/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
73
src/api/credit/creditJudiciary/model/index.ts
Normal file
73
src/api/credit/creditJudiciary/model/index.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 司法案件
|
||||
*/
|
||||
export interface CreditJudiciary {
|
||||
// ID
|
||||
id?: number;
|
||||
// 案件名称
|
||||
name?: string;
|
||||
// 案号
|
||||
code?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 类型, 0普通用户, 1招投标
|
||||
type?: number;
|
||||
// 案由
|
||||
reason?: string;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 案件类型
|
||||
infoType?: string;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 街道地址
|
||||
address?: string;
|
||||
// 案件进程
|
||||
caseProgress?: string;
|
||||
// 案件身份
|
||||
caseIdentity?: string;
|
||||
// 法院
|
||||
court?: string;
|
||||
// 进程日期
|
||||
processDate?: string;
|
||||
// 案件金额(元)
|
||||
caseAmount?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 到期时间
|
||||
expirationTime?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 司法案件搜索条件
|
||||
*/
|
||||
export interface CreditJudiciaryParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
154
src/api/credit/creditMediation/index.ts
Normal file
154
src/api/credit/creditMediation/index.ts
Normal file
@@ -0,0 +1,154 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditMediation, CreditMediationParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询诉前调解司法大数据
|
||||
*/
|
||||
export async function pageCreditMediation(params: CreditMediationParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditMediation>>>(
|
||||
'/credit/credit-mediation/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诉前调解司法大数据列表
|
||||
*/
|
||||
export async function listCreditMediation(params?: CreditMediationParam) {
|
||||
const res = await request.get<ApiResult<CreditMediation[]>>(
|
||||
'/credit/credit-mediation',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加诉前调解司法大数据
|
||||
*/
|
||||
export async function addCreditMediation(data: CreditMediation) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-mediation',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改诉前调解司法大数据
|
||||
*/
|
||||
export async function updateCreditMediation(data: CreditMediation) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-mediation',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除诉前调解司法大数据
|
||||
*/
|
||||
export async function removeCreditMediation(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-mediation/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除诉前调解司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditMediation(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-mediation/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询诉前调解司法大数据
|
||||
*/
|
||||
export async function getCreditMediation(id: number) {
|
||||
const res = await request.get<ApiResult<CreditMediation>>(
|
||||
'/credit/credit-mediation/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入诉前调解司法大数据
|
||||
*/
|
||||
export async function importCreditMediation(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-mediation/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史诉前调解司法大数据
|
||||
*/
|
||||
export async function importCreditMediationHistory(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-mediation/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditMediation/model/index.ts
Normal file
59
src/api/credit/creditMediation/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 诉前调解司法大数据
|
||||
*/
|
||||
export interface CreditMediation {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 诉前调解司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditMediationParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
233
src/api/credit/creditNearbyCompany/index.ts
Normal file
233
src/api/credit/creditNearbyCompany/index.ts
Normal file
@@ -0,0 +1,233 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditNearbyCompany, CreditNearbyCompanyParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询附近企业
|
||||
*/
|
||||
export async function pageCreditNearbyCompany(
|
||||
params: CreditNearbyCompanyParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditNearbyCompany>>>(
|
||||
'/credit/credit-nearby-company/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询附近企业列表
|
||||
*/
|
||||
export async function listCreditNearbyCompany(
|
||||
params?: CreditNearbyCompanyParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditNearbyCompany[]>>(
|
||||
'/credit/credit-nearby-company',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加附近企业
|
||||
*/
|
||||
export async function addCreditNearbyCompany(data: CreditNearbyCompany) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-nearby-company',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改附近企业
|
||||
*/
|
||||
export async function updateCreditNearbyCompany(data: CreditNearbyCompany) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-nearby-company',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除附近企业
|
||||
*/
|
||||
export async function removeCreditNearbyCompany(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-nearby-company/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除附近企业
|
||||
*/
|
||||
export async function removeBatchCreditNearbyCompany(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-nearby-company/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询附近企业
|
||||
*/
|
||||
export async function getCreditNearbyCompany(id: number) {
|
||||
const res = await request.get<ApiResult<CreditNearbyCompany>>(
|
||||
'/credit/credit-nearby-company/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入附近企业
|
||||
*/
|
||||
export async function importCreditNearbyCompany(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = buildImportFormData(file, companyId);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-nearby-company/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入附近企业(多文件,同一次请求)
|
||||
*
|
||||
* 约定:后端需支持 multipart 同名字段 `file` 多次出现(常见于 MultipartFile[] file)
|
||||
*/
|
||||
export async function importCreditNearbyCompanyMulti(
|
||||
files: File[] | FileList,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = buildImportFormData(files, companyId);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-nearby-company/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
function buildImportFormData(
|
||||
fileOrFiles: File | File[] | FileList,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
if (Array.isArray(fileOrFiles)) {
|
||||
fileOrFiles.forEach((f) => formData.append('file', f));
|
||||
} else if (fileOrFiles instanceof FileList) {
|
||||
Array.from(fileOrFiles).forEach((f) => formData.append('file', f));
|
||||
} else {
|
||||
formData.append('file', fileOrFiles);
|
||||
}
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
return formData;
|
||||
}
|
||||
|
||||
export interface ImportBatchCreditNearbyCompanyItem {
|
||||
fileName: string;
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ImportBatchCreditNearbyCompanyResult {
|
||||
total: number;
|
||||
success: number;
|
||||
failure: number;
|
||||
items: ImportBatchCreditNearbyCompanyItem[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入附近企业(多文件)
|
||||
*
|
||||
* 说明:
|
||||
* - 目前复用单文件导入接口,前端循环调用实现“多文件导入”
|
||||
* - 不会在有失败时 reject(便于上层展示部分成功/失败明细)
|
||||
*/
|
||||
export async function importBatchCreditNearbyCompany(
|
||||
files: File[] | FileList,
|
||||
companyId?: number,
|
||||
options?: {
|
||||
/** 遇到失败是否立即停止,默认 false(继续导入后续文件) */
|
||||
stopOnError?: boolean;
|
||||
}
|
||||
): Promise<ImportBatchCreditNearbyCompanyResult> {
|
||||
const list = Array.isArray(files) ? files : Array.from(files);
|
||||
const items: ImportBatchCreditNearbyCompanyItem[] = [];
|
||||
const stopOnError = options?.stopOnError ?? false;
|
||||
|
||||
for (const file of list) {
|
||||
try {
|
||||
const msg = await importCreditNearbyCompany(file, companyId);
|
||||
items.push({ fileName: file.name, success: true, message: msg });
|
||||
} catch (e: unknown) {
|
||||
items.push({
|
||||
fileName: file.name,
|
||||
success: false,
|
||||
message: e instanceof Error ? e.message : String(e)
|
||||
});
|
||||
if (stopOnError) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const success = items.filter((d) => d.success).length;
|
||||
const failure = items.length - success;
|
||||
return {
|
||||
total: list.length,
|
||||
success,
|
||||
failure,
|
||||
items
|
||||
};
|
||||
}
|
||||
143
src/api/credit/creditNearbyCompany/model/index.ts
Normal file
143
src/api/credit/creditNearbyCompany/model/index.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 附近企业
|
||||
*/
|
||||
export interface CreditNearbyCompany {
|
||||
// ID
|
||||
id?: number;
|
||||
// 企业名称
|
||||
name?: string;
|
||||
// 登记状态
|
||||
registrationStatus?: string;
|
||||
// 法定代表人
|
||||
legalPerson?: string;
|
||||
// 注册资本
|
||||
registeredCapital?: string;
|
||||
// 成立日期
|
||||
establishDate?: string;
|
||||
// 统一社会信用代码
|
||||
code?: string;
|
||||
// 注册地址
|
||||
address?: string;
|
||||
// 注册地址邮编
|
||||
postalCode?: string;
|
||||
// 有效手机号
|
||||
phone?: string;
|
||||
// 更多电话
|
||||
moreTel?: string;
|
||||
// 邮箱
|
||||
email?: string;
|
||||
// 邮箱
|
||||
moreEmail?: string;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所属省份
|
||||
province?: string;
|
||||
// 所属城市
|
||||
city?: string;
|
||||
// 所属区县
|
||||
region?: string;
|
||||
// 纳税人识别号
|
||||
taxpayerCode?: string;
|
||||
// 注册号
|
||||
registrationNumber?: string;
|
||||
// 组织机构代码
|
||||
organizationalCode?: string;
|
||||
// 参保人数
|
||||
numberOfInsuredPersons?: string;
|
||||
// 参保人数所属年报
|
||||
annualReport?: string;
|
||||
// 企业(机构)类型
|
||||
institutionType?: string;
|
||||
// 企业规模
|
||||
companySize?: string;
|
||||
// 营业期限
|
||||
businessTerm?: string;
|
||||
// 国标行业门类
|
||||
nationalStandardIndustryCategories?: string;
|
||||
// 国标行业大类
|
||||
nationalStandardIndustryCategories2?: string;
|
||||
// 国标行业中类
|
||||
nationalStandardIndustryCategories3?: string;
|
||||
// 国标行业小类
|
||||
nationalStandardIndustryCategories4?: string;
|
||||
// 曾用名
|
||||
formerName?: string;
|
||||
// 英文名
|
||||
englishName?: string;
|
||||
// 官网网址
|
||||
domain?: string;
|
||||
// 通信地址
|
||||
mailingAddress?: string;
|
||||
// 通信地址邮箱
|
||||
mailingEmail?: string;
|
||||
// 企业简介
|
||||
companyProfile?: string;
|
||||
// 经营范围
|
||||
natureOfBusiness?: string;
|
||||
// 电话
|
||||
tel?: string;
|
||||
// 企查查行业门类
|
||||
nationalStandardIndustryCategories5?: string;
|
||||
// 企查查行业大类
|
||||
nationalStandardIndustryCategories6?: string;
|
||||
// 企查查行业中类
|
||||
nationalStandardIndustryCategories7?: string;
|
||||
// 企查查行业小类
|
||||
nationalStandardIndustryCategories8?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 类型
|
||||
type?: number;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 实缴资本
|
||||
paidinCapital?: string;
|
||||
// 登记机关
|
||||
registrationAuthority?: string;
|
||||
// 纳税人资质
|
||||
taxpayerQualification?: string;
|
||||
// 最新年报年份
|
||||
latestAnnualReportYear?: string;
|
||||
// 最新年报营业收入
|
||||
latestAnnualReportOnOperatingRevenue?: string;
|
||||
// 企查分
|
||||
enterpriseScoreCheck?: string;
|
||||
// 信用等级
|
||||
creditRating?: string;
|
||||
// 科创分
|
||||
cechnologyScore?: string;
|
||||
// 科创等级
|
||||
cechnologyLevel?: string;
|
||||
// 是否小微企业
|
||||
smallEnterprise?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 附近企业搜索条件
|
||||
*/
|
||||
export interface CreditNearbyCompanyParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
127
src/api/credit/creditPatent/index.ts
Normal file
127
src/api/credit/creditPatent/index.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditPatent, CreditPatentParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询专利
|
||||
*/
|
||||
export async function pageCreditPatent(params: CreditPatentParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditPatent>>>(
|
||||
'/credit/credit-patent/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专利列表
|
||||
*/
|
||||
export async function listCreditPatent(params?: CreditPatentParam) {
|
||||
const res = await request.get<ApiResult<CreditPatent[]>>(
|
||||
'/credit/credit-patent',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加专利
|
||||
*/
|
||||
export async function addCreditPatent(data: CreditPatent) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-patent',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改专利
|
||||
*/
|
||||
export async function updateCreditPatent(data: CreditPatent) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-patent',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除专利
|
||||
*/
|
||||
export async function removeCreditPatent(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-patent/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除专利
|
||||
*/
|
||||
export async function removeBatchCreditPatent(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-patent/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询专利
|
||||
*/
|
||||
export async function getCreditPatent(id: number) {
|
||||
const res = await request.get<ApiResult<CreditPatent>>(
|
||||
'/credit/credit-patent/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入专利
|
||||
*/
|
||||
export async function importCreditPatent(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-patent/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditPatent/model/index.ts
Normal file
59
src/api/credit/creditPatent/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 专利
|
||||
*/
|
||||
export interface CreditPatent {
|
||||
// ID
|
||||
id?: number;
|
||||
// 发明名称
|
||||
name?: string;
|
||||
// 专利类型
|
||||
type?: string;
|
||||
// 法律状态
|
||||
statusText?: string;
|
||||
// 申请号
|
||||
registerNo?: string;
|
||||
// 申请日
|
||||
registerDate?: string;
|
||||
// 公开(公告)号
|
||||
publicNo?: string;
|
||||
// 公开(公告)日期
|
||||
publicDate?: string;
|
||||
// 发明人
|
||||
inventor?: string;
|
||||
// 申请(专利权)人
|
||||
patentApplicant?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 专利搜索条件
|
||||
*/
|
||||
export interface CreditPatentParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
127
src/api/credit/creditProject/index.ts
Normal file
127
src/api/credit/creditProject/index.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditProject, CreditProjectParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询招投标
|
||||
*/
|
||||
export async function pageCreditProject(params: CreditProjectParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditProject>>>(
|
||||
'/credit/credit-project/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询招投标列表
|
||||
*/
|
||||
export async function listCreditProject(params?: CreditProjectParam) {
|
||||
const res = await request.get<ApiResult<CreditProject[]>>(
|
||||
'/credit/credit-project',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加招投标
|
||||
*/
|
||||
export async function addCreditProject(data: CreditProject) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-project',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改招投标
|
||||
*/
|
||||
export async function updateCreditProject(data: CreditProject) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-project',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除招投标
|
||||
*/
|
||||
export async function removeCreditProject(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-project/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除招投标
|
||||
*/
|
||||
export async function removeBatchCreditProject(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-project/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询招投标
|
||||
*/
|
||||
export async function getCreditProject(id: number) {
|
||||
const res = await request.get<ApiResult<CreditProject>>(
|
||||
'/credit/credit-project/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入招投标
|
||||
*/
|
||||
export async function importCreditProject(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-project/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
71
src/api/credit/creditProject/model/index.ts
Normal file
71
src/api/credit/creditProject/model/index.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 招投标
|
||||
*/
|
||||
export interface CreditProject {
|
||||
// ID
|
||||
id?: number;
|
||||
// 项目名称
|
||||
name?: string;
|
||||
// 唯一标识
|
||||
code?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 类型, 0普通用户, 1招投标
|
||||
type?: number;
|
||||
// 企业角色
|
||||
role?: string;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 信息类型
|
||||
infoType?: string;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 街道地址
|
||||
address?: string;
|
||||
// 招采单位名称
|
||||
procurementName?: string;
|
||||
// 中标单位名称
|
||||
winningName?: string;
|
||||
// 中标金额
|
||||
winningPrice?: string;
|
||||
// 发布日期
|
||||
releaseDate?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 到期时间
|
||||
expirationTime?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 招投标搜索条件
|
||||
*/
|
||||
export interface CreditProjectParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
129
src/api/credit/creditRiskRelation/index.ts
Normal file
129
src/api/credit/creditRiskRelation/index.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditRiskRelation, CreditRiskRelationParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询风险关系表
|
||||
*/
|
||||
export async function pageCreditRiskRelation(params: CreditRiskRelationParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditRiskRelation>>>(
|
||||
'/credit/credit-risk-relation/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询风险关系表列表
|
||||
*/
|
||||
export async function listCreditRiskRelation(params?: CreditRiskRelationParam) {
|
||||
const res = await request.get<ApiResult<CreditRiskRelation[]>>(
|
||||
'/credit/credit-risk-relation',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加风险关系表
|
||||
*/
|
||||
export async function addCreditRiskRelation(data: CreditRiskRelation) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-risk-relation',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改风险关系表
|
||||
*/
|
||||
export async function updateCreditRiskRelation(data: CreditRiskRelation) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-risk-relation',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除风险关系表
|
||||
*/
|
||||
export async function removeCreditRiskRelation(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-risk-relation/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除风险关系表
|
||||
*/
|
||||
export async function removeBatchCreditRiskRelation(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-risk-relation/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询风险关系表
|
||||
*/
|
||||
export async function getCreditRiskRelation(id: number) {
|
||||
const res = await request.get<ApiResult<CreditRiskRelation>>(
|
||||
'/credit/credit-risk-relation/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入风险关系表
|
||||
*/
|
||||
export async function importCreditRiskRelation(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-risk-relation/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
51
src/api/credit/creditRiskRelation/model/index.ts
Normal file
51
src/api/credit/creditRiskRelation/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 风险关系表
|
||||
*/
|
||||
export interface CreditRiskRelation {
|
||||
// 序号
|
||||
id?: number;
|
||||
// 主体名称
|
||||
mainBodyName?: string;
|
||||
// 登记状态
|
||||
registrationStatus?: string;
|
||||
// 注册资本
|
||||
registeredCapital?: string;
|
||||
// 省份地区
|
||||
provinceRegion?: string;
|
||||
// 关联关系
|
||||
associatedRelation?: string;
|
||||
// 风险关系
|
||||
riskRelation?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 风险关系表搜索条件
|
||||
*/
|
||||
export interface CreditRiskRelationParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
127
src/api/credit/creditSupplier/index.ts
Normal file
127
src/api/credit/creditSupplier/index.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditSupplier, CreditSupplierParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询供应商
|
||||
*/
|
||||
export async function pageCreditSupplier(params: CreditSupplierParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditSupplier>>>(
|
||||
'/credit/credit-supplier/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商列表
|
||||
*/
|
||||
export async function listCreditSupplier(params?: CreditSupplierParam) {
|
||||
const res = await request.get<ApiResult<CreditSupplier[]>>(
|
||||
'/credit/credit-supplier',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加供应商
|
||||
*/
|
||||
export async function addCreditSupplier(data: CreditSupplier) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-supplier',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应商
|
||||
*/
|
||||
export async function updateCreditSupplier(data: CreditSupplier) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-supplier',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应商
|
||||
*/
|
||||
export async function removeCreditSupplier(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-supplier/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除供应商
|
||||
*/
|
||||
export async function removeBatchCreditSupplier(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-supplier/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询供应商
|
||||
*/
|
||||
export async function getCreditSupplier(id: number) {
|
||||
const res = await request.get<ApiResult<CreditSupplier>>(
|
||||
'/credit/credit-supplier/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入供应商
|
||||
*/
|
||||
export async function importCreditSupplier(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-supplier/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
49
src/api/credit/creditSupplier/model/index.ts
Normal file
49
src/api/credit/creditSupplier/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
export interface CreditSupplier {
|
||||
// ID
|
||||
id?: number;
|
||||
// 供应商
|
||||
supplier?: string;
|
||||
// 状态
|
||||
statusTxt?: string;
|
||||
// 采购金额(万元)
|
||||
purchaseAmount?: string;
|
||||
// 公开日期
|
||||
publicDate?: string;
|
||||
// 数据来源
|
||||
dataSource?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商搜索条件
|
||||
*/
|
||||
export interface CreditSupplierParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
144
src/api/credit/creditSuspectedRelationship/index.ts
Normal file
144
src/api/credit/creditSuspectedRelationship/index.ts
Normal file
@@ -0,0 +1,144 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
CreditSuspectedRelationship,
|
||||
CreditSuspectedRelationshipParam
|
||||
} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询疑似关系
|
||||
*/
|
||||
export async function pageCreditSuspectedRelationship(
|
||||
params: CreditSuspectedRelationshipParam
|
||||
) {
|
||||
const res = await request.get<
|
||||
ApiResult<PageResult<CreditSuspectedRelationship>>
|
||||
>('/credit/credit-suspected-relationship/page', {
|
||||
params: withCreditUserScope(params)
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询疑似关系列表
|
||||
*/
|
||||
export async function listCreditSuspectedRelationship(
|
||||
params?: CreditSuspectedRelationshipParam
|
||||
) {
|
||||
const res = await request.get<ApiResult<CreditSuspectedRelationship[]>>(
|
||||
'/credit/credit-suspected-relationship',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加疑似关系
|
||||
*/
|
||||
export async function addCreditSuspectedRelationship(
|
||||
data: CreditSuspectedRelationship
|
||||
) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-suspected-relationship',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改疑似关系
|
||||
*/
|
||||
export async function updateCreditSuspectedRelationship(
|
||||
data: CreditSuspectedRelationship
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-suspected-relationship',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除疑似关系
|
||||
*/
|
||||
export async function removeCreditSuspectedRelationship(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-suspected-relationship/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除疑似关系
|
||||
*/
|
||||
export async function removeBatchCreditSuspectedRelationship(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-suspected-relationship/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询疑似关系
|
||||
*/
|
||||
export async function getCreditSuspectedRelationship(id: number) {
|
||||
const res = await request.get<ApiResult<CreditSuspectedRelationship>>(
|
||||
'/credit/credit-suspected-relationship/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入疑似关系
|
||||
*/
|
||||
export async function importCreditSuspectedRelationship(
|
||||
file: File,
|
||||
companyId?: number
|
||||
) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-suspected-relationship/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
57
src/api/credit/creditSuspectedRelationship/model/index.ts
Normal file
57
src/api/credit/creditSuspectedRelationship/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 疑似关系
|
||||
*/
|
||||
export interface CreditSuspectedRelationship {
|
||||
// ID
|
||||
id?: number;
|
||||
// 企业名称
|
||||
name?: string;
|
||||
// 状态
|
||||
statusText?: string;
|
||||
// 法定代表人
|
||||
legalPerson?: string;
|
||||
// 注册资本
|
||||
registeredCapital?: string;
|
||||
// 成立日期
|
||||
createDate?: string;
|
||||
// 关联方
|
||||
relatedParty?: string;
|
||||
// 疑似关系类型
|
||||
type?: string;
|
||||
// 疑似关系详情
|
||||
detail?: string;
|
||||
// 链接
|
||||
url?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 疑似关系搜索条件
|
||||
*/
|
||||
export interface CreditSuspectedRelationshipParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
127
src/api/credit/creditUser/index.ts
Normal file
127
src/api/credit/creditUser/index.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditUser, CreditUserParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询招投标信息表
|
||||
*/
|
||||
export async function pageCreditUser(params: CreditUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditUser>>>(
|
||||
'/credit/credit-user/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询招投标信息表列表
|
||||
*/
|
||||
export async function listCreditUser(params?: CreditUserParam) {
|
||||
const res = await request.get<ApiResult<CreditUser[]>>(
|
||||
'/credit/credit-user',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加招投标信息表
|
||||
*/
|
||||
export async function addCreditUser(data: CreditUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改招投标信息表
|
||||
*/
|
||||
export async function updateCreditUser(data: CreditUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除招投标信息表
|
||||
*/
|
||||
export async function removeCreditUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除招投标信息表
|
||||
*/
|
||||
export async function removeBatchCreditUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询招投标信息表
|
||||
*/
|
||||
export async function getCreditUser(id: number) {
|
||||
const res = await request.get<ApiResult<CreditUser>>(
|
||||
'/credit/credit-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入招投标
|
||||
*/
|
||||
export async function importCreditUsers(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-user/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
71
src/api/credit/creditUser/model/index.ts
Normal file
71
src/api/credit/creditUser/model/index.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 招投标信息表
|
||||
*/
|
||||
export interface CreditUser {
|
||||
// ID
|
||||
id?: number;
|
||||
// 客户名称
|
||||
name?: string;
|
||||
// 唯一标识
|
||||
code?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 类型, 0普通用户, 1招投标
|
||||
type?: number;
|
||||
// 企业角色
|
||||
role?: string;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 信息类型
|
||||
infoType?: string;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 街道地址
|
||||
address?: string;
|
||||
// 招采单位名称
|
||||
procurementName?: string;
|
||||
// 中标单位名称
|
||||
winningName?: string;
|
||||
// 中标单位名称
|
||||
winningPrice?: string;
|
||||
// 发布日期
|
||||
releaseDate?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 到期时间
|
||||
expirationTime?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 招投标信息表搜索条件
|
||||
*/
|
||||
export interface CreditUserParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
151
src/api/credit/creditXgxf/index.ts
Normal file
151
src/api/credit/creditXgxf/index.ts
Normal file
@@ -0,0 +1,151 @@
|
||||
import request from '@/utils/request';
|
||||
import { withCreditUserScope } from '@/api/credit/utils/data-scope';
|
||||
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditXgxf, CreditXgxfParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询限制高消费
|
||||
*/
|
||||
export async function pageCreditXgxf(params: CreditXgxfParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditXgxf>>>(
|
||||
'/credit/credit-xgxf/page',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询限制高消费列表
|
||||
*/
|
||||
export async function listCreditXgxf(params?: CreditXgxfParam) {
|
||||
const res = await request.get<ApiResult<CreditXgxf[]>>(
|
||||
'/credit/credit-xgxf',
|
||||
{ params: withCreditUserScope(params) }
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加限制高消费
|
||||
*/
|
||||
export async function addCreditXgxf(data: CreditXgxf) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-xgxf',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改限制高消费
|
||||
*/
|
||||
export async function updateCreditXgxf(data: CreditXgxf) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-xgxf',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除限制高消费
|
||||
*/
|
||||
export async function removeCreditXgxf(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-xgxf/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除限制高消费
|
||||
*/
|
||||
export async function removeBatchCreditXgxf(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-xgxf/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询限制高消费
|
||||
*/
|
||||
export async function getCreditXgxf(id: number) {
|
||||
const res = await request.get<ApiResult<CreditXgxf>>(
|
||||
'/credit/credit-xgxf/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入限制高消费
|
||||
*/
|
||||
export async function importCreditXgxf(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-xgxf/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入历史限制高消费
|
||||
*/
|
||||
export async function importCreditXgxfHistory(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-xgxf/import/history',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
src/api/credit/creditXgxf/model/index.ts
Normal file
59
src/api/credit/creditXgxf/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 限制高消费
|
||||
*/
|
||||
export interface CreditXgxf {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 限制高消费搜索条件
|
||||
*/
|
||||
export interface CreditXgxfParam extends PageParam {
|
||||
userId?: number;
|
||||
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
49
src/api/credit/utils/data-scope.ts
Normal file
49
src/api/credit/utils/data-scope.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { hasRole } from '@/utils/permission';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
|
||||
function isSuperAdmin(): boolean {
|
||||
try {
|
||||
return hasRole('superAdmin');
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function getCurrentUserId(): number | undefined {
|
||||
try {
|
||||
const store = useUserStore();
|
||||
const id = store?.info?.userId;
|
||||
if (typeof id === 'number' && Number.isFinite(id) && id > 0) {
|
||||
return id;
|
||||
}
|
||||
} catch {
|
||||
// Pinia may not be active in some early-init code paths.
|
||||
}
|
||||
const raw = localStorage.getItem('UserId');
|
||||
if (!raw) {
|
||||
return undefined;
|
||||
}
|
||||
const n = Number(raw);
|
||||
return Number.isFinite(n) && n > 0 ? n : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Credit module data scope:
|
||||
* - superAdmin: see all data
|
||||
* - others: only see data published by themselves (userId)
|
||||
*/
|
||||
export function withCreditUserScope<T extends Record<string, any> | undefined>(
|
||||
params: T
|
||||
): T {
|
||||
if (isSuperAdmin()) {
|
||||
return params;
|
||||
}
|
||||
const userId = getCurrentUserId();
|
||||
if (!userId) {
|
||||
return params;
|
||||
}
|
||||
if (!params) {
|
||||
return { userId } as T;
|
||||
}
|
||||
return { ...(params as any), userId } as T;
|
||||
}
|
||||
Reference in New Issue
Block a user