|
@@ -5,7 +5,6 @@ import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import thyyxxk.webserver.config.auth.PassToken;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
-import thyyxxk.webserver.constants.ResponceType;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.dictionary.PureCodeName;
|
|
|
import thyyxxk.webserver.entity.dictionary.SearchDataParam;
|
|
@@ -56,15 +55,12 @@ public class DictionaryController {
|
|
|
@PassToken
|
|
|
@PostMapping("/searchYbDiag")
|
|
|
public ResultVo<List<PureCodeName>> searchYbDiag(@RequestBody SearchDataParam param) {
|
|
|
- if (null == param.getResponceType()) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保身份不能为空!");
|
|
|
+ ResultVo<List<PureCodeName>> res = service.executeSearch(param);
|
|
|
+ if (res.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
+ return res;
|
|
|
}
|
|
|
- if (!param.getResponceType().equals(ResponceType.NEW_RURAL_COOPERATIVE_MEDICAL_INSURANCE) && null == param.getYbType()) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保类别不能为空!");
|
|
|
- }
|
|
|
- List<PureCodeName> list = service.searchYbDiag(param);
|
|
|
int start = param.getPage() * 10;
|
|
|
int end = param.getPage() * 10 + 10;
|
|
|
- return ResultVoUtil.success(list.subList(start, Math.min(list.size(), end)));
|
|
|
+ return ResultVoUtil.success(res.getData().subList(start, Math.min(res.getData().size(), end)));
|
|
|
}
|
|
|
}
|