Commit d2a7dd1a authored by huyuchen's avatar huyuchen

huych-入离职登记增加附件和姓名身份证和手机号校验

parent d5176183
...@@ -125,6 +125,6 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -125,6 +125,6 @@ public class EmployeeRegistrationPreVo implements Serializable {
private List<TEmployeeInsurancePreVo> employeeInsurancePreVos; private List<TEmployeeInsurancePreVo> employeeInsurancePreVos;
@Schema(description = "附件集合") @Schema(description = "附件集合")
private List<TAttaInfo> attaList; private List<TAttaInfoSaveVo> attaList;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* @Author fxj
* @Description 附件信息表
* @Date 11:07 2022/6/22
**/
@Data
public class TAttaInfoSaveVo {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 资源名称
*/
@NotBlank(message = "资源名称不能为空")
@Length(max = 50, message = "资源名称不能超过50个字符")
@Schema(description = "资源名称")
private String attaName;
/**
* 资源地址
*/
@NotBlank(message = "资源地址不能为空")
@Length(max = 100, message = "资源地址不能超过100个字符")
@Schema(description = "资源地址")
private String attaSrc;
/**
* 资源大小
*/
@Schema(description = "资源大小")
private Long attaSize;
/**
* 资源类型
*/
@Length(max = 10, message = "资源类型不能超过10个字符")
@Schema(description = "资源类型")
private String attaType;
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件28户配置 31入离职登记身份证正面 32入离职登记身份证反面
*/
@NotBlank(message = "关系类型不能为空")
@Length(max = 2, message = "关系类型不能超过2个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置 31入离职登记身份证正面 32入离职登记身份证反面)")
private String relationType;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
*/
@NotBlank(message = "实体id和关系类型共同确定附件所属不能为空")
@Length(max = 32, message = "实体id和关系类型共同确定附件所属不能超过32个字符")
@Schema(description = "实体id和关系类型共同确定附件所属")
private String domainId;
/**
* 地址URL
*/
@Length(max = 100, message = "地址URL不能超过100个字符")
@Schema(description = "地址URL")
@TableField(exist = false)
private String attaUrl;
/**
* 附件变更类型:0 新增 1 更新 2 删除 3 不变 档案编辑附件时需要告知后端是增加还是减少
*/
private String handleType;
/**
* 其他分租名称
*/
private String groupName;
}
...@@ -268,7 +268,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -268,7 +268,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
baseMapper.insert(pre); baseMapper.insert(pre);
//附件赋值 //附件赋值
if (Common.isNotNull(preVo.getAttaList())) { if (Common.isNotNull(preVo.getAttaList())) {
for (TAttaInfo attaInfo : preVo.getAttaList()) { for (TAttaInfoSaveVo attaInfoVo : preVo.getAttaList()) {
TAttaInfo attaInfo = new TAttaInfo();
BeanUtils.copyProperties(attaInfoVo, attaInfo);
attaInfo.setDomainId(pre.getId()); attaInfo.setDomainId(pre.getId());
attaInfoService.save(attaInfo); attaInfoService.save(attaInfo);
} }
......
...@@ -26,7 +26,6 @@ import com.yifu.cloud.plus.v1.csp.vo.*; ...@@ -26,7 +26,6 @@ import com.yifu.cloud.plus.v1.csp.vo.*;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysCspDeptVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysCspDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.SysAutoDictItem; import com.yifu.cloud.plus.v1.yifu.archives.entity.SysAutoDictItem;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
...@@ -1282,9 +1281,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1282,9 +1281,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//附件赋值 //附件赋值
List<TCspAttaInfo> attaInfoList = tAttaInfoService.list(Wrappers.<TCspAttaInfo>query().lambda().eq(TCspAttaInfo::getDomainId, registration.getId())); List<TCspAttaInfo> attaInfoList = tAttaInfoService.list(Wrappers.<TCspAttaInfo>query().lambda().eq(TCspAttaInfo::getDomainId, registration.getId()));
if (attaInfoList != null && !attaInfoList.isEmpty()) { if (attaInfoList != null && !attaInfoList.isEmpty()) {
List<TAttaInfo> attaInfos = new ArrayList<>(); List<TAttaInfoSaveVo> attaInfos = new ArrayList<>();
for (TCspAttaInfo cspAttaInfo : attaInfoList) { for (TCspAttaInfo cspAttaInfo : attaInfoList) {
TAttaInfo attaInfo = new TAttaInfo(); TAttaInfoSaveVo attaInfo = new TAttaInfoSaveVo();
BeanUtils.copyProperties(cspAttaInfo,attaInfo); BeanUtils.copyProperties(cspAttaInfo,attaInfo);
if (CommonConstants.ONE_STRING.equals(cspAttaInfo.getRelationType())) { if (CommonConstants.ONE_STRING.equals(cspAttaInfo.getRelationType())) {
attaInfo.setRelationType("30"); attaInfo.setRelationType("30");
......
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