|
@ -89,15 +89,15 @@ public class JwPrescriptionService {
|
|
|
params.add(new BasicNameValuePair("applyTimeFrom", applyTimeFrom));
|
|
|
params.add(new BasicNameValuePair("applyTimeEnd", applyTimeEnd));
|
|
|
|
|
|
// String response = httpClientUtil.post(url, params, "UTF-8");
|
|
|
|
|
|
String sql = "SELECT h.response from wlyy_http_log h WHERE h.id = 806287";
|
|
|
List<Map<String ,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
String response = list.get(0).get("response").toString();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("status",200);
|
|
|
jsonObject.put("data",response);
|
|
|
response = jsonObject.toString();
|
|
|
String response = httpClientUtil.post(url, params, "UTF-8");
|
|
|
|
|
|
// String sql = "SELECT h.response from wlyy_http_log h WHERE h.id = 806287";
|
|
|
// List<Map<String ,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
// String response = list.get(0).get("response").toString();
|
|
|
// JSONObject jsonObject = new JSONObject();
|
|
|
// jsonObject.put("status",200);
|
|
|
// jsonObject.put("data",response);
|
|
|
// response = jsonObject.toString();
|
|
|
return response;
|
|
|
}
|
|
|
|
|
@ -253,30 +253,29 @@ public class JwPrescriptionService {
|
|
|
|
|
|
Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
|
|
|
|
|
|
if(StringUtils.isBlank(prescription.getVisitNo())
|
|
|
|| StringUtils.isBlank(prescription.getRecipeNo())){
|
|
|
throw new Exception("参数错误,挂号号或者处方号卫空!");
|
|
|
}
|
|
|
|
|
|
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);
|
|
|
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("基卫接口(挂号作废)请求失败,无数据返回!");
|
|
|
}
|
|
|
}else{
|
|
|
throw new Exception("基卫接口(挂号作废)请求失败,无数据返回!");
|
|
|
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
/**
|