From 2c5870937e63da37af39ba457f1561cef2476d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 6 Dec 2023 14:13:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0WMS=E5=8F=91=E8=B4=A7=E5=8D=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BQ/Syncs/PendingDeductionService.cs | 2 ++ .../Entities/BQ/Syncs/SeSyncExtendManager.cs | 27 ++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs index 371667e2..94a2155c 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs @@ -226,12 +226,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs //BillType = EnumDeliverBjBmpBillType.JIS件, CustPartCode = itm.LU, SettlementVinCode = inv.InvbillNum, + SettlementPartCode =(!string.IsNullOrEmpty(itm.PN)?itm.PN:string.Empty)+ (!string.IsNullOrEmpty(itm.LU) ? itm.LU.Trim().Replace(" ", string.Empty) : string.Empty), DeliverBillType = bussinessType, VinCode = itm.PN, OrderNum = itm.GroupNum, ErpToLoc = itm.Extend2, //寄售库 ReMark = itm.Extend3, Version=int.Parse(inv.LastModificationTime.Value.ToString("yyyyMM")), + factory=itm.BusinessType.ToString() }; ls.AddRange(query1.ToList()); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs index 4a4ef9b1..95dff4dd 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs @@ -98,8 +98,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs Seq = t.Seq, UniqueCode = isJisTable ? t.UniqueCode : t.DeliverCode, VinCode = t.PN, + Version = GetVersionByBillTimeAsync(t.BillTime.Value, value),//加区间字段 - factory = t.BusinessType.ToString() + factory = t.BusinessType.ToString(), + SettlementVinCode = !string.IsNullOrEmpty(t.WmsBillNum) ? t.WmsBillNum : string.Empty, + SettlementPartCode = (!string.IsNullOrEmpty(t.PN) ? t.PN : string.Empty)+(!string.IsNullOrEmpty(t.CustomerPartCodeNoSpace) ? t.CustomerPartCodeNoSpace : string.Empty) + , + }).ToList(); var returnVmiLogList = returnSeDetails.Select(t => new VmiLog { @@ -127,6 +132,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs Seq = t.Seq, UniqueCode = isJisTable ? t.UniqueCode : t.DeliverCode, VinCode = t.PN, + SettlementVinCode=!string.IsNullOrEmpty(t.WmsBillNum)?t.WmsBillNum:string.Empty, + SettlementPartCode = (!string.IsNullOrEmpty(t.PN) ? t.PN : string.Empty) + (!string.IsNullOrEmpty(t.CustomerPartCodeNoSpace) ? t.CustomerPartCodeNoSpace : string.Empty) + , Version = GetVersionByBillTimeAsync(t.BillTime.Value, value),//加区间字段 factory = t.BusinessType.ToString() }).ToList(); @@ -168,7 +176,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs RealPartCode = t.PartCode, VinCode = t.PN, Version = GetVersionByBillTimeAsync(t.BillTime.Value, value),//加区间字段 - factory = t.BusinessType.ToString() + factory = t.BusinessType.ToString(), + SettlementVinCode = !string.IsNullOrEmpty(t.WmsBillNum) ? t.WmsBillNum : string.Empty, + SettlementPartCode = (!string.IsNullOrEmpty(t.PN) ? t.PN : string.Empty) + (!string.IsNullOrEmpty(t.CustomerPartCodeNoSpace) ? t.CustomerPartCodeNoSpace : string.Empty) + , + }).ToList(); var returnVmiLogList = returnSeDetails.Select(t => new VmiLog @@ -191,7 +203,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs RealPartCode = t.PartCode, VinCode = t.PN, Version = GetVersionByBillTimeAsync(t.BillTime.Value, value),//加区间字段 - factory = t.BusinessType.ToString() + factory = t.BusinessType.ToString(), + SettlementVinCode = !string.IsNullOrEmpty(t.WmsBillNum) ? t.WmsBillNum : string.Empty, + SettlementPartCode = (!string.IsNullOrEmpty(t.PN) ? t.PN : string.Empty) + (!string.IsNullOrEmpty(t.CustomerPartCodeNoSpace) ? t.CustomerPartCodeNoSpace : string.Empty) + , }).ToList(); vmiLogList.AddRange(returnVmiLogList); @@ -228,16 +243,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs var next = before + 1; DateTime lastYear = DateTime.ParseExact(string.Format("{0}-12-{1} 08:00:00", last, p_day), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);//上期时间 DateTime beforeYear = DateTime.ParseExact(string.Format("{0}-12-{1} 07:59:59", before, p_day), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);//这期时间 - - string version = null; - if (p_billtime >= DateTime.ParseExact(string.Format("{0}-01-01 00:00:00", before), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture) && p_billtime <= DateTime.ParseExact(string.Format("{0}-01-01 07:59:59", before), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture)) { version = $"{last.ToString()}12"; } - if (p_billtime >= DateTime.ParseExact(string.Format("{0}-01-01 08:00:00", before), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture) && p_billtime <= lastYear.AddMonths(1)) { version = $"{before.ToString()}01"; @@ -270,8 +281,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs { version = $"{before.ToString()}12"; } - - if (string.IsNullOrEmpty(version)) { return 200802;//找不到的数据默认写到这个区间