|
@ -1,5 +1,7 @@
|
|
|
package com.yihu.wlyy.service.pc.prescription;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.*;
|
|
@ -11,11 +13,11 @@ import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
|
|
|
import com.yihu.wlyy.service.common.account.DoctorService;
|
|
|
import com.yihu.wlyy.service.common.account.RoleService;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springside.modules.mapper.JsonMapper;
|
|
|
|
|
|
import java.beans.Transient;
|
|
|
import java.util.Date;
|
|
@ -79,8 +81,11 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
if(status==50){
|
|
|
jsonObject.put("status",-5);//订单正在配药中,暂时无法出药
|
|
|
}else if(status==60){
|
|
|
jsonObject.put("flag",1);
|
|
|
List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(result.get("prescriptionCode").toString());
|
|
|
// jsonObject = new JSONObject(result);
|
|
|
// jsonObject = JSONObject.fromObject(result);
|
|
|
jsonObject.put("prescriptionInfoList",list);
|
|
|
jsonObject.put("flag",1);
|
|
|
jsonObject.put("prescriptionInfoList",list);
|
|
|
jsonObject.put("idcard",result.get("idcard"));
|
|
|
jsonObject.put("orderCode",result.get("orderCode"));
|
|
@ -90,9 +95,11 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
jsonObject.put("dispensaryType",result.get("dispensaryType"));
|
|
|
jsonObject.put("expressageName",result.get("expressageName"));
|
|
|
jsonObject.put("expressageMobile",result.get("expressageMobile"));
|
|
|
// return jsonObject;
|
|
|
}else{
|
|
|
jsonObject.put("flag",-6);//”订单已取药,出药人:张三,出药时间:XXXX-XX-XX,无法重新出药
|
|
|
List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(result.get("prescriptionCode").toString());
|
|
|
// jsonObject = new JSONObject(result);
|
|
|
jsonObject.put("flag",-6);//”订单已取药,出药人:张三,出药时间:XXXX-XX-XX,无法重新出药
|
|
|
jsonObject.put("prescriptionInfoList",list);
|
|
|
jsonObject.put("idcard",result.get("idcard"));
|
|
|
jsonObject.put("orderCode",result.get("orderCode"));
|
|
@ -103,6 +110,7 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
jsonObject.put("expressageName",result.get("expressageName"));
|
|
|
jsonObject.put("expressageMobile",result.get("expressageMobile"));
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
//健管师取药码
|
|
|
case 2:{
|
|
@ -113,6 +121,7 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
if(status==50){
|
|
|
jsonObject.put("flag",-5);//订单正在配药中,暂时无法出药
|
|
|
}else if(status==60){
|
|
|
// jsonObject = new JSONObject(result);
|
|
|
jsonObject.put("flag",1);
|
|
|
List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(result.get("prescriptionCode").toString());
|
|
|
jsonObject.put("prescriptionInfoList",list);
|
|
@ -125,6 +134,7 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
jsonObject.put("expressageName",result.get("expressageName"));
|
|
|
jsonObject.put("expressageMobile",result.get("expressageMobile"));
|
|
|
}else{
|
|
|
// jsonObject = new JSONObject(result);
|
|
|
jsonObject.put("flag",-6);//”订单已取药,出药人:张三,出药时间:XXXX-XX-XX,无法重新出药
|
|
|
List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(result.get("prescriptionCode").toString());
|
|
|
jsonObject.put("prescriptionInfoList",list);
|
|
@ -140,6 +150,7 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
}else{
|
|
|
jsonObject.put("flag",-4);//出药机构与您所在机构不一致,无法出药,请重新确认
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
default:{
|
|
|
PrescriptionLog prescriptionLog = new PrescriptionLog();
|