xiangpei
2025-04-07 80662b34fe93b4ede00c7fc03fbd9f01355c94e2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.ycl.domain.form;
 
 
import com.ycl.common.group.Add;
import com.ycl.common.group.Update;
import com.ycl.domain.entity.ProjectPlanRecord;
import com.ycl.system.domain.base.AbsForm;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.lang.NonNull;
 
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
 
/**
 * 项目计划记录表单
 *
 * @author lhr
 * @since 2024-11-22
 */
@Data
@ApiModel(value = "ProjectPlanRecord表单", description = "项目计划记录表单")
public class ProjectPlanRecordForm extends AbsForm {
 
    @NotNull(message = "项目信息id不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("项目信息id")
    private Long projectInfoId;
 
    @NotNull(message = "项目计划id不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("项目计划id")
    private Long planId;
 
    @NotNull(message = "工程id不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("工程id")
    private Long engineeringInfoId;
 
    @NotNull(message = "计划期不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("计划期")
    private Integer planTime;
 
    @NotNull(message = "月度/季度/年度  0/1/2不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("月度/季度/年度  0/1/2")
    private Integer planTimeFlag;
 
    @NotNull(message = "创建时间不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("创建时间")
    private Date createTime;
 
    @NotNull(message = "上报状态 已上报/未上报  0/1不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("上报状态 已上报/未上报  0/1")
    private Integer reportStatus;
 
    @NotNull(message = "投资不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("投资")
    private BigDecimal actualInvest;
 
    public static ProjectPlanRecord getEntityByForm(@NonNull ProjectPlanRecordForm form, ProjectPlanRecord entity) {
        if(entity == null) {
          entity = new ProjectPlanRecord();
        }
        BeanUtils.copyProperties(form, entity);
        return entity;
    }
 
}