培训计划表、培训记录表新增修改字段校验调整
parent
c97b089ce7
commit
abccf860e3
|
|
@ -60,7 +60,7 @@ public class PersonnelPlan extends CommUpdate implements Serializable {
|
|||
*/
|
||||
@TableField(value="type")
|
||||
@Schema(description="培训主题分类,0:水利,1:岗前培训,2:在岗培训,3:政治学习教育,4:其他")
|
||||
@NotBlank(message = "培训主题不能为空",groups = {Insert.class, Update.class})
|
||||
@NotNull(message = "培训主题不能为空",groups = {Insert.class, Update.class})
|
||||
@Pattern(regexp = "^[0-4]$", message = "培训主题分类应为:0:水利,1:岗前培训,2:在岗培训,3:政治学习教育,4:其他")
|
||||
private Integer type;
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ public class PersonnelPlan extends CommUpdate implements Serializable {
|
|||
* 开始培训时间
|
||||
*/
|
||||
@Schema(description="开始培训时间 格式:yyyy-MM-dd")
|
||||
@NotBlank(message = "开始培训时间不能为空")
|
||||
@NotNull(message = "开始培训时间不能为空")
|
||||
@TableField(value="stm")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date stm;
|
||||
|
|
@ -86,7 +86,7 @@ public class PersonnelPlan extends CommUpdate implements Serializable {
|
|||
* 结束培训时间
|
||||
*/
|
||||
@Schema(description="结束培训时间 格式:yyyy-MM-dd")
|
||||
@NotBlank(message = "结束培训时间不能为空")
|
||||
@NotNull(message = "结束培训时间不能为空")
|
||||
@TableField(value="etm")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date etm;
|
||||
|
|
@ -146,7 +146,7 @@ public class PersonnelPlan extends CommUpdate implements Serializable {
|
|||
@Schema(description="参训人数(人)")
|
||||
@TableField(value="num_people")
|
||||
@Size(max = 200,message = "参训人员最大长度要小于 200")
|
||||
@NotBlank(message = "参训人数不能为空",groups = {Insert.class, Update.class})
|
||||
@NotNull(message = "参训人数不能为空",groups = {Insert.class, Update.class})
|
||||
private Integer numPeople;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.gunshi.project.xyt.validate.markers.Insert;
|
|||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
|
@ -59,7 +60,7 @@ public class PersonnelPlanLog extends CommUpdate implements Serializable {
|
|||
*/
|
||||
@TableField(value="plan_date")
|
||||
@Schema(description="培训日期 格式:yyyy-MM-dd")
|
||||
@NotBlank(message = "培训日期不能为空",groups = {Insert.class, Update.class})
|
||||
@NotNull(message = "培训日期不能为空",groups = {Insert.class, Update.class})
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date planDate;
|
||||
|
||||
|
|
@ -146,7 +147,7 @@ public class PersonnelPlanLog extends CommUpdate implements Serializable {
|
|||
@Schema(description="参训人数(人)")
|
||||
@TableField(value="num_people")
|
||||
@Size(max = 200,message = "参训人员最大长度要小于 200")
|
||||
@NotBlank(message = "参训人数不能为空",groups = {Insert.class, Update.class})
|
||||
@NotNull(message = "参训人数不能为空",groups = {Insert.class, Update.class})
|
||||
private Integer numPeople;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue