Browse Source

更新

master
学 赵 1 year ago
parent
commit
dfdc3a3db4
  1. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
  2. 27
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs

@ -43,7 +43,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList(); var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value = string.Join(",", p_list) }); customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value = string.Join(",", p_list) });
customConditionList.Add(new CustomCondition() { Name = "Type", Value = "PUB" }); var first=detailist.FirstOrDefault();
customConditionList.Add(new CustomCondition() { Name = "Type", Value = first.BusinessType.ToString()});
customConditionList.Add(new CustomCondition() { Name = "IsOut", Value = "out" }); customConditionList.Add(new CustomCondition() { Name = "IsOut", Value = "out" });
var ls = _repository.Where(p => p_list.Contains(p.BillNum)).ToList(); var ls = _repository.Where(p => p_list.Contains(p.BillNum)).ToList();
var lst = ls.Where(p => (p.State == SettleBillState. || p.State == SettleBillState.)); var lst = ls.Where(p => (p.State == SettleBillState. || p.State == SettleBillState.));

27
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -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)
{ {

Loading…
Cancel
Save