فهرست منبع

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

wangjun 4 سال پیش
والد
کامیت
80851d6360

+ 48 - 10
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -429,7 +429,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (payFlag){
            map = unifiedorder(wechatId,body,totalFee,tradeType,openid,ourTradeNo,notifyUrl);
        }else {
            updatePayStatusByRelation(relationCode);
            updatePayStatusByRelation(relationCode,wechatId);
        }
        return map;
    }
@ -1165,7 +1165,6 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                String age="";
                String date = "";
                String title = "";
                String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                if (patientDO!=null){
                    sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
                    age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
@ -1180,7 +1179,17 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                        msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频咨询,点击查看";
                    }
                }
                enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                    String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                }else if(wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                    String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("xm_ykyy_wx",outpatientDO.getDoctor(),title,msg,url);
                }else if (wechatId.equalsIgnoreCase("xm_xzzx_wx")){
                    String url="https://ih.xmheart.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("xm_xzzx_wx",outpatientDO.getDoctor(),title,msg,url);
                }
                System.out.println("发送企业模板消息成功");
            }
        }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
@ -1197,7 +1206,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
               String age="";
               String date = "";
               String title = "";
               String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
               if (patientDO!=null){
                   sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
                   age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
@ -1212,7 +1221,17 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                       msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
                   }
               }
               enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
               if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                   String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                   enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
               }else if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                   String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                   enterpriseService.sendTWMesByDoctor("xm_ykyy_wx",outpatientDO.getDoctor(),title,msg,url);
               }else if (wechatId.equalsIgnoreCase("xm_xzzx_wx")){
                   String url="https://ih.xmheart.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                   enterpriseService.sendTWMesByDoctor("xm_xzzx_wx",outpatientDO.getDoctor(),title,msg,url);
               }
               System.out.println("发送企业模板消息成功");
           }
@ -1237,7 +1256,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     * @param relationCode
     * @return
     */
    public BusinessOrderDO updatePayStatusByRelation(String relationCode) throws Exception {
    public BusinessOrderDO updatePayStatusByRelation(String relationCode,String wxId) throws Exception {
        logger.info("入参:"+relationCode);
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay");
@ -1267,7 +1286,6 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    String age="";
                    String date = "";
                    String title = "";
                    String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    if (patientDO!=null){
                        sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
                        age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
@ -1282,7 +1300,17 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                            msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频咨询,点击查看";
                        }
                    }
                    enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                    if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                        String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                        enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                    }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
                        String url="https://ih.xmheart.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                        enterpriseService.sendTWMesByDoctor("xm_xzzx_wx",outpatientDO.getDoctor(),title,msg,url);
                    }else if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
                        String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                        enterpriseService.sendTWMesByDoctor("xm_ykyy_wx",outpatientDO.getDoctor(),title,msg,url);
                    }
                    System.out.println("发送企业模板消息成功");
                }
            }
@ -1300,7 +1328,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                String age="";
                String date = "";
                String title = "";
                String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                if (patientDO!=null){
                    sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
                    age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
@ -1315,7 +1343,17 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                        msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
                    }
                }
                enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                    String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
                    String url="https://ih.xmheart.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("xm_xzzx_wx",outpatientDO.getDoctor(),title,msg,url);
                }else if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
                    String url="https://intel.yanketong.com/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("xm_ykyy_wx",outpatientDO.getDoctor(),title,msg,url);
                }
                System.out.println("发送企业模板消息成功");
            }
        } else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("4")) {

+ 4 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -1,5 +1,6 @@
package com.yihu.jw.entity;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
@ -18,13 +19,13 @@ public abstract class IntegerIdentityEntity implements Serializable {
    @Id
//==========mysql 环境 id策略======================================================
 /*   @GeneratedValue(generator = "generator")
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "identity")
    @Column(name = "id", unique = true, nullable = false)*/
    @Column(name = "id", unique = true, nullable = false)
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
 /*  @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 1 - 1
gateway/ag-basic/pom.xml

@ -12,7 +12,7 @@
    <artifactId>ag-basic</artifactId>
    <version>${parent.version}</version>
    <packaging>jar</packaging>
    <packaging>war</packaging>
    <dependencies>
        <!-- 支持Tomcat启动 -->

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

@ -1837,8 +1837,12 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                                            iliness.add(family.getString("ILLNESS"));
                                        }
                                    }
                                    String birdth = com.yihu.jw.util.idcard.IdCardUtil.getBirthdayForIdcardStr(basePatientDO1.getIdcard());
                                    Integer age = com.yihu.jw.util.idcard.IdCardUtil.getAgeForIdcard(basePatientDO1.getIdcard());
                                    String birdth = null;
                                    Integer age = 0;
                                    if (org.apache.commons.lang3.StringUtils.isNoneBlank(basePatientDO1.getIdcard())){
                                        birdth = com.yihu.jw.util.idcard.IdCardUtil.getBirthdayForIdcardStr(basePatientDO1.getIdcard());
                                        age =com.yihu.jw.util.idcard.IdCardUtil.getAgeForIdcard(basePatientDO1.getIdcard());
                                    }
                                    Integer sex = basePatientDO1.getSex()!=null?basePatientDO1.getSex():0;
                                    if (iliness!=null&&iliness.size()!=0){
                                        if (!iliness.contains("本人")){
@ -1865,17 +1869,20 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        } else {
            parameters.put("grant_type", "captcha");
        }
        logger.info("登陆111111111111111111");
        ClientDetails authenticatedClient = clientDetailsService.loadClientByClientId(client_id);
        if (null == authenticatedClient) {
            throw new InvalidRequestException("client_id");
        }
        logger.info("登陆22222222222222222");
        TokenRequest tokenRequest = oAuth2RequestFactory.createTokenRequest(parameters, authenticatedClient);
        oAuth2RequestValidator.validateScope(tokenRequest, authenticatedClient);
        OAuth2AccessToken token = getTokenGranter().grant(tokenRequest.getGrantType(), tokenRequest);
        if (token == null) {
            throw new UnsupportedGrantTypeException("Unsupported grant type: " + tokenRequest.getGrantType());
        }
        logger.info("登陆33333333333333333333");
        /*如果是移动端登陆则移除之前的token,
        在网关处通过HTTP状态码告知前端是过期(402)还是账号在别处登陆(403),
        实现同一账号只能在一处登陆*/
@ -1888,6 +1895,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        if (token == null) {
            throw new UnsupportedGrantTypeException("Unsupported grant type: " + tokenRequest.getGrantType());
        }
        logger.info("登陆4444444444444444");
        WlyyUserSimple wlyyUserSimple = userDetailsService.authSuccess(parameters.get("username"));
        wlyyUserSimple.setAccessToken(token.getValue());
        wlyyUserSimple.setTokenType(token.getTokenType());

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

@ -2096,7 +2096,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "relationCode", value = "业务code")
            @RequestParam(value = "relationCode", required = false) String relationCode) throws Exception {
        try {
            BusinessOrderDO businessOrderDO = businessOrderService.updatePayStatusByRelation(relationCode);
            BusinessOrderDO businessOrderDO = businessOrderService.updatePayStatusByRelation(relationCode,wxId);
            if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")){
                SystemMessageDO systemMessageDO = new SystemMessageDO();
                systemMessageDO.setType("1");