瀏覽代碼

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/DoctorWorkTimeDao.java
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
#	gateway/ag-basic/src/main/resources/bootstrap.yml
#	svr/svr-internet-hospital/src/main/resources/application.yml
wangzhinan 4 年之前
父節點
當前提交
b4d094ab2e

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

@ -71,6 +71,7 @@ import com.yihu.jw.restmodel.hospital.prescription.*;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.jw.util.common.IdCardUtil;
@ -3486,6 +3487,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            patientDO = basePatientDao.findById(outpatientDO.getPatient());
        }
        logger.info("titelType:"+titelType+"&&remindMsg:"+remindMsg+"&&type"+type);
        String contentMsg = "";
        String first = "";
@ -6751,6 +6754,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            count = hibenateUtils.objTransformLong(total.get(0).get("total"));
        }
        Map<String, Object> map = new HashedMap();
       /* for (Map<String,Object> map1:mapList){
            String outpatientId = null;
            List<BaseDoctorHospitalDO> doctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(map1.get("doctor").toString());
            if (doctorHospitalDOS!=null&&doctorHospitalDOS.size()!=0){
                BaseDoctorHospitalDO doctorHospitalDO = doctorHospitalDOS.get(0);
            }
        }*/
        map.put("count", count);
        map.put("list", mapList);
        maps.add(map);

+ 27 - 34
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -422,42 +422,35 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			re = imService.addTeamConsult(consult, patient,doctor);
//			res = re.getInteger("status");
//			dts = re.containsKey("doctor")?re.getJSONArray("doctor"):null;
			//线上问诊支付提醒
			if (type==17||type==1){
				SystemMessageDO systemMessageDO = new SystemMessageDO();
				systemMessageDO.setTitle("支付提醒");
				systemMessageDO.setType("11");
				systemMessageDO.setSender(re.getString("doctor"));
				systemMessageDO.setSenderName(re.getString("doctorName"));
				systemMessageDO.setRelationCode(re.getString("consult"));
				systemMessageDO.setReceiver(re.getString("patient"));
				systemMessageDO.setReceiverName(re.getString("patientName"));
				net.sf.json.JSONObject data = new net.sf.json.JSONObject();
				data.put("name",re.getString("patientName"));
				data.put("age", IdCardUtil.getAgeForIdcard(re.getString("patient_idcard")));
				data.put("gender",IdCardUtil.getSexForIdcard_new(re.getString("patient_idcard")));
				data.put("question",symptoms);
                data.put("type",type);
				String msg= "";
				if (type==17){
					msg=re.getString("patientName")+",您好!您有一个视频咨询订单待支付,请及时支付。点击完成支付,如您已支付请忽略本条信息。";
					prescriptionService.sendWxTemplateMsg(wxId,"",consult,type+"","videoOrderRemind","");
				}else {
					msg=re.getString("patientName")+",您好!您有一个图文咨询订单待支付,请及时支付。点击完成支付,如您已支付请忽略本条信息。";
				}
				if (payFlag){
			if (payFlag){
				//线上问诊支付提醒
				if (type==17||type==1){
					SystemMessageDO systemMessageDO = new SystemMessageDO();
					systemMessageDO.setTitle("支付提醒");
					systemMessageDO.setType("11");
					systemMessageDO.setSender(re.getString("doctor"));
					systemMessageDO.setSenderName(re.getString("doctorName"));
					systemMessageDO.setRelationCode(re.getString("consult"));
					systemMessageDO.setReceiver(re.getString("patient"));
					systemMessageDO.setReceiverName(re.getString("patientName"));
					net.sf.json.JSONObject data = new net.sf.json.JSONObject();
					data.put("name",re.getString("patientName"));
					data.put("age", IdCardUtil.getAgeForIdcard(re.getString("patient_idcard")));
					data.put("gender",IdCardUtil.getSexForIdcard_new(re.getString("patient_idcard")));
					data.put("question",symptoms);
					data.put("type",type);
					String msg= "";
				/*	prescriptionService.sendWxTemplateMsg(wxId,"",consult,type+"","payRemind","");*/
					prescriptionService.saveInquirySystemMessage(null,consult);
					data.put("msg",msg);
					systemMessageDO.setData(data.toString());
					systemMessageService.saveMessage(systemMessageDO);
					BasePatientDO patientDO = basePatientDao.findById(patient);
					if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
						String templateMsgResult = ykyyService.pushNotificationToYktPatient(patientDO.getYktId(), systemMessageDO.getTitle(), data.get("msg").toString());
					}
				}
				data.put("msg",msg);
				systemMessageDO.setData(data.toString());
				systemMessageService.saveMessage(systemMessageDO);
				BasePatientDO patientDO = basePatientDao.findById(patient);
				if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
					String templateMsgResult = ykyyService.pushNotificationToYktPatient(patientDO.getYktId(), systemMessageDO.getTitle(), data.get("msg").toString());
				}
			}
			//发送系统消息