Selaa lähdekoodia

add
添加重设参数值

18339543638 1 vuosi sitten
vanhempi
commit
967dff7dc6

+ 2 - 0
nb-service-api/web-service-api/src/main/java/com/nb/web/api/entity/common/BusDeviceRunningEntity.java

@@ -209,6 +209,8 @@ public class BusDeviceRunningEntity extends CommonDeviceParam<String,String> {
         // 输液将结束预报
         this.setWarnWillFinished(Optional.ofNullable(items.getBoolean(PumpParams.warnWillFinished)).orElse(false));
 
+        this.setResetParams(ObjectUtil.equal(items.getInteger(PumpParams.resetParams),1));
+
         // 设置脉冲泵参数
         if (this.getType() == DeviceTypeEnum.pulse){
             // 脉冲锁时

+ 18 - 2
nb-service-api/web-service-api/src/main/java/com/nb/web/api/entity/common/CommonDeviceParam.java

@@ -12,7 +12,6 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-
 /**
  * @author lifang
  * @version 1.0.0
@@ -36,8 +35,9 @@ public class CommonDeviceParam<K,T>  extends DeviceProperties<K,T>  {
     @TableField(updateStrategy = FieldStrategy.IGNORED)
     private Boolean warnWillFinished;
 
-    @ApiModelProperty(value = "镇痛不足提醒")
+    @ApiModelProperty(value = "镇痛不足提醒",hidden = true)
 //    @TableField(updateStrategy = FieldStrategy.IGNORED)
+    @JsonIgnore
     private Boolean warnAnalgesicPoor;
 
     @ApiModelProperty(value = "电量偏低提醒")
@@ -48,6 +48,10 @@ public class CommonDeviceParam<K,T>  extends DeviceProperties<K,T>  {
     @TableField(updateStrategy = FieldStrategy.IGNORED)
     private FlowStatusEnum warnFlow;
 
+    @ApiModelProperty("是否重设参数")
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
+    private Boolean resetParams;
+
     @TableField(exist = false)
     @ApiModelProperty(value = "提醒字段",hidden = true)
     private String warns;
@@ -96,8 +100,20 @@ public class CommonDeviceParam<K,T>  extends DeviceProperties<K,T>  {
         }
     }
 
+    private void judgeResetParams() {
+        if(!Boolean.TRUE.equals(this.resetParams)){
+            return;
+        }
+        if (CharSequenceUtil.isEmpty(this.warns)) {
+            this.warns="重设参数;";
+        }else {
+            this.warns=this.warns+"重设参数;";
+        }
+    }
+
     public void handleWarn(){
         judgeWarnAnalgesicPoor();
+        judgeResetParams();
         judgeWarnFlow();
         judgeWarnLowBattery();
         judgeWarnWillFinished();

+ 1 - 0
nb-service-api/web-service-api/src/main/java/com/nb/web/api/enums/FlowStatusEnum.java

@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
 
+
 /**
  * @Author 龙三郎
  * @Date 2022-04-26 09:28:34