ソースを参照

修改PC端bug

liuwenbin 7 年 前
コミット
137eb412e1

+ 9 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionExpressage.java

@ -47,6 +47,7 @@ public class PrescriptionExpressage extends IdEntity{
    private String hospitalCode;            // 配药机构code
    private String hospitalDoctor;          // 配药机构出药人(健管师或者称工作人员)
    private String hospitalDoctorCode;     // 配药机构出药人code
    private Date fetchingMedicineTime;    //配药机构出药时间
    //配送人信息
    private String expressageHospitalName;            // 如果配送方式是健管师那么这个字段存服务站名称,如果是快递配送那么是快递公司名称
@ -406,4 +407,12 @@ public class PrescriptionExpressage extends IdEntity{
    public void setHospitalDoctorCode(String hospitalDoctorCode) {
        this.hospitalDoctorCode = hospitalDoctorCode;
    }
    public Date getFetchingMedicineTime() {
        return fetchingMedicineTime;
    }
    public void setFetchingMedicineTime(Date fetchingMedicineTime) {
        this.fetchingMedicineTime = fetchingMedicineTime;
    }
}

+ 8 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/pc/prescription/PrescriptionExpressagePCService.java

@ -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);
    }
}