public IHttpActionResult SearchRechargeRecord(RechargeSearchRequest model) { GetRecordListResponse <RechargeRecordResponse> response = new GetRecordListResponse <RechargeRecordResponse>() { IsSuccess = true, MessageCode = (int)ApiBaseErrorCode.API_SUCCESS, MessageContent = ApiBaseErrorCode.API_SUCCESS.ToString() }; if (string.IsNullOrWhiteSpace(model.ParkingCode)) { response.IsSuccess = false; response.MessageCode = (int)ApiBaseErrorCode.API_PARAM_ERROR; response.MessageContent = "车场编码不能为空,请检查"; return(Ok(response)); } GetRecordListResponse <RechargeRecordResponse> opengatereasonlistmodel = _reportManager.SearchRechargeRecord(model); if (opengatereasonlistmodel != null) { response = opengatereasonlistmodel; } else { response.IsSuccess = false; response.MessageCode = (int)ApiPersonnelErrorCode.API_DATA_NULL_ERROR; response.MessageContent = ApiPersonnelErrorCode.API_DATA_NULL_ERROR.ToString(); } return(Ok(response)); }
/// <summary> /// 查询充值记录(报表) /// </summary> /// <param name="parkCode"></param> /// <returns></returns> public GetRecordListResponse <RechargeRecordResponse> SearchRechargeRecord(RechargeSearchRequest model) { GetRecordListResponse <RechargeRecordResponse> responseModel = null; RequestFujicaReportStatistical requestFujica = new RequestFujicaReportStatistical(); //请求方法 string servername = "SearchRecord/SearchRechargeRecord"; //请求参数 Dictionary <string, object> dicParam = new Dictionary <string, object>(); dicParam["Id"] = model.Id; dicParam["ParkingCode"] = model.ParkingCode; dicParam["LicensePlate"] = model.LicensePlate; dicParam["TransactionCode"] = model.TransactionCode; dicParam["UserCode"] = model.UserCode; dicParam["OpenId"] = model.OpenId; dicParam["OwnerName"] = model.OwnerName; dicParam["PhoneNumber"] = model.PhoneNumber; dicParam["GroupParkingCode"] = model.GroupParkingCode; dicParam["RechargeOperator"] = model.RechargeOperator; dicParam["InvoiceCode"] = model.InvoiceCode; dicParam["RenewalType"] = model.RenewalType; dicParam["PaymentType"] = model.PaymentType; dicParam["OrderType"] = model.OrderType; dicParam["CardType"] = model.CardType; dicParam["CarType"] = model.CarType; dicParam["OrderStauts"] = model.OrderStauts; dicParam["OperatType"] = model.OperatType; dicParam["InvoiceState"] = model.InvoiceState; dicParam["TransactionStartTime"] = model.TransactionStartTime; dicParam["TransactionEndTime"] = model.TransactionEndTime; dicParam["ExpirationStartTime"] = model.ExpirationStartTime; dicParam["ExpirationEndTime"] = model.ExpirationEndTime; dicParam["CreateStartTime"] = model.CreateStartTime; dicParam["CreateEndTime"] = model.CreateEndTime; dicParam["InvoiceStartTime"] = model.InvoiceStartTime; dicParam["InvoiceEndTime"] = model.InvoiceEndTime; dicParam["NextToken"] = model.NextToken; //就是第一次查询,需要制定当前页 页大小 ,需要下一页的时候,直接给这个nexttoken就可以了 dicParam["PageIndex"] = model.PageIndex; dicParam["PageSize"] = model.PageSize; dicParam["Sort"] = model.Sort; dicParam["FieldSort"] = model.FieldSort; bool falg = requestFujica.RequestFujicaReport(servername, dicParam); if (falg) { string fujicaResult = requestFujica.FujicaResult; if (!string.IsNullOrEmpty(fujicaResult)) { //解析返回参数json字符串 GetRecordListResponse <RechargeRecordResponse> response = m_serializer.Deserialize <GetRecordListResponse <RechargeRecordResponse> >(fujicaResult); //List<MCoupon> ls = m_serializer.Deserialize<List<MCoupon>>(dicFujicaResult["CouponList"].ToString()); //responseModel.CouponList = ls; responseModel = response; } } return(responseModel); }