| | |
| | | package com.ycl.domain.form; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.common.group.Update; |
| | | import com.ycl.common.group.Add; |
| | | import com.ycl.common.utils.StringUtils; |
| | | import com.ycl.system.domain.base.AbsForm; |
| | | import com.ycl.domain.entity.ProjectEngineering; |
| | | import com.ycl.system.domain.base.AbsUUIDForm; |
| | | import org.springframework.beans.BeanUtils; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ProjectEngineering表单", description = "项目工程表单") |
| | | public class ProjectEngineeringForm extends AbsForm { |
| | | public class ProjectEngineeringForm extends AbsUUIDForm { |
| | | |
| | | @NotNull(message = "项目id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("项目id") |
| | |
| | | @ApiModelProperty("状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("主管部门") |
| | | private Long department; |
| | | |
| | | @ApiModelProperty("业主单位") |
| | | private Long unit; |
| | | |
| | | @ApiModelProperty("年份") |
| | | private String year; |
| | | |
| | | @ApiModelProperty("父工程") |
| | | private String parent; |
| | | |
| | | @ApiModelProperty("建设内容") |
| | | private String buildContent; |
| | | |
| | | public static ProjectEngineering getEntityByForm(@NonNull ProjectEngineeringForm form, ProjectEngineering entity) { |
| | | if(entity == null) { |
| | | entity = new ProjectEngineering(); |
| | | } |
| | | if (StringUtils.isEmpty(form.parent)){ |
| | | form.setParent("0"); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |