Commit 4dcf529f by jianan

Fna接口11

parent 761f4605
...@@ -136,7 +136,7 @@ public class ApiFnaFormController { ...@@ -136,7 +136,7 @@ public class ApiFnaFormController {
*/ */
@GetMapping("/get/vo") @GetMapping("/get/vo")
@Operation(summary = "根据 fnaFormBizId 获取Fna表单详情") @Operation(summary = "根据 fnaFormBizId 获取Fna表单详情")
public Result<FnaForm> getFnaFormVOByFnaFormBizId(String fnaFormBizId, HttpServletRequest request) { public Result<FnaFormVO> getFnaFormVOByFnaFormBizId(String fnaFormBizId, HttpServletRequest request) {
if (fnaFormBizId == null) { if (fnaFormBizId == null) {
return Result.fail(ErrorCode.PARAMS_ERROR.getCode(), ErrorCode.PARAMS_ERROR.getMessage()); return Result.fail(ErrorCode.PARAMS_ERROR.getCode(), ErrorCode.PARAMS_ERROR.getMessage());
} }
...@@ -147,7 +147,7 @@ public class ApiFnaFormController { ...@@ -147,7 +147,7 @@ public class ApiFnaFormController {
} }
// 获取封装类 // 获取封装类
return Result.success(fnaForm); return Result.success(fnaFormService.getFnaFormVO(fnaForm));
} }
/** /**
* 分页获取fna表单列表(仅管理员可用) * 分页获取fna表单列表(仅管理员可用)
......
...@@ -8,8 +8,7 @@ import com.google.gson.Gson; ...@@ -8,8 +8,7 @@ import com.google.gson.Gson;
import com.yd.common.exception.BusinessException; import com.yd.common.exception.BusinessException;
import com.yd.csf.service.common.ErrorCode; import com.yd.csf.service.common.ErrorCode;
import com.yd.csf.service.dao.FnaFormMapper; import com.yd.csf.service.dao.FnaFormMapper;
import com.yd.csf.service.dto.FnaFormAddRequest; import com.yd.csf.service.dto.*;
import com.yd.csf.service.dto.FnaFormQueryRequest;
import com.yd.csf.service.model.FnaForm; import com.yd.csf.service.model.FnaForm;
import com.yd.csf.service.service.FnaFormService; import com.yd.csf.service.service.FnaFormService;
import com.yd.csf.service.vo.FnaFormVO; import com.yd.csf.service.vo.FnaFormVO;
...@@ -120,10 +119,30 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl ...@@ -120,10 +119,30 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
// 对象转封装类 // 对象转封装类
FnaFormVO fnaFormVO = FnaFormVO.objToVo(fnaForm); FnaFormVO fnaFormVO = FnaFormVO.objToVo(fnaForm);
// todo 可以根据需要为封装对象补充值,不需要的内容可以删除 Object personalData = fnaForm.getPersonalData();
// region 可选 if (personalData != null) {
fnaFormVO.setPersonalData(GSON.fromJson(personalData.toString(), PersonalData.class));
// endregion }
Object familyMembers = fnaForm.getFamilyMembers();
if (familyMembers != null) {
fnaFormVO.setFamilyMembers(GSON.fromJson(familyMembers.toString(), FamilyMembers.class));
}
Object existingSecurityOwner = fnaForm.getExistingSecurityOwner();
if (existingSecurityOwner != null) {
fnaFormVO.setExistingSecurityOwner(GSON.fromJson(existingSecurityOwner.toString(), ExistingSecuritys.class));
}
Object existingSecurityInsured = fnaForm.getExistingSecurityInsured();
if (existingSecurityInsured != null) {
fnaFormVO.setExistingSecurityInsured(GSON.fromJson(existingSecurityInsured.toString(), ExistingSecuritys.class));
}
Object ownerAssets = fnaForm.getOwnerAssets();
if (ownerAssets != null) {
fnaFormVO.setOwnerAssets(GSON.fromJson(ownerAssets.toString(), OwnerAssets.class));
}
Object monthlyIncome = fnaForm.getCompanyBusinessData();
if (monthlyIncome != null) {
fnaFormVO.setCompanyBusinessData(GSON.fromJson(monthlyIncome.toString(), CompanyBusinessData.class));
}
return fnaFormVO; return fnaFormVO;
} }
...@@ -182,7 +201,7 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl ...@@ -182,7 +201,7 @@ public class FnaFormServiceImpl extends ServiceImpl<FnaFormMapper, FnaForm> impl
@Override @Override
public FnaForm getByFnaFormBizId(String fnaFormBizId) { public FnaForm getByFnaFormBizId(String fnaFormBizId) {
QueryWrapper<FnaForm> queryWrapper = new QueryWrapper<>(); QueryWrapper<FnaForm> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("fnaFormBizId", fnaFormBizId); queryWrapper.eq("fna_form_biz_id", fnaFormBizId);
return baseMapper.selectOne(queryWrapper); return baseMapper.selectOne(queryWrapper);
} }
......
...@@ -2,7 +2,9 @@ package com.yd.csf.service.vo; ...@@ -2,7 +2,9 @@ package com.yd.csf.service.vo;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.yd.csf.service.dto.*;
import com.yd.csf.service.model.FnaForm; import com.yd.csf.service.model.FnaForm;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -23,34 +25,83 @@ public class FnaFormVO implements Serializable { ...@@ -23,34 +25,83 @@ public class FnaFormVO implements Serializable {
private Long id; private Long id;
/** /**
* 标题 * fna唯一业务ID
*/ */
private String title; @Schema(description = "fna唯一业务ID")
private String fnaFormBizId;
/**
* 客户唯一业务ID
*/
@Schema(description = "客户唯一业务ID")
private String customerBizId;
/**
* 个人资料
*/
@Schema(description = "个人资料")
private PersonalData personalData;
/**
* 家庭状况
*/
@Schema(description = "家庭状况")
private FamilyMembers familyMembers;
/**
* 保单持有人个人已有保障
*/
@Schema(description = "保单持有人个人已有保障")
private ExistingSecuritys existingSecurityOwner;
/**
* 受保人个人已有保障
*/
@Schema(description = "受保人个人已有保障")
private ExistingSecuritys existingSecurityInsured;
/**
* 平均月收入
*/
@Schema(description = "在过去24个月里,你从所有所得的收入来源所得的平均每月收入为?(包括薪金、花红、佣金、其他薪酬红利、银行存款利息、债券利息及股息等")
private String monthlyIncome;
/**
* 平均月支出
*/
@Schema(description = "过去24个月每月里,你每月的平均开支为")
private String monthlyExpense;
/** /**
* 内容 * 累积流动资产
*/ */
private String content; @Schema(description = "您现时的累积流动资产约有多少")
private String liquidAssets;
/** /**
* 创建用户 id * 流动资产种类(A.现金 B.银行存款……)
*/ */
private Long userId; @Schema(description = "流动资产种类(A.现金 B.银行存款 C.货币市场账户 D.交投活络的股票 E.债券及互惠基金 F.美国国库债券 G. 其他(請說明))")
private String liquidAssetType;
/** /**
* 创建时间 * 保单持有人资产
*/ */
private Date createTime; @Schema(description = "保单持有人资产")
private OwnerAssets ownerAssets;
/** /**
* 更新时间 * 公司业务资料
*/ */
private Date updateTime; @Schema(description = "公司业务资料")
private CompanyBusinessData companyBusinessData;
/** /**
* 标签列表 * 首期及续保保费的财富来源(A.储蓄 B.受雇收入 C.自雇收入 D.投资收入)
*/ */
private List<String> tagList; @Schema(description = "首期及续保保费的财富来源(A.储蓄 B.受雇收入 C.自雇收入 D.投资收入)")
private String premiumFundingSource;
/** /**
...@@ -65,7 +116,6 @@ public class FnaFormVO implements Serializable { ...@@ -65,7 +116,6 @@ public class FnaFormVO implements Serializable {
} }
FnaForm fnaForm = new FnaForm(); FnaForm fnaForm = new FnaForm();
BeanUtils.copyProperties(fnaFormVO, fnaForm); BeanUtils.copyProperties(fnaFormVO, fnaForm);
List<String> tagList = fnaFormVO.getTagList();
return fnaForm; return fnaForm;
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.csf.service.dao.FnaFormMapper">
<resultMap id="BaseResultMap" type="com.yd.csf.service.model.FnaForm">
<id property="id" column="id" />
<result property="fnaFormBizId" column="fna_form_biz_id" />
<result property="userBizId" column="user_biz_id" />
<result property="agentBizId" column="agent_biz_id" />
<result property="customerBizId" column="customer_biz_id" />
<result property="personalData" column="personal_data" />
<result property="familyMembers" column="family_members" />
<result property="existingSecurityOwner" column="existing_security_owner" />
<result property="existingSecurityInsured" column="existing_security_insured" />
<result property="monthlyIncome" column="monthly_income" />
<result property="monthlyExpense" column="monthly_expense" />
<result property="liquidAssets" column="liquid_assets" />
<result property="liquidAssetType" column="liquid_asset_type" />
<result property="ownerAssets" column="owner_assets" />
<result property="companyBusinessData" column="company_business_data" />
<result property="premiumFundingSource" column="premium_funding_source" />
<result property="remark" column="remark" />
<result property="isDeleted" column="is_deleted" />
<result property="creatorId" column="creator_id" />
<result property="updaterId" column="updater_id" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="Base_Column_List">
id,fna_form_biz_id,user_biz_id,agent_biz_id,customer_biz_id,personal_data,
family_members,existing_security_owner,existing_security_insured,monthly_income,monthly_expense,
liquid_assets,liquid_asset_type,owner_assets,company_business_data,premium_funding_source,
remark,is_deleted,creator_id,updater_id,create_time,
update_time
</sql>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment