From b79d4b3daba0ed9d0ed45554e397ab06f79f85ab Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Thu, 17 Nov 2022 22:05:05 +0800 Subject: [PATCH] 1 --- .../Statistics/StatisticsBusiness.cs | 3 +- BBWY.Test/JDBaoBiaoAPITest.cs | 70 ++++++++++++++++--- BBWY.Test/Program.cs | 16 ++++- 3 files changed, 75 insertions(+), 14 deletions(-) diff --git a/BBWY.Server.Business/Statistics/StatisticsBusiness.cs b/BBWY.Server.Business/Statistics/StatisticsBusiness.cs index dcc68eb7..af9fc6f2 100644 --- a/BBWY.Server.Business/Statistics/StatisticsBusiness.cs +++ b/BBWY.Server.Business/Statistics/StatisticsBusiness.cs @@ -293,6 +293,7 @@ namespace BBWY.Server.Business //startDate = startDate.Date; //endDate = endDate.Date.AddDays(1).AddSeconds(-1); var dt = DateTime.Parse("2022-05-01"); + var afterDt = DateTime.Parse("2022-10-01"); var response = new OrderCountStatisticsResponse(); response.WaitPurchaseCount = fsql.Select().Where(o => o.ShopId == shopId && o.OrderState == Enums.OrderState.等待采购 && o.StartTime >= dt).Count(); @@ -306,7 +307,7 @@ namespace BBWY.Server.Business response.WaitOutStoreCount = fsql.Select().Where(o => o.ShopId == shopId && o.OrderState == Enums.OrderState.待出库 && o.StartTime >= dt).Count(); - response.AfterSaleOrderUnhandleCount = fsql.Select().Where(aso => aso.ShopId == shopId && (aso.ProductHealth == null || aso.ProductResult == null) && aso.CreateTime >= dt).Count(); + response.AfterSaleOrderUnhandleCount = fsql.Select().Where(aso => aso.ShopId == shopId && (aso.ProductHealth == null || aso.ProductResult == null) && aso.CreateTime >= afterDt).Count(); return response; } diff --git a/BBWY.Test/JDBaoBiaoAPITest.cs b/BBWY.Test/JDBaoBiaoAPITest.cs index c2dca970..07c79556 100644 --- a/BBWY.Test/JDBaoBiaoAPITest.cs +++ b/BBWY.Test/JDBaoBiaoAPITest.cs @@ -642,22 +642,72 @@ namespace BBWY.Test } - public void Test_服务单明细(IJdClient client, string token) + public void Test_FindSku(IJdClient client, string token) { + StockReadFindSkuStockRequest req = new StockReadFindSkuStockRequest(); - var res = new AscQueryViewRequest(); - res.buId = "10598776"; - res.operatePin = "布莱特玩具"; - res.operateNick = "布莱特玩具"; - res.serviceId = 1567063304; - res.orderId = 255815085917; + req.skuId = 10042760172349;// 10036238533172; //京仓sku - //req.extJsonStr = ; + //req.field = "abc,def,hgj"; - var response = client.Execute(res, token, DateTime.Now.ToLocalTime()); - Console.WriteLine(JsonConvert.SerializeObject(response)); + var res = client.Execute(req, token, DateTime.Now.ToLocalTime()); + Console.WriteLine(JsonConvert.SerializeObject(res)); + } + + public void Test_获取事业部编码(IJdClient client, string token) + { + EclpMasterQueryDeptRequest req = new EclpMasterQueryDeptRequest(); + + // req.deptNos = ; + + + var res = client.Execute(req, token, DateTime.Now.ToLocalTime()); + Console.WriteLine(JsonConvert.SerializeObject(res)); + } + + public void Test_查询仓库(IJdClient client, string token) + { + StoreFindPartitionWhByIdAndStatusRequest req = new StoreFindPartitionWhByIdAndStatusRequest(); + + req.status = "2"; + var res = client.Execute(req, token, DateTime.Now.ToLocalTime()); + Console.WriteLine(JsonConvert.SerializeObject(res)); + } + + public void Test_查询京仓库存(IJdClient client, string token) + { + + EclpStockQueryStockRequest req = new EclpStockQueryStockRequest(); + + req.deptNo = "EBU4418054732484"; + + req.warehouseNo = "110029845"; //成都亚一公共平台仓1号库 + + //req.stockStatus = ; + + //req.stockType = ; + + //req.goodsNo = ; + + req.currentPage ="1" ; + + req.pageSize = "100"; + + //req.returnZeroStock = ; + + //req.returnIsvLotattrs = ; + + //req.goodsLevel = ; + + //req.isvSku = ; + + //req.sellerGoodsSign = ; + + + var res = client.Execute(req, token, DateTime.Now.ToLocalTime()); + Console.WriteLine(JsonConvert.SerializeObject(res)); } } } diff --git a/BBWY.Test/Program.cs b/BBWY.Test/Program.cs index dac12b67..bb04095d 100644 --- a/BBWY.Test/Program.cs +++ b/BBWY.Test/Program.cs @@ -30,14 +30,24 @@ namespace BBWY.Test IJdClient client = GetJdClient(appkey, appSecret); var test1 = new JDBaoBiaoAPITest(); - test1.Test_服务单明细(client, token); - //test1.Test_订单维度_快车(client, token); - //test1.Test_订单维度_京速推(client, token); + //test1.Test_FindSku(client, token); + test1.Test_获取事业部编码(client, token); Console.WriteLine(); Console.WriteLine(); + test1.Test_查询仓库(client, token); + Console.WriteLine(); + Console.WriteLine(); //test1.Test2(client, token); + test1.Test_查询京仓库存(client, token); + Console.WriteLine(); + Console.WriteLine(); + + test1.Test_FindSku(client, token); + Console.WriteLine(); + Console.WriteLine(); + Console.ReadKey(); } }