wangzhinan пре 3 година
родитељ
комит
8852c6cd1a

+ 4 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -1736,7 +1736,7 @@ public class YkyyEntranceService {
                "FROM\n" +
                "\tV_ZKSG_BRCX x\n" +
                "WHERE\n" +
                "\tx.jzkh = '"+ssc+"' and x.sfzh ='"+idcard+"'";
                "\t(x.jzkh = '"+ssc+"' or x.MZHM='"+ssc+"') and x.sfzh ='"+idcard+"'";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
@ -2486,8 +2486,9 @@ public class YkyyEntranceService {
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
        BasePatientDO patientDO = basePatientDao.findById(patient);
        PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patient,"1");
        if (patientMedicareCardDO==null){
            patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_02",patient,"1");
        }
        Integer GHXH = 0;
        //挂号明细表HLW_GHMX
        HlwGhmxDO hlwGhmxDO = new HlwGhmxDO();

+ 3 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -889,7 +889,9 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
    public void updateOpenIdAndWechatId(String openid, String userId,String wechatId) {
        List<BasePatientWechatDo> patientWechatDos = basePatientWechatDao.findByWechatIdAndPatientId(wechatId,userId);
        if (patientWechatDos!=null&&patientWechatDos.size()!=0){
            this.getJdbcTemplate().update("update base_patient_wechat p set p.openid = ? where p.patient_id= ? and p.wechat_id= ? ", openid, userId,wechatId);
            BasePatientWechatDo basePatientWechatDo = patientWechatDos.get(0);
            basePatientWechatDo.setOpenid(openid);
            basePatientWechatDao.save(basePatientWechatDo);
        }else {
            BasePatientWechatDo basePatientWechatDo=new BasePatientWechatDo();
            basePatientWechatDo.setCreateTime(new Date());
@ -898,7 +900,6 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
            basePatientWechatDo.setWechatId(wechatId);
            basePatientWechatDao.save(basePatientWechatDo);
        }
    }
    public String getSynPath(String wxId){

+ 24 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/YkyyPrescriptionEndpoint.java

@ -1,10 +1,13 @@
package com.yihu.jw.hospital.endpoint.prescription;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.YkyyPrescriptionService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.hospital.service.SystemMessage.HospitalSystemMessageService;
import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
@ -15,6 +18,7 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
@ -32,11 +36,17 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private YkyyPrescriptionService prescriptionService;
    @Autowired
    private PrescriptionService sysPrescriptionService;
    @Autowired
    private YkyyEntranceService ykyyEntranceService;
    @Autowired
    private BusinessOrderService businessOrderService;
    @Autowired
    private PrescriptionService commenPrescriptionService;
    @Autowired
    private HospitalSystemMessageService hospitalSystemMessageService;
    @Autowired
    private BaseDoctorDao doctorDao;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -221,7 +231,20 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
                return objEnvelop;
            }
           /* SystemMessageDO systemMessageDO = commenPrescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);*/
            if (wlyyOutpatientDO.getPayStatus() != null && wlyyOutpatientDO.getPayStatus() == 1) {
                //发送系统消息
                SystemMessageDO systemMessageDO = sysPrescriptionService.sendOutPatientMes(wlyyOutpatientDO, payFlag);
                //发送IM消息
                hospitalSystemMessageService.sendImMessage(systemMessageDO);
            }
            //发送医生抢单消息
            if (StringUtils.isBlank(wlyyOutpatientDO.getDoctor())) {
                hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
            }
          /*SystemMessageDO systemMessageDO = commenPrescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);*/
       /* //发送系统消息
        SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO);
        //发送IM消息