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