部分枚举调整
This commit is contained in:
@@ -3,11 +3,21 @@
|
||||
*/
|
||||
package com.openhis.web.outpatientservice.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
import com.openhis.common.enums.PriorityLevel;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceInitDto;
|
||||
import com.openhis.web.outpatientservice.dto.OutpatientRegistrationInitDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 门诊挂号 controller
|
||||
*/
|
||||
@@ -17,6 +27,18 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@AllArgsConstructor
|
||||
public class OutpatientRegistrationController {
|
||||
|
||||
|
||||
/**
|
||||
* 门诊挂号基础数据初始化
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> init() {
|
||||
OutpatientRegistrationInitDto outpatientRegistrationInitDto = new OutpatientRegistrationInitDto();
|
||||
// 优先级
|
||||
List<OutpatientRegistrationInitDto.priorityLevelOption> priorityLevelOptionOptions = Stream.of(PriorityLevel.values())
|
||||
.map(e -> new OutpatientRegistrationInitDto.priorityLevelOption(e.getValue(), e.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
outpatientRegistrationInitDto.setPriorityLevelOptionOptions(priorityLevelOptionOptions);
|
||||
return R.ok(outpatientRegistrationInitDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.web.outpatientservice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 门诊挂号 新增数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutpatientRegistrationAddDto {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.openhis.web.outpatientservice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 门诊挂号 init基础数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OutpatientRegistrationInitDto {
|
||||
|
||||
private List<priorityLevelOption> priorityLevelOptionOptions;
|
||||
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
@Data
|
||||
public static class priorityLevelOption {
|
||||
private Integer value;
|
||||
private String label;
|
||||
|
||||
public priorityLevelOption(Integer value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user