浏览代码

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

wangzhinan 4 年之前
父节点
当前提交
8b8452e12f

+ 10 - 0
common/common-util/src/main/java/com/yihu/jw/util/date/DateUtil.java

@ -72,6 +72,16 @@ public class DateUtil {
        return formatter.format(date);
    }
    public static String dateToChineseDate(Date date) {
        SimpleDateFormat formatter =   new SimpleDateFormat( "yyyy年MM月dd日", Locale.CHINA);
        return formatter.format(date);
    }
    public static String dateToChineseTime(Date date) {
        SimpleDateFormat formatter =   new SimpleDateFormat( "yyyy年MM月dd日 hh:mm:ss", Locale.CHINA);
        return formatter.format(date);
    }
    public static Date getNight23(){
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.HOUR_OF_DAY,22);

+ 45 - 37
svr/svr-door-serivce/pom.xml

@ -150,6 +150,10 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-entity-es</artifactId>
        </dependency>
        <!-- redis end  -->
    </dependencies>
@ -157,13 +161,30 @@
    <build>
        <finalName>svr-door-service</finalName>
        <plugins>
            <!-- 分离lib -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <!-- 是否要把第三方jar加入到类构建路径 -->
                            <addClasspath>true</addClasspath>
                            <!-- 外部依赖jar包的最终位置 -->
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.yihu.SvrDoorServiceApplication</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <!--拷贝依赖到jar外面的lib目录-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <id>copy-lib</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
@ -178,56 +199,43 @@
                    </execution>
                </executions>
            </plugin>
            <!-- copy资源文件 -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                            <outputDirectory>${project.build.directory}/resources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- 打jar包时忽略配置文件 -->
            <!--指定配置文件,将resources打成外部resource-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- 指定配置文件目录,这样jar运行时会去找到同目录下的resources文件夹下查找 -->
                        <manifestEntries>
                            <Class-Path>resources/</Class-Path>
                        </manifestEntries>
                    </archive>
                    <!-- 打包时忽略的文件(也就是不打进jar包里的文件) -->
                    <excludes>
                        <exclude>**/*.yml</exclude>
                        <exclude>**/*.xml</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- spring boot repackage -->
            <!-- 拷贝资源文件 外面的resource目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <layout>ZIP</layout>
                    <includes>
                        <include>
                            <groupId>non-exists</groupId>
                            <artifactId>non-exists</artifactId>
                        </include>
                    </includes>
                </configuration>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>repackage</goal>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <!-- 资源文件输出目录 -->
                            <outputDirectory>${project.build.directory}/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

+ 19 - 0
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/doctor/DoorOrderController.java

@ -1377,4 +1377,23 @@ public class DoorOrderController extends BaseController {
        return null;
    }
    @ApiOperation("医生修改上门服务项")
    @RequestMapping(value = "updServiceItems" , method = RequestMethod.POST)
    public String updServiceItems(   @ApiParam(value = "医生code", name = "doctor")
                                         @RequestParam(value = "doctor", required = true) String doctor,
                                         @ApiParam(value = "工单id", name = "orderId")
                                         @RequestParam(value = "orderId", required = false) String orderId,
                                         @ApiParam(name = "level", value = "医院等级,1.三级医院,2.二级医院,3.一级及以下")
                                         @RequestParam(value = "level",required = true)Integer level ){
        try {
            return write(200, "修改成功", "data", "");
        }catch (Exception e){
            e.printStackTrace();
        }
        return write(-1,"修改失败");
    }
}

+ 6 - 4
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/controller/patient/WlyyDoorServiceOrderController.java

@ -75,7 +75,7 @@ public class WlyyDoorServiceOrderController extends EnvelopRestEndpoint {
        if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
            return failed(result.getString(ResponseContant.resultMsg));
        }
        return success(result.get(ResponseContant.resultMsg));
        return success(result);
    }
    @PostMapping(value = "delete")
@ -319,11 +319,13 @@ public class WlyyDoorServiceOrderController extends EnvelopRestEndpoint {
    @PostMapping(value = "payServiceItemFees")
    @ApiOperation("付服务项费用")
    public Envelop payServiceItemFees(@ApiParam(name = "ids", value = "订单id",required = true)
    public Envelop payServiceItemFees(@ApiParam(name = "orderId", value = "订单id",required = true)
                                          @RequestParam String orderId,
                                      @ApiParam(name = "ids", value = "订单id",required = true)
                                      @RequestParam String[] ids) {
        try {
            wlyyDoorServiceOrderService.payServiceItemFees(ids);
            return success();
            JSONObject json = wlyyDoorServiceOrderService.payServiceItemFees(ids,orderId);
            return success(json);
        } catch (Exception e) {
            return failed(e.getMessage());
        }

+ 20 - 4
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorOrderService.java

@ -301,7 +301,7 @@ public class DoorOrderService {
     * @return
     */
    public List<Map<String, Object>> getDoorFeeDetailGroupByStatus(String orderId) {
        String sql = "SELECT d.id, d.status,d.name,d.code,sum(d.number) num,fee,sum(d.number)*fee sum from wlyy_door_fee_detail d where order_id=? and type=1 GROUP BY status,code";
        String sql = "SELECT d.id, d.status, d.pay_status payStatus,d.name,d.code,sum(d.number) num,fee,sum(d.number)*fee sum from wlyy_door_fee_detail d where order_id=? and type=1 GROUP BY status,code";
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, orderId);
        return list;
    }
@ -605,7 +605,7 @@ public class DoorOrderService {
            String first = "key1,您好!您的上门预约服务已由【key2】医生接单了";
            first = first.replace("key1",(patient.getName()==null?"":patient.getName()));
            first = first.replace("key2", null != doorServiceOrder.getDoctorName() ? doorServiceOrder.getDoctorName() : "");
            messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","smyyyjjd",patient.getOpenid(),first,null,null,30,json,DateUtil.dateToStrShort(new Date()),"上门服务已接单");
            messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","smyyyjjd",patient.getOpenid(),first,null,null,30,json,DateUtil.dateToChineseDate(new Date()),"上门服务已接单");
        }catch (Exception e){
            e.printStackTrace();
            logger.error(e.getMessage());
@ -1044,7 +1044,7 @@ public class DoorOrderService {
                json.put("finish",finish);
            }
            String first="key1预约上门服务医生已完成服务。为提高服务质量,诚邀您对本次服务医生进行评分".replace("key1", DateUtil.dateToStr(new Date(), "yyyy-MM-dd HH:mm"));
            messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),first,null,null,31,json,DateUtil.dateToStrShort(new Date()),"服务医生评分");
            messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),first,null,null,31,json,DateUtil.dateToChineseDate(new Date()),"服务医生评分");
        }catch (Exception e){
            logger.error(e.getMessage());
@ -1103,7 +1103,7 @@ public class DoorOrderService {
                json.put("finish",finish);
            }
            String first="key1预约上门服务医生已完成服务。为提高服务质量,诚邀您对本次服务医生进行评分".replace("key1", DateUtil.dateToStr(new Date(), "yyyy-MM-dd HH:mm"));
            messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),first,null,null,31,json,DateUtil.dateToStrShort(new Date()),"服务医生评分");
            messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),first,null,null,31,json,DateUtil.dateToChineseDate(new Date()),"服务医生评分");
        }catch (Exception e){
            logger.error(e.getMessage());
        }
@ -1737,4 +1737,20 @@ public class DoorOrderService {
       List<Map<String,Object>> list = jdbcTemplate.queryForList(sqlList+sql);
        return list;
   }
    /**
     *
     * @param openId
     * @param patientName
     * @param deptName
     * @param payTypeName
     * @param doctorName
     * @param orderId
     */
   public void putTemplateTobePay(String openId,String patientName,String deptName,String payTypeName,String doctorName,String orderId){
        JSONObject json = new JSONObject();
       json.put("orderId",orderId);
       messageUtil.putTemplateWxMessage(wxId,"template_to_be_pay","smfwqrfk",openId,DateUtil.dateToStr(new Date(), "yyyy/MM/dd HH:mm"),null,null,35,json,patientName,deptName,payTypeName,doctorName,DateUtil.dateToChineseTime(new Date()));
   }
}

+ 8 - 25
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/DoorServiceApplicationService.java

@ -21,6 +21,7 @@ import com.yihu.jw.wechat.dao.WxTemplateConfigDao;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.jsoup.helper.DataUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
@ -584,11 +585,11 @@ public class DoorServiceApplicationService {
        if(null!=wlyyDoorServiceApplicationDo1){
            //给代理申请资质的居民发送微信模板消息-审核结果//·
            BasePatientDO patient = patientInfoService.findById(wlyyDoorServiceApplicationDo1.getProxyPatient());
            String first ="key1您好,key2的资格审核医生已处理。";
            first = first.replace("key1",(patient.getName()==null?"":patient.getName()));
            first = first.replace("key2", (wlyyDoorServiceApplicationDo1.getPatientName() == null ? "" : wlyyDoorServiceApplicationDo1.getPatientName()));
            wlyyDoorServiceApplicationDo1.getAuditorName();
            messageUtil.putTemplateWxMessage(wxId,"template_doctor_audit",scene,patient.getOpenid(),first,null,null,19,null,null,wlyyDoorServiceApplicationDo1.getAuditorName());
//            String first ="key1您好,key2的资格审核医生已处理。";
//            first = first.replace("key1",(patient.getName()==null?"":patient.getName()));
//            first = first.replace("key2", (wlyyDoorServiceApplicationDo1.getPatientName() == null ? "" : wlyyDoorServiceApplicationDo1.getPatientName()));
//            wlyyDoorServiceApplicationDo1.getAuditorName();
//            messageUtil.putTemplateWxMessage(wxId,"template_doctor_audit",scene,patient.getOpenid(),first,null,null,19,null,null,wlyyDoorServiceApplicationDo1.getAuditorName());
        }
@ -650,26 +651,8 @@ public class DoorServiceApplicationService {
    }
    public String myMyTest(){
        messageUtil.putTemplateWxMessage("xm_test_ihealth_wx","template_process_feedback","smyyyqx","ojsU-1XvRLx_IjDj96S4gxIRBNlY","您的上门服务知情同意书已送达",null,null,30,null,DateUtil.dateToStrShort(new Date()),"知情同意书已推送");
//        BasePatientDO patient = patientDao.findById("3ae2673512154d5280d1dcf5ffa5626d");
//        WxTemplateConfigDO templateConfig = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus("xm_test_ihealth_wx", "template_process_feedback", "smyyyqx", 1);
//        String first = templateConfig.getFirst().replace("key1", null != patient.getName() ? patient.getName() : "");
//        org.json.JSONObject json = new org.json.JSONObject();
//        templateConfig.setFirst("白海灵您好!您的上门服务知情同意书已送达");
//        templateConfig.setKeyword1(DateUtil.dateToStrShort(new Date()));
//        templateConfig.setKeyword2("知情同意书已推送");
//        json.put("url", templateConfig.getUrl());
//        json.put("url", "appoint_service/html/appoint-serviceDetail.html?id="+orderId);
////        appoint_service/html/appoint-serviceDetail.html?openid=ojsU-1XJVftkfdbP1F5bi8JVPtOo&consult=e0d17c67ab07477f8e96534bc610e51b
//        json.put("remark", templateConfig.getRemark());
//        if(consult != null) {
//            json.put("consult", consult.getCode());
//        }else {
//            json.put("id", orderDO.getId());
//        }
//        pushMsgTask.putWxMsg(tokenUtils.getAccessToken(), 30, patient.getOpenid(), patient.getName(), json);
//        messageUtil
        messageUtil.putTemplateWxMessage("xm_test_ihealth_wx","template_to_be_pay","smfwqrfk","ojsU-1XvRLx_IjDj96S4gxIRBNlY",DateUtil.dateToStr(new Date(), "yyyy/MM/dd HH:mm"),null,null,30,null,null,null,null,null,DateUtil.dateToChineseTime(new Date()));
        return "ss";
    }

+ 1 - 1
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorPrescriptionService.java

@ -269,7 +269,7 @@ public class WlyyDoorPrescriptionService  extends BaseJpaService<WlyyDoorPrescri
        json.put("orderId", orderDO.getId());
        json.put("openId", patient.getOpenid());
        json.put("authorizeImage", orderDO.getAuthorizeImage());
        messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","authorize",patient.getOpenid(),first,null,null,34,json,DateUtil.dateToStrShort(new Date()));
        messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","authorize",patient.getOpenid(),first,null,null,34,json,DateUtil.dateToChineseDate(new Date()));
/*        Patient patient = patientDao.findByCode(orderDO.getPatient());//·
        //发送微信模板消息

+ 20 - 10
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/WlyyDoorServiceOrderService.java

@ -277,7 +277,9 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
                }else{
                    feeDetailDO.setStatus(status);
                }
                feeDetailDO.setPayStatus(0);
                if(StringUtils.isBlank(feeDetailDO.getId())){
                    feeDetailDO.setPayStatus(0);
                }
//                feeDetailDO.setNumber(1);
                feeDetailDO.setOrderId(order.getId());
                if(StringUtils.isBlank(feeDetailDO.getId())) {
@ -344,11 +346,12 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
            for(Object oneId : itemArray) {
                JSONObject oneIdJson = (JSONObject) oneId;
                WlyyDoorFeeDetailDO doorFeeDetail = wlyyDoorFeeDetailDao.findOne(String.valueOf(oneIdJson.get("id")));
                doorFeeDetail.setStatus(3);
                doorFeeDetail.setUpdateTime(new Date());
                list.add(doorFeeDetail);
                itemFee = itemFee.add(doorFeeDetail.getFee().multiply(BigDecimal.valueOf(doorFeeDetail.getNumber())));
                if(doorFeeDetail.getPayStatus()==0){
                    doorFeeDetail.setStatus(3);
                    doorFeeDetail.setUpdateTime(new Date());
                    list.add(doorFeeDetail);
                    itemFee = itemFee.add(doorFeeDetail.getFee().multiply(BigDecimal.valueOf(doorFeeDetail.getNumber())));
                }
            }
            wlyyDoorFeeDetailDao.save(list);
//            orderDO.setTotalFee(totalFee.subtract(itemFee));
@ -625,7 +628,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        }
        orderDO.setServiceStatus("1");
        this.save(orderDO);
        result.put("orderId",orderDO.getId());
        //创建咨询
        JSONObject successOrNot = null;
        try {
@ -1469,7 +1472,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
            json.put("id", orderDO.getId());
        }
        messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","smyyyqx",patient.getOpenid(),first,null,null,30,json,DateUtil.dateToStrShort(new Date()),"上门预约已取消");
        messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","smyyyqx",patient.getOpenid(),first,null,null,30,json,DateUtil.dateToChineseDate(new Date()),"上门预约已取消");
/*        Consult consult = consultDao.queryByRelationCode(orderId);
        // 发送微信模板消息,通知居民工单已取消(smyyyqx-上门预约已取消)
@ -1517,7 +1520,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
        }else {
            json.put("id", orderDO.getId());
        }
        messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","smyyyqx",patient.getOpenid(),first,url,null,30,json,DateUtil.dateToStrShort(new Date()),"知情同意书已推送");
        messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","smyyyqx",patient.getOpenid(),first,url,null,30,json,DateUtil.dateToChineseDate(new Date()),"知情同意书已推送");
/*        BasePatientDO patient = patientDao.findById(orderDO.getPatient());
        WechatTemplateConfig templateConfig = templateConfigDao.findByScene("template_process_feedback","smyyyqx");
@ -2948,7 +2951,14 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
    }
    @Transactional
    public void payServiceItemFees(String[] ids){
    public JSONObject payServiceItemFees(String[] ids,String orderId){
        JSONObject json = new JSONObject();
        wlyyDoorFeeDetailDao.updatePayStatusById(ids);
//        WlyyDoorServiceOrderDO orderDO = wlyyDoorServiceOrderDao.findOne(orderId);
        ConsultDo consult = consultDao.queryByRelationCode(orderId);
        json.put("patient",consult.getPatient());
        json.put("consult",consult.getId());
        return json;
    }
}

+ 0 - 3
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/service/common/ServerPackageService.java

@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
@ -22,8 +21,6 @@ import java.util.Map;
@Transactional
public class ServerPackageService  {
    private static org.slf4j.Logger logger = LoggerFactory.getLogger(ServerPackageService.class);
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Value("${wechat.id}")

+ 41 - 17
svr/svr-door-serivce/src/main/java/com/yihu/jw/door/util/MessageUtil.java

@ -22,6 +22,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -58,8 +59,8 @@ public class MessageUtil {
    private BaseDoctorDao baseDoctorDao;
    @Autowired
    private BasePatientDao basePatientDao;
    @Value("${server.server_url}")
    private String server_url;
    @Value("${tnzyy.tnzyy_url}")
    private String tnzyy_url;
    //发送微信模板消息
    private  String sendMessageUrl = "http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage";
@ -153,9 +154,24 @@ public class MessageUtil {
    }
    //推送模板消息
    /**
     *
     * @param wechatId
     * @param templateName
     * @param scene
     * @param openId
     * @param first
     * @param url 跳转链接
     * @param remark
     * @param type  模板通知类型
     * @param josn 用于对跳转连接的修改,
     * @param keywords
     */
    public void putTemplateWxMessage(String wechatId, String templateName, String scene, String openId, String first,String url, String remark, Integer type,JSONObject josn,String ...keywords) {
        try {
            System.out.println(wechatId);
            wxAccessTokenService.getWxAccessTokenById(wechatId);
            List<WxAccessTokenDO> list = wxAccessTokenDao.getWxAccessTokenById(wechatId);
            if(list.size()==0){
                return;
@ -166,7 +182,9 @@ public class MessageUtil {
                logger.info("wx_access_token表获取为空,wechatId" + wechatId);
                return;
            }
            WxTemplateConfigDO newConfig = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, templateName, scene, 1);
            WxTemplateConfigDO templateConfig = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, templateName, scene, 1);
            WxTemplateConfigDO newConfig = new WxTemplateConfigDO();
            BeanUtils.copyProperties(templateConfig,newConfig);
            if (newConfig == null) {
                logger.info("微信模板不存在!请确认wechatId:" + wechatId + ",templateName:" + templateName + ",scene:" + scene);
                return;
@ -176,7 +194,7 @@ public class MessageUtil {
                newConfig.setFirst(first);
            }
            if (StringUtils.isNoneBlank(url)){
                newConfig.setUrl(url);
               newConfig.setUrl(url);
            }
            if (StringUtils.isNoneBlank(remark)){
                newConfig.setRemark(remark);
@ -190,32 +208,32 @@ public class MessageUtil {
            }
            if (keyLength >= 2) {
                if(StringUtils.isNoneBlank(keywords[1])){
                    newConfig.setKeyword1(keywords[1]);
                    newConfig.setKeyword2(keywords[1]);
                }
            }
            if (keyLength >= 3) {
                if(StringUtils.isNoneBlank(keywords[2])){
                    newConfig.setKeyword1(keywords[2]);
                    newConfig.setKeyword3(keywords[2]);
                }
            }
            if (keyLength >= 4) {
                if(StringUtils.isNoneBlank(keywords[3])){
                    newConfig.setKeyword1(keywords[3]);
                    newConfig.setKeyword4(keywords[3]);
                }
            }
            if (keyLength >= 5) {
                if(StringUtils.isNoneBlank(keywords[4])){
                    newConfig.setKeyword1(keywords[4]);
                    newConfig.setKeyword5(keywords[4]);
                }
            }
            if (keyLength >= 6) {
                if(StringUtils.isNoneBlank(keywords[5])){
                    newConfig.setKeyword1(keywords[5]);
                    newConfig.setKeyword6(keywords[5]);
                }
            }
            if (keyLength >= 7) {
                if(StringUtils.isNoneBlank(keywords[6])){
                    newConfig.setKeyword1(keywords[6]);
                    newConfig.setKeyword7(keywords[6]);
                }
            }
            //发起微信消息模板推送
@ -228,7 +246,10 @@ public class MessageUtil {
    }
    public WxTemplateConfigDO setTemPlateUrl(WxTemplateConfigDO wxTemplateConfigDO,Integer type,String openid,JSONObject json){
        String url = server_url + "wx/html/";
        String url = tnzyy_url + "taian-wx/html/";
        if (json==null){
            return wxTemplateConfigDO;
        }
        if (type==30){//反馈通知 测试 TPbq9m0SAiVfRhXtXq17SDmYIfrJ8Whp2NpSrq9wlfI
            if(json.containsKey("consult")) {
                wxTemplateConfigDO.setUrl(url + wxTemplateConfigDO.getUrl() + "?openid=" + openid + "&consult=" + json.getString("consult"));
@ -240,17 +261,17 @@ public class MessageUtil {
                wxTemplateConfigDO.setUrl(url + wxTemplateConfigDO.getUrl() + "?resultCode=" + json.getString("resultCode"));
            }
        }
        if (type==31){ //上门服务医生评分   //TPbq9m0SAiVfRhXtXq17SDmYIfrJ8Whp2NpSrq9wlfI
        if (type==31){ //上门服务医生评分   //
            wxTemplateConfigDO.setUrl(url + wxTemplateConfigDO.getUrl()+"?openid=" + openid + "&id=" + json.getString("id")+ "&finish=" + json.getString("finish"));
        }
        if(type==32){  //TPbq9m0SAiVfRhXtXq17SDmYIfrJ8Whp2NpSrq9wlfI
            String url1 = server_url + "wx/common/";
        if(type==32){  //
            String url1 = tnzyy_url + "wx/common/";
            wxTemplateConfigDO.setUrl(url1 + wxTemplateConfigDO.getUrl()+"?openid=" + openid + "&consult=" + json.getString("consult") + "&status=" + json.getInteger("status"));
        }
        if(type==34){ //TPbq9m0SAiVfRhXtXq17SDmYIfrJ8Whp2NpSrq9wlfI
            wxTemplateConfigDO.setUrl(url + wxTemplateConfigDO.getUrl() + "?openid=" + openid + "&orderId=" + json.get("orderId")+ "&authorizeImage=" + json.getString("authorizeImage"));
        if(type==34){ //居民授权电子健康卡
            wxTemplateConfigDO.setUrl(url + wxTemplateConfigDO.getUrl() + "?openid=" + openid + "&orderId=" + json.getString("orderId")+ "&authorizeImage=" + json.getString("authorizeImage"));
        }
        if (type==19){  //zSR9w5AjfZFLc_g8AxGBvDKZASoKAeXQuGnvPAQzvps
        if (type==19){  //
            String urlStr= wxTemplateConfigDO.getUrl();
            boolean status = urlStr.contains("openid=");
            if(!status){
@ -258,6 +279,9 @@ public class MessageUtil {
            }
            wxTemplateConfigDO.setUrl(url + urlStr );
        }
        if (type==35){//支付提醒
            wxTemplateConfigDO.setUrl(url + wxTemplateConfigDO.getUrl()+json.getString("orderId"));
        }
        return wxTemplateConfigDO;
    }

+ 6 - 0
svr/svr-door-serivce/src/main/resources/application.yml

@ -150,6 +150,9 @@ fast-dfs:
server:
  server_url: http://ehr.yihu.com/wlyy/
tnzyy:
  tnzyy_url: http://172.26.0.107:10001/
neiwang:
  enable: true
  wlyy: http://172.26.0.110:22122/
@ -316,6 +319,9 @@ neiwang:
server:
  server_url: http://ehr.yihu.com/wlyy/
tnzyy:
  tnzyy_url: https://zyy.jkta.com.cn:9660/
base:
  url: http://127.0.0.1:10020/svr-base/
  hospitalUrl: http://10.9.1.247:10022/