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;//找不到的数据默认写到这个区间