|
|
|
@ -1,8 +1,12 @@ |
|
|
|
package com.biutag.lan.domain.bo; |
|
|
|
package com.biutag.lan.domain.bo; |
|
|
|
|
|
|
|
|
|
|
|
import com.biutag.lan.domain.MailSource; |
|
|
|
import com.biutag.lan.domain.MailSource; |
|
|
|
|
|
|
|
import com.biutag.validator.annotation.IdCard; |
|
|
|
|
|
|
|
import com.biutag.validator.annotation.Phone; |
|
|
|
|
|
|
|
import jakarta.validation.constraints.NotBlank; |
|
|
|
import lombok.Getter; |
|
|
|
import lombok.Getter; |
|
|
|
import lombok.Setter; |
|
|
|
import lombok.Setter; |
|
|
|
|
|
|
|
import org.hibernate.validator.constraints.Length; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
@ -19,21 +23,25 @@ public class MailOuter { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 联系人姓名 |
|
|
|
* 联系人姓名 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@NotBlank(message = "请输入联系人姓名") |
|
|
|
private String contactName; |
|
|
|
private String contactName; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 联系人性别 M / F |
|
|
|
* 联系人性别 M / F |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@NotBlank(message = "请选择联系人性别") |
|
|
|
private String contactSex; |
|
|
|
private String contactSex; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 联系人身份证号 |
|
|
|
* 联系人身份证号 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@IdCard |
|
|
|
private String contactIdCard; |
|
|
|
private String contactIdCard; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 联系人手机号 |
|
|
|
* 联系人手机号 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Phone |
|
|
|
private String contactPhone; |
|
|
|
private String contactPhone; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -44,6 +52,8 @@ public class MailOuter { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 内容 |
|
|
|
* 内容 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Length(min= 10, max = 300, message = "信件内容不符合规范(不少于10字,不多于300字)") |
|
|
|
|
|
|
|
@NotBlank(message = "请输入信件内容") |
|
|
|
private String content; |
|
|
|
private String content; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -60,20 +70,24 @@ public class MailOuter { |
|
|
|
* 来信时间 |
|
|
|
* 来信时间 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private LocalDateTime mailTime; |
|
|
|
private LocalDateTime mailTime; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 涉及单位ID |
|
|
|
* 涉及单位ID |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private Integer involvedDeptId; |
|
|
|
private Integer involvedDeptId; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 涉及单位名称 |
|
|
|
* 涉及单位名称 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private String involvedDeptName; |
|
|
|
private String involvedDeptName; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String source = MailSource.Source.MAILBOX.getValue(); |
|
|
|
|
|
|
|
|
|
|
|
public MailSource toMailSource() { |
|
|
|
public MailSource toMailSource() { |
|
|
|
MailSource mailSource = new MailSource(); |
|
|
|
MailSource mailSource = new MailSource(); |
|
|
|
BeanUtils.copyProperties(this, mailSource); |
|
|
|
BeanUtils.copyProperties(this, mailSource); |
|
|
|
mailSource.setMailTime(createTime); |
|
|
|
mailSource.setMailTime(createTime); |
|
|
|
mailSource.setSource(MailSource.Source.MAILBOX.getValue()); |
|
|
|
|
|
|
|
mailSource.setCreateTime(LocalDateTime.now()); |
|
|
|
mailSource.setCreateTime(LocalDateTime.now()); |
|
|
|
mailSource.setSignFlag(false); |
|
|
|
mailSource.setSignFlag(false); |
|
|
|
return mailSource; |
|
|
|
return mailSource; |
|
|
|
|