Browse Source

同安医院接口开发

wangjun 3 years ago
parent
commit
c3ed83f470

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

@ -11803,7 +11803,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        }
                    }
                }
                tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),"hszftx",baseNatAppointmentDO.getName());
                tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),"hszftx",baseNatAppointmentDO.getName(),baseNatAppointmentDO.getId().toString());
                logger.info("开单结束");
                returnMap.put("msg","预约成功");
                returnMap.put("status","200");

+ 6 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/TasyNatService.java

@ -4,6 +4,7 @@ package com.yihu.jw.hospital.prescription.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.sun.org.apache.regexp.internal.RE;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.base.wx.WxTemplateConfigDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
@ -469,7 +470,7 @@ public class TasyNatService {
        wlyyHttpLogDao.save(wlyyHttpLogDO);
    }
    public String sendWxtemplateMessaeg(String patient,String name,String scene){
    public String sendWxtemplateMessaeg(String patient,String name,String scene,String relationCode){
        String url="";
        String openId="";
        JSONObject key=new JSONObject();
@ -487,7 +488,7 @@ public class TasyNatService {
            if (wxTemplateConfigDO!=null&&wxTemplateConfigDO.size()>0){
                wxTemplateConfigDO1 = wxTemplateConfigDO.get(0);
            }
            url=wxTemplateConfigDO1.getUrl();
            url=wxTemplateConfigDO1.getUrl()+relationCode;
            key1.put("value",wxTemplateConfigDO1.getKeyword1().replace("key1",name));
            key1.put("color",wxTemplateConfigDO1.getKeyword6());
            key2.put("value",wxTemplateConfigDO1.getKeyword1().replace("key1",name));
@ -498,7 +499,7 @@ public class TasyNatService {
            jsonObject.put("tempateId",wxTemplateConfigDO1.getTemplateId());//
            jsonObject.put("data",key);
            jsonObject.put("openId",openId);
            jsonObject.put("url",wxTemplateConfigDO1.getUrl());
            jsonObject.put("url",url);
            logger.info("核酸检测支付成功模板消息推送param"+jsonObject.toString());
            String tmResilt= tmpPush(jsonObject);
            return tmResilt;
@ -510,7 +511,7 @@ public class TasyNatService {
            if (wxTemplateConfigDO!=null&&wxTemplateConfigDO.size()>0){
                wxTemplateConfigDO1 = wxTemplateConfigDO.get(0);
            }
            url=wxTemplateConfigDO1.getUrl();
            url=wxTemplateConfigDO1.getUrl()+relationCode;
            key1.put("value",wxTemplateConfigDO1.getKeyword1().replace("key1",name));
            key1.put("color",wxTemplateConfigDO1.getKeyword6());
            key2.put("value",wxTemplateConfigDO1.getKeyword1().replace("key1",name));
@ -521,7 +522,7 @@ public class TasyNatService {
            jsonObject.put("tempateId",wxTemplateConfigDO1.getTemplateId());//
            jsonObject.put("data",key);
            jsonObject.put("openId",openId);
            jsonObject.put("url",wxTemplateConfigDO1.getUrl());
            jsonObject.put("url",url);
            logger.info("核酸检测支付提醒模板消息推送param"+jsonObject.toString());
            String tmResilt= tmpPush(jsonObject);
            return tmResilt;

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -2314,7 +2314,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                        BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findOne(Integer.valueOf(businessOrderDO.getRelationCode()));
                        if (baseNatAppointmentDO!=null){
                            if (baseNatAppointmentDO.getPayStatus().equalsIgnoreCase("0")){
                                tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),"hszfcg",baseNatAppointmentDO.getName());
                                tasyNatService.sendWxtemplateMessaeg(baseNatAppointmentDO.getConsumer(),"hszfcg",baseNatAppointmentDO.getName(),baseNatAppointmentDO.getId().toString());
                                baseNatAppointmentDO.setPayStatus("1");
                                baseNatAppointmentDao.save(baseNatAppointmentDO);
                            }