|
@ -253,29 +253,30 @@ public class JwPrescriptionService {
|
|
|
|
|
|
Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
|
|
|
|
|
|
if(StringUtils.isNotBlank(prescription.getVisitNo())){
|
|
|
String url = jwUrl + "/third/prescription/fadeRecipe";
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
params.add(new BasicNameValuePair("visitNo", prescription.getVisitNo()));//挂号号
|
|
|
params.add(new BasicNameValuePair("fadeDept", prescription.getJwDeptCode()));//作废科室编码
|
|
|
params.add(new BasicNameValuePair("fadeOperator", prescription.getJwDoctorCode()));//作废人员编码
|
|
|
params.add(new BasicNameValuePair("recipeNo", prescription.getRecipeNo()));//基卫处方号
|
|
|
String response = httpClientUtil.post(url, params, "UTF-8");
|
|
|
if(StringUtils.isNotBlank(response)){
|
|
|
JSONObject reobj = JSON.parseObject(response);
|
|
|
Integer status = reobj.getInteger("status");
|
|
|
String errmsg = reobj.getString("msg");
|
|
|
if(-1 == status){
|
|
|
throw new Exception("基卫接口(挂号作废)请求失败,"+errmsg);
|
|
|
}
|
|
|
}else{
|
|
|
throw new Exception("基卫接口(挂号作废)请求失败,无数据返回!");
|
|
|
}
|
|
|
if(StringUtils.isBlank(prescription.getVisitNo())
|
|
|
|| StringUtils.isBlank(prescription.getRecipeNo())){
|
|
|
throw new Exception("参数错误,挂号号或者处方号卫空!");
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
String url = jwUrl + "/third/prescription/fadeRecipe";
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
params.add(new BasicNameValuePair("visitNo", prescription.getVisitNo()));//挂号号
|
|
|
params.add(new BasicNameValuePair("fadeDept", prescription.getJwDeptCode()));//作废科室编码
|
|
|
params.add(new BasicNameValuePair("fadeOperator", prescription.getJwDoctorCode()));//作废人员编码
|
|
|
params.add(new BasicNameValuePair("recipeNo", prescription.getRecipeNo()));//基卫处方号
|
|
|
String response = httpClientUtil.post(url, params, "UTF-8");
|
|
|
if(StringUtils.isNotBlank(response)){
|
|
|
JSONObject reobj = JSON.parseObject(response);
|
|
|
Integer status = reobj.getInteger("status");
|
|
|
String errmsg = reobj.getString("msg");
|
|
|
if(0 != status){
|
|
|
throw new Exception("基卫接口(挂号作废)请求失败,"+errmsg);
|
|
|
}
|
|
|
}else{
|
|
|
throw new Exception("基卫接口(挂号作废)请求失败,无数据返回!");
|
|
|
}
|
|
|
|
|
|
return "";
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/**
|