/// <summary> /// 查询顺丰下单返回明细 /// </summary> public Response <QueryAMSUploadResponses> GetWMS_SFDetailByCondition(QueryAMSUploadRequests request) { Response <QueryAMSUploadResponses> response = new Response <QueryAMSUploadResponses>() { Result = new QueryAMSUploadResponses() }; if (request == null || request.WMS_PackageSearch == null) { ArgumentNullException ex = new ArgumentNullException("GetWMS_SFDetailByCondition request"); LogError(ex); response.ErrorCode = ErrorCode.Argument; response.Exception = ex; return(response); } try { AMSUploadAccessor accessor = new AMSUploadAccessor(); int RowCount; response.Result.WMS_SFDetaileCollection = accessor.GetWMS_SFDetailByCondition(request.WMS_SFDetailSearch, request.PageIndex, request.PageSize, out RowCount); response.Result.PageCount = RowCount % request.PageSize == 0 ? RowCount / request.PageSize : RowCount / request.PageSize + 1; response.Result.PageIndex = request.PageIndex; response.IsSuccess = true; } catch (Exception ex) { LogError(ex); response.IsSuccess = false; response.ErrorCode = ErrorCode.Technical; } return(response); }
public Response <QueryAMSUploadResponses> QueryAMSUpload(QueryAMSUploadRequests request) { Response <QueryAMSUploadResponses> response = new Response <QueryAMSUploadResponses>() { Result = new QueryAMSUploadResponses() }; if (request == null || request.SearchCondition == null) { ArgumentNullException ex = new ArgumentNullException("QueryAMSUpload request"); LogError(ex); response.ErrorCode = ErrorCode.Argument; response.Exception = ex; return(response); } try { AMSUploadAccessor accessor = new AMSUploadAccessor(); int RowCount; response.Result.AMSUploadCollection = accessor.GetQueryAttachments(request.SearchCondition, request.Customers, request.PageIndex, request.PageSize, out RowCount); response.Result.PageCount = RowCount % request.PageSize == 0 ? RowCount / request.PageSize : RowCount / request.PageSize + 1; response.Result.PageIndex = request.PageIndex; response.IsSuccess = true; } catch (Exception ex) { LogError(ex); response.IsSuccess = false; response.ErrorCode = ErrorCode.Technical; } return(response); }