|
|
@@ -1,8 +1,10 @@
|
|
|
package thyyxxk.webserver.service.yibao;
|
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
+import thyyxxk.webserver.constants.sidicts.MedType;
|
|
|
import thyyxxk.webserver.dao.his.yibao.DictionaryDao;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.dictionary.PureCodeName;
|
|
|
@@ -16,6 +18,7 @@ import java.util.List;
|
|
|
/**
|
|
|
* @author dj
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class DictionaryService {
|
|
|
private final DictionaryDao dao;
|
|
|
@@ -122,4 +125,21 @@ public class DictionaryService {
|
|
|
}
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER);
|
|
|
}
|
|
|
+
|
|
|
+ public ResultVo<List<PureCodeName>> searchYbDiag(SearchDataParam param) {
|
|
|
+ log.info("searchYbDiag: {}", param);
|
|
|
+ ResultVo<List<PureCodeName>> res;
|
|
|
+ if (param.getMedType().equals(MedType.MATERNITY_HOSPITALIZATION.getCode())) {
|
|
|
+ res = getMaternDiagsForFrontSheet(param);
|
|
|
+ } else if (param.getMedType().equals(MedType.SINGLE_DISEASE_HOSPITALIZATION.getCode())) {
|
|
|
+ res = getSingleDssForFrontSheet(param);
|
|
|
+ } else {
|
|
|
+ res = executeSearch(param);
|
|
|
+ }
|
|
|
+ if (res.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ return ResultVoUtil.success(res.getData().subList((param.getPage() - 1) * 10,
|
|
|
+ Math.min(res.getData().size(), param.getPage() * 10)));
|
|
|
+ }
|
|
|
}
|