Переглянути джерело

update used表改为infusionHistory 输注历史
add infusionModify 输注参数修改

18339543638 3 роки тому
батько
коміт
0b056d7f14

+ 5 - 5
coffee-admin/src/test/java/com/coffee/admin/AliyunTest.java

@@ -1,9 +1,9 @@
 package com.coffee.admin;
 
 import com.coffee.bus.entity.BusDeviceRunningEntity;
-import com.coffee.bus.entity.BusDeviceUsedEntity;
+import com.coffee.bus.entity.BusInfusionHistoryEntity;
 import com.coffee.bus.listener.event.bean.DeviceInfoEvent;
-import com.coffee.bus.service.LocalBusDeviceUsedService;
+import com.coffee.bus.service.LocalBusInfusionHistoryService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,7 +25,7 @@ public class AliyunTest {
     private ApplicationContext applicationContext;
 
     @Autowired
-    private LocalBusDeviceUsedService localBusDeviceUsedService;
+    private LocalBusInfusionHistoryService localBusInfusionHistoryService;
 
     @Test
     public void test001(){
@@ -43,10 +43,10 @@ public class AliyunTest {
 
     @Test
     public void test002(){
-        BusDeviceUsedEntity deviceUsedEntity = new BusDeviceUsedEntity();
+        BusInfusionHistoryEntity deviceUsedEntity = new BusInfusionHistoryEntity();
         deviceUsedEntity.setTenantId("123456");
 
-        localBusDeviceUsedService.save(deviceUsedEntity);
+        localBusInfusionHistoryService.save(deviceUsedEntity);
         System.out.println(deviceUsedEntity);
     }
 

+ 3 - 3
coffee-system/src/main/java/com/coffee/bus/controller/BusDeviceHistoryController.java

@@ -19,8 +19,8 @@ import org.springframework.web.bind.annotation.RestController;
  */
 @RestController
 @AllArgsConstructor
-@RequestMapping("/bus/netpump/history")
-@Api(tags = "网络泵历史数据管理",description = "统一权限前缀(netpump:history),netpump:history:add")
+@RequestMapping("/bus/device/history")
+@Api(tags = "设备历史数据管理",description = "统一权限前缀(device:history),device:history:add")
 public class BusDeviceHistoryController extends BaseCrudController<BusDeviceHistoryEntity, String> {
     private final LocalBusDeviceHistoryService historyService;
 
@@ -30,7 +30,7 @@ public class BusDeviceHistoryController extends BaseCrudController<BusDeviceHist
      */
     @Override
     public String getPermissionPrefix() {
-        return "netpump:history";
+        return "device:history";
     }
 
     @Override

+ 1 - 1
coffee-system/src/main/java/com/coffee/bus/controller/BusDeviceRunningController.java

@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.*;
 @RestController
 @AllArgsConstructor
 @RequestMapping({"/bus/netpump","/bus/device/using"})
-@Api(tags = "网络泵管理",description = "统一权限前缀(bus:device),例如新增bus:device:add")
+@Api(tags = "设备运行状态管理",description = "统一权限前缀(bus:device),例如新增bus:device:add")
 public class BusDeviceRunningController implements BaseQueryController<BusDeviceRunningEntity, String> {
     private final LocalBusDeviceRunningService netPumpService;
 

+ 1 - 0
coffee-system/src/main/java/com/coffee/bus/controller/BusEvaluationTmpController.java

@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
 @AllArgsConstructor
 @RequestMapping("/eval/temp")
 @Api(tags = "评价模板管理",description = "统一权限前缀(eval:temp),eval:temp:add")
+@Deprecated
 public class BusEvaluationTmpController extends BaseCrudController<BusEvaluationTmpEntity, String> {
     private final LocalBusEvaluationTmpService evalTmpService;
 

+ 1 - 0
coffee-system/src/main/java/com/coffee/bus/entity/BusDeviceRunningEntity.java

@@ -64,6 +64,7 @@ public class BusDeviceRunningEntity extends TenantGenericEntity<String,String> {
     @ApiModelProperty(value = "床号")
     private String bedNo;
     /***************临床固定数据*****************/
+
     @ApiModelProperty(value = "设备别名")
     private String alias;
 

+ 0 - 111
coffee-system/src/main/java/com/coffee/bus/entity/BusDeviceUsedEntity.java

@@ -1,111 +0,0 @@
-package com.coffee.bus.entity;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.coffee.common.config.mybatis.DateToBigIntHandler;
-import com.coffee.common.entity.GenericEntity;
-import com.coffee.common.entity.TenantGenericEntity;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.apache.poi.hpsf.Decimal;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * @author 龙三郎
- * @version 1.0.0
- * @ClassName BusDeviceUseEntity.java
- * @Description TODO
- * @createTime 2022年03月30日 11:01:00
- */
-@Data
-@TableName("bus_device_used")
-public class BusDeviceUsedEntity extends TenantGenericEntity<String,String> {
-    @ApiModelProperty("临床id")
-    private String clinicId;
-
-    @ApiModelProperty("设备id")
-    private String deviceId;
-
-    private String patientId;
-    private Short useStatus;
-
-    @TableField(typeHandler = DateToBigIntHandler.class)
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date startTime;
-
-    @TableField(typeHandler = DateToBigIntHandler.class)
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date endTime;
-
-    @TableField(typeHandler = DateToBigIntHandler.class)
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date startUseTime;
-
-    @TableField(typeHandler = DateToBigIntHandler.class)
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date endUseTime;
-
-    private String classification;
-
-    private Integer dataNumber;
-
-    private Integer dataTotal;
-
-    @TableField(typeHandler = DateToBigIntHandler.class)
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date lastReceiveTime;
-
-    private String pumpType;
-    private String patientCode;
-    private String ward;
-    private String bedNo;
-    private Integer totalDose;
-    private BigDecimal finishedDose;
-    private BigDecimal flow;
-    private Integer firstDose;
-    private BigDecimal singleDose;
-    private Integer lockTime;
-    private Integer pcaValid;
-    private Integer pcaInvalid;
-    private BigDecimal maxDose;
-    private Integer electricQuantity;
-    private Double maxFlow;
-    private Double minFlow;
-    private Integer flowAdjustRate;
-    private Integer flowUpPcaValid;
-    private Double flowUpTime;
-    private Double flowDownTime;
-    private Integer warnFlow;
-    private Integer pluseDose;
-    private Integer pluseLockTime;
-    private Integer pluseFirstLockTime;
-    private Integer runStatus;
-    private Integer alarmStatus;
-    private Short warnWillFinished;
-    private Short warnAnalgesicPoor;
-    private Short warnLowBattery;
-
-    @TableField(typeHandler = DateToBigIntHandler.class,fill = FieldFill.INSERT)
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-
-    @TableField(fill = FieldFill.INSERT)
-    private String createBy;
-
-    @TableField(typeHandler = DateToBigIntHandler.class,fill = FieldFill.UPDATE)
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-
-    @TableField(fill = FieldFill.INSERT_UPDATE)
-    private String updateBy;
-
-    @TableField(fill = FieldFill.INSERT)
-    @TableLogic(value = "0",delval = "1")
-    private Integer isDelete;
-
-}

+ 204 - 0
coffee-system/src/main/java/com/coffee/bus/entity/BusInfusionHistoryEntity.java

@@ -0,0 +1,204 @@
+package com.coffee.bus.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.coffee.bus.enums.DeviceAlarmEnum;
+import com.coffee.bus.enums.DeviceEnum;
+import com.coffee.bus.enums.DeviceStatusEnum;
+import com.coffee.common.config.mybatis.DateToBigIntHandler;
+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 lombok.experimental.Accessors;
+import org.apache.ibatis.type.EnumOrdinalTypeHandler;
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author 龙三郎
+ * @version 1.0.0
+ * @ClassName BusDeviceUseEntity.java
+ * @Description TODO
+ * @createTime 2022年03月30日 11:01:00
+ */
+@ToString
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName(value = "bus_infusion_history",autoResultMap = true)
+@ApiModel(value="设备输注历史信息记录", description="设备的classification标识每改变一次,就算一次新的输注记录")
+public class BusInfusionHistoryEntity extends TenantGenericEntity<String,String> {
+    @ApiModelProperty(value = "网络泵id",readOnly = true)
+    private String deviceId;
+
+    @ApiModelProperty(value = "病号")
+    private String patientCode;
+
+    @ApiModelProperty(value = "临床号")
+    private String clinicId;
+
+    /***************临床固定数据*****************/
+    @ApiModelProperty(value = "病区")
+    private String ward;
+
+    @ApiModelProperty(value = "床号")
+    private String bedNo;
+    /***************临床固定数据*****************/
+
+    @ApiModelProperty(value = "总量",readOnly = true)
+    @Max(value = 999,message = "总量最大值不得超过999")
+    @Min(value = 0,message ="总量最小值不得超过0" )
+    private Integer totalDose;
+
+    @ApiModelProperty(value = "公共参数-首次量",readOnly = true)
+    @Max(value = 50,message = "首次量最大值不得超过50")
+    @Min(value = 0,message ="首次量最小值不得超过0" )
+    private Integer firstDose;
+
+
+    @ApiModelProperty(value = "公共参数-剩余量",readOnly = true)
+    private BigDecimal remainDose;
+
+    @ApiModelProperty(value = "公共参数-已输入量",readOnly = true)
+    private BigDecimal inputDose;
+
+    @ApiModelProperty(value = "公共参数-追加量",readOnly = true)
+    @DecimalMax(value = "10",message = "PCA追加量最大值不得超过10")
+    @DecimalMin(value = "0",message ="PCA追加量最小值不得超过0" )
+    private BigDecimal appendDose;
+
+    @ApiModelProperty(value = "公共参数-追加锁时",readOnly = true)
+    @DecimalMax(value = "99",message = "PCA追加量最大值不得超过99")
+    @DecimalMin(value = "1",message ="PCA追加量最小值不得超过0" )
+    private BigDecimal appendLockTime;
+
+    @ApiModelProperty(value = "公共参数-极限量",readOnly = true)
+    @DecimalMax(value = "90",message = "PCA追加量最大值不得超过90")
+    @DecimalMin(value = "0",message ="PCA追加量最小值不得超过0" )
+    private BigDecimal maxDose;
+
+    @ApiModelProperty(value = "公共参数-自控锁时",readOnly = true)
+    private BigDecimal selfControlLockTime;
+
+    @ApiModelProperty(value = "公共参数-pca有效次数",readOnly = true)
+    private Integer pcaValidCount;
+
+    @ApiModelProperty(value = "公共参数-pca无效次数",readOnly = true)
+    private Integer pcaInvalidCount;
+
+    @ApiModelProperty(value = "公共参数-pca总按次数",readOnly = true)
+    private Integer pcaTotalCount;
+
+    @ApiModelProperty(value = "持续泵参数-持续量",readOnly = true)
+    @DecimalMax(value = "50",message = "持续给液量最大值不得超过50")
+    @DecimalMin(value = "0",message ="持续给液量最小值不得超过0" )
+    private BigDecimal continueDose;
+
+    @ApiModelProperty(value = "脉冲泵参数-脉冲量",readOnly = true)
+    @Max(value = 20,message = "脉冲量最大值不得超过20")
+    @Min(value = 0,message ="脉冲量最小值不得超过0" )
+    private Integer pulseDose;
+
+    @ApiModelProperty(value = "脉冲泵参数-脉冲锁时",readOnly = true)
+    @Max(value = 90,message = "脉冲锁时最大值不得超过90")
+    @Min(value = 30,message ="脉冲锁时最小值不得超过30" )
+    private Integer pulseLockTime;
+
+    @ApiModelProperty(value = "脉冲泵参数-脉冲首次锁时",readOnly = true)
+    @Max(value = 60,message = "脉冲首次锁时最大值不得超过60")
+    @Min(value = 0,message ="脉冲首次锁时最小值不得超过0" )
+    private Integer pulseFirstLockTime;
+
+    @ApiModelProperty(value = "智能泵参数-加档周期",readOnly = true)
+    @DecimalMax(value = "10",message = "加档周期最大值不得超过10")
+    @DecimalMin(value = "0.5",message ="加档周期最小值不得超过0.5" )
+    private BigDecimal flowUpCycle;
+
+    @ApiModelProperty(value = "智能泵参数-减档周期",readOnly = true)
+    @DecimalMax(value = "10",message = "减档周期最大值不得超过10")
+    @DecimalMin(value = "0.5",message ="减档周期最小值不得超过0.5" )
+    private BigDecimal flowDownCycle;
+
+    @ApiModelProperty(value = "智能泵参数-计次",readOnly = true)
+    @DecimalMax(value = "10",message = "PCA追加量最大值不得超过10")
+    @DecimalMin(value = "1",message ="PCA追加量最小值不得超过1" )
+    private BigDecimal flowCount;
+
+    @ApiModelProperty(value = "智能泵参数-上限",readOnly = true)
+    @DecimalMax(value = "50",message = "智能泵上限值最大值不得超过90")
+    @DecimalMin(value = "1",message ="智能泵上限值最小值不得超过0" )
+    private BigDecimal flowUpLimit;
+
+    @ApiModelProperty(value = "智能泵参数-下限",readOnly = true)
+    @DecimalMax(value = "50",message = "智能泵下限值最大值不得超过50")
+    @DecimalMin(value = "0.1",message ="智能泵下限值最小值不得超过0.1" )
+    private BigDecimal flowDownLimit;
+
+    @ApiModelProperty(value = "智能泵参数-自调比例",readOnly = true)
+    @DecimalMax(value = "95",message = "自调比例不得超过95")
+    @DecimalMin(value = "0",message ="自调比例最小值不得超过0" )
+    private BigDecimal flowAdjustRate;
+
+
+    @ApiModelProperty(value = "泵运行状态",readOnly = true)
+    @TableField(typeHandler = EnumOrdinalTypeHandler.class,javaType = true,updateStrategy = FieldStrategy.IGNORED)
+    private DeviceStatusEnum runState;
+
+    @ApiModelProperty(value = "报警信息",readOnly = true)
+    @TableField(typeHandler = EnumOrdinalTypeHandler.class,javaType = true,updateStrategy = FieldStrategy.IGNORED)
+    private DeviceAlarmEnum alarm;
+
+    @ApiModelProperty(value = "输注即将结束提醒",readOnly = true)
+    private Boolean warnWillFinished;
+
+    @ApiModelProperty(value = "镇痛不足提醒",readOnly = true)
+    private Boolean warnAnalgesicPoor;
+
+    @ApiModelProperty(value = "电量偏低提醒",readOnly = true)
+    private Boolean warnLowBattery;
+
+    @ApiModelProperty(value = "输注开始时间,即本次运行开机时间",readOnly = true)
+    @TableField(typeHandler = DateToBigIntHandler.class)
+    private Date startTime;
+
+    @ApiModelProperty(value = "是否已撤泵,0、未撤泵1、已撤泵")
+    @JsonIgnoreProperties(allowSetters = true)
+    private Boolean isUndo;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "分包标记位",readOnly = true)
+    @JsonIgnoreProperties(allowSetters = true)
+    private String classification;
+
+    @ApiModelProperty(value = "泵类型",readOnly = true)
+    @TableField(typeHandler = EnumOrdinalTypeHandler.class,javaType = true,updateStrategy = FieldStrategy.NEVER)
+    private DeviceEnum type;
+
+    @ApiModelProperty(value = "当前输注记录数据最后上传时间",readOnly = true,hidden = true)
+    @TableField(typeHandler = DateToBigIntHandler.class)
+    @JsonIgnoreProperties(allowSetters = true)
+    private Date lastUploadTime;
+
+    @ApiModelProperty(value = "撤泵人")
+    private String undoBy;
+
+    @ApiModelProperty(value = "销毁人")
+    private String destroyer;
+
+    @ApiModelProperty(value = "见证人")
+    private String witnesses;
+
+    @ApiModelProperty(value = "撤泵时间")
+    @TableField(typeHandler = DateToBigIntHandler.class)
+    private Date undoTime;
+
+}

+ 141 - 0
coffee-system/src/main/java/com/coffee/bus/entity/BusInfusionModifyEntity.java

@@ -0,0 +1,141 @@
+package com.coffee.bus.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.coffee.common.config.mybatis.DateToBigIntHandler;
+import com.coffee.common.entity.TenantGenericEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author 龙三郎
+ * @version 1.0.0
+ * @ClassName BusDeviceUseEntity.java
+ * @Description TODO
+ * @createTime 2022年03月30日 11:01:00
+ */
+@ToString
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName(value = "bus_infusion_modify",autoResultMap = true)
+@ApiModel(value="设备输注参数修改记录", description="当输注参数发生修改时,在此表中进行记录")
+public class BusInfusionModifyEntity extends TenantGenericEntity<String,String> {
+    @ApiModelProperty(value = "网络泵id",readOnly = true)
+    private String deviceId;
+
+    @ApiModelProperty(value = "输注记录")
+    private String infusionId;
+
+    @ApiModelProperty(value = "临床号")
+    private String clinicId;
+
+    @ApiModelProperty(value = "总量",readOnly = true)
+    @Max(value = 999,message = "总量最大值不得超过999")
+    @Min(value = 0,message ="总量最小值不得超过0" )
+    private Integer totalDose;
+
+    @ApiModelProperty(value = "公共参数-首次量",readOnly = true)
+    @Max(value = 50,message = "首次量最大值不得超过50")
+    @Min(value = 0,message ="首次量最小值不得超过0" )
+    private Integer firstDose;
+
+    @ApiModelProperty(value = "公共参数-剩余量",readOnly = true)
+    private BigDecimal remainDose;
+
+    @ApiModelProperty(value = "公共参数-已输入量",readOnly = true)
+    private BigDecimal inputDose;
+
+    @ApiModelProperty(value = "公共参数-追加量",readOnly = true)
+    @DecimalMax(value = "10",message = "PCA追加量最大值不得超过10")
+    @DecimalMin(value = "0",message ="PCA追加量最小值不得超过0" )
+    private BigDecimal appendDose;
+
+    @ApiModelProperty(value = "公共参数-追加锁时",readOnly = true)
+    @DecimalMax(value = "99",message = "PCA追加量最大值不得超过99")
+    @DecimalMin(value = "1",message ="PCA追加量最小值不得超过0" )
+    private BigDecimal appendLockTime;
+
+    @ApiModelProperty(value = "公共参数-极限量",readOnly = true)
+    @DecimalMax(value = "90",message = "PCA追加量最大值不得超过90")
+    @DecimalMin(value = "0",message ="PCA追加量最小值不得超过0" )
+    private BigDecimal maxDose;
+
+    @ApiModelProperty(value = "公共参数-自控锁时",readOnly = true)
+    private BigDecimal selfControlLockTime;
+
+    @ApiModelProperty(value = "公共参数-pca有效次数",readOnly = true)
+    private Integer pcaValidCount;
+
+    @ApiModelProperty(value = "公共参数-pca无效次数",readOnly = true)
+    private Integer pcaInvalidCount;
+
+    @ApiModelProperty(value = "公共参数-pca总按次数",readOnly = true)
+    private Integer pcaTotalCount;
+
+    @ApiModelProperty(value = "持续泵参数-持续量",readOnly = true)
+    @DecimalMax(value = "50",message = "持续给液量最大值不得超过50")
+    @DecimalMin(value = "0",message ="持续给液量最小值不得超过0" )
+    private BigDecimal continueDose;
+
+    @ApiModelProperty(value = "脉冲泵参数-脉冲量",readOnly = true)
+    @Max(value = 20,message = "脉冲量最大值不得超过20")
+    @Min(value = 0,message ="脉冲量最小值不得超过0" )
+    private Integer pulseDose;
+
+    @ApiModelProperty(value = "脉冲泵参数-脉冲锁时",readOnly = true)
+    @Max(value = 90,message = "脉冲锁时最大值不得超过90")
+    @Min(value = 30,message ="脉冲锁时最小值不得超过30" )
+    private Integer pulseLockTime;
+
+    @ApiModelProperty(value = "脉冲泵参数-脉冲首次锁时",readOnly = true)
+    @Max(value = 60,message = "脉冲首次锁时最大值不得超过60")
+    @Min(value = 0,message ="脉冲首次锁时最小值不得超过0" )
+    private Integer pulseFirstLockTime;
+
+    @ApiModelProperty(value = "智能泵参数-加档周期",readOnly = true)
+    @DecimalMax(value = "10",message = "加档周期最大值不得超过10")
+    @DecimalMin(value = "0.5",message ="加档周期最小值不得超过0.5" )
+    private BigDecimal flowUpCycle;
+
+    @ApiModelProperty(value = "智能泵参数-减档周期",readOnly = true)
+    @DecimalMax(value = "10",message = "减档周期最大值不得超过10")
+    @DecimalMin(value = "0.5",message ="减档周期最小值不得超过0.5" )
+    private BigDecimal flowDownCycle;
+
+    @ApiModelProperty(value = "智能泵参数-计次",readOnly = true)
+    @DecimalMax(value = "10",message = "PCA追加量最大值不得超过10")
+    @DecimalMin(value = "1",message ="PCA追加量最小值不得超过1" )
+    private BigDecimal flowCount;
+
+    @ApiModelProperty(value = "智能泵参数-上限",readOnly = true)
+    @DecimalMax(value = "50",message = "智能泵上限值最大值不得超过90")
+    @DecimalMin(value = "1",message ="智能泵上限值最小值不得超过0" )
+    private BigDecimal flowUpLimit;
+
+    @ApiModelProperty(value = "智能泵参数-下限",readOnly = true)
+    @DecimalMax(value = "50",message = "智能泵下限值最大值不得超过50")
+    @DecimalMin(value = "0.1",message ="智能泵下限值最小值不得超过0.1" )
+    private BigDecimal flowDownLimit;
+
+    @ApiModelProperty(value = "智能泵参数-自调比例",readOnly = true)
+    @DecimalMax(value = "95",message = "自调比例不得超过95")
+    @DecimalMin(value = "0",message ="自调比例最小值不得超过0" )
+    private BigDecimal flowAdjustRate;
+
+    @ApiModelProperty(value = "参数修改时间")
+    @TableField(typeHandler = DateToBigIntHandler.class)
+    private Date modifyTime;
+
+}

+ 2 - 2
coffee-system/src/main/java/com/coffee/bus/mapper/BusDeviceUsedMapper.java → coffee-system/src/main/java/com/coffee/bus/mapper/BusInfusionHistoryMapper.java

@@ -1,7 +1,7 @@
 package com.coffee.bus.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.coffee.bus.entity.BusDeviceUsedEntity;
+import com.coffee.bus.entity.BusInfusionHistoryEntity;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -12,6 +12,6 @@ import org.apache.ibatis.annotations.Mapper;
  * @createTime 2022年03月19日 09:15:00
  */
 @Mapper
-public interface BusDeviceUsedMapper extends BaseMapper<BusDeviceUsedEntity> {
+public interface BusInfusionHistoryMapper extends BaseMapper<BusInfusionHistoryEntity> {
 
 }

+ 5 - 5
coffee-system/src/main/java/com/coffee/bus/service/LocalBusDeviceUsedService.java → coffee-system/src/main/java/com/coffee/bus/service/LocalBusInfusionHistoryService.java

@@ -1,7 +1,7 @@
 package com.coffee.bus.service;
 
-import com.coffee.bus.entity.BusDeviceUsedEntity;
-import com.coffee.bus.mapper.BusDeviceUsedMapper;
+import com.coffee.bus.entity.BusInfusionHistoryEntity;
+import com.coffee.bus.mapper.BusInfusionHistoryMapper;
 import com.coffee.common.crud.BaseService;
 import org.springframework.stereotype.Service;
 
@@ -13,14 +13,14 @@ import org.springframework.stereotype.Service;
  * @createTime 2022年03月19日 09:27:00
  */
 @Service
-public class LocalBusDeviceUsedService extends BaseService<BusDeviceUsedMapper, BusDeviceUsedEntity,String> {
+public class LocalBusInfusionHistoryService extends BaseService<BusInfusionHistoryMapper, BusInfusionHistoryEntity,String> {
     @Override
-    public void validateBeforeSave(BusDeviceUsedEntity entity) {
+    public void validateBeforeSave(BusInfusionHistoryEntity entity) {
 
     }
 
     @Override
-    public void validateBeforeUpdate(BusDeviceUsedEntity entity) {
+    public void validateBeforeUpdate(BusInfusionHistoryEntity entity) {
 
     }
 

+ 1 - 1
coffee-system/src/main/java/com/coffee/bus/websocket/listener/DeviceInfoListener.java

@@ -104,7 +104,7 @@ public class DeviceInfoListener {
             //则推送设备上报消息
             String topic = WebSocketConstant.getDeviceInfoDetailTopic(null, device.getId(), device.getTenantId());
             redisTemplate.convertAndSend(topic, device);
-            //更新缓存信息
+            //所有事务处理完成后更新缓存信息
             cacheOperation.forEach(Supplier::get);
         }
         log.info("结束处理时间------------------------[{}]",System.currentTimeMillis());