ソースを参照

add:添加镇痛麻醉方式查询

zhouzeyu 7 ヶ月 前
コミット
2d2a261a7c

+ 17 - 0
nb-service/app-doctor/src/main/java/com/nb/app/doctor/controller/PatientMonitorController.java

@@ -40,6 +40,7 @@ import com.nb.web.api.feign.result.PatientMonitorDetailResult;
 import com.nb.web.service.bus.controller.BusAppDoctorUserController;
 import com.nb.web.service.bus.controller.vo.MonitorFinishedVo;
 import com.nb.web.service.bus.entity.BusPatientEntity;
+import com.nb.web.service.bus.enums.AnaTypeEnum;
 import com.nb.web.service.bus.enums.ConstantEnum;
 import com.nb.web.service.bus.service.LocalBusDeviceHistoryService;
 import com.nb.web.service.bus.service.LocalBusInfusionHistoryService;
@@ -296,6 +297,22 @@ public class PatientMonitorController {
         return R.success(localBusConMixService.listWard());
     }
 
+    @PostMapping("/{type}/page")
+    @ApiOperation(value = "镇痛麻醉方式查询")
+    public R anaTypeQueryPage(@PathVariable("type") String type){
+
+        AnaTypeEnum anaTypeEnum = AnaTypeEnum.fromValue(type);
+        List<String> result;
+        if (anaTypeEnum==AnaTypeEnum.ANATYPE){
+            result = localBusConMixService.listAnaType();
+        }else {
+            result = localBusConMixService.listAnalType();
+        }
+
+        return R.success(result);
+    }
+
+
     /**
      * @description: 网络泵技改项目
      * ①增加病区筛选功能:移动软件主界面增加病区快速筛选,可以点击不同的病区,将同一个病区的患者显示在一列;

+ 35 - 0
nb-service/web-service/src/main/java/com/nb/web/service/bus/enums/AnaTypeEnum.java

@@ -0,0 +1,35 @@
+package com.nb.web.service.bus.enums;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @Author zzy
+ * @Data 2025/5/6
+ * @Version 1.0
+ * @Description XXX
+ */
+@JsonFormat(shape = JsonFormat.Shape.OBJECT)
+@ApiModel("混合常量类型")
+@AllArgsConstructor
+@Getter
+public enum AnaTypeEnum {
+
+    ANATYPE("anaType"),
+    ANALTYPE("analType");
+
+    private String value;
+
+    // 根据字符串获取枚举值
+    public static AnaTypeEnum fromValue(String value) {
+        for (AnaTypeEnum type : values()) {
+            if (type.getValue().equalsIgnoreCase(value)) {
+                return type;
+            }
+        }
+        throw new IllegalArgumentException("不支持的类型: " + value);
+    }
+
+}

+ 21 - 0
nb-service/web-service/src/main/java/com/nb/web/service/bus/service/constant/LocalBusConMixService.java

@@ -144,4 +144,25 @@ public class LocalBusConMixService extends AbstractConstantService<BusConMixMapp
                 .map(BusConMixEntity::getName)
                 .collect(Collectors.toList());
     }
+
+    public List<String> listAnaType() {
+       List<BusConMixEntity> entities = baseMapper.selectList(new QueryWrapper<BusConMixEntity>().lambda()
+                .eq(BusConMixEntity::getTenantId, SecurityUtil.getTenantId())
+                .eq(BusConMixEntity::getType,ConstantMixEnum.anal.getValue())
+                .select(BusConMixEntity::getName));
+       return entities.stream()
+               .map(BusConMixEntity::getName)
+               .collect(Collectors.toList());
+    }
+
+    public List<String> listAnalType() {
+
+        List<BusConMixEntity> entities = baseMapper.selectList(new QueryWrapper<BusConMixEntity>().lambda()
+                .eq(BusConMixEntity::getTenantId, SecurityUtil.getTenantId())
+                .eq(BusConMixEntity::getType,ConstantMixEnum.anaesthesia.getValue())
+                .select(BusConMixEntity::getName));
+        return entities.stream()
+                .map(BusConMixEntity::getName)
+                .collect(Collectors.toList());
+    }
 }