| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- package com.coffee.bus.entity;
- import com.baomidou.mybatisplus.annotation.TableName;
- import com.coffee.bus.enums.DeviceAlarmEnum;
- import com.coffee.common.entity.TenantGenericEntity;
- import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
- import io.swagger.annotations.ApiModel;
- import io.swagger.annotations.ApiModelProperty;
- import lombok.Data;
- import lombok.EqualsAndHashCode;
- import lombok.ToString;
- import java.util.Date;
- /**
- * @author lifang
- * @version 1.0.0
- * @ClassName BusDeviceAlarmEntity.java
- * @Description 设备报警信息
- * @createTime 2022年04月08日 16:18:00
- */
- @EqualsAndHashCode(callSuper = true)
- @Data
- @TableName(value = "bus_device_alarm",autoResultMap = true)
- @ApiModel(value="设备报警信息", description="设备报警信息记录")
- @ToString
- public class BusDeviceAlarmEntity extends TenantGenericEntity<String,String> {
- @ApiModelProperty(value = "设备唯一编码",readOnly = true)
- private String deviceId;
- @ApiModelProperty(value = "报警信息")
- private DeviceAlarmEnum alarm;
- @ApiModelProperty(value = "报警时间")
- private Date alarmTime;
- @ApiModelProperty(value = "报警原因")
- private String cause;
- @ApiModelProperty(value = "报警是否正在进行",hidden = true)
- @JsonIgnoreProperties(allowSetters = true)
- private Boolean doing;
- @ApiModelProperty(value = "是否已处理 0、未处理,1、已处理,暂未使用")
- private Boolean dealing;
- @ApiModelProperty(value = "报警记录所绑定的历史记录id,后续用于更新操作",hidden = true)
- @JsonIgnoreProperties(allowSetters = true)
- private String historyId;
- @ApiModelProperty(value = "输注记录")
- private String infusionId;
- @ApiModelProperty(value = "临床id",readOnly = true)
- private String clinicId;
- @ApiModelProperty(value = "设备标识",readOnly = true,hidden = true)
- @JsonIgnoreProperties(allowSetters = true)
- private String classification;
- public static BusDeviceAlarmEntity parseRunningInfo(BusDeviceHistoryEntity history){
- BusDeviceAlarmEntity entity = new BusDeviceAlarmEntity();
- entity.setDeviceId(history.getDeviceId());
- entity.setAlarm(history.getAlarm());
- entity.setAlarmTime(history.getUploadTime());
- entity.setHistoryId(history.getId());
- entity.setInfusionId(history.getInfusionId());
- entity.setClinicId(history.getClinicId());
- entity.setClassification(history.getClassification());
- entity.setTenantId(history.getTenantId());
- return entity;
- }
- }
|