|
|
@@ -59,13 +59,7 @@ public class SiQueryService {
|
|
|
return ResultVoUtil.success(siPatInfo);
|
|
|
}
|
|
|
|
|
|
- public ResultVo<String> fetchPsnNo(String socialNo, String admdvs) {
|
|
|
- if (StringUtil.isBlank(socialNo)) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者的身份证不能为空,请补充!");
|
|
|
- }
|
|
|
- if (StringUtil.isBlank(admdvs)) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者的参保地区不能为空,请补充!");
|
|
|
- }
|
|
|
+ public String fetchPsnNo(String socialNo, String admdvs) {
|
|
|
JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.OBTAIN_BASIC_PERSON_INFO, admdvs);
|
|
|
JSONObject data = new JSONObject();
|
|
|
data.put("mdtrt_cert_type", MdtrtCertType.RESIDENT_IDENTITY_CARD.getCode());
|
|
|
@@ -78,20 +72,20 @@ public class SiQueryService {
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.OBTAIN_BASIC_PERSON_INFO);
|
|
|
log.info("【操作员:{}】,人员基本信息获取:\n参数:{},\n结果:{}", TokenUtil.getInstance().getTokenUserId(), input, result);
|
|
|
if (null == result) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
+ return ExceptionEnum.NETWORK_ERROR.getMessage();
|
|
|
}
|
|
|
if (null == result.getInteger(RESULT_CODE)) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
+ return "医保中心报错:" + result.getString("message");
|
|
|
}
|
|
|
if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
JSONObject output = result.getJSONObject(OUTPUT);
|
|
|
JSONObject baseinfo = output.getJSONObject("baseinfo");
|
|
|
String psnNo = baseinfo.getString("psn_no");
|
|
|
if (StringUtil.notBlank(psnNo)) {
|
|
|
- return ResultVoUtil.success(psnNo);
|
|
|
+ return "SUCCESS:" + psnNo;
|
|
|
}
|
|
|
}
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "无法查询到患者的医保个人编码。");
|
|
|
+ return "无法查询到患者的医保个人编码。";
|
|
|
}
|
|
|
|
|
|
public ResultVo<PsnBaseInfo> obtainBasicPersonInfo(QryPsnBsInfo qryPsnBsInfo) {
|