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