wupengfei
7 天以前 17062f511f1a714e8bf091c9916af8f70872858d
feat: 接口
1个文件已添加
3个文件已修改
305 ■■■■■ 已修改文件
src/services/api/InsuranceOrder.ts 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/TaiPing.ts 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/index.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/typings.d.ts 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/InsuranceOrder.ts
@@ -77,22 +77,6 @@
  });
}
/** 此处后端没有提供注释 POST /api/InsuranceOrder/Demo */
export async function demo(options?: API.RequestConfig) {
  return request<any>('/api/InsuranceOrder/Demo', {
    method: 'POST',
    ...(options || {}),
  });
}
/** 此处后端没有提供注释 POST /api/InsuranceOrder/Demo2 */
export async function demo2(options?: API.RequestConfig) {
  return request<any>('/api/InsuranceOrder/Demo2', {
    method: 'POST',
    ...(options || {}),
  });
}
/** 批量减员保单数据 POST /api/InsuranceOrder/DownsizingInsuranceOrderData */
export async function downsizingInsuranceOrderData(
  body: API.DownsizingInsuranceOrderData,
src/services/api/TaiPing.ts
New file
@@ -0,0 +1,30 @@
/* eslint-disable */
// @ts-ignore
import { request } from '@/utils/request';
/** 一步出单 POST /api/TaiPing/Proposal */
export async function proposal(body: API.ProposalInput, options?: API.RequestConfig) {
  return request<API.ProposalResponseData>('/api/TaiPing/Proposal', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 太平保险承保成功通知 POST /api/TaiPing/Success */
export async function success(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIsuccessParams,
  options?: API.RequestConfig
) {
  return request<string>('/api/TaiPing/Success', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
src/services/api/index.ts
@@ -19,6 +19,7 @@
import * as Permissions from './Permissions';
import * as PhoneMessage from './PhoneMessage';
import * as Profile from './Profile';
import * as TaiPing from './TaiPing';
import * as Tenant from './Tenant';
import * as User from './User';
import * as Version from './Version';
@@ -40,6 +41,7 @@
  Permissions,
  PhoneMessage,
  Profile,
  TaiPing,
  Tenant,
  User,
  Version,
src/services/api/typings.d.ts
@@ -378,6 +378,10 @@
    permissionName?: string;
  }
  interface APIsuccessParams {
    input?: string;
  }
  interface APIupdateDefaultConnectionStringParams {
    id?: string;
    defaultConnectionString?: string;
@@ -1834,6 +1838,259 @@
    isRequired?: boolean;
  }
  interface ProposalInput {
    sign?: ProposalInputSign;
    request?: ProposalInputRequest;
  }
  interface ProposalInputRequest {
    head?: ProposalInputRequestHead;
    body?: ProposalInputRequestBody;
  }
  interface ProposalInputRequestBody {
    commonPlan?: ProposalInputRequestBodyCommonPlan;
    /** 方案详情 */
    planDetails?: ProposalInputRequestBodyPlanDetail[];
    policyHolder?: ProposalInputRequestBodyPolicyHolder;
    /** 被保人信息 */
    policyInsureds?: ProposalInputRequestBodyPolicyInsured[];
    /** 附属被保险人信息 */
    extraPolicyInsureds?: ProposalInputRequestBodyExtraPolicyInsured[];
    insuredType?: ProposalInputRequestBodyInsuredType;
    trade?: ProposalInputRequestBodyTrade;
    /** 拓展节点 */
    policyExtra?: ProposalInputRequestBodyPolicyExtra[];
  }
  interface ProposalInputRequestBodyCommonPlan {
    /** 投保时间 */
    operateDate?: string;
    /** 起保时间 */
    startTime?: string;
    /** 终保时间 */
    endTime?: string;
    /** 币别 */
    currency?: string;
    /** 总保额 */
    sumInsured?: string;
    /** 总保费 */
    sumSignPremium?: string;
  }
  interface ProposalInputRequestBodyExtraPolicyInsured {
    /** 方案代码(可选)
保司提供实际方案代码,非见费下为必传 */
    planCode?: string;
    /** 客户角色(必需)
枚举值: 1, 2, 3, 4 */
    role?: string;
    /** 与投保人关系(必需)
枚举值: 1, 2, 3, 4, 5, 6, 7, 8, 9 */
    relationToAppnt?: string;
    /** 客户类型(必需)
枚举值: 1, 2 */
    type?: string;
    /** 被保人名称(必需) */
    name?: string;
    /** 证件类型(必需)
枚举值: 01, 02, 04, 05, 06, 07, 08, 09, 10, 13, 14, 16, 17, 18, 19, 20 */
    certType?: string;
    /** 证件号码(必需) */
    certNo?: string;
    /** 性别(必需)
枚举值: 1, 2 */
    gender?: string;
    /** 出生日期(必需)
格式: yyyy-MM-dd */
    birthday?: string;
    /** 年龄(必需)
范围: 0-100 */
    age?: number;
    /** 与主被保险人关系(可选)
枚举值: 1, 2, 3, 4, 5, 6, 7, 8 */
    relationToMainInsured?: string;
    /** 有无社保(可选)
枚举值: Y, N */
    socialInsuFlag?: string;
    /** 详细地址(可选) */
    address?: string;
    /** 邮箱(可选) */
    email?: string;
    /** 手机号(可选) */
    mobile?: string;
    /** 职业代码(可选) */
    occupationCode?: string;
  }
  interface ProposalInputRequestBodyInsuredType {
    /** 标的标签(必需)
0-产品附加要素(产品层级)、1-标的类型(方案层级)、2-标的附加要素(被保人层级) */
    flag?: number;
    /** 标的类型名称(必需) */
    insuredTypeName?: string;
    /** 要素代码(必需) */
    factorCode?: string;
    /** 标的类型代码(必需) */
    insuredTypeCode?: string;
    /** 要素名称(必需) */
    factorName?: string;
    /** 要素值(必需)
当factorCode为FWDZ,factorName为房屋地址时,factorValue传参为json字符串,格式为:
"{"factorProvince":"120000","detailAddress":"天津市-天津市-红桥区","factorCity":"120100","factorCounty":"120106","houseAddress":"测试地址"}" */
    factorValue?: string;
    /** 属性(必需)
固定值:{"codeTable":"CD000049"} */
    attribute?: string;
  }
  interface ProposalInputRequestBodyPlanDetail {
    /** 方案代码 */
    planCode?: string;
    /** 份数 */
    copies?: number;
    /** 方案名称 */
    planName?: string;
  }
  interface ProposalInputRequestBodyPolicyExtra {
    /** 拓展字段代码(必需) */
    extraCode?: string;
    /** 拓展字段名称(必需) */
    extraName?: string;
    /** 拓展字段值(必需) */
    extraValue?: string;
  }
  interface ProposalInputRequestBodyPolicyHolder {
    /** 客户角色 */
    role?: string;
    /** 客户类型 */
    type?: string;
    /** 投保人名称 */
    name?: string;
    /** 证件类型 */
    certType?: string;
    /** 证件号码 */
    certNo?: string;
    /** 性别 */
    gender?: string;
    /** 出生日期 */
    birthday?: string;
    /** 手机号码 */
    mobile?: string;
    /** 邮箱地址 */
    email?: string;
    /** 年龄 */
    age?: string;
    /** 地址 */
    address?: string;
    /** 联系人姓名 */
    linkerName?: string;
    /** 联系人电话 */
    linkerMobile?: string;
    /** 职业代码 */
    occupationCode?: string;
    /** 职业类别 */
    occupationType?: string;
  }
  interface ProposalInputRequestBodyPolicyInsured {
    /** 方案代码(必需) */
    planCode?: string;
    /** 客户角色(必需)
枚举值: 1, 2, 3, 4 */
    role?: string;
    /** 与投保人关系(必需)
投保人是团体时,被保人与投保人关系只能是6(雇佣)、7(劳务)或8(其他)
枚举值: 1, 2, 3, 4, 5, 6, 7, 8, 9 */
    relationToAppnt?: string;
    /** 客户类型(必需)
枚举值: 1, 2 */
    type?: string;
    /** 被保人名称(必需) */
    name?: string;
    /** 证件类型(必需)
枚举值: 01, 02, 04, 05, 06, 07, 08, 09, 10, 13, 14, 16, 17, 18, 19, 20
默认值: 01 */
    certType?: string;
    /** 证件号码(必需) */
    certNo?: string;
    /** 性别(必需)
枚举值: 1, 2 */
    gender?: string;
    /** 出生日期(必需)
格式: yyyy-MM-dd */
    birthday?: string;
    /** 年龄(必需)
范围: 0-100 */
    age?: number;
    /** 与主被保险人关系(可选)
枚举值: 1, 2, 3, 4, 5, 6, 7, 8 */
    relationToMainInsured?: string;
    /** 有无社保(可选)
枚举值: Y, N
默认值: N */
    socialInsuFlag?: string;
    /** 详细地址(可选) */
    address?: string;
    /** 邮箱(可选) */
    email?: string;
    /** 手机号(可选) */
    mobile?: string;
    /** 职业代码(可选) */
    occupationCode?: string;
    /** 鹊桥专用因子(可选)
非必须,特殊情况需传值 示例:{"FL0078":"N"} */
    factorMap?: string;
    /** 保单起期(可选,批量出单必须) */
    startTime?: string;
    /** 保单止期(可选,批量出单必须) */
    endTime?: string;
  }
  interface ProposalInputRequestBodyTrade {
    /** 支付成功跳转地址(可选)
见费必传 */
    returnUrl?: string;
    /** 微信小程序支付appId(可选)
微信小程序对应的appId,小程序签约并支付场景传递 */
    appId?: string;
    /** 微信小程序支付openID(可选)
openID 微信openid,小程序签约并支付场景传递 */
    openId?: string;
  }
  interface ProposalInputRequestHead {
    /** 第三方订单号 */
    channelOrderNo?: string;
    /** 商户编码 */
    agencyCode?: string;
    /** 商品编码 */
    productCode?: string;
    /** 业务类型 */
    businessType?: string;
    applyTime?: string;
    /** 子商户编码 */
    subAgencyCode?: string;
  }
  interface ProposalInputSign {
    /** 签名 */
    signature?: string;
  }
  interface ProposalResponseData {
    /** 投保单号(可选) */
    proposalNo?: string;
    /** 支付短链(可选) */
    payUrl?: string;
    /** 支付长链(可选) */
    longPayUrl?: string;
    /** 支付流水号(可选) */
    payRegistrationNo?: string;
  }
  interface ProviderInfoDto {
    providerName?: string;
    providerKey?: string;