Explorar el Código

update:修改病区查询

zhouzeyu hace 8 meses
padre
commit
1e9113379a

+ 7 - 3
nb-service/web-service/src/main/java/com/nb/web/service/bus/service/constant/LocalBusConMixService.java

@@ -16,6 +16,7 @@ import org.springframework.dao.DuplicateKeyException;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @author lifang
@@ -134,10 +135,13 @@ public class LocalBusConMixService extends AbstractConstantService<BusConMixMapp
         }
     }
 
-    public List<BusConMixEntity> listWard() {
-        return  baseMapper.selectList(new QueryWrapper<BusConMixEntity>().lambda()
+    public List<String> listWard() {
+        List<BusConMixEntity> entities = baseMapper.selectList(new QueryWrapper<BusConMixEntity>().lambda()
                 .eq(BusConMixEntity::getTenantId, SecurityUtil.getTenantId())
-                .eq(BusConMixEntity::getType,ConstantMixEnum.ward.getValue())
+                .eq(BusConMixEntity::getType, ConstantMixEnum.ward.getValue())
                 .select(BusConMixEntity::getName));
+        return entities.stream()
+                .map(BusConMixEntity::getName)
+                .collect(Collectors.toList());
     }
 }