浏览代码

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

huangwenjie 7 年之前
父节点
当前提交
cf6a76fa1c

+ 12 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -1541,4 +1541,16 @@ public class DoctorInfoService extends BaseService {
        }
        return false;
    }
    @Transactional
    public void cancelAuthentication(String doctorCode) throws Exception{
        Doctor doctor = doctorDao.findByCode(doctorCode);
        doctor.setCheckPassword("");
        doctor.setIscertified(0);
        doctor.setCertifiedOvertime(null);
        doctorDao.save(doctor);
    }
}

+ 6 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionDispensaryCodeService.java

@ -124,14 +124,14 @@ public class PrescriptionDispensaryCodeService extends BaseService {
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        //取药类型:1 自取 2快递配送 3健管师配送
        Integer type = prescription.getDispensaryType();
        PrescriptionDispensaryCode prescriptionDispensaryCode = savePatientQRCode(token,prescriptionCode);
        PrescriptionDispensaryCode p1 = savePatientQRCode(token,prescriptionCode);
        if(type==3){
            if(prescriptionDispensaryCode!=null){
            if(p1!=null){
                prescriptionDispensaryCode = saveQRCode(prescriptionDispensaryCode.getCode(),token,prescriptionCode,2);
                if(prescriptionDispensaryCode!=null){
                    prescriptionDispensaryCode = saveQRCode(prescriptionDispensaryCode.getCode(),token,prescriptionCode,3);
                    if(prescriptionDispensaryCode==null){
                PrescriptionDispensaryCode p2 = saveQRCode(p1.getCode(),token,prescriptionCode,2);
                if(p2!=null){
                    PrescriptionDispensaryCode p3 = saveQRCode(p2.getCode(),token,prescriptionCode,3);
                    if(p3==null){
                        return false;
                    }
                }else{

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

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

+ 15 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -2012,5 +2012,20 @@ public class DoctorController extends BaseController {
                return error(-1, e.getMessage());
            }
    }
    @ApiOperation("取消认证")
    @ObserverRequired
    @ResponseBody
    @RequestMapping(value = "/cancelAuthentication", method = RequestMethod.GET)
    public String cancelAuthentication(){
        try {
            doctorInfoService.cancelAuthentication(getRepUID());
            return write(200, "取消认证成功!");
        }catch (Exception e) {
            error(e);
            return error(-1, "取消认证失败!");
        }
    }
}

+ 5 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescriptionPC/PrescriptionExpressagePCController.java

@ -1,11 +1,11 @@
package com.yihu.wlyy.web.doctor.prescriptionPC;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.service.pc.prescription.PrescriptionExpressagePCService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -27,8 +27,9 @@ public class PrescriptionExpressagePCController extends BaseController {
    public String getMedicine(
            @ApiParam(required = true, name = "code", value = "二维码(居民取药码、健管师取药码)") @RequestParam(value = "code", required = true) String code){
        try{
            JSONObject jsonObject = prescriptionExpressagePCService.getMedicine(code,"hxmD201703150111");
            return write(200, "获取信息成功!", "data", jsonObject);
            JSONObject jSONObject = prescriptionExpressagePCService.getMedicine(code,getRepUID());
//            jSONObject.toString().replace("\\","");
            return write(200, "获取信息成功!", "data", jSONObject);
        }catch (Exception e) {
            error(e);
            return error(-1, "获取信息失败!");
@ -40,7 +41,7 @@ public class PrescriptionExpressagePCController extends BaseController {
    public String fetchingMedicine(
            @ApiParam(required = true, name = "code", value = "二维码(居民取药码、健管师取药码)") @RequestParam(value = "code", required = true) String code){
        try {
            prescriptionExpressagePCService.fetchingMedicine(code, "hxmD201703150111");
            prescriptionExpressagePCService.fetchingMedicine(code, getRepUID());
            return write(200, "更改成功!");
        }catch (Exception e) {
            error(e);