|
@ -5,11 +5,13 @@ using System.ServiceModel.Channels; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
using System.Threading; |
|
|
using System.Threading; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
using DocumentFormat.OpenXml.Office2010.Excel; |
|
|
using EFCore.BulkExtensions; |
|
|
using EFCore.BulkExtensions; |
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax; |
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax; |
|
|
using Microsoft.EntityFrameworkCore.Metadata.Conventions; |
|
|
using Microsoft.EntityFrameworkCore.Metadata.Conventions; |
|
|
using Newtonsoft.Json; |
|
|
using Newtonsoft.Json; |
|
|
using Nito.AsyncEx; |
|
|
using Nito.AsyncEx; |
|
|
|
|
|
using NPOI.HSSF.Util; |
|
|
using NPOI.OpenXmlFormats; |
|
|
using NPOI.OpenXmlFormats; |
|
|
using NPOI.SS.Formula.Functions; |
|
|
using NPOI.SS.Formula.Functions; |
|
|
using SettleAccount.Bases; |
|
|
using SettleAccount.Bases; |
|
@ -58,7 +60,7 @@ public class PendingDeductionService : ApplicationService, ITransientDependency, |
|
|
//MaiDanJianHBPO
|
|
|
//MaiDanJianHBPO
|
|
|
//BeiJian
|
|
|
//BeiJian
|
|
|
//YinDuJian
|
|
|
//YinDuJian
|
|
|
if (type == "JisBBAC" || type == "ZhiGongJianBBAC" || type == "MaiDanJianBBAC" ) |
|
|
if (type == "JisBBAC" || type == "ZhiGongJianBBAC" || type == "MaiDanJianBBAC" || type== "BeiJian") |
|
|
{ |
|
|
{ |
|
|
var jisdetail = _dbcontext.Set<BBAC_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.JisBBAC);//jis
|
|
|
var jisdetail = _dbcontext.Set<BBAC_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.JisBBAC);//jis
|
|
|
if (jisdetail != null && jisdetail.Count() > 0) |
|
|
if (jisdetail != null && jisdetail.Count() > 0) |
|
@ -123,6 +125,22 @@ public class PendingDeductionService : ApplicationService, ITransientDependency, |
|
|
} |
|
|
} |
|
|
Sync(ydlist, EnumDeliverBjBmpBillType.印度件, isout == "out" ? true : false); |
|
|
Sync(ydlist, EnumDeliverBjBmpBillType.印度件, isout == "out" ? true : false); |
|
|
} |
|
|
} |
|
|
|
|
|
var bjlist = detailist1.Where(p => p.BusinessType == EnumBusinessType.BeiJian).ToList(); |
|
|
|
|
|
if (bjlist.Count > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (var itm in bjlist) |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(itm.Extend2)) |
|
|
|
|
|
{ |
|
|
|
|
|
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "BeiJian").Description; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
Sync(bjlist, EnumDeliverBjBmpBillType.北汽4S备件, isout == "out" ? true : false); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else if (type == "JisHBPO" || type == "ZhiGongJianHBPO" || type == "MaiDanJianHBPO") |
|
|
else if (type == "JisHBPO" || type == "ZhiGongJianHBPO" || type == "MaiDanJianHBPO") |
|
@ -180,6 +198,7 @@ public class PendingDeductionService : ApplicationService, ITransientDependency, |
|
|
var query = from itm in p_ls |
|
|
var query = from itm in p_ls |
|
|
select new VmiLog() |
|
|
select new VmiLog() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
CodeType=string.Empty, |
|
|
CodeType=string.Empty, |
|
|
BillTime = DateTime.Now, |
|
|
BillTime = DateTime.Now, |
|
|
ChangedTime = DateTime.Now, |
|
|
ChangedTime = DateTime.Now, |
|
@ -200,6 +219,11 @@ public class PendingDeductionService : ApplicationService, ITransientDependency, |
|
|
}; |
|
|
}; |
|
|
var ls = query.ToList(); |
|
|
var ls = query.ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var itm in ls) |
|
|
|
|
|
{ |
|
|
|
|
|
itm.SetId(GuidGenerator.Create()); |
|
|
|
|
|
} |
|
|
var _first= p_ls.FirstOrDefault(); |
|
|
var _first= p_ls.FirstOrDefault(); |
|
|
using (var transaction =_dbcontext.Database.BeginTransaction()) |
|
|
using (var transaction =_dbcontext.Database.BeginTransaction()) |
|
|
{ |
|
|
{ |
|
@ -212,7 +236,6 @@ public class PendingDeductionService : ApplicationService, ITransientDependency, |
|
|
|
|
|
|
|
|
var messagelist = new List<VmiMessage>(); |
|
|
var messagelist = new List<VmiMessage>(); |
|
|
|
|
|
|
|
|
_dbcontext.BulkInsert(ls); |
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in ls) |
|
|
foreach (var item in ls) |
|
|
{ |
|
|
{ |
|
|