Trick 5 роки тому
батько
коміт
0f8b890d18

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

@ -43,6 +43,8 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.security.Code16;
import com.yihu.jw.util.security.MD5;
import com.yihu.mysql.query.BaseJpaService;
import jxl.write.*;
import net.sf.json.JSONArray;
@ -295,7 +297,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            prescriptionDOs = prescriptionDao.findById(prescriptionId);
        }else{
            prescriptionDOs = prescriptionDao.findByOutpatientId(outpatientId);
        }
        List<WlyyPrescriptionVO> prescriptionVOs = new ArrayList<>();
        if(prescriptionDOs!=null&&prescriptionDOs.size()>0){
@ -1749,7 +1750,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //删除门诊号源
        List<WlyyPatientRegisterTimeDO> list = patientRegisterTimeDao.findByOutpatientId(wlyyOutpatientDO.getId());
        patientRegisterTimeDao.delete(list);
        if(list!=null&&list.size()>0){
            patientRegisterTimeDao.delete(list);
        }
        rs.put("code",1);
        rs.put("mes","取消成功");
@ -2247,20 +2250,24 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    @Autowired
    private HttpClientUtil httpClientUtil;
    public String test() {
        /**
         * http://www.mstpay.com:1811/ehcService/gateway.do
         public String app_id = "1BQA48ETK000A718A8C000001FFAA482";
         public String app_key = "1BQA48ETK001A718A8C00000FE996B9B";
         public String term_id = "35020010001";
         */
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("method", "ehc.ehealthcard.authurl"));
        params.add(new BasicNameValuePair("app_id", "1BQA48ETK000A718A8C000001FFAA482"));
        params.add(new BasicNameValuePair("term_id", "b60bab0617c04b23b7fa0a059cc83eb6"));
        params.add(new BasicNameValuePair("version","o0hubt3byGmNYLyC-UvmSVyUuZkI"));
        params.add(new BasicNameValuePair("timestamp", "ihealth_pa8DIRJasL"));
        params.add(new BasicNameValuePair("sign_type", "jkzl1h7aj39dnasyi23fnkv92"));
        params.add(new BasicNameValuePair("sign", "b60bab0617c04b23b7fa0a059cc83eb6"));
        params.add(new BasicNameValuePair("enc_type","o0hubt3byGmNYLyC-UvmSVyUuZkI"));
        params.add(new BasicNameValuePair("biz_content", "ihealth_pa8DIRJasL"));
        String res = httpClientUtil.post("http://172.16.1.21:6601/ehcService/gateway.do", params, "UTF-8");
        params.add(new BasicNameValuePair("term_id", "35020010001"));
        params.add(new BasicNameValuePair("version","X.M.0.1"));
        params.add(new BasicNameValuePair("timestamp", DateUtil.dateToStr(new Date(),"yyyyMMddHHmmss")));
        params.add(new BasicNameValuePair("sign_type", "MD5"));
        params.add(new BasicNameValuePair("sign", getSign()));
        params.add(new BasicNameValuePair("enc_type","AES"));
        params.add(new BasicNameValuePair("biz_content", ""));
        String res = httpClientUtil.post("http://www.mstpay.com:1811/ehcService/gateway.do", params, "UTF-8");
        return res;
@ -2270,7 +2277,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
//        com.alibaba.fastjson.JSONObject object1 = com.alibaba.fastjson.JSONObject.parseObject(responseMsg);
//        return object1.toString();
    }
    
    public String getSign(){
        String str ="app_id=1BQA48ETK000A718A8C000001FFAA482" +
                "&enc_type=AES" +
                "&method=ehc.ehealthcard.authurl" +
                "&sign_type=MD5" +
                "&term_id=35020010001" +
                "&timestamp=" +DateUtil.dateToStr(new Date(),"yyyyMMddHHmmss")+
                "&version=X.M.0.1key=<你的密钥>";
        String md5str =  MD5.GetMD5Code(str);
        String str16 = Code16.toStringHex1(md5str);
        return str16.substring(0,16).toUpperCase();
    }
    
    /**
     * 获取正在进行中的视频复诊/协同门诊

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

@ -625,7 +625,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    }
    @RequestMapping(value = "/oauth/getHwlyyDecrypt", method = RequestMethod.POST)
    public ObjEnvelop getHwlyyDecrypt(String openid,String idcard,String wechatId,HttpSession httpSession){
    public ObjEnvelop getHwlyyDecrypt(String openid,String idcard,String wechatId){
        Map<String,Object> rs = new HashedMap();
        try{
            OauthKeypairDO keypairDO = oauthKeypairDao.findByCode("hwlyyKey");