You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
201 lines
7.2 KiB
201 lines
7.2 KiB
using BBWY.Client.Models;
|
|
using BBWY.Client.Models.APIModel;
|
|
using BBWY.Client.Models.APIModel.Response.PackTask;
|
|
using BBWY.Client.Views.PackTask;
|
|
using BBWY.Common.Http;
|
|
using BBWY.Common.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
using System.Text;
|
|
|
|
namespace BBWY.Client.APIServices
|
|
{
|
|
public class SealBoxService : BaseApiService, IDenpendency
|
|
{
|
|
public SealBoxService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext)
|
|
{
|
|
}
|
|
|
|
|
|
public ApiResponse<SealBoxWaitConfigureResponse> GetSealBoxWaitConfigureList(string SkuId, string TaskId, int? PageSize = 10, int? PageIndex = 1, string SpuId = null)
|
|
{
|
|
return SendRequest<SealBoxWaitConfigureResponse>(globalContext.QKApiHost, $"api/SealBox/GetSealBoxWaitConfigureList",
|
|
new
|
|
{
|
|
ShopId = globalContext.User.Shop.ShopId.ToString(),
|
|
TaskId = TaskId,
|
|
SkuId = SkuId,
|
|
SpuId,
|
|
PageSize,
|
|
PageIndex,
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
public ApiResponse<SealBoxPackStateCountResponse> GetSealBoxPackStateCount()
|
|
{
|
|
return SendRequest<SealBoxPackStateCountResponse>(globalContext.QKApiHost, $"api/SealBox/GetSealBoxPackStateCount",
|
|
new
|
|
{
|
|
ShopId = globalContext.User.Shop.ShopId.ToString(),
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<bool> SetSealBoxConfigured(SetSealBoxConfiguredRequest setSealBoxConfiguredRequest)
|
|
{
|
|
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/SetSealBoxConfigured",
|
|
setSealBoxConfiguredRequest
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<SealBoxConfiguredResponse> GetSealBoxConfiguredList(PositionState PositionState, string SkuId, string TaskId, string shopId, int? PageSize = 10, int? PageIndex = 1, string SpuId = null)
|
|
{
|
|
return SendRequest<SealBoxConfiguredResponse>(globalContext.QKApiHost, $"api/SealBox/GetSealBoxConfiguredList",
|
|
new
|
|
{
|
|
PositionState,
|
|
ShopId = shopId,
|
|
TaskId = TaskId,
|
|
SkuId = SkuId,
|
|
SpuId,
|
|
PageSize,
|
|
PageIndex,
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
public ApiResponse<UpdateSealBoxConfiguredResponse> GetUpdateSealBoxConfigured(long SealBoxId, long[] TaskIds)
|
|
{
|
|
return SendRequest<UpdateSealBoxConfiguredResponse>(globalContext.QKApiHost, $"api/SealBox/GetUpdateSealBoxConfigured",
|
|
new
|
|
{
|
|
SealBoxId,
|
|
TaskIds
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
public ApiResponse<bool> BatchUpdateSealBoxConfigured(BatchUpdateSealBoxConfiguredRequest batchUpdateSealBoxConfiguredRequest)
|
|
{
|
|
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/BatchUpdateSealBoxConfigured",
|
|
batchUpdateSealBoxConfiguredRequest
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<GetWareSealBoxResponse> GetWareSealBoxList(string ShopName, long? TaskId, string SkuId, int? PageIndex, int? PageSize)
|
|
{
|
|
return SendRequest<GetWareSealBoxResponse>(globalContext.QKApiHost, $"api/SealBox/GetWareSealBoxList",
|
|
new
|
|
{
|
|
ShopName,
|
|
TaskId,
|
|
SkuId,
|
|
PageIndex,
|
|
PageSize
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
|
|
public ApiResponse<bool> WareCompeteSealBox(long SealBoxId, int? BoxCount)
|
|
{
|
|
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/WareCompeteSealBox",
|
|
new
|
|
{
|
|
SealBoxId,
|
|
BoxCount
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
/// <summary>
|
|
/// 仓库端获取待落仓列表
|
|
/// </summary>
|
|
/// <param name="ShopName"></param>
|
|
/// <param name="TaskId"></param>
|
|
/// <param name="SkuId"></param>
|
|
/// <param name="PageIndex"></param>
|
|
/// <param name="PageSize"></param>
|
|
/// <returns></returns>
|
|
public ApiResponse<SearchWaitFallWareResponse> SearchWareFallWareConfigureList(PositionState positionState, string ShopName = null, long? TaskId = null, string SkuId = null, int PageIndex = 1
|
|
, int PageSize = 10)
|
|
{
|
|
return SendRequest<SearchWaitFallWareResponse>(globalContext.QKApiHost, $"api/SealBox/SearchWareFallWareConfigureList",
|
|
new
|
|
{
|
|
ShopName,
|
|
TaskId,
|
|
SkuId,
|
|
PageIndex,
|
|
PageSize,
|
|
positionState
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 商家端 获取待落仓列表
|
|
/// </summary>
|
|
/// <param name="ShopName"></param>
|
|
/// <param name="TaskId"></param>
|
|
/// <param name="SkuId"></param>
|
|
/// <param name="PageIndex"></param>
|
|
/// <param name="PageSize"></param>
|
|
/// <returns></returns>
|
|
public ApiResponse<SearchFallWareConfiguredResponse> SearchFallWareConfiguredList(PositionState positionState, long? TaskId = null, string SkuId = null, int PageIndex = 1
|
|
, int PageSize = 10)
|
|
{
|
|
return SendRequest<SearchFallWareConfiguredResponse>(globalContext.QKApiHost, $"api/SealBox/SearchFallWareConfiguredList",
|
|
new
|
|
{
|
|
shopId = globalContext.User.Shop.ShopId.ToString(),
|
|
positionState,
|
|
TaskId,
|
|
SkuId,
|
|
PageIndex,
|
|
PageSize
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
|
|
|
|
public ApiResponse<bool> SetFallWareConfigure(long SealBoxId, string ProductTitle, string PurchaseOrder, string PrewOrder, string WaybillNo)
|
|
{
|
|
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/SetFallWareConfigure",
|
|
new
|
|
{
|
|
SealBoxId,
|
|
ProductTitle,
|
|
PurchaseOrder,
|
|
PrewOrder,
|
|
WaybillNo
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
public ApiResponse<FallWareConfigureCountResponse> GetFallWareConfigureCounts(string shopId)
|
|
{
|
|
return SendRequest<FallWareConfigureCountResponse>(globalContext.QKApiHost, $"api/SealBox/GetFallWareConfigureCounts?shopId={shopId}",
|
|
null
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
public ApiResponse<bool> WareCompeteFallWare(long SealBoxId)
|
|
{
|
|
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/WareCompeteFallWare?SealBoxId={SealBoxId}",
|
|
null
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
}
|
|
}
|
|
|