退货类型订单

This commit is contained in:
余宇波 2025-10-20 16:25:51 +08:00
parent c8ad77df21
commit 4766ddf18c
4 changed files with 11 additions and 10 deletions

View File

@ -35,7 +35,7 @@ namespace MyCode.Project.Repositories
FROM [JackOrders] a WITH (NOLOCK)
LEFT JOIN [dbo].[JackOrdersItem] b WITH (NOLOCK)
ON a.id = b.JackOrdersId
WHERE a.status = 0 and TradeType in (1,7)
WHERE a.status = 0 and TradeType in (1,7) and sellCount <> 0
GROUP BY [shopCode],[shopName], [shopId], [warehouseName], [warehouseCode], [status], CONVERT(NVARCHAR(30),[consignTime],23) ,[goodsNo], [goodsId], [barcode] ,[warehouseId], [TradeType],Unit";
var list = this.SelectList<PushOrderListResp>(sql);
return list;
@ -54,12 +54,12 @@ GROUP BY [shopCode],[shopName], [shopId], [warehouseName], [warehouseCode], [s
SELECT [shopCode], [shopName], [shopId], [warehouseName], [warehouseCode],
[status], CONVERT(NVARCHAR(30),[consignTime],23) [consignTime],
[goodsNo], [goodsId],SUM([sellTotal]*-1) [sellTotal],
SUM([sellCount]*-1) [sellCount], SUM([ShareShouldReturnFee]*-1) AS [divideSellTotal],
SUM([returnCount]*-1) [sellCount], SUM([ShareShouldReturnFee]*-1) AS [divideSellTotal],
[barcode], [TradeType] ,[warehouseId],Unit
FROM [JackOrders] a WITH (NOLOCK)
LEFT JOIN [dbo].[ReturnChangeGoodsDetail] b WITH (NOLOCK)
ON a.id = b.JackOrdersId
WHERE a.status = 0 and [TradeType]=8
WHERE a.status = 0 and [TradeType]=8 and returnCount <> 0
GROUP BY [shopCode],[shopName], [shopId], [warehouseName], [warehouseCode], [status], CONVERT(NVARCHAR(30),[consignTime],23) ,[goodsNo],
[goodsId], [barcode] ,[warehouseId], [TradeType],Unit
ORDER BY [shopCode],[consignTime] desc,[TradeType]

View File

@ -155,9 +155,9 @@ namespace MyCode.Project.Services.Implementation
ReturnChangeGetRequestBizData requestBizData = new ReturnChangeGetRequestBizData();
//string value = "2025-06-15 00:00:00";// DateTime.Now.Date.AddDays(-5).ToString("yyyy-MM-dd HH:mm:ss") ;
//string value1 = "2025-06-20 00:00:00";//DateTime.Now.Date.ToString("yyyy-MM-dd HH:mm:ss");
string value = now.Date.AddDays(-1).ToString("yyyy-MM-dd");
string value = now.Date.AddDays(-7).ToString("yyyy-MM-dd");
string value1 = now.Date.ToString("yyyy-MM-dd");
if (now.Date.AddDays(-1) < startTime)
if (now.Date.AddDays(-7) < startTime)
{
value = startTime.ToString("yyyy-MM-dd");
}
@ -183,7 +183,7 @@ namespace MyCode.Project.Services.Implementation
List<ReturnChangeListResp> trades = new List<ReturnChangeListResp>();
TradeTypeList.ForEach(ty =>
{
requestBizData.ProcessStatusList = ty.ToString();
requestBizData.ProcessStatusList = "";
string lggl = JsonHelper.ToJson(requestBizData);
LogHelper.Info(lggl);
JackyunResponse response = Call(EnumAttribute.GetAttribute(ApiEnum.RETURNCHANGE).Value, "1.0", requestBizData);
@ -235,7 +235,7 @@ namespace MyCode.Project.Services.Implementation
reslut = trades.Select(rc => new TradesItem
{
tradeId = rc.TradeId,
tradeId = rc.TradeAfterId.ToString(),
couponFee = 0,
realFee = 0,
shopCode = rc.ShopCode,

View File

@ -125,7 +125,7 @@ namespace MyCode.Project.Services.Implementation
list.ForEach(sheet =>
{
if (pushKingDeeOrders.Where(t => t.ShopId == sheet.ShopId && t.WarehouseId == sheet.WarehouseId
&& t.ConsignTime.Value.ToString("yyyy-MM-dd")==sheet.ConsignTime).Count() > 0)
&& t.ConsignTime.Value.ToString("yyyy-MM-dd")==sheet.ConsignTime && t.TradeType != 8).Count() > 0)
{
return;
}
@ -191,7 +191,7 @@ namespace MyCode.Project.Services.Implementation
DateTime runTime = DateTime.Parse(now);
var list = _jackYunService.GetReturnChangeList(runTime);
SetReturnOrder(list);
//_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetAndMergeJackYunOrder", "合并吉客云订单到新表", now, 1);
_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetAndMergeJackReturnYunOrder", "合并吉客云退货订单到新表", now, 1);
}
#endregion
@ -265,7 +265,7 @@ namespace MyCode.Project.Services.Implementation
list.ForEach(sheet =>
{
if (pushKingDeeOrders.Where(t => t.ShopId == sheet.ShopId && t.WarehouseId == sheet.WarehouseId
&& t.ConsignTime.Value.ToString("yyyy-MM-dd") == sheet.ConsignTime).Count() > 0)
&& t.ConsignTime.Value.ToString("yyyy-MM-dd") == sheet.ConsignTime && t.TradeType==8).Count() > 0)
{
return;
}

View File

@ -44,6 +44,7 @@ namespace MyCode.Project.Services.Implementation
DateTime now = DateTime.Now.Date;
_workProcessService.Add<IWMSService>(this.MerchantId, "GetList", "抓取WMS订单到本地数据库", now.AddDays(-3).ToString("yyyy-MM-dd"), 1);
_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "TaskGetJackYunOrder", "调度运行抓吉客云销售订单", now.ToString("yyyy-MM-dd"), 1);
_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "TaskGetReturnChangeList", "调度运行抓吉客云退货订单", now.ToString("yyyy-MM-dd"), 1);
}
#endregion