|
|
@@ -5,6 +5,8 @@ import java.time.LocalDateTime;
|
|
|
import java.io.Serializable;
|
|
|
import java.util.Date;
|
|
|
import com.fasterxml.jackson.annotation.JsonSetter;
|
|
|
+import com.nb.web.api.entity.common.BusDeviceRunningEntity;
|
|
|
+import com.nb.web.api.enums.DeviceTypeEnum;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
@@ -154,20 +156,43 @@ public class PcPumpEntity implements Serializable {
|
|
|
@ApiModelProperty(value = "显示状态")
|
|
|
private String ViewState;
|
|
|
|
|
|
- @ApiModelProperty(value = "备注")
|
|
|
- private String Remark;
|
|
|
-
|
|
|
@ApiModelProperty(value = "最后上传时间")
|
|
|
private LocalDateTime LastUploadTime;
|
|
|
|
|
|
- @ApiModelProperty(value = "创建时间",hidden = true)
|
|
|
- private LocalDateTime gmtCreate;
|
|
|
-
|
|
|
- @ApiModelProperty(value = "更新时间",hidden = true)
|
|
|
- private LocalDateTime gmtModified;
|
|
|
|
|
|
- @ApiModelProperty(value = "是否是家用")
|
|
|
- private Boolean isFamily;
|
|
|
+ public BusDeviceRunningEntity toDevice(){
|
|
|
+ BusDeviceRunningEntity result = new BusDeviceRunningEntity();
|
|
|
+ result.setUploadTime(new Date());
|
|
|
+ result.setDeviceId(this.getPumpCode());
|
|
|
+ //todo
|
|
|
+ result.setClassification("");
|
|
|
+ result.setDataNumber(1);
|
|
|
+
|
|
|
+ result.setPatientCode(this.getPatientCode());
|
|
|
+// result.setWard(this.getW);
|
|
|
+ result.setTenantId(this.getSysHospital_ID());
|
|
|
+ result.setTotalDose(this.getAllQuantity());
|
|
|
+ result.setInputDose(this.getInputQuantity());
|
|
|
+ result.setRemainDose(this.getBalanceQuantity());
|
|
|
+ result.setFirstDose(this.getFirstQuantity());
|
|
|
+ result.setMaxDose(this.getMaxQuantity());
|
|
|
+ result.setAppendDose(this.getSingleQuantity());
|
|
|
+ //todo 自控锁时
|
|
|
+// result.setSelfControlLockTime(this.getFirstLockTime());
|
|
|
+ result.setContinueDose(this.getContinueQuantity());
|
|
|
+ //todo
|
|
|
+ result.setType(DeviceTypeEnum.other);
|
|
|
+
|
|
|
+ result.setPcaInvalidCount(this.getFalseNum());
|
|
|
+ result.setPcaValidCount(this.getTrueNum());
|
|
|
+ result.setPcaTotalCount(this.getAllCount());
|
|
|
+
|
|
|
+// result.setElectricQuantity();
|
|
|
+// result.setRunState();
|
|
|
+// result.setAlarm();
|
|
|
+ return result;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|