Browse Source

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

wangjun 4 years ago
parent
commit
20c838498e

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

@ -273,7 +273,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String openId = doctorDO.getOpenid();
            String idcard = patientDO.getIdcard();
            if (hashType!=null&&hashValue!=null){
                JSONObject object1 = synRecipeInfo("2017070411003376","hash_004","2017070411003360",getCode(),patientName,patientAge.toString(),patientSex,"SF",recipeTime,hashValue,hashType,openId,idcard);
                JSONObject object1 = synRecipeInfo("hash_004",getCode(),patientName,patientAge.toString(),patientSex,"SF",recipeTime,hashValue,hashType,openId,idcard);
                if (object1.getString("status").equalsIgnoreCase("0")){
                    logger.info("西药处方签名成功"+object1);
                }
@ -313,7 +313,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String openId = doctorDO.getOpenid();
            String idcard = patientDO.getIdcard();
            if (hashType!=null&&hashValue!=null){
                JSONObject object1 = synRecipeInfo("2017070411003376","hash_002","2017070411003360",getCode(),patientName,patientAge.toString(),patientSex,"SF",recipeTime,hashValue,hashType,openId,idcard);
                JSONObject object1 = synRecipeInfo("hash_002",getCode(),patientName,patientAge.toString(),patientSex,"SF",recipeTime,hashValue,hashType,openId,idcard);
                if (object1.getString("status").equalsIgnoreCase("0")){
                    logger.info("门诊病历签名成功"+object1);
@ -349,9 +349,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    /***
     * 数据签名接口
     * @param clientId 第三方厂商标识
     * @param templateId 模板ID签名数据摘要数据类型
     * @param clientSecret 第三方厂商秘钥
     * @param urId 签名流水ID
     * @param patientName 患者姓名
     * @param patientAge 患者年龄
@ -362,12 +360,16 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     * @param hashType Hash算法(从签名指纹接口结果中得到的)
     * @return
     */
    public JSONObject synRecipeInfo(String clientId,String templateId,String clientSecret,String urId,String patientName,String patientAge,String patientSex,String patientCardType,String recipeTime,String hashValue,String hashType,String openId,String patientCard){
    public JSONObject synRecipeInfo(String templateId,String urId,String patientName,String patientAge,String patientSex,String patientCardType,String recipeTime,String hashValue,String hashType,String openId,String patientCard){
        try {
            OauthCaConfigDO oauthCaConfigDO = oauthCaConfigDao.findOne("oauth_ca_config");
            String url = "";
            String clientId= "";
            String clientSecret = "";
            if (oauthCaConfigDO!=null){
                url=oauthCaConfigDO.getUrl()+"/gateway/recipe/synRecipeInfo";
                clientId=oauthCaConfigDO.getClientId();
                clientSecret=oauthCaConfigDO.getClientSecret();
            }
            JSONObject object = new JSONObject();
            JSONObject msg = new JSONObject();

+ 18 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/ca/OauthCaConfigDO.java

@ -14,6 +14,8 @@ public class OauthCaConfigDO extends UuidIdentityEntity {
    private String url;
    private String remark;
    private String clientId;
    private String clientSecret;
    public String getUrl() {
        return url;
@ -30,4 +32,20 @@ public class OauthCaConfigDO extends UuidIdentityEntity {
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public String getClientId() {
        return clientId;
    }
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    public String getClientSecret() {
        return clientSecret;
    }
    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }
}

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

@ -968,7 +968,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            }
            username = data.getString("userIdCardNum");
        }else if (wechatId.equalsIgnoreCase("xm_xzzx_wx")){
            rs = xzzxService.getTokeninfo("2017070411003376",qrcode);
            rs = xzzxService.getTokeninfo(qrcode);
            JSONObject jsonObject = rs.getJSONObject("data");
            logger.info("查询登录信息"+rs);
            String qrCodeStatus = rs.getString("status");

+ 2 - 3
server/svr-authentication/src/main/java/com/yihu/jw/security/service/XzzxService.java

@ -80,16 +80,15 @@ public class XzzxService {
    /**
     * OAuth登陆-获取用户信息
     * @param clientId
     * @param requestId
     * @return
     */
    public JSONObject getTokeninfo(String clientId,String requestId){
    public JSONObject getTokeninfo(String requestId){
        try {
            OauthCaConfigDO oauthCaConfigDO = oauthCaConfigDao.findOne("oauth_ca_config");
            String url = "";
            if (oauthCaConfigDO!=null){
                url=oauthCaConfigDO.getUrl()+"/gateway/oauth/tokeninfo?clientId="+clientId+"&requestId="+requestId+"";
                url=oauthCaConfigDO.getUrl()+"/gateway/oauth/tokeninfo?clientId="+oauthCaConfigDO.getClientId()+"&requestId="+requestId+"";
            }
            String response = httpClientUtil.get(url,"utf-8");
            logger.info("验证二维码 getQueryQRCode :"+response);