|
@@ -9,7 +9,6 @@ import com.github.jfcloud.gene.lis.vo.DictItem;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
-import lombok.SneakyThrows;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -28,7 +27,6 @@ public class SampleCheckItemSerumController {
|
|
|
|
|
|
private final LisDb lisDb;
|
|
|
|
|
|
- @SneakyThrows
|
|
|
@Operation(summary = "获取检测指标")
|
|
|
@GetMapping("/target")
|
|
|
public R<List<DictItem>> getCheckItemTarget(@RequestParam(required = false) String name) {
|
|
@@ -38,14 +36,13 @@ public class SampleCheckItemSerumController {
|
|
|
} else {
|
|
|
sql = String.format(sql, "");
|
|
|
}
|
|
|
- List<Entity> entities = lisDb.getDb().query(sql);
|
|
|
+ List<Entity> entities = lisDb.query(sql);
|
|
|
List<DictItem> dictItems = entities.stream()
|
|
|
.map(entity -> entity.toBeanWithCamelCase(new DictItem()))
|
|
|
.collect(Collectors.toList());
|
|
|
return R.ok(dictItems);
|
|
|
}
|
|
|
|
|
|
- @SneakyThrows
|
|
|
@Operation(summary = "获取区域")
|
|
|
@GetMapping("/area")
|
|
|
public R<List<AreaItem>> getCheckItemArea(@RequestParam(required = false) String name) {
|
|
@@ -55,7 +52,7 @@ public class SampleCheckItemSerumController {
|
|
|
} else {
|
|
|
sql = String.format(sql, "");
|
|
|
}
|
|
|
- List<Entity> entities = lisDb.getDb().query(sql);
|
|
|
+ List<Entity> entities = lisDb.query(sql);
|
|
|
List<AreaItem> dictItems = entities.stream()
|
|
|
.map(entity -> entity.toBeanWithCamelCase(new AreaItem()))
|
|
|
.collect(Collectors.toList());
|