|
|
@ -58,7 +58,7 @@ public class PendingDeductionService : ApplicationService, ITransientDependency, |
|
|
|
//MaiDanJianHBPO
|
|
|
|
//BeiJian
|
|
|
|
//YinDuJian
|
|
|
|
if (type == "JisBBAC" || type == "ZhiGongJianBBAC" || type == "MaiDanJianBBAC" || type=="") |
|
|
|
if (type == "JisBBAC" || type == "ZhiGongJianBBAC" || type == "MaiDanJianBBAC" ) |
|
|
|
{ |
|
|
|
var jisdetail = _dbcontext.Set<BBAC_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.JisBBAC);//jis
|
|
|
|
if (jisdetail != null && jisdetail.Count() > 0) |
|
|
@ -67,15 +67,16 @@ public class PendingDeductionService : ApplicationService, ITransientDependency, |
|
|
|
{ |
|
|
|
if (itm.Site == "1040" && string.IsNullOrEmpty(itm.Extend2)) |
|
|
|
{ |
|
|
|
itm.Extend2 = "CC001"; |
|
|
|
itm.Extend2 = projectList.FirstOrDefault(p=>p.Value== "JisBBAC").Description; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
itm.Extend2 = "CC017"; |
|
|
|
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC顺义").Description; |
|
|
|
} |
|
|
|
} |
|
|
|
Sync(jisdetail.ToList(), EnumDeliverBjBmpBillType.JIS件, isout == "out" ? true : false); |
|
|
|
} |
|
|
|
//买电脑
|
|
|
|
var mdetail = _dbcontext.Set<BBAC_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.MaiDanJianBBAC);//买单件
|
|
|
|
if (mdetail !=null&&mdetail.Count() > 0) |
|
|
|
{ |
|
|
@ -83,35 +84,43 @@ public class PendingDeductionService : ApplicationService, ITransientDependency, |
|
|
|
{ |
|
|
|
if (itm.Site == "1040" && string.IsNullOrEmpty(itm.Extend2)) |
|
|
|
{ |
|
|
|
itm.Extend2 = "CC001"; |
|
|
|
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC").Description; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
itm.Extend2 = "CC017"; |
|
|
|
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC顺义").Description; |
|
|
|
} |
|
|
|
} |
|
|
|
Sync(mdetail.ToList(), EnumDeliverBjBmpBillType.JIS件, isout == "out" ? true : false); |
|
|
|
} |
|
|
|
|
|
|
|
var detailist1 = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => list.Contains(p.BillNum) ).ToList(); |
|
|
|
if (detailist1 != null && detailist1.Count() > 0) |
|
|
|
|
|
|
|
if (detailist1.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in detailist1) |
|
|
|
var zgbbaclist = detailist1.Where(p => p.BusinessType == EnumBusinessType.ZhiGongJianHBPO).ToList(); |
|
|
|
foreach (var itm in zgbbaclist) |
|
|
|
{ |
|
|
|
if (itm.Site == "1040" && string.IsNullOrEmpty(itm.Extend2)) |
|
|
|
{ |
|
|
|
itm.Extend2 = "CC001"; |
|
|
|
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "ZhiGongJianBBAC").Description; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "ZhiGongJianBBAC顺义").Description; |
|
|
|
} |
|
|
|
Sync(mdetail.ToList(), EnumDeliverBjBmpBillType.JIS件, isout == "out" ? true : false); |
|
|
|
} |
|
|
|
if (detailist1.Count > 0) |
|
|
|
{ |
|
|
|
|
|
|
|
var zgbbaclist = detailist1.Where(p => p.BusinessType == EnumBusinessType.ZhiGongJianHBPO).ToList(); |
|
|
|
Sync(zgbbaclist, EnumDeliverBjBmpBillType.JIT直供件, isout == "out" ? true : false); |
|
|
|
var ydlist = detailist1.Where(p => p.BusinessType == EnumBusinessType.YinDuJian).ToList(); |
|
|
|
if (ydlist.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in zgbbaclist) |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(itm.Extend2)) |
|
|
|
{ |
|
|
|
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC").Description; |
|
|
|
} |
|
|
|
} |
|
|
|
Sync(ydlist, EnumDeliverBjBmpBillType.印度件, isout == "out" ? true : false); |
|
|
|
} |
|
|
|
} |
|
|
|