/// <summary> /// 获取待上交对账单汇总 /// </summary> /// <param name="start"></param> /// <param name="end"></param> /// <param name="businessUserId"></param> /// <param name="payeer"></param> /// <param name="accountingOptionId"></param> /// <param name="billNumber"></param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <returns></returns> public async Task <IList <FinanceReceiveAccountBillModel> > GetFinanceReceiveAccounts(DateTime?start, DateTime?end, int?businessUserId, int?payeer, int?accountingOptionId, string billNumber = "", int pageIndex = 0, int pageSize = 20, bool force = false, CancellationToken calToken = default) { try { int storeId = Settings.StoreId; int userId = Settings.UserId; var api = RefitServiceBuilder.Build <IFinanceReceiveAccountApi>(URL); var results = await _makeRequest.Start(api.GetFinanceReceiveAccounts(storeId, start, end, businessUserId, payeer, accountingOptionId, billNumber, pageIndex, pageSize, calToken), calToken); if (results != null && results?.Code >= 0) { return(results?.Data.ToList()); } else { return(null); } } catch (Exception e) { e.HandleException(); return(null); } }
/// <summary> /// 创建 /// </summary> /// <param name="data"></param> /// <returns></returns> public async Task <APIResult <FeedBack> > CreateOrUpdateAsync(FeedBack data, CancellationToken calToken = default) { try { var api = RefitServiceBuilder.Build <ITTSApi>(URL); var results = await _makeRequest.Start(api.InsertFeedbackAsync(data, Settings.StoreId)); return(results); } catch (Exception) { return(null); } }