/// <summary> /// 公交登陆认证 /// </summary> /// <returns></returns> public static string BusLogin() { BusInterface access = new BusInterface(); BusLoginParam param = new BusLoginParam(); param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime(); param.servicename = "DL001"; param.resqn = SysBLL.getSerialNum(); param.loginId = SysBLL.getCpuNo(); //设备ID BusLoginInfo info = access.BusLogin(param); //同步系统时间 SysBLL.SetSystemTime(info.msghead.trandatetime); if (info != null) { if (info.msgrsp != null) { if (info.msgrsp.authcode != null) { return(info.msgrsp.authcode); } } } return(null); }
private string RefundRequestLogin(string type) { if ("bus".Equals(type)) { BusInterface access = new BusInterface(); BusLoginParam param = new BusLoginParam(); param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime(); param.servicename = "DL001"; param.resqn = SysBLL.getSerialNum(); param.loginId = SysBLL.getCpuNo(); //设备ID BusLoginInfo info = access.BusLogin(param); if (info != null) { if (info.msgrsp != null) { if (info.msgrsp.authcode != null) { return(info.msgrsp.authcode); } } } return(null); } else { return(SysBLL.Authcode); } }
/// <summary> /// 公交卡登录认证 /// </summary> /// <param name="param"></param> /// <returns></returns> public BusLoginInfo BusLogin(BusLoginParam param) { BusLoginInfo busLoginInfo = null; Dictionary <String, String> parameters = new Dictionary <String, String>(); parameters.Add("trandateTime", param.trandateTime); parameters.Add("servicename", param.servicename); parameters.Add("reqsn", param.resqn); parameters.Add("loginId", param.loginId); string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("BusLoginName"), parameters, null); //反序列化JSON字符串,将JSON字符串转换成LIST列表 busLoginInfo = JsonConvert.DeserializeObject <BusLoginInfo>(jsonText); return(busLoginInfo); }