|
@ -60,8 +60,8 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
public JSONObject getMedicine(String code,String userCode) throws Exception{
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
Doctor doctor = doctorService.findDoctorByCode(userCode);
|
|
|
String sql = "select a.type,a.prescription_code as prescriptionCode ,c.status,b.hospital_code as hospitalCode, \n" +
|
|
|
"b.code as orderCode, b.hospital_name as hospitalName,c.dispensary_type as dispensaryType, \n" +
|
|
|
String sql = "select a.type,a.prescription_code as prescriptionCode ,c.status,b.hospital_code as hospitalCode, b.hospital_doctor as hospitalDoctor,\n" +
|
|
|
"b.code as orderCode, b.hospital_name as hospitalName,c.dispensary_type as dispensaryType,b.fetching_medicine_time as fetchingMedicineTime ,\n" +
|
|
|
"b.expressage_name as expressageName, b.expressage_code as expressageCode,b.expressage_mobile as expressageMobile,d.idcard \n" +
|
|
|
"from wlyy_prescription_dispensary_code a \n" +
|
|
|
"left join wlyy_prescription_expressage b on a.prescription_code = b.prescription_code \n" +
|
|
@ -95,6 +95,8 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
jsonObject.put("dispensaryType",result.get("dispensaryType"));
|
|
|
jsonObject.put("expressageName",result.get("expressageName"));
|
|
|
jsonObject.put("expressageMobile",result.get("expressageMobile"));
|
|
|
jsonObject.put("fetchingMedicineTime",result.get("fetchingMedicineTime"));
|
|
|
jsonObject.put("hospitalDoctor",result.get("hospitalDoctor"));
|
|
|
// return jsonObject;
|
|
|
}else{
|
|
|
List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(result.get("prescriptionCode").toString());
|
|
@ -116,7 +118,7 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
case 2:{
|
|
|
|
|
|
//判断出药机构是否与健管师所属机构一致,不一致弹窗提示:“出药机构与您所在机构不一致,无法出药,请重新确认”。一致则进入下一步。
|
|
|
if(doctor.getHospital().equals(result.get("hospitalCode").toString())){
|
|
|
if(doctor.getHospital().equals(result.get("hospitalCode")!=null?result.get("hospitalCode").toString():"")){
|
|
|
//20开方完成/待支付, 21 支付失败 , 30 支付成功/待配药 , 40配药成功/待配送 41配送失败 42分配健管师 45配送中 49配送到服务站 100配送到患者手中/已完成
|
|
|
if(status==50){
|
|
|
jsonObject.put("flag",-5);//订单正在配药中,暂时无法出药
|
|
@ -168,7 +170,7 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
jsonObject.put("status",-3);
|
|
|
//保存验证二维码的日志
|
|
|
PrescriptionLog prescriptionLog = new PrescriptionLog();
|
|
|
prescriptionLog.setCode(UUID.randomUUID().toString());
|
|
@ -180,6 +182,7 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
prescriptionLog.setUserType(2);
|
|
|
prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
|
|
|
prescriptionLog.setRemark("PC端取药码输入错误!");
|
|
|
prescriptionLogDao.save(prescriptionLog);
|
|
|
}
|
|
|
|
|
|
return jsonObject;
|
|
@ -243,6 +246,7 @@ public class PrescriptionExpressagePCService extends BaseService {
|
|
|
Doctor doctor = doctorDao.findByCode(userCode);
|
|
|
prescriptionExpressage.setHospitalDoctorCode(userCode);
|
|
|
prescriptionExpressage.setHospitalDoctor(doctor.getName());
|
|
|
prescriptionExpressage.setFetchingMedicineTime(new Date());
|
|
|
prescriptionExpressageDao.save(prescriptionExpressage);
|
|
|
}
|
|
|
}
|