package com.fzzy.igds.dzhwk.domain; import com.bstek.dorado.annotation.PropertyDef; import lombok.Data; import org.apache.commons.lang3.time.DateFormatUtils; import javax.persistence.*; import java.util.Date; /** * @Description 巡检任务 */ @Data @Entity @Table(name = "H_PATROL_TASK") public class PatrolTask { public static String SORT_PROP = "id"; @Id @Column(name = "ID_", length = 40) @PropertyDef(label = "主键ID") private String id; @Column(name = "COMPANY_ID_", length = 20) @PropertyDef(label = "组织编码", description = "") private String companyId; @Column(name = "DEPT_ID_", length = 50) @PropertyDef(label = "所属库区") private String deptId; @Column(name = "TYPE_", length = 50) @PropertyDef(label = "巡检类型") private String type; @Column(name = "CHECK_USER_", length = 50) @PropertyDef(label = "巡检人") private String checkUser; @Column(name = "CHECK_TIME_") @PropertyDef(label = "巡检时间") private Date checkTime; @Column(name = "LOCATION_", length = 50) @PropertyDef(label = "巡检位置") private String location; @Column(name = "FILE_ID_", length = 30) @PropertyDef(label = "巡检人照片id") private String fileId; @Column(name = "FILE_NAME_", length = 50) @PropertyDef(label = "巡检人照片") private String fileName; @Column(name = "INFO_", length = 200) @PropertyDef(label = "巡检说明") private String info; @Column(name = "REMARK_", length = 250) @PropertyDef(label = "备注", description = "备注信息") private String remark; @Transient @PropertyDef(label = "巡检时间", description = "更新时间:yyyy-MM-dd HH:mm") private String checkTimeStr; public String getCheckTimeStr() { if(null == this.checkTime){ return ""; } return DateFormatUtils.format(this.checkTime, "yy/MM/dd HH:mm"); } }