Kaynağa Gözat

fix 低电量报警改为电量耗尽

18339543638 3 yıl önce
ebeveyn
işleme
e07ccb0467

+ 0 - 1
nb-admin/src/main/java/com/nb/admin/AdminApplication.java

@@ -8,7 +8,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.boot.web.servlet.ServletComponentScan;
 import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.PropertySource;
 import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.tio.websocket.starter.EnableTioWebSocketServer;

+ 2 - 2
nb-service/web-service/src/main/java/com/nb/web/service/bus/controller/BusPatientController.java

@@ -229,8 +229,8 @@ public class BusPatientController  implements BaseQueryController<BusPatientEnti
     }
 
     @PostMapping("/shift")
-    @SaCheckPermission("device:clinic:edit")
-    @ApiOperation(value = "主泵切换的操作,只切换,不结束",notes = "当出现泵重复状态时,若用户想要进行主泵的切换,调用该接口进行操作,主泵切换完成后,会将副泵自动撤泵,权限标识为【device:clinic:edit】")
+    @SaCheckPermission("bus:clinic:edit")
+    @ApiOperation(value = "主泵切换的操作,只切换,不结束",notes = "当出现泵重复状态时,若用户想要进行主泵的切换,调用该接口进行操作,主泵切换完成后,会将副泵自动撤泵,权限标识为【bus:clinic:edit】")
     public R shift(@RequestBody@Validated DeviceShiftConfig shiftConfig){
         log.info("主泵切换的操作,【{}】",JSONUtil.toJsonStr(shiftConfig));
         patientService.shift(shiftConfig);

+ 12 - 9
nb-service/web-service/src/main/java/com/nb/web/service/bus/stats/analyse/AlarmStatsAnalyse.java

@@ -194,10 +194,9 @@ public class AlarmStatsAnalyse implements CommonStats<CombineAlarmResult> {
             lineContentMap.computeIfAbsent(DeviceAlarmEnum.Limit.getText(),k->new LineResult.LineContent<>(DeviceAlarmEnum.Limit.getText())).getValue().add(totalResult.getLimit().getValue());
             lineContentMap.computeIfAbsent(DeviceAlarmEnum.NotBox.getText(),k->new LineResult.LineContent<>(DeviceAlarmEnum.NotBox.getText())).getValue().add(totalResult.getNoBox().getValue());
 //            lineContentMap.computeIfAbsent(DeviceAlarmEnum.OutOfControl.getText(),k->new LineResult.LineContent<>(DeviceAlarmEnum.OutOfControl.getText())).getValue().add(totalResult.getOutOfControl().getValue());
-            lineContentMap.computeIfAbsent("镇痛不足",k->new LineResult.LineContent<>("镇痛不足")).getValue().add(totalResult.getAnalgesicPoor().getValue());
-            lineContentMap.computeIfAbsent("不在服务区",k->new LineResult.LineContent<>("不在服务区")).getValue().add(totalResult.getNoSignal().getValue());
+            lineContentMap.computeIfAbsent(DeviceAlarmEnum.LowBattery.getText(),k->new LineResult.LineContent<>(DeviceAlarmEnum.LowBattery.getText())).getValue().add(totalResult.getBatteryFinished().getValue());
             lineContentMap.computeIfAbsent(DeviceAlarmEnum.Machine.getText(),k->new LineResult.LineContent<>(DeviceAlarmEnum.Machine.getText())).getValue().add(totalResult.getMachine().getValue());
-            lineContentMap.computeIfAbsent("低电量",k->new LineResult.LineContent<>("低电量")).getValue().add(totalResult.getLowBattery().getValue());
+
             lineContentMap.computeIfAbsent(DeviceAlarmEnum.Bubble.getText(),k->new LineResult.LineContent<>(DeviceAlarmEnum.Bubble.getText())).getValue().add(totalResult.getBubble().getValue());
             lineContentMap.computeIfAbsent(DeviceAlarmEnum.InfusionMax.getText(),k->new LineResult.LineContent<>(DeviceAlarmEnum.InfusionMax.getText())).getValue().add(totalResult.getInfusionMax().getValue());
 
@@ -209,6 +208,9 @@ public class AlarmStatsAnalyse implements CommonStats<CombineAlarmResult> {
                 lineContentMap.computeIfAbsent(FlowStatusEnum.Limited.getText(),k->new LineResult.LineContent<>(FlowStatusEnum.Limited.getText())).getValue().add(totalResult.getFlowLimited().getValue());
                 lineContentMap.computeIfAbsent(FlowStatusEnum.Lowest.getText(),k->new LineResult.LineContent<>(FlowStatusEnum.Lowest.getText())).getValue().add(totalResult.getLowInfusion().getValue());
             }
+            lineContentMap.computeIfAbsent("镇痛不足",k->new LineResult.LineContent<>("镇痛不足")).getValue().add(totalResult.getAnalgesicPoor().getValue());
+            lineContentMap.computeIfAbsent("不在服务区",k->new LineResult.LineContent<>("不在服务区")).getValue().add(totalResult.getNoSignal().getValue());
+            lineContentMap.computeIfAbsent("低电量",k->new LineResult.LineContent<>("低电量")).getValue().add(totalResult.getLowBattery().getValue());
 
         });
         result.setContent(new ArrayList<>(lineContentMap.values()));
@@ -233,12 +235,13 @@ public class AlarmStatsAnalyse implements CommonStats<CombineAlarmResult> {
                 DeviceAlarmEnum.Limit.getText(),
                 DeviceAlarmEnum.NotBox.getText(),
 //                DeviceAlarmEnum.OutOfControl.getText(),
-                "镇痛不足",
-                "不在服务区",
+                DeviceAlarmEnum.LowBattery.getText(),
                 DeviceAlarmEnum.Machine.getText(),
-                "低电量",
                 DeviceAlarmEnum.Bubble.getText(),
-                DeviceAlarmEnum.InfusionMax.getText());
+                DeviceAlarmEnum.InfusionMax.getText(),
+                "镇痛不足",
+                "不在服务区",
+                "低电量");
         if(addIntelligentParam()){
             //智能泵专属
             columnNames=CollUtil.unionAll(columnNames,Arrays.asList(
@@ -278,7 +281,7 @@ public class AlarmStatsAnalyse implements CommonStats<CombineAlarmResult> {
             contentValues.put( DeviceAlarmEnum.Jam.getText(),totalResult.getJam().getValue());
             contentValues.put( DeviceAlarmEnum.Limit.getText(),totalResult.getLimit().getValue());
             contentValues.put(DeviceAlarmEnum.NotBox.getText(),totalResult.getNoBox().getValue());
-//            contentValues.put(DeviceAlarmEnum.OutOfControl.getText(),totalResult.getOutOfControl().getValue());
+            contentValues.put(DeviceAlarmEnum.LowBattery.getText(),totalResult.getBatteryFinished().getValue());
             contentValues.put("镇痛不足",totalResult.getAnalgesicPoor().getValue());
             contentValues.put("不在服务区",totalResult.getNoSignal().getValue());
             contentValues.put(DeviceAlarmEnum.Machine.getText(),totalResult.getMachine().getValue());
@@ -289,7 +292,7 @@ public class AlarmStatsAnalyse implements CommonStats<CombineAlarmResult> {
             contentValues.put(DeviceAlarmEnum.Jam.getText()+"比率",computeRatio(BigDecimal.valueOf(totalResult.getJam().getValue()),total));
             contentValues.put(DeviceAlarmEnum.Limit.getText()+"比率",computeRatio(BigDecimal.valueOf(totalResult.getLimit().getValue()),total));
             contentValues.put(DeviceAlarmEnum.NotBox.getText()+"比率",computeRatio(BigDecimal.valueOf(totalResult.getNoBox().getValue()),total));
-//            contentValues.put(DeviceAlarmEnum.OutOfControl.getText()+"比率",computeRatio(BigDecimal.valueOf(totalResult.getOutOfControl().getValue()),total));
+            contentValues.put(DeviceAlarmEnum.LowBattery.getText()+"比率",computeRatio(BigDecimal.valueOf(totalResult.getBatteryFinished().getValue()),total));
             contentValues.put("镇痛不足比率",computeRatio(BigDecimal.valueOf(totalResult.getAnalgesicPoor().getValue()),total));
             contentValues.put("不在服务区比率",computeRatio(BigDecimal.valueOf(totalResult.getNoSignal().getValue()),total));
             contentValues.put(DeviceAlarmEnum.Machine.getText()+"比率",computeRatio(BigDecimal.valueOf(totalResult.getMachine().getValue()),total));

+ 14 - 1
nb-service/web-service/src/main/java/com/nb/web/service/bus/stats/entity/AlarmTotalPieResult.java

@@ -101,6 +101,16 @@ public class AlarmTotalPieResult extends HashMap<String,PieContent> {
         incrementValue(this.getLowBattery());
     }
 
+    public PieContent getBatteryFinished() {
+        return this.computeIfAbsent("batteryFinished",k->PieContent.of("电量耗尽",0L));
+    }
+
+
+    public void incrementBatteryFinished() {
+        incrementValue(this.getBatteryFinished());
+    }
+
+
     public PieContent getBubble() {
         return this.computeIfAbsent("bubble",k->PieContent.of(DeviceAlarmEnum.Bubble.getText(),0L));
     }
@@ -214,7 +224,7 @@ public class AlarmTotalPieResult extends HashMap<String,PieContent> {
 //                    incrementOutOfControl();
 //                    break;
                 case LowBattery:
-                    incrementLowBattery();
+                    incrementBatteryFinished();
                     break;
                 case Bubble:
                     incrementBubble();
@@ -233,6 +243,9 @@ public class AlarmTotalPieResult extends HashMap<String,PieContent> {
             if (DeviceStatusEnum.NoSignal.equals(runState)) {
                 incrementNoSignal();
             }
+            if (Boolean.TRUE.equals(alarmResult.getWarnLowBattery())) {
+                incrementLowBattery();
+            }
             if(intelligent){
                 FlowStatusEnum warnFlow = alarmResult.getWarnFlow();
                 if(warnFlow!=null){