package com.gkhy.labRiskManage.domain.riskReport.entity;
|
|
import com.gkhy.labRiskManage.domain.account.entity.Role;
|
import com.gkhy.labRiskManage.domain.account.entity.User;
|
import com.gkhy.labRiskManage.domain.basic.entity.BasicTip;
|
import lombok.Data;
|
import org.hibernate.annotations.Fetch;
|
import org.hibernate.annotations.FetchMode;
|
import org.hibernate.annotations.Where;
|
|
import javax.persistence.*;
|
import java.math.BigDecimal;
|
import java.time.LocalDateTime;
|
import java.util.Date;
|
import java.io.Serializable;
|
import java.util.List;
|
|
/**
|
*
|
*/
|
@Data
|
@Entity
|
@Table(name = "risk_assess_plan")
|
@Where(clause = "delete_status = 0")
|
public class RiskAssessPlan implements Serializable {
|
private static final long serialVersionUID = -44756780317221858L;
|
|
@Id
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
private Long id;
|
/**
|
* 实验id
|
*/
|
private Long experimentId;
|
/**
|
* 风险分析单元id
|
*/
|
private Long riskUnitId;
|
|
/**
|
* 评估计划名称
|
*/
|
private String assessPlanName;
|
/**
|
* 风险来源:1-固有风险;2-实验风险
|
*/
|
private Byte riskType;
|
/**
|
* 新建时间
|
*/
|
private LocalDateTime createTime;
|
/**
|
* 修改时间
|
*/
|
private LocalDateTime updateTime;
|
/**
|
* 最后修改人
|
*/
|
private Long updateByUserId;
|
/**
|
* 新建人
|
*/
|
private Long createByUserId;
|
/**
|
* 计划制定人
|
*/
|
private Long planUserId;
|
/**
|
* 评估开始时间
|
*/
|
private LocalDateTime assessStartTime;
|
/**
|
* 评估结束时间
|
*/
|
private LocalDateTime assessEndTime;
|
/**
|
* 辨识时间
|
*/
|
private LocalDateTime identificationTime;
|
/**
|
* 评价时间
|
*/
|
private LocalDateTime evaluateTime;
|
/**
|
* 评估计划派发状态:1-未派发;2-已派发
|
*/
|
private Byte planSellStatus;
|
/**
|
* 评估计划派发时间
|
*/
|
private LocalDateTime planSellTime;
|
/**
|
* 评估计划执行状态:1-未开始;2-辨识阶段;3-评价阶段;4-评价完成
|
*/
|
private Byte planExecStatus;
|
/**
|
* 评估计划时间状态:1-未开始;2-评估中;3-已超期
|
*/
|
private Byte planTimeStatus;
|
/**
|
* 辨识方法:1-PHA;2-JHA;3-SCL;4-HAZOP;5-类比法
|
*/
|
private Byte identificationMethod;
|
|
/**
|
* 辨识类型1线上专家2现场专家3线上+现场
|
*/
|
private Byte identificationType;
|
/**
|
* 辨识专家
|
*/
|
private String identificationUser;
|
/**
|
* 辨识专家id
|
*/
|
private Long identificationUserId;
|
/**
|
* 删除状态:0-正常;1-已删除
|
*/
|
private Byte deleteStatus;
|
/**
|
* 推荐评价方法:1-LEC;2-LS;3-MES;4-RS;
|
*/
|
private Byte evaluateMethod;
|
/**
|
* 评价专家id
|
*/
|
private Long evaluateUserId;
|
/**
|
* 评价专家
|
*/
|
private String evaluateUser;
|
/**
|
* 技术措施
|
*/
|
private String technologyMeasure;
|
/**
|
* 管理措施
|
*/
|
private String manageMeasure;
|
/**
|
* 教育措施
|
*/
|
private String educationMeasure;
|
/**
|
* 个体防护措施
|
*/
|
private String personalProtectionMeasure;
|
/**
|
* 应急措施
|
*/
|
private String emergencyMeasure;
|
/**
|
* 风险数值
|
*/
|
private BigDecimal riskValue;
|
/**
|
* 风险等级值:风险值区间级别,1-1级,2-2级,3-3级,4-4级,5-5级
|
*/
|
private Byte riskLevelValue;
|
/**
|
* 风险级别:1-低,2-一般,3-较大,4-重大
|
*/
|
private Byte riskLevel;
|
/**
|
* 风险色:1-蓝色;2-黄色;3-橙色;4-红色
|
*/
|
private Byte riskColor;
|
/**
|
* 管理层级:1-院所级;2-部门级;3-项目组级
|
*/
|
private Byte manageLevel;
|
|
@OneToOne(targetEntity = User.class,fetch = FetchType.EAGER)
|
@JoinColumn(name = "planUserId",referencedColumnName = "id",insertable =false ,updatable = false)
|
private User planUser;
|
|
@OneToMany(fetch = FetchType.EAGER,cascade = {CascadeType.REFRESH})
|
@Fetch(FetchMode.SUBSELECT)
|
@JoinColumn(name = "riskAssessPlanId",referencedColumnName = "id",insertable =false ,updatable = false)
|
private List<RiskAssessPlanIdentificationUser> riskAssessPlanIdentificationUsers;
|
|
@OneToMany(fetch = FetchType.EAGER,cascade = {CascadeType.REFRESH})
|
@Fetch(FetchMode.SUBSELECT)
|
@JoinColumn(name = "riskAssessPlanId",referencedColumnName = "id",insertable =false ,updatable = false)
|
private List<RiskAssessPlanEvaluateUser> riskAssessPlanEvaluateUsers;
|
|
}
|