/// <summary> /// 获取Pcn认证用户的身份证证明照 /// </summary> /// <param name="req"></param> /// <returns></returns> public string GetUserIDCardFrontPicFromPcn(GetIDCardPicFromPcnReq req) { PcnAcountInfoDto pcnReginfo = GetRegInfoFromPcn(req.PcnNodecode); if (pcnReginfo == null) { return(null); } if (!CheckPcnPwd(req)) { return(null); } TzcAuthLog pcnAuthLog = GetAuthLogFromPcnByPcnUserNodeid(req.PcnNodecode, req); if (pcnAuthLog == null) { return(null); } if (db.TzcAuthBindpcnSet.Where(w => w.Pcnnodeid == pcnReginfo.NodeId || w.Nodeid == req.Nodeid).Count() > 0) { Alert("此PCN账号已被其他用户绑定"); return(null); } var otherAuthLog = db.TzcAuthLogSet.Where(w => w.Idcard == pcnAuthLog.Idcard && w.Nodeid != req.Nodeid); if (otherAuthLog.Count() > 0) { Alert("此PCN账号身份证信息已被人使用"); log.Info("PCN认证:PNCNodeid=" + pcnReginfo.NodeId + "的身份证:" + pcnAuthLog.Idcard + "存在相信认证库中"); return(null); } return(pcnAuthLog.Idcardpic1); }
private bool CheckPcnPwd(GetIDCardPicFromPcnReq req) { var myRet = HttpSimulation.Instance.RequestByJsonOrQueryString($"{AppConfig.PCNDomainUrl}/api/user/Login", new { Nodecode = req.PcnNodecode, PassWord = req.PcnLoginPwd, Version = "1.0.0", Client = req.Client, Tm = req.Tm, Sign = req.Sign, Sid = req.Sid, Nodeid = req.Nodeid }); var ret = JsonConvert.DeserializeObject <Respbase <PcnAcountInfoDto> >(myRet); if (ret.Result <= 0) { log.Info("CheckPcnPwd失败," + myRet); Alert(ret.Message); return(false); } return(true); }