|
@ -1,5 +1,6 @@
|
|
|
package com.yihu.wlyy.service.app.prescription;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
|
|
@ -34,6 +35,28 @@ public class PrescriptionAdjustService extends BaseService {
|
|
|
JSONObject json = JSONObject.parseObject(response);
|
|
|
if(json.getInteger("status")==200){
|
|
|
JSONObject data = json.getJSONObject("data");
|
|
|
String zyCode = data.getString("CODE");
|
|
|
if("1".equals(zyCode)){
|
|
|
JSONArray returnData = data.getJSONArray("returnData");
|
|
|
if(returnData.size()>0){
|
|
|
JSONObject pre = returnData.getJSONArray(0).getJSONObject(0);
|
|
|
String visitNo = pre.getString("VISIT_NO");
|
|
|
String recipeNo = pre.getString("RECIPE_NO");
|
|
|
prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.changeing.getValue());
|
|
|
prescription.setVisitNo(visitNo);
|
|
|
prescription.setRecipeNo(recipeNo);
|
|
|
prescriptionDao.save(prescription);
|
|
|
|
|
|
//添加日志
|
|
|
|
|
|
|
|
|
}else {
|
|
|
//请求失败
|
|
|
}
|
|
|
}else {
|
|
|
//调整请求失败
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
//请求报错
|
|
@ -46,6 +69,4 @@ public class PrescriptionAdjustService extends BaseService {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|