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.
312 lines
12 KiB
312 lines
12 KiB
using BBWY.Client.Helpers;
|
|
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 Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
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,long? SealBoxId, int? PageIndex, int? PageSize)
|
|
{
|
|
return SendRequest<GetWareSealBoxResponse>(globalContext.QKApiHost, $"api/SealBox/GetWareSealBoxList",
|
|
new
|
|
{
|
|
ShopName,
|
|
TaskId,
|
|
SkuId,
|
|
PageIndex,
|
|
PageSize,
|
|
SealBoxId
|
|
}
|
|
, 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,long?sealBoxId=null, int PageIndex = 1
|
|
, int PageSize = 10)
|
|
{
|
|
return SendRequest<SearchWaitFallWareResponse>(globalContext.QKApiHost, $"api/SealBox/SearchWareFallWareConfigureList",
|
|
new
|
|
{
|
|
ShopName,
|
|
TaskId,
|
|
SkuId,
|
|
PageIndex,
|
|
PageSize,
|
|
positionState,
|
|
sealBoxId
|
|
}
|
|
, 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, string providerName = "", string wareName = "",string WareCity="",DateTime? TransportOverTime=null)
|
|
{
|
|
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/SetFallWareConfigure",
|
|
new
|
|
{
|
|
SealBoxId,
|
|
ProductTitle,
|
|
PurchaseOrder,
|
|
PrewOrder,
|
|
WaybillNo,
|
|
providerName,
|
|
wareName,
|
|
WareCity,
|
|
TransportOverTime
|
|
}
|
|
, 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);
|
|
}
|
|
|
|
|
|
public ApiResponse<GetJDSupplierNameAndStoreNameResponse> GetJDSupplierNameAndStoreName(string poOrderNo)
|
|
{
|
|
return SendRequest<GetJDSupplierNameAndStoreNameResponse>(globalContext.BBYWApiHost, "api/qiku/GetJDSupplierNameAndStoreName", new
|
|
{
|
|
poOrderNo,
|
|
globalContext.User.Shop.AppKey,
|
|
globalContext.User.Shop.AppSecret,
|
|
globalContext.User.Shop.AppToken,
|
|
globalContext.User.Shop.Platform,
|
|
}, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
public ApiResponse<GetWareSealBoxWaitConfigureResponse> GetWareSealBoxWaitConfigureList(string ShopName, long? TaskId, string SkuId, int? PageIndex, int? PageSize)
|
|
{
|
|
return SendRequest<GetWareSealBoxWaitConfigureResponse>(globalContext.QKApiHost, $"api/SealBox/GetWareSealBoxWaitConfigureList",
|
|
new
|
|
{
|
|
ShopName,
|
|
TaskId,
|
|
SkuId,
|
|
PageIndex,
|
|
PageSize
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<GetWareSealBoxConfigureCountResponse> GetWareSealBoxConfigureCounts()
|
|
{
|
|
return SendRequest<GetWareSealBoxConfigureCountResponse>(globalContext.QKApiHost, $"api/SealBox/GetWareSealBoxConfigureCounts",
|
|
null
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
|
|
|
|
public ApiResponse<GetWareWaitTransportResponse> GetWareWaitTransportList(WareType WareType, int? PageSize, int? PageIndex)
|
|
{
|
|
return SendRequest<GetWareWaitTransportResponse>(globalContext.QKApiHost, $"api/SealBox/GetWareWaitTransportList",
|
|
new
|
|
{
|
|
WareType,
|
|
PageSize,
|
|
PageIndex
|
|
|
|
}
|
|
, null, HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<bool> WareCompeteTransport(long sealBoxId)
|
|
{
|
|
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/WareCompeteTransport?sealBoxId={sealBoxId}",
|
|
null , null, HttpMethod.Post);
|
|
}
|
|
|
|
|
|
public ApiResponse<GetWareTransportCountResponse> GetWareTransportCounts()
|
|
{
|
|
return SendRequest<GetWareTransportCountResponse>(globalContext.QKApiHost, $"api/SealBox/GetWareTransportCounts",
|
|
null, null, HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<GetWareWaitCompletedResponse> GetWareWaitCompletedList(string shopId, string ShopName , long? TaskId , string SkuId , long? sealBoxId , int? PageIndex, int? PageSize)
|
|
{
|
|
return SendRequest<GetWareWaitCompletedResponse>(globalContext.QKApiHost, $"api/SealBox/GetWareWaitCompletedList",
|
|
new {
|
|
shopId,
|
|
PageIndex,
|
|
PageSize,
|
|
ShopName,
|
|
TaskId,
|
|
SkuId,
|
|
sealBoxId
|
|
|
|
}, null, HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<bool> WareCompetedWaitCompleted(long sealBoxId)
|
|
{
|
|
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/WareCompetedWaitCompleted?sealBoxId={sealBoxId}",
|
|
null, null, HttpMethod.Post);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取揽收单信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ApiResponse<GetWareLSAcceptOrderResponse> GetWareLSAcceptOrder()
|
|
{
|
|
return SendRequest<GetWareLSAcceptOrderResponse>(globalContext.QKApiHost, $"api/WareLSAcceptOrder/GetWareLSAcceptOrder",
|
|
null, null, HttpMethod.Get);
|
|
}
|
|
|
|
public ApiResponse<GetWareLSOrderPurchaseResponse> GetWareLSOrderPurchaseList(string PrewOrder)
|
|
{
|
|
return SendRequest<GetWareLSOrderPurchaseResponse>(globalContext.QKApiHost, $"api/WareLSAcceptOrder/GetWareLSOrderPurchaseList?PrewOrder={PrewOrder}",
|
|
null, null, HttpMethod.Get);
|
|
}
|
|
}
|
|
}
|
|
|