提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.bpm.controller.admin.oa.vo; |
H |
2 |
|
|
3 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
4 |
import lombok.Data; |
|
5 |
import org.springframework.format.annotation.DateTimeFormat; |
|
6 |
|
|
7 |
import javax.validation.constraints.AssertTrue; |
|
8 |
import javax.validation.constraints.NotNull; |
|
9 |
import java.time.LocalDateTime; |
|
10 |
import java.util.List; |
|
11 |
import java.util.Map; |
|
12 |
|
|
13 |
import static com.iailab.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|
14 |
|
|
15 |
@Schema(description = "管理后台 - 请假申请创建 Request VO") |
|
16 |
@Data |
|
17 |
public class BpmOALeaveCreateReqVO { |
|
18 |
|
|
19 |
@Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|
20 |
@NotNull(message = "开始时间不能为空") |
|
21 |
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|
22 |
private LocalDateTime startTime; |
|
23 |
|
|
24 |
@Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|
25 |
@NotNull(message = "结束时间不能为空") |
|
26 |
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|
27 |
private LocalDateTime endTime; |
|
28 |
|
|
29 |
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
30 |
private Integer type; |
|
31 |
|
|
32 |
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读iailab") |
|
33 |
private String reason; |
|
34 |
|
|
35 |
@Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}") |
|
36 |
private Map<String, List<Long>> startUserSelectAssignees; |
|
37 |
|
|
38 |
@AssertTrue(message = "结束时间,需要在开始时间之后") |
|
39 |
public boolean isEndTimeValid() { |
|
40 |
return !getEndTime().isBefore(getStartTime()); |
|
41 |
} |
|
42 |
|
|
43 |
} |