/// <summary> /// 车牌号缴费 /// </summary> /// <param name="PlateNumber"></param> /// <param name="CardNo"></param> /// <param name="ParkingID"></param> /// <param name="SystemID"></param> /// <param name="AccountID"></param> /// <returns></returns> public static TempParkingFeeResult WXTempParkingFee(string PlateNumber, string ParkingID, string AccountID, DateTime CalculatDate) { WXServiceClient client = ServiceUtil <WXServiceClient> .GetServiceClient("WXService"); string result = client.WXTempParkingFee(PlateNumber, ParkingID, CalculatDate, AccountID, 1); client.Close(); client.Abort(); TempParkingFeeResult model = JsonHelper.GetJson <TempParkingFeeResult>(result); try { if (!string.IsNullOrWhiteSpace(BWYInterfaceUrl) && !string.IsNullOrWhiteSpace(BWYSessionID) && !string.IsNullOrWhiteSpace(BWPKID)) { if (model.Result == APPResult.NotFindIn || model.Result == APPResult.ProxyException || model.Result == APPResult.NoTempCard || model.Result == APPResult.NotFindCard || model.Result == APPResult.OtherException) { BWYOrderQueryResult bwyResult = BWYInterfaceProcess.TempParkingFee(PlateNumber); if (bwyResult != null) { //return TransforTempParkingFeeResult(model, bwyResult, PlateNumber); model = BWYTransforTempParkingFeeResult(model, bwyResult, PlateNumber); } } } } catch (Exception ex) { TxtLogServices.WriteTxtLogEx("BWYInterfaceProcess", string.Format("WXTempParkingFee方法,异常:{0}", ex.Message)); } try { if (model.Result == APPResult.NotFindIn || model.Result == APPResult.ProxyException || model.Result == APPResult.NoTempCard || model.Result == APPResult.NotFindCard || model.Result == APPResult.OtherException) { if (!string.IsNullOrWhiteSpace(SFMInterfaceUrl) && !string.IsNullOrWhiteSpace(SFMSecretKey) && !string.IsNullOrWhiteSpace(SFMPKID)) { PlateQueryResult sfmResult = SFMInterfaceProcess.GetCarPrice(PlateNumber); if (sfmResult != null) { model = SFMTransforTempParkingFeeResult(model, sfmResult); } } } } catch (Exception ex) { TxtLogServices.WriteTxtLogEx("SFMError", string.Format("WXTempParkingFee方法,异常:{0}", ex.Message)); } return(model); }
public static TempParkingFeeResult BWYTempParkingFeeResult(string GateID) { TempParkingFeeResult result = new TempParkingFeeResult(); result.Result = APPResult.NoCarInBox; result.ErrorDesc = "未知异常"; int bwyGateId = 0; if (!string.IsNullOrWhiteSpace(SystemDefaultConfig.BWPKID) && int.TryParse(GateID, out bwyGateId)) { try { OutCarResult bwyResult = BWYInterfaceProcess.QueryOutCar(bwyGateId); if (bwyResult.Result != 0) { result.Result = APPResult.OtherException; result.ErrorDesc = bwyResult.Desc; return(result); } if (bwyResult.Reference == null || string.IsNullOrWhiteSpace(bwyResult.Reference.LPR)) { result.Result = APPResult.NoCarInBox; result.ErrorDesc = bwyResult.Desc; return(result); } TxtLogServices.WriteTxtLogEx("BWYInterfaceProcess", string.Format("BWYTempParkingFeeResult方法,BWYInterfaceUrl:{0},BWYSessionID:{1},BWPKID:{2}", BWYInterfaceUrl, BWYSessionID, BWPKID)); if (!string.IsNullOrWhiteSpace(BWYInterfaceUrl) && !string.IsNullOrWhiteSpace(BWYSessionID) && !string.IsNullOrWhiteSpace(BWPKID)) { BWYOrderQueryResult tempResult = BWYInterfaceProcess.TempParkingFee(bwyResult.Reference.LPR); if (tempResult != null) { return(BWYTransforTempParkingFeeResult(result, tempResult, bwyResult.Reference.LPR)); } } } catch (Exception ex) { TxtLogServices.WriteTxtLogEx("BWYInterfaceProcess", string.Format("BWYTempParkingFeeResult方法,异常:{0}", ex.Message)); } } else { TxtLogServices.WriteTxtLogEx("BWYInterfaceProcess", string.Format("BWYTempParkingFeeResult方法,参数无效:{0},GateID:{1}", SystemDefaultConfig.BWPKID, GateID)); } return(result); }