Commit dc8d3453 by jianan

Fna接口3

parent 65c1e750
...@@ -182,13 +182,13 @@ public class ApiFnaController { ...@@ -182,13 +182,13 @@ public class ApiFnaController {
*/ */
@PostMapping("/list/page") @PostMapping("/list/page")
@Operation(summary = "分页获取Fna列表") @Operation(summary = "分页获取Fna列表")
public Result<Page<Fna>> listFnaByPage(@RequestBody FnaQueryRequest fnaQueryRequest) { public Result<Page<FnaVO>> listFnaByPage(@RequestBody FnaQueryRequest fnaQueryRequest) {
long current = fnaQueryRequest.getPageNo(); long current = fnaQueryRequest.getPageNo();
long size = fnaQueryRequest.getPageSize(); long size = fnaQueryRequest.getPageSize();
// 查询数据库 // 查询数据库
Page<Fna> fnaPage = fnaService.page(new Page<>(current, size), Page<Fna> fnaPage = fnaService.page(new Page<>(current, size),
fnaService.getQueryWrapper(fnaQueryRequest)); fnaService.getQueryWrapper(fnaQueryRequest));
return Result.success(fnaPage); return Result.success(fnaService.getFnaVOPage(fnaPage));
} }
/** /**
......
...@@ -36,6 +36,11 @@ public class Fna implements Serializable { ...@@ -36,6 +36,11 @@ public class Fna implements Serializable {
private String userBizId; private String userBizId;
/** /**
* 客户名称
*/
private String customerName;
/**
* 客户唯一业务ID * 客户唯一业务ID
*/ */
private String customerBizId; private String customerBizId;
......
...@@ -121,11 +121,8 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe ...@@ -121,11 +121,8 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
return fnaVOPage; return fnaVOPage;
} }
// 对象列表 => 封装对象列表 // 对象列表 => 封装对象列表
List<FnaVO> fnaVOList = fnaList.stream().map(fna -> { List<FnaVO> fnaVOList = fnaList.stream().map(FnaVO::objToVo).collect(Collectors.toList());
return FnaVO.objToVo(fna);
}).collect(Collectors.toList());
// todo 可以根据需要为封装对象补充值,不需要的内容可以删除
// region 可选 // region 可选
// 1. 关联查询用户信息 // 1. 关联查询用户信息
// Set<Long> userIdSet = fnaList.stream().map(Fna::getUserId).collect(Collectors.toSet()); // Set<Long> userIdSet = fnaList.stream().map(Fna::getUserId).collect(Collectors.toSet());
...@@ -139,8 +136,8 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe ...@@ -139,8 +136,8 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
// 填充信息 // 填充信息
fnaVOList.forEach(fnaVO -> { // fnaVOList.forEach(fnaVO -> {
Long userId = fnaVO.getUserId(); // Long userId = fnaVO.getUserId();
// User user = null; // User user = null;
// if (userIdUserListMap.containsKey(userId)) { // if (userIdUserListMap.containsKey(userId)) {
// user = userIdUserListMap.get(userId).get(0); // user = userIdUserListMap.get(userId).get(0);
...@@ -148,7 +145,7 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe ...@@ -148,7 +145,7 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
// fnaVO.setUser(userService.getUserVO(user)); // fnaVO.setUser(userService.getUserVO(user));
// fnaVO.setHasThumb(fnaIdHasThumbMap.getOrDefault(fnaVO.getId(), false)); // fnaVO.setHasThumb(fnaIdHasThumbMap.getOrDefault(fnaVO.getId(), false));
// fnaVO.setHasFavour(fnaIdHasFavourMap.getOrDefault(fnaVO.getId(), false)); // fnaVO.setHasFavour(fnaIdHasFavourMap.getOrDefault(fnaVO.getId(), false));
}); // });
// endregion // endregion
fnaVOPage.setRecords(fnaVOList); fnaVOPage.setRecords(fnaVOList);
......
package com.yd.csf.service.vo; package com.yd.csf.service.vo;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yd.csf.service.model.Customer; import com.yd.csf.service.model.Customer;
import com.yd.csf.service.model.CustomerExpand; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* customer视图 * customer视图
...@@ -23,166 +18,193 @@ public class CustomerVO implements Serializable { ...@@ -23,166 +18,193 @@ public class CustomerVO implements Serializable {
/** /**
* id * id
*/ */
@Schema(description = "id")
private Long id; private Long id;
/** /**
* 唯一业务ID * 客户唯一业务ID
*/ */
@Schema(description = "客户业务ID")
private String customerBizId; private String customerBizId;
/** /**
* 自定义代码 * 自定义代码
*/ */
@Schema(description = "客户自定义代码")
private String customCode; private String customCode;
/** /**
* 姓氏 * 姓氏
*/ */
@Schema(description = "客户姓氏")
private String lastName; private String lastName;
/** /**
* 名字 * 名字
*/ */
@Schema(description = "客户名字")
private String firstName; private String firstName;
/** /**
* 姓名 * 姓名
*/ */
@Schema(description = "客户姓名")
private String name; private String name;
/** /**
* 姓氏拼音 * 姓氏拼音
*/ */
@Schema(description = "客户姓氏拼音")
private String lastNamePinyin; private String lastNamePinyin;
/** /**
* 名字拼音 * 名字拼音
*/ */
@Schema(description = "客户名字拼音")
private String firstNamePinyin; private String firstNamePinyin;
/** /**
* 拼音全称 * 拼音全称
*/ */
@Schema(description = "客户拼音全称")
private String pinyin; private String pinyin;
/** /**
* 称谓 * 称谓
*/ */
@Schema(description = "客户称谓")
private String title; private String title;
/** /**
* 性别 * 性别
*/ */
@Schema(description = "性别")
private Object gender; private Object gender;
/** /**
* 生日
*/
private Date birthday;
/**
* 出生日期 * 出生日期
*/ */
private Date birthdate; @Schema(description = "出生日期")
private String birthdate;
/** /**
* 异常信息 * 异常信息
*/ */
@Schema(description = "异常信息")
private String abnormal; private String abnormal;
/** /**
* 年龄 * 年龄
*/ */
@Schema(description = "年龄")
private String age; private String age;
/** /**
* 地区代码 * 地区代码
*/ */
@Schema(description = "地区代码")
private String areaCode; private String areaCode;
/** /**
* 电话号码 * 电话号码
*/ */
@Schema(description = "客户电话号码")
private String phone; private String phone;
/** /**
* 电子邮箱 * 电子邮箱
*/ */
@Schema(description = "客户电子邮箱")
private String email; private String email;
/** /**
* 是否吸烟 * 是否吸烟
*/ */
@Schema(description = "是否吸烟 'NS'-不吸烟 'S'-吸烟 ")
private String smoke; private String smoke;
/** /**
* 吸烟数量 * 吸烟数量
*/ */
@Schema(description = "吸烟数量")
private String smokeQuantity; private String smokeQuantity;
/** /**
* 公司类型 * 公司类型
*/ */
@Schema(description = "公司类型")
private String companyType; private String companyType;
/** /**
* 来源 * 来源
*/ */
@Schema(description = "客户来源")
private String source; private String source;
/** /**
* 证件类型 * 证件类型
*/ */
@Schema(description = "证件类型")
private String idType; private String idType;
/** /**
* 证件号码 * 证件号码
*/ */
@Schema(description = "证件号码")
private String idCard; private String idCard;
/** /**
* 护照号 * 护照号
*/ */
@Schema(description = "护照号")
private String passport; private String passport;
/** /**
* EEP代码 * EEP代码
*/ */
@Schema(description = "EEP代码")
private String eepCode; private String eepCode;
/** /**
* 婚姻状况 * 婚姻状况
*/ */
@Schema(description = "婚姻状况")
private Object marriage; private Object marriage;
/** /**
* 出生地 * 出生地
*/ */
@Schema(description = "出生地")
private String birthplace; private String birthplace;
/** /**
* 教育程度 * 教育程度
*/ */
@Schema(description = "教育程度")
private Object education; private Object education;
/** /**
* 签单用户扩展唯一业务ID * 签单用户扩展唯一业务ID
*/ */
@Schema(description = "客户扩展信息ID")
private String customerExpandBizId; private String customerExpandBizId;
/** /**
* 国家 * 国家
*/ */
@Schema(description = "国家")
private String country; private String country;
/** /**
* 创建时间 * 创建时间
*/ */
@Schema(description = "创建时间")
private Date createTime; private Date createTime;
/** /**
* 客户扩展信息 * 客户扩展信息
*/ */
@Schema(description = "客户扩展信息")
private CustomerExpandVO customerExpand; private CustomerExpandVO customerExpand;
/** /**
......
package com.yd.csf.service.vo; package com.yd.csf.service.vo;
import com.yd.csf.service.model.Fna; import com.yd.csf.service.model.Fna;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -18,42 +19,116 @@ public class FnaVO implements Serializable { ...@@ -18,42 +19,116 @@ public class FnaVO implements Serializable {
/** /**
* id * id
*/ */
@Schema(description = "id")
private Long id; private Long id;
/** /**
* 标题 * fna唯一业务ID
*/ */
private String title; @Schema(description = "fna业务ID")
private String fnaBizId;
/** /**
* 内容 * 财富需要分析编号
*/ */
private String content; @Schema(description = "财富需要分析编号")
private Long fnaNo;
/** /**
* 创建用户 id * 系统用户唯一业务ID
*/ */
private Long userId; @Schema(description = "系统用户唯一业务ID")
private String userBizId;
/** /**
* 创建时间 * 客户姓名
*/ */
private Date createTime; @Schema(description = "客户姓名")
private String customerName;
/**
* 客户唯一业务ID
*/
@Schema(description = "客户唯一业务ID")
private String customerBizId;
/** /**
* 更新时间 * Fna表单唯一业务ID
*/ */
private Date updateTime; @Schema(description = "Fna表单唯一业务ID")
private String fnaFormBizId;
/** /**
* 标签列表 * 预约编号
*/ */
private List<String> tagList; @Schema(description = "预约编号")
private String appointmentNo;
/** /**
* 创建用户信息 * 预约信息主表唯一业务ID
*/ */
// private UserVO user; @Schema(description = "预约信息主表唯一业务ID")
private String appointmentBizId;
/**
* 新单跟进ID
*/
@Schema(description = "新单跟进ID")
private String policyId;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* FNA 状态
*/
@Schema(description = "FNA 状态 'UNCOMPLETED'-未完成, 'COMPLETED'-已完成")
private Object status;
/**
* 产品代码
*/
@Schema(description = "产品代码")
private String productCode;
/**
* 产品名称
*/
@Schema(description = "产品名称")
private String productName;
/**
* 相关URL
*/
@Schema(description = "相关URL")
private String url;
/**
* 是否可编辑: 0-否, 1-是
*/
@Schema(description = "是否可编辑: '0'-否, '1'-是")
private String edit;
/**
* 通用备注
*/
@Schema(description = "通用备注")
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
@Schema(description = "删除标识: '0'-正常, '1'-删除")
private String isDeleted;
/**
* 创建时间
*/
@Schema(description = "创建时间")
private Date createTime;
/** /**
* 封装类转对象 * 封装类转对象
...@@ -67,7 +142,6 @@ public class FnaVO implements Serializable { ...@@ -67,7 +142,6 @@ public class FnaVO implements Serializable {
} }
Fna fna = new Fna(); Fna fna = new Fna();
BeanUtils.copyProperties(fnaVO, fna); BeanUtils.copyProperties(fnaVO, fna);
List<String> tagList = fnaVO.getTagList();
return fna; return fna;
} }
......
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