|
|
@ -32,8 +32,6 @@ public class PendingDeductionService : ITransientDependency, IExportJob |
|
|
|
INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> hbpoRepository, |
|
|
|
INormalEfCoreRepository<PUB_PD_DETAIL, Guid> pubRepository, |
|
|
|
VmiAppService vimservice |
|
|
|
|
|
|
|
|
|
|
|
) |
|
|
|
{ |
|
|
|
_hbpoRepository = hbpoRepository; |
|
|
@ -105,8 +103,8 @@ public class PendingDeductionService : ITransientDependency, IExportJob |
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
|
ChangedQty = itm.Qty, |
|
|
|
ChangedType = VmiType.Out, |
|
|
|
SubBillType = EnumDeliverSubBillType.小件BBAC, |
|
|
|
BillType = EnumDeliverBjBmpBillType.JIS件, |
|
|
|
//SubBillType = EnumDeliverSubBillType.小件BBAC,
|
|
|
|
//BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
PartCode = itm.PartCode, |
|
|
|
SettlementVinCode = itm.VinCode, |
|
|
|
PartCode2 = itm.PartCode2, |
|
|
@ -130,45 +128,118 @@ public class PendingDeductionService : ITransientDependency, IExportJob |
|
|
|
BillTime = itm.CreationTime, |
|
|
|
ChangedTime = DateTime.Now, |
|
|
|
Qty = itm.Qty, |
|
|
|
DeliverTime = itm.CreationTime, |
|
|
|
// DeliverTime = ,
|
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
|
ChangedQty = itm.Qty, |
|
|
|
ChangedType = VmiType.Out, |
|
|
|
SubBillType = EnumDeliverSubBillType.小件BBAC, |
|
|
|
BillType = EnumDeliverBjBmpBillType.JIS件, |
|
|
|
PartCode = itm.LU, |
|
|
|
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
|
|
|
|
// BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
PartCode = itm.LU,//客户
|
|
|
|
SettlementVinCode = itm.PN, |
|
|
|
PartCode2 = itm.LU, |
|
|
|
PartCode2 = itm.LU,//厂内
|
|
|
|
CustomerPartCode = itm.LU, |
|
|
|
VinCode = itm.PN, |
|
|
|
OrderNum = itm.GroupNum, |
|
|
|
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
|
|
|
|
ErpToLoc = "C0001" |
|
|
|
}).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList(); |
|
|
|
|
|
|
|
switch (type) |
|
|
|
{ |
|
|
|
case "ZhiGongJianBBAC": |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (detailist != null && detailist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in detailist) |
|
|
|
{ |
|
|
|
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog() |
|
|
|
{ |
|
|
|
BillTime = itm.CreationTime, |
|
|
|
ChangedTime = DateTime.Now, |
|
|
|
Qty = itm.Qty, |
|
|
|
// DeliverTime = ,
|
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
|
ChangedQty = itm.Qty, |
|
|
|
ChangedType = VmiType.Out, |
|
|
|
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
|
|
|
|
// BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
PartCode = itm.LU,//客户
|
|
|
|
SettlementVinCode = itm.PN, |
|
|
|
PartCode2 = itm.LU,//厂内
|
|
|
|
CustomerPartCode = itm.LU, |
|
|
|
VinCode = itm.PN, |
|
|
|
OrderNum = itm.PN, |
|
|
|
ErpToLoc = "C0001" |
|
|
|
}).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
case "ZhiGongJianHBPO": |
|
|
|
|
|
|
|
if (detailist != null && detailist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in detailist) |
|
|
|
{ |
|
|
|
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog() |
|
|
|
{ |
|
|
|
BillTime = itm.CreationTime, |
|
|
|
ChangedTime = DateTime.Now, |
|
|
|
Qty = itm.Qty, |
|
|
|
// DeliverTime = ,
|
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
|
ChangedQty = itm.Qty, |
|
|
|
ChangedType = VmiType.Out, |
|
|
|
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
|
|
|
|
// BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
PartCode = itm.LU,//客户
|
|
|
|
SettlementVinCode = itm.PN, |
|
|
|
PartCode2 = itm.LU,//厂内
|
|
|
|
CustomerPartCode = itm.LU, |
|
|
|
VinCode = itm.PN, |
|
|
|
OrderNum = itm.PN,// 非JIS传ASN 交付识别号
|
|
|
|
ErpToLoc = "C0001" |
|
|
|
}).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
case "MaiDanJianBBAC": |
|
|
|
|
|
|
|
if (detailist != null && detailist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in detailist) |
|
|
|
{ |
|
|
|
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog() |
|
|
|
{ |
|
|
|
BillTime = itm.CreationTime, |
|
|
|
ChangedTime = DateTime.Now, |
|
|
|
Qty = itm.Qty, |
|
|
|
// DeliverTime = ,
|
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
|
ChangedQty = itm.Qty, |
|
|
|
ChangedType = VmiType.Out, |
|
|
|
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
|
|
|
|
// BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
PartCode = itm.LU,//客户
|
|
|
|
SettlementVinCode = itm.PN, |
|
|
|
PartCode2 = itm.LU,//厂内
|
|
|
|
CustomerPartCode = itm.LU, |
|
|
|
VinCode = itm.PN, |
|
|
|
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
|
|
|
|
ErpToLoc = "C0001" |
|
|
|
}).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -176,18 +247,99 @@ public class PendingDeductionService : ITransientDependency, IExportJob |
|
|
|
case "MaiDanJianHBPO": |
|
|
|
|
|
|
|
|
|
|
|
if (detailist != null && detailist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in detailist) |
|
|
|
{ |
|
|
|
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog() |
|
|
|
{ |
|
|
|
BillTime = itm.CreationTime, |
|
|
|
ChangedTime = DateTime.Now, |
|
|
|
Qty = itm.Qty, |
|
|
|
// DeliverTime = ,
|
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
|
ChangedQty = itm.Qty, |
|
|
|
ChangedType = VmiType.Out, |
|
|
|
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
|
|
|
|
// BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
PartCode = itm.LU,//客户
|
|
|
|
SettlementVinCode = itm.PN, |
|
|
|
PartCode2 = itm.LU,//厂内
|
|
|
|
CustomerPartCode = itm.LU, |
|
|
|
VinCode = itm.PN, |
|
|
|
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
|
|
|
|
ErpToLoc = "C0001" |
|
|
|
}).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
case "BeiJian": |
|
|
|
|
|
|
|
|
|
|
|
if (detailist != null && detailist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in detailist) |
|
|
|
{ |
|
|
|
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog() |
|
|
|
{ |
|
|
|
BillTime = itm.CreationTime, |
|
|
|
ChangedTime = DateTime.Now, |
|
|
|
Qty = itm.Qty, |
|
|
|
// DeliverTime = ,
|
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
|
ChangedQty = itm.Qty, |
|
|
|
ChangedType = VmiType.Out, |
|
|
|
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
|
|
|
|
// BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
PartCode = itm.LU,//客户
|
|
|
|
SettlementVinCode = itm.PN, |
|
|
|
PartCode2 = itm.LU,//厂内
|
|
|
|
CustomerPartCode = itm.LU, |
|
|
|
VinCode = itm.PN, |
|
|
|
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
|
|
|
|
ErpToLoc = "C0001" |
|
|
|
}).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
case "YinDuJian": |
|
|
|
|
|
|
|
if (detailist != null && detailist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in detailist) |
|
|
|
{ |
|
|
|
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog() |
|
|
|
{ |
|
|
|
BillTime = itm.CreationTime, |
|
|
|
ChangedTime = DateTime.Now, |
|
|
|
Qty = itm.Qty, |
|
|
|
// DeliverTime = ,
|
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
|
ChangedQty = itm.Qty, |
|
|
|
ChangedType = VmiType.Out, |
|
|
|
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
|
|
|
|
// BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
|
PartCode = itm.LU,//客户
|
|
|
|
SettlementVinCode = itm.PN, |
|
|
|
PartCode2 = itm.LU,//厂内
|
|
|
|
CustomerPartCode = itm.LU, |
|
|
|
VinCode = itm.PN, |
|
|
|
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
|
|
|
|
ErpToLoc = "C0001" |
|
|
|
}).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|