Browse Source

代码修改

yeshijie 7 năm trước cách đây
mục cha
commit
b6355275d9

+ 23 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionAdjustService.java

@ -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 {
    }
}