using BBWY.Client.Models; using BBWY.Client.Models.APIModel; 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.QiKu { public class PackTaskOverTimeDetailService : BaseApiService, IDenpendency { public PackTaskOverTimeDetailService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) { } public ApiResponse SearchTaskList(string skuId = null, string taskId = null , string spuId = null, string orderSn = null, TaskState? TaskState = null, int pageIndex = 1, int pageSize = 10 ) { return SendRequest(globalContext.QKApiHost, "api/PackTask/SearchTaskList", new { orderSn, spuId, skuId, taskId, TaskState, pageIndex, pageSize, ShopId = globalContext.User.Shop.ShopId.ToString(), }, null, HttpMethod.Post); } /// /// 查询超时任务列表 /// /// /// public ApiResponse SearchOverTimeTaskList(string ShopId, DateTime? StartTime, DateTime? EndTime, OverTimeTaskState? overTimeTaskState, OverTimeTaskType? OverTimeType, int? PageIndex, int? PageSize = 20) { return SendRequest(globalContext.QKApiHost, $"api/PackTaskOverTimeDetail/SearchOverTimeTaskList", new { ShopId, StartTime, EndTime, OverTimeType= OverTimeType==0?null: OverTimeType, PageIndex, PageSize, OverTimeTaskState= (overTimeTaskState == OverTimeTaskState.全部) ? null : overTimeTaskState, }, null, HttpMethod.Post); } // /// 任务超时提交备注(解释超时原因) /// /// /// public ApiResponse SubmitOverTimeMarkMsg(TaskMessageType TaskType, long OverTimeTaskId, OverTimeType OverTimeType, string OverTimeRemarkMsg) { return SendRequest(globalContext.QKApiHost, "api/PackTaskOverTimeDetail/SubmitOverTimeMarkMsg", new { TaskType, OverTimeTaskId, OverTimeType, OverTimeRemarkMsg, UserName=globalContext.User.Name, }, null, HttpMethod.Post); } } }