Merge branch 'BaoMaKu' of http://8.130.121.29:3000/Develop/YunTongJackYunTask into BaoMaKu
This commit is contained in:
@@ -21,7 +21,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
_yTKJTShopParameterRepository = yTKJTShopParameterRepository;
|
||||
}
|
||||
|
||||
DateTime startTime = DateTime.Parse("2025-10-01");
|
||||
DateTime startTime = DateTime.Parse("2025-11-01");
|
||||
/// <summary>
|
||||
/// 请求开放平台服务
|
||||
/// </summary>
|
||||
@@ -95,15 +95,16 @@ namespace MyCode.Project.Services.Implementation
|
||||
TradeTypeList.Add(1);
|
||||
TradeTypeList.Add(7);
|
||||
TradeTypeList.Add(8);
|
||||
TradeTypeList.Add(5);
|
||||
List<TradesItem> trades = new List<TradesItem>();
|
||||
TradeTypeList.ForEach(ty =>
|
||||
{
|
||||
requestBizData.TradeType = ty;
|
||||
string lggl = JsonHelper.ToJson(requestBizData);
|
||||
LogHelper.Info(lggl);
|
||||
LogHelper.Info("TradeType:==" + ty.ToString() + " " + lggl);
|
||||
JackyunResponse response = Call(EnumAttribute.GetAttribute(ApiEnum.TRADEFULLINFOGET).Value, "1.0", requestBizData);
|
||||
string ll = JsonHelper.ToJson(response);
|
||||
LogHelper.Info(ll);
|
||||
LogHelper.Info("TradeType:=="+ ty.ToString() + " "+ll);
|
||||
|
||||
if (response.code == "200")
|
||||
{
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
}
|
||||
pushKingDeeOrders.ForEach(t =>
|
||||
{
|
||||
//_workProcessService.Add<IOrderPushService>(this.MerchantId, "PushOrderToKingDee", "推送订单到云星空或者WMS", t.Id, 1);
|
||||
_workProcessService.Add<ISalesOutboundService>(this.MerchantId, "PushSalesOutboundToKingDee", "推送销售出库单到金蝶云星空", t.Id, 1);
|
||||
Thread.Sleep(300);
|
||||
});
|
||||
|
||||
@@ -325,7 +325,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
}
|
||||
pushKingDeeOrders.ForEach(t =>
|
||||
{
|
||||
_workProcessService.Add<IOrderPushService>(this.MerchantId, "PushOrderToKingDee", "推送退货订单到云星空或者WMS", t.Id, 1);
|
||||
_workProcessService.Add<ISalesReturnService>(this.MerchantId, "PushSalesReturnToKingDee", "推送销售退货单到金蝶云星空", t.Id, 1);
|
||||
Thread.Sleep(300);
|
||||
});
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
{
|
||||
FNUMBER = BILL_TYPE_CODE
|
||||
},
|
||||
FBillNo = orderHead.Sheet > 0 ? orderHead.Sheet.ToString() : "",
|
||||
FBillNo = GenerateBillNo(orderHead.Sheet, orderHead.ConsignTime.Value),
|
||||
FDate = dateStr,
|
||||
FSaleOrgId = new FSaleOrgId()
|
||||
{
|
||||
@@ -301,7 +301,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
FNumber = customerId
|
||||
},
|
||||
FOwnerTypeIdHead = OWNER_TYPE,
|
||||
|
||||
|
||||
FOwnerIdHead = new FOwnerIdHead()
|
||||
{
|
||||
FOrgId = orgId
|
||||
@@ -334,7 +334,24 @@ namespace MyCode.Project.Services.Implementation
|
||||
},
|
||||
FEntity = entryList
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* JKXC+年月日+自增ID(三位)--销售出库单
|
||||
JKXT+年月日+自增ID(三位)--销售退货单
|
||||
JKCR+年月日+自增ID(三位)--采购入库单
|
||||
JKCT+年月日+自增ID(三位)--采购退货单
|
||||
**/
|
||||
private string GenerateBillNo(int Sheet, DateTime date)
|
||||
{
|
||||
string prefix = "JKXC" + date.ToString("yyyyMMdd");
|
||||
string numberPart = (Sheet > 0 ? Sheet.ToString() : "").PadLeft(3, '0');
|
||||
numberPart = numberPart.Length > 3 ? numberPart.Substring(numberPart.Length - 3) : numberPart;
|
||||
// 组合并确保只取最后3位数字
|
||||
string combined = prefix + numberPart;
|
||||
return combined;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,8 @@ namespace MyCode.Project.Services.Implementation
|
||||
{
|
||||
FNUMBER = BILL_TYPE_CODE
|
||||
},
|
||||
FDate = dateStr,
|
||||
FDate = dateStr,
|
||||
FBillNo= GenerateBillNo(orderHead.Sheet, orderHead.ConsignTime.Value),
|
||||
FSaleOrgId = new FSaleOrgId()
|
||||
{
|
||||
FOrgId = orgId
|
||||
@@ -246,6 +247,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
{
|
||||
FCustId = customerId
|
||||
},
|
||||
|
||||
//FSaledeptid = new FSaledeptid()
|
||||
//{
|
||||
// FNumber = "02"
|
||||
@@ -301,6 +303,17 @@ namespace MyCode.Project.Services.Implementation
|
||||
FEntity = entryList
|
||||
};
|
||||
}
|
||||
|
||||
private string GenerateBillNo(int Sheet,DateTime date)
|
||||
{
|
||||
string prefix = "JKXT" + date.ToString("yyyyMMdd");
|
||||
string numberPart = (Sheet > 0 ? Sheet.ToString() : "").PadLeft(3, '0');
|
||||
numberPart = numberPart.Length > 3 ? numberPart.Substring(numberPart.Length - 3) : numberPart;
|
||||
// 组合并确保只取最后3位数字
|
||||
string combined = prefix + numberPart;
|
||||
return combined;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,10 @@ namespace MyCode.Project.Services.Implementation
|
||||
public void AddTask()
|
||||
{
|
||||
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);
|
||||
//_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetPurchaseInboundData", "调度运行吉客云采购入库", now.ToString("yyyy-MM-dd"), 1);
|
||||
//_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetStorageGoodsDocOutV2", "获取吉客云采购退货出库单", now.ToString("yyyy-MM-dd"), 1);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user