瀏覽代碼

眼科医生 忘记修改密码

wangjun 4 年之前
父節點
當前提交
0a58bf675d

+ 5 - 5
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -330,18 +330,18 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        String response="";
        Map headermap = new HashMap();
        headermap.put("verifyCode",vercode);
        String url = yktUrl_90+"api/Share/PasswordReset?doctorId="+doctorId+"&password="+password+"&oldpassword="+oldpassword;
        response = httpClientUtil.get(url,"GBK",headermap);
        String url = yktUrl_90+"api/share/PasswordReset?doctorId="+doctorId+"&password="+password+"&oldpassword="+oldpassword;
        logger.info("url"+url);
        response = httpClientUtil.get(url,"utf-8",headermap);
        logger.info("修改眼科同密码后的信息:"+response);
        return response;
    }
    public Boolean updateDoctorPw(String id,String pw,String orgPw){
        if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            BaseDoctorDO doctorDOs = baseDoctorDao.findById(id);
            DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(id);
            String res = "";
            if (null!=doctorDOs&&null!=doctorMappingDO){
                res =resetYktPwdByPwd(doctorDOs.getVerifyCode(),doctorMappingDO.getMappingCode(),pw,orgPw);
            if (null!=doctorDOs){
                res =resetYktPwdByPwd(doctorDOs.getYktDoctorId(),pw,orgPw,doctorDOs.getVerifyCode());
            }
            if (org.apache.commons.lang3.StringUtils.isNoneBlank(res)) {
                com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(res);

+ 67 - 48
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -1507,19 +1507,21 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                String id = (String) doctor.get("id");
                List<WlyyDoctorWorkTimeVO> times = findDoctorWorkTime(id, orgCode);
                doctor.put("workTime", times);
                String deptTyepCode = "6";
                List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(id);
                if (null!=depts&&depts.size()>0){
                    BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
                    String deptcode =  baseDoctorHospitalDO.getDeptCode();
                    String hosptitalCode = baseDoctorHospitalDO.getOrgCode();
                    List<DictHospitalDeptDO> dictHospitalDeptDO = dictHospitalDeptDao.findByOrgCodeAndCode(hosptitalCode,deptcode);
                    if(null!=dictHospitalDeptDO&&dictHospitalDeptDO.size()>0){
                        if (StringUtils.isNotBlank(dictHospitalDeptDO.get(0).getDeptTypeCode())){
                            deptTyepCode = dictHospitalDeptDO.get(0).getDeptTypeCode();
                String deptTyepCode = "";
                if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                    deptTyepCode = "6";
                    List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(id);
                    if (null!=depts&&depts.size()>0){
                        BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
                        String deptcode =  baseDoctorHospitalDO.getDeptCode();
                        String hosptitalCode = baseDoctorHospitalDO.getOrgCode();
                        List<DictHospitalDeptDO> dictHospitalDeptDO = dictHospitalDeptDao.findByOrgCodeAndCode(hosptitalCode,deptcode);
                        if(null!=dictHospitalDeptDO&&dictHospitalDeptDO.size()>0){
                            if (StringUtils.isNotBlank(dictHospitalDeptDO.get(0).getDeptTypeCode())){
                                deptTyepCode = dictHospitalDeptDO.get(0).getDeptTypeCode();
                            }
                        }
                    }
                }
                List<Map<String,Object>> chargeDictDOLists = new ArrayList<>();
                if (null!=doctor.get("chargeType")){
@ -1531,7 +1533,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                            "req_fee  as \"reqFee\",dept_type_code as \"deptTypeCode\" " +
                            " from wlyy_charge_dict where 1=1";
                    sqlCharge+=" and charge_type in ( '"+chargeTypeList+"')";
                    sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
                    if (StringUtils.isNoneBlank(deptTyepCode)){
                        sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
                    }
                    chargeDictDOLists =  hibenateUtils.createSQLQuery(sqlCharge);
                }
                doctor.put("chargeTypeList",chargeDictDOLists);
@ -1584,7 +1588,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return null;
    }
    /**
     * 查询医生列表带月份排班状态
     *
@ -3414,19 +3417,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            rs.put("popularity",doctorDO.getPopularity());
            rs.put("qrcode",doctorDO.getQrcode());
            //号别
            String deptTyepCode = "6";
            List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(doctor);
            if (null!=depts&&depts.size()>0){
                BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
                String deptcode =  baseDoctorHospitalDO.getDeptCode();
                String hosptitalCode = baseDoctorHospitalDO.getOrgCode();
                List<DictHospitalDeptDO> dictHospitalDeptDO = dictHospitalDeptDao.findByOrgCodeAndCode(hosptitalCode,deptcode);
                if(null!=dictHospitalDeptDO&&dictHospitalDeptDO.size()>0){
                    if(StringUtils.isNotBlank(dictHospitalDeptDO.get(0).getDeptTypeCode())){
                        deptTyepCode = dictHospitalDeptDO.get(0).getDeptTypeCode();
            String deptTyepCode = "";
            if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                deptTyepCode = "6";
                List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(doctor);
                if (null!=depts&&depts.size()>0){
                    BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
                    String deptcode =  baseDoctorHospitalDO.getDeptCode();
                    String hosptitalCode = baseDoctorHospitalDO.getOrgCode();
                    List<DictHospitalDeptDO> dictHospitalDeptDO = dictHospitalDeptDao.findByOrgCodeAndCode(hosptitalCode,deptcode);
                    if(null!=dictHospitalDeptDO&&dictHospitalDeptDO.size()>0){
                        if (StringUtils.isNotBlank(dictHospitalDeptDO.get(0).getDeptTypeCode())){
                            deptTyepCode = dictHospitalDeptDO.get(0).getDeptTypeCode();
                        }
                    }
                }
                }
            }
            List<Map<String,Object>> chargeDictDOLists = new ArrayList<>();
            String chargeType = doctorDO.getChargeType();
@ -3438,7 +3444,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        "req_fee  as \"reqFee\",dept_type_code as \"deptTypeCode\" " +
                        " from wlyy_charge_dict where 1=1";
                sqlCharge+=" and charge_type in ( '"+chargeType+"')";
                sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
                if (StringUtils.isNoneBlank(deptTyepCode)){
                    sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
                }
                chargeDictDOLists =  hibenateUtils.createSQLQuery(sqlCharge);
            }
            rs.put("chargeTypeList",chargeDictDOLists);
@ -3676,17 +3684,21 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            rs.put("sex",doctorDO.getSex());
            rs.put("qrcode",doctorDO.getQrcode());
            //号别
            String deptTyepCode = "6";
            List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(doctor);
            if (null!=depts&&depts.size()>0){
                BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
                String deptcode =  baseDoctorHospitalDO.getDeptCode();
                String hosptitalCode = baseDoctorHospitalDO.getOrgCode();
                List<DictHospitalDeptDO> dictHospitalDeptDO = dictHospitalDeptDao.findByOrgCodeAndCode(hosptitalCode,deptcode);
                if(null!=dictHospitalDeptDO&&dictHospitalDeptDO.size()>0){
                    if(StringUtils.isNotBlank(dictHospitalDeptDO.get(0).getDeptTypeCode())){
                        deptTyepCode = dictHospitalDeptDO.get(0).getDeptTypeCode();
            String deptTyepCode = "";
            if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                deptTyepCode = "6";
                List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(doctor);
                if (null!=depts&&depts.size()>0){
                    BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
                    String deptcode =  baseDoctorHospitalDO.getDeptCode();
                    String hosptitalCode = baseDoctorHospitalDO.getOrgCode();
                    List<DictHospitalDeptDO> dictHospitalDeptDO = dictHospitalDeptDao.findByOrgCodeAndCode(hosptitalCode,deptcode);
                    if(null!=dictHospitalDeptDO&&dictHospitalDeptDO.size()>0){
                        if (StringUtils.isNotBlank(dictHospitalDeptDO.get(0).getDeptTypeCode())){
                            deptTyepCode = dictHospitalDeptDO.get(0).getDeptTypeCode();
                        }
                    }
                }
            }
            List<Map<String,Object>> chargeDictDOLists = new ArrayList<>();
@ -3699,7 +3711,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        "req_fee  as \"reqFee\",dept_type_code as \"deptTypeCode\" " +
                        " from wlyy_charge_dict where 1=1";
                sqlCharge+=" and charge_type in ( '"+chargeType+"')";
                sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
                if(StringUtils.isNoneBlank(deptTyepCode)){
                    sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
                }
                chargeDictDOLists =  hibenateUtils.createSQLQuery(sqlCharge);
            }
            rs.put("chargeTypeList",chargeDictDOLists);
@ -5130,19 +5144,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        for (Map<String,Object> map:list){
            String doctor = map.get("id").toString();
            //号别
            String deptTyepCode = "6";
            List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(doctor);
            if (null!=depts&&depts.size()>0){
                BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
                String deptcode =  baseDoctorHospitalDO.getDeptCode();
                String hosptitalCode = baseDoctorHospitalDO.getOrgCode();
                List<DictHospitalDeptDO> dictHospitalDeptDO = dictHospitalDeptDao.findByOrgCodeAndCode(hosptitalCode,deptcode);
                if(null!=dictHospitalDeptDO&&dictHospitalDeptDO.size()>0){
                    if (StringUtils.isNotBlank(dictHospitalDeptDO.get(0).getDeptTypeCode())){
                        deptTyepCode = dictHospitalDeptDO.get(0).getDeptTypeCode();
            String deptTyepCode = "";
            if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
                deptTyepCode = "6";
                List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(doctor);
                if (null!=depts&&depts.size()>0){
                    BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
                    String deptcode =  baseDoctorHospitalDO.getDeptCode();
                    String hosptitalCode = baseDoctorHospitalDO.getOrgCode();
                    List<DictHospitalDeptDO> dictHospitalDeptDO = dictHospitalDeptDao.findByOrgCodeAndCode(hosptitalCode,deptcode);
                    if(null!=dictHospitalDeptDO&&dictHospitalDeptDO.size()>0){
                        if (StringUtils.isNotBlank(dictHospitalDeptDO.get(0).getDeptTypeCode())){
                            deptTyepCode = dictHospitalDeptDO.get(0).getDeptTypeCode();
                        }
                    }
                }
                }
            }
            List<Map<String,Object>> chargeDictDOLists = new ArrayList<>();
            if(null!=map.get("chargeType")){
@ -5154,7 +5171,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        "req_fee  as \"reqFee\",dept_type_code as \"deptTypeCode\" " +
                        " from wlyy_charge_dict where 1=1";
                sqlCharge+=" and charge_type in ( '"+chargeType+"')";
                sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
                if (StringUtils.isNoneBlank(deptTyepCode)){
                    sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
                }
                chargeDictDOLists =  hibenateUtils.createSQLQuery(sqlCharge);
            }
            map.put("chargeTypeList",chargeDictDOLists);

+ 17 - 7
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -2226,17 +2226,21 @@ public class ImService {
					"left join wlyy_outpatient op on  a.relation_code = op.id " +
					"WHERE a.id=b.consult " +
					"AND op.patient=d.id ";
			if(status ==-1){
				sql +=" and op.status = -1 ";
			}//候诊中
			else if(status ==1){
				sql +=" and op.status = 0 ";
			}
		}
		if (org.apache.commons.lang.StringUtils.isNotBlank(doctor)){
			sql+=" AND b.doctor='"+doctor+"' ";
		}
		
		if(!StringUtils.isEmpty(title)){
			title="%"+title+"%";
			sql +=" and a.symptoms like '"+title+"'";
		}
		
            title="%"+title+"%";
            sql +=" and a.symptoms like '"+title+"'";
        }
		if(!StringUtils.isEmpty(start_time)){
			if("xm_ykyy_wx".equals(wxId)){
				if (flag){
@ -2273,7 +2277,8 @@ public class ImService {
				sql +=" and b.status = 0 ";
			}else if(status ==3 ){
				sql +=" and b.status = 1 ";
			}else{}
			}
			else{}
			
		}
		
@ -2427,7 +2432,12 @@ public class ImService {
					"left join wlyy_outpatient op on  a.relation_code = op.id " +
					"WHERE a.id=b.consult " +
					"AND b.patient=d.id ";
			if(status ==-1){
				sql +=" and op.status = -1 ";
			}//候诊中
			else if(status ==1){
				sql +=" and op.status = 0 ";
			}
		}
		if (org.apache.commons.lang.StringUtils.isNotBlank(doctor)){
			sql+=" AND b.doctor='"+doctor+"' ";

+ 13 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java

@ -252,6 +252,19 @@ public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
     *身份验证秘钥
     */
    private String verifyCode;
    /**
     *眼科同医生id
     */
    private String yktDoctorId;
    @Column(name = "YKT_DOCTOR_ID")
    public String getYktDoctorId() {
        return yktDoctorId;
    }
    public void setYktDoctorId(String yktDoctorId) {
        this.yktDoctorId = yktDoctorId;
    }
    @Column(name = "verify_code")
    public String getVerifyCode() {
        return verifyCode;

+ 58 - 26
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -521,11 +521,12 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    }
    //眼科医院短信验证码
    @RequestMapping(value = "/oauth/sendYKCaptcha", method = RequestMethod.GET)
        @RequestMapping(value = "/oauth/sendYKCaptcha", method = RequestMethod.GET)
    public ResponseEntity<Oauth2Envelop<Captcha>> sendYKCaptcha(@RequestParam Map<String, String> parameters) throws Exception {
        String client_id = parameters.get("client_id");
        String username = parameters.get("username");
        String type = parameters.get("type");
        String isDoctor = parameters.get("isDoctor");
        if (StringUtils.isEmpty(client_id)) {
            throw new InvalidRequestException("client_id");
        }
@ -536,31 +537,60 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        if (!wlyyRedisVerifyCodeService.isIntervalTimeout(client_id, username)) {
            throw new IllegalAccessException("SMS request frequency is too fast");
        }
        //发送短信获取验证码
        String captcha = wlyyRedisVerifyCodeService.getCodeNumber();
        ResultMsg result= null;
        if(StringUtils.isEmpty(type)){
            result =  ykyySMSService.ykyySendSMS(username,"您好,您的手机登录短信验证码是:"+captcha+",5分钟内有效。");
        }else if("1".equals(type)){
            result = ykyySMSService.ykyySendSMS(username,"您好,您的手机登录短信验证码是:"+captcha+",5分钟内有效。");
        }else if("2".equals(type)){
            result = ykyySMSService.ykyySendSMS(username,"您好,您正在进行找回密码操作,您的短信验证码是:"+captcha+",请勿将验证码告诉他人,5分钟内有效。");
        if ("1".equalsIgnoreCase(isDoctor)){
            String res = ykyyService.getResetCode("4",username);
            String resltCode ="";
            String captcha = "";
            if (!StringUtils.isEmpty(res)){
                JSONObject jsonObject = JSONObject.parseObject(res);
                if ("10000".equalsIgnoreCase(jsonObject.getString("code"))){
                    captcha = jsonObject.getString("value");
                    resltCode = jsonObject.getString("code");
                }
            }
            if ("10000".equalsIgnoreCase(resltCode)) {
                Captcha _captcha = new Captcha();
                _captcha.setCode(captcha);
                _captcha.setExpiresIn(300);
                wlyyRedisVerifyCodeService.store(client_id, username, captcha, 300);
                Oauth2Envelop<Captcha> oauth2Envelop = new Oauth2Envelop<>("captcha", 200, _captcha);
                HttpHeaders headers = new HttpHeaders();
                headers.set("Cache-Control", "no-store");
                headers.set("Pragma", "no-cache");
                return new ResponseEntity<>(oauth2Envelop, headers, HttpStatus.OK);
            }
            throw new IllegalStateException("验证码发送失败!");
        }else {
            //发送短信获取验证码
            String captcha = wlyyRedisVerifyCodeService.getCodeNumber();
            ResultMsg result= null;
            if(StringUtils.isEmpty(type)){
                result =  ykyySMSService.ykyySendSMS(username,"您好,您的手机登录短信验证码是:"+captcha+",5分钟内有效。");
            }else if("1".equals(type)){
                result = ykyySMSService.ykyySendSMS(username,"您好,您的手机登录短信验证码是:"+captcha+",5分钟内有效。");
            }else if("2".equals(type)) {
                result = ykyySMSService.ykyySendSMS(username, "您好,您正在进行找回密码操作,您的短信验证码是:" + captcha + ",请勿将验证码告诉他人,5分钟内有效。");
             }
            if (result.isSuccess()) {
                Captcha _captcha = new Captcha();
                _captcha.setCode(captcha);
                _captcha.setExpiresIn(300);
                wlyyRedisVerifyCodeService.store(client_id, username, captcha, 300);
                Oauth2Envelop<Captcha> oauth2Envelop = new Oauth2Envelop<>("captcha", 200, _captcha);
                HttpHeaders headers = new HttpHeaders();
                headers.set("Cache-Control", "no-store");
                headers.set("Pragma", "no-cache");
                return new ResponseEntity<>(oauth2Envelop, headers, HttpStatus.OK);
            }
            throw new IllegalStateException("验证码发送失败!");
        }
        if (result.isSuccess()) {
            Captcha _captcha = new Captcha();
            _captcha.setCode(captcha);
            _captcha.setExpiresIn(300);
            wlyyRedisVerifyCodeService.store(client_id, username, captcha, 300);
            Oauth2Envelop<Captcha> oauth2Envelop = new Oauth2Envelop<>("captcha", 200, _captcha);
            HttpHeaders headers = new HttpHeaders();
            headers.set("Cache-Control", "no-store");
            headers.set("Pragma", "no-cache");
            return new ResponseEntity<>(oauth2Envelop, headers, HttpStatus.OK);
        }
        throw new IllegalStateException("验证码发送失败!");
    }
    /**
@ -1390,10 +1420,10 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                if (object.getString("code").equalsIgnoreCase("10000")){
                    return ObjEnvelop.getSuccess("修改成功!");
                }else {
                    return ObjEnvelop.getSuccess("修改失败!");
                    return ObjEnvelop.getError("修改失败!");
                }
            }else {
                return ObjEnvelop.getSuccess("修改失败!");
                return ObjEnvelop.getError("修改失败!");
            }
        }else if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
            if (wlyyRedisVerifyCodeService.verification(client_id, mobile, captcha)) {
@ -1694,6 +1724,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            if (parameters.get("password") != null) {
                KeyPair keyPair = (KeyPair) httpSession.getAttribute("privateKey");
                String password = com.yihu.jw.security.utils.RSAUtils.decryptBase64(parameters.get("password"), keyPair);
                logger.info("password:"+password);
                String response = ykyyService.DoctorLogin(parameters.get("username"),password);
                if (!StringUtils.isEmpty(response)){
                    JSONObject object = JSONObject.parseObject(response);
@ -1706,10 +1737,11 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                        if (jsonObject!=null) {
                            String idCard = jsonObject.getString("idCard");
                            String verifyCode = jsonObject.getString("verifyCode");
                            String yktDoctorId= jsonObject.getString("id");
                            if (idCard==null||idCard==""){
                                logger.info("身份证为空");
                            }else {
                                ykyyService.updateYkyyDoctor(idCard,verifyCode);
                                ykyyService.updateYkyyDoctor(idCard,verifyCode,yktDoctorId);
                            }
                        }
                    }

+ 4 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/service/YkyyService.java

@ -153,7 +153,7 @@ public class YkyyService {
        String veryCode = "";
        if (StringUtils.isNoneBlank(codeResponse)){
            JSONObject jsonObject = JSONObject.parseObject(codeResponse);
            if ("1000".equalsIgnoreCase(jsonObject.getString("code"))){
            if ("10000".equalsIgnoreCase(jsonObject.getString("code"))){
                veryCode =  jsonObject.getString("value");
            }
        }
@ -403,7 +403,7 @@ public class YkyyService {
    }
    public String updateYkyyDoctor(String idCard,String verifyCode)throws Exception{
    public String updateYkyyDoctor(String idCard,String verifyCode,String yktDoctorId)throws Exception{
        String sql ="select y.code AS \"code\",y.name AS \"name\",y.expertise AS \"expertise\",y.introduce AS \"introduce\",y.mobile AS \"mobile\",y.idCard AS \"idcard\",y.jobtitlecode AS \"jobTitleCode\",y.jobTitleName AS \"jobTitleName\",y.dept AS \"dept\",y.deptName AS \"deptName\" from v_Hlw_Ysxx y where y.idcard is not null";
        sql +=" and y.idcard ='"+idCard+"' ";
        Map<String,Object> params = new HashedMap();
@ -438,6 +438,7 @@ public class YkyyService {
                            doctor.setJobTitleCode(doctorJson.getString("jobtitlecode"));
                            doctor.setJobTitleName(doctorJson.getString("jobTitleName"));
                            doctor.setVerifyCode(verifyCode);
                            doctor.setYktDoctorId(yktDoctorId);
//                            doctor.setExpertise(doctorJson.getString("expertise"));
//                            doctor.setIntroduce(doctorJson.getString("introduce"));
//                            doctor.setMobile(doctorJson.getString("mobile"));
@ -471,6 +472,7 @@ public class YkyyService {
                            doctor.setCityCode("350200");
                            doctor.setCityName("厦门市");
                            doctor.setVerifyCode(verifyCode);
                            doctor.setYktDoctorId(yktDoctorId);
//                            doctor.setExpertise(doctorJson.getString("expertise"));
//                            doctor.setIntroduce(doctorJson.getString("introduce"));
//                            doctor.setMobile(doctorJson.getString("mobile"));

+ 16 - 0
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/TimeoutOverDueService.java

@ -1,5 +1,7 @@
package com.yihu.jw.service.channel;
import com.yihu.jw.entity.base.im.ConsultDo;
import com.yihu.jw.entity.base.im.ConsultTeamDo;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalWaitingRoomDO;
import com.yihu.jw.entity.hospital.doctor.WlyyPatientRegisterTimeDO;
@ -16,6 +18,8 @@ import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
import com.yihu.jw.hospital.prescription.service.PrescriptionLogService;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
import com.yihu.jw.im.dao.ConsultDao;
import com.yihu.jw.im.dao.ConsultTeamDao;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.order.dao.BusinessOrderDao;
@ -72,6 +76,10 @@ public class TimeoutOverDueService {
    private PrescriptionService prescriptionService;
    @Autowired
    private SystemMessageService systemMessageService;
    @Autowired
    private ConsultTeamDao consultTeamDao;
    @Autowired
    private ConsultDao consultDao;
    /**
     *  取消未结束门诊
     */
@ -89,6 +97,14 @@ public class TimeoutOverDueService {
                        if (currentTime-outpatientTime>24*60*60*1000){
                            logger.info("时间满足条件");
                            String outPatientId = wlyyOutpatientDO.getId();
                            ConsultDo consultDo = consultDao.findByRelationCode(outPatientId);
                            if (null!=consultDo){
                                ConsultTeamDo consultTeamDo = consultTeamDao.findByConsult(consultDo.getId());
                                if (null!=consultTeamDo){
                                    consultTeamDo.setStatus(-1);
                                    consultTeamDao.save(consultTeamDo);
                                }
                            }
                            //判断医生是否接诊
                            List<WlyyHospitalWaitingRoomDO> roomDOs = hospitalWaitingRoomDao.findByOutpatientId(outPatientId);
                            if (roomDOs != null && roomDOs.size() > 0) {

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -677,9 +677,9 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
					if (consultDo!=null){
						int resutl = imService.finish(consultDo.getId(),doctor,2);
						if (resutl!=-1){
							logger.info("结束咨询成功!");
						}
						logger.info("结束咨询成功!");
					}
				}
					String immsg = imService.sendOutPatientCancle(patientName,patientCode,doctor,cancelRemark,cancelValue,outPatientId);
					System.out.println("发送拒绝接诊消息成功:"+immsg);
				}