Browse Source

测试提交

master
学 赵 1 year ago
parent
commit
665cafbc8a
  1. 40
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  2. 119
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

40
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -81,7 +81,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BBAC_CAN_SA_MNG bbacMng, BBAC_CAN_SA_MNG bbacMng,
HBPO_CAN_SA_MNG hbpoMng, HBPO_CAN_SA_MNG hbpoMng,
INV_MNG invMng INV_MNG invMng
) : base(excelImportService, snowflakeIdGenerator, commonManager) ) : base(excelImportService, snowflakeIdGenerator, commonManager)
{ {
_logger = logger; _logger = logger;
@ -136,11 +135,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
return; return;
} }
var invoiceGrpDetails = _settleAccountDbContext.Set<INVOICE_WAIT_DETAIL>() var invoiceGrpDetails = _settleAccountDbContext.Set<INVOICE_WAIT_DETAIL>()
.Where(t => t.InvbillNum == invbillNum) .Where(t => t.InvbillNum == invbillNum)
.ToList(); .ToList();
if (invoiceGrpDetails.Any()) if (invoiceGrpDetails.Any())
{ {
var tedSaInvs = new List<TED_SAS_INVOICE>(); var tedSaInvs = new List<TED_SAS_INVOICE>();
@ -158,7 +155,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
CreateTime = DateTime.Now, CreateTime = DateTime.Now,
UpdateTime = DateTime.Now, UpdateTime = DateTime.Now,
}; };
for (var i = 0; i < invoiceGrpDetails.Count; i++) for (var i = 0; i < invoiceGrpDetails.Count; i++)
{ {
var invoiceGrpDetail = invoiceGrpDetails[i]; var invoiceGrpDetail = invoiceGrpDetails[i];
@ -186,9 +182,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
LINE = (i + 1).ToString() LINE = (i + 1).ToString()
}); });
} }
tedSaInvs.FirstOrDefault().InvoiceTaxAmount += invoiceGrp.TaxDiff; tedSaInvs.FirstOrDefault().InvoiceTaxAmount += invoiceGrp.TaxDiff;
//红冲发票提交QAD //红冲发票提交QAD
if (!string.IsNullOrEmpty(invoiceGrp.ParentInvbillNum)) if (!string.IsNullOrEmpty(invoiceGrp.ParentInvbillNum))
{ {
@ -317,7 +311,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
return new JsonResult(new { Code = "400", Message = "有发票没有金税发票号!" }); return new JsonResult(new { Code = "400", Message = "有发票没有金税发票号!" });
} }
var ls = invs.Where(p => p.State != SettleBillState.).Distinct(); var ls = invs.Where(p => p.State != SettleBillState.).Distinct();
if (ls.Any()) if (ls.Any())
{ {
@ -391,9 +384,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
input.Filters.Add(new FilterCondition("InvoiceState", "1", EnumFilterAction.Equal, EnumFilterLogic.And)); input.Filters.Add(new FilterCondition("InvoiceState", "1", EnumFilterAction.Equal, EnumFilterLogic.And));
} }
var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m); var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m);
var first = invs.FirstOrDefault(); var first = invs.FirstOrDefault();
@ -468,7 +458,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//bj.PurchaseOrderNumber = itm.GetProperty("PurchaseOrderNumber", "");//采购订单号 //bj.PurchaseOrderNumber = itm.GetProperty("PurchaseOrderNumber", "");//采购订单号
//bj.DeliveryIndexNumber = itm.GetProperty("DeliveryIndexNumber", "");//交付索引号 //bj.DeliveryIndexNumber = itm.GetProperty("DeliveryIndexNumber", "");//交付索引号
//bj.PartName = itm.GetProperty("PartName", "");//零件名称 //bj.PartName = itm.GetProperty("PartName", "");//零件名称
BMap.Add(bj); BMap.Add(bj);
} }
@ -507,9 +496,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
ProductionGroup = itm.ProductionGroup, ProductionGroup = itm.ProductionGroup,
LineCode = itm.LineCode, LineCode = itm.LineCode,
ContractID = itm.ContractID, ContractID = itm.ContractID,
}; };
entity.INVOICE_WAIT_DETAIL_BJ = bjquery.OrderBy(p => p.LineCode).ToList(); entity.INVOICE_WAIT_DETAIL_BJ = bjquery.OrderBy(p => p.LineCode).ToList();
@ -592,7 +578,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}; };
entity.INVOICE_NOT_SETTLE = notquery.OrderBy(p => p.SettleGroupNum).ThenBy(p => p.LU).ToList(); entity.INVOICE_NOT_SETTLE = notquery.OrderBy(p => p.SettleGroupNum).ThenBy(p => p.LU).ToList();
var lscompare = entity.INVOICE_NOT_SETTLE.GroupBy(x => new { x.InvBillNum, x.SettleGroupNum }).Select(p => var lscompare = entity.INVOICE_NOT_SETTLE.GroupBy(x => new { x.InvBillNum, x.SettleGroupNum }).Select(p =>
new INVOICE_MAP_GROUP_DTO() new INVOICE_MAP_GROUP_DTO()
{ {
@ -621,7 +606,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
if (first.BusinessType == EnumBusinessType.MaiDanJianHBPO) if (first.BusinessType == EnumBusinessType.MaiDanJianHBPO)
{ {
//List<MAIDAN_HBPO_INVOICE_MAP_GROUP_DTO> maidan = new List<MAIDAN_HBPO_INVOICE_MAP_GROUP_DTO>(); //List<MAIDAN_HBPO_INVOICE_MAP_GROUP_DTO> maidan = new List<MAIDAN_HBPO_INVOICE_MAP_GROUP_DTO>();
var maiquery = from itm in m var maiquery = from itm in m
join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum
select select
@ -633,7 +617,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
InvbillNum = itm.InvbillNum, InvbillNum = itm.InvbillNum,
RealInvBillNum = itm1.RealnvBillNum RealInvBillNum = itm1.RealnvBillNum
}; };
entity.MAIDAN_HBPO_INVOICE_MAP_GROUP = maiquery.ToList(); entity.MAIDAN_HBPO_INVOICE_MAP_GROUP = maiquery.ToList();
List<MAIDAN_HBPO_UNSETTLED_DETAIL_DTO> unsettle = new List<MAIDAN_HBPO_UNSETTLED_DETAIL_DTO>(); List<MAIDAN_HBPO_UNSETTLED_DETAIL_DTO> unsettle = new List<MAIDAN_HBPO_UNSETTLED_DETAIL_DTO>();
foreach (var itm in sdtos) foreach (var itm in sdtos)
@ -643,12 +626,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
GroupNum = itm.SettleGroupNum, GroupNum = itm.SettleGroupNum,
LU = itm.LU, LU = itm.LU,
PN = itm.Extend1, PN = itm.Extend1,
}); });
} }
entity.MAIDAN_HBPO_UNSETTLED_DETAIL = unsettle; entity.MAIDAN_HBPO_UNSETTLED_DETAIL = unsettle;
} }
entity.ADJ_DETAIL = adjQuery.ToList().OrderBy(p => p.GroupNum).ThenBy(p => p.LU).ToList(); entity.ADJ_DETAIL = adjQuery.ToList().OrderBy(p => p.GroupNum).ThenBy(p => p.LU).ToList();
return entity; return entity;
} }
@ -678,7 +659,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
// break; // break;
//} //}
result.ShouldNotBeNull(); result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制 //保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync( await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto new SaveExcelImportInputDto
@ -701,14 +681,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
IExporter _csv = new CsvExporter(); IExporter _csv = new CsvExporter();
ExcelExporter _excel = new ExcelExporter(); ExcelExporter _excel = new ExcelExporter();
// var materialList = await _baseservice.GetMaterialList().ConfigureAwait(false); // var materialList = await _baseservice.GetMaterialList().ConfigureAwait(false);
var condition = input.Filters.FirstOrDefault(p => p.Column == "invbillNum"); var condition = input.Filters.FirstOrDefault(p => p.Column == "invbillNum");
if (condition == null) if (condition == null)
{ {
input.Filters.Add(new FilterCondition("InvoiceState", "1", EnumFilterAction.Equal, EnumFilterLogic.And)); input.Filters.Add(new FilterCondition("InvoiceState", "1", EnumFilterAction.Equal, EnumFilterLogic.And));
} }
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false); var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false);
var first = entities.FirstOrDefault(); var first = entities.FirstOrDefault();
var dtoDetails = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_EXP_DTO>>(entities); var dtoDetails = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_EXP_DTO>>(entities);
@ -723,10 +700,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var hbpom = invdetail.MAIDAN_HBPO_INVOICE_MAP_GROUP;//买单HBPO分组对应 var hbpom = invdetail.MAIDAN_HBPO_INVOICE_MAP_GROUP;//买单HBPO分组对应
var hbpounsettle = invdetail.MAIDAN_HBPO_UNSETTLED_DETAIL;//买单HBPO未结 var hbpounsettle = invdetail.MAIDAN_HBPO_UNSETTLED_DETAIL;//买单HBPO未结
var jitunsettle = invdetail.JIT_UNSETTLED_DETAIL;//买单HBPO未结 var jitunsettle = invdetail.JIT_UNSETTLED_DETAIL;//买单HBPO未结
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name; var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx"; string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
#region 发票明细 #region 发票明细
if (entities.FirstOrDefault().BusinessType == EnumBusinessType.JisBBAC) if (entities.FirstOrDefault().BusinessType == EnumBusinessType.JisBBAC)
{ {
@ -741,7 +716,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_excel.Append(detail, "发票明细"); _excel.Append(detail, "发票明细");
} }
#endregion #endregion
// 发票分组 // 发票分组
if (first.BusinessType == EnumBusinessType.JisBBAC || first.BusinessType == EnumBusinessType.JisHBPO || first.BusinessType == EnumBusinessType.ZhiGongJianHBPO) if (first.BusinessType == EnumBusinessType.JisBBAC || first.BusinessType == EnumBusinessType.JisHBPO || first.BusinessType == EnumBusinessType.ZhiGongJianHBPO)
{ {
@ -810,7 +784,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
p.InvDate, p.InvDate,
p.InvBillNum, p.InvBillNum,
p.InvGroupNum, p.InvGroupNum,
}).Select(p => new INVOICE_NOT_SETTLE_DTO() }).Select(p => new INVOICE_NOT_SETTLE_DTO()
{ {
LU = p.Key.LU, LU = p.Key.LU,
@ -939,7 +912,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files) public async Task<string> ExcelImport([FromForm] IFormFileCollection files)
{ {
ExportImporter _exportImporter = new ExportImporter(); ExportImporter _exportImporter = new ExportImporter();
@ -954,22 +926,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var newinv1= result.Where(p => p.InvbillNum == inv.InvbillNum).FirstOrDefault(); var newinv1= result.Where(p => p.InvbillNum == inv.InvbillNum).FirstOrDefault();
var newinv = ls.Where(p => p.InvbillNum == inv.InvbillNum).FirstOrDefault(); var newinv = ls.Where(p => p.InvbillNum == inv.InvbillNum).FirstOrDefault();
inv.Tax = 0.13m; inv.Tax = 0.13m;
//inv.RealAmt = Math.Round(inv.Amt * newinv.Tax, 2);
//inv.TaxAmt = inv.Amt+ Math.Round(inv.Amt * newinv.Tax, 2);
inv.RealnvBillNum = newinv.RealnvBillNum; inv.RealnvBillNum = newinv.RealnvBillNum;
// inv.RealAmt = newinv.RealAmt;
inv.TaxDiff = newinv.PreTaxDiff; inv.TaxDiff = newinv.PreTaxDiff;
inv.CreationTime = newinv1.InvoiceDate; inv.CreationTime = newinv1.InvoiceDate;
// inv.ClientCode = newinv.ClientCode;
} }
//foreach (var detail in invdetail)//明细EXTEND1字段BBAC不能占用
//{
// detail.Extend1 = Math.Round(detail.Amt * first.Tax, 2).ToString();
//}
await _repository.DbContext.BulkUpdateAsync(invlist).ConfigureAwait(false); await _repository.DbContext.BulkUpdateAsync(invlist).ConfigureAwait(false);
await _repository.DbContext.BulkUpdateAsync(invdetail).ConfigureAwait(false); await _repository.DbContext.BulkUpdateAsync(invdetail).ConfigureAwait(false);
return ApplicationConsts.SuccessStr; return ApplicationConsts.SuccessStr;

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

@ -31,7 +31,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
_emailSender = emailSender; _emailSender = emailSender;
_dbcontext = dbcontext; _dbcontext = dbcontext;
} }
[UnitOfWork(false)] [UnitOfWork(false)]
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {
@ -41,13 +41,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
var email = string.Empty; var email = string.Empty;
// property.Where(p => p.Name == "CurrentUserEmail").FirstOrDefault().Value; // property.Where(p => p.Name == "CurrentUserEmail").FirstOrDefault().Value;
var list = billList.Split(","); var list = billList.Split(",");
var projectList = _dbcontext.Set<CodeSetting>().Where(p => p.Project == "库位").ToList();
var projectList = _dbcontext.Set<CodeSetting>().Where(p => p.Project == "库位").ToList(); var jisbbac = projectList.FirstOrDefault(p => p.Value == "JisBBAC").Description;
var jisbbac= projectList.FirstOrDefault(p => p.Value == "JisBBAC").Description; var jisbbac_sy = projectList.FirstOrDefault(p => p.Value == "JisBBAC顺义").Description;
var jisbbac_sy= projectList.FirstOrDefault(p => p.Value == "JisBBAC顺义").Description; var yindujian = projectList.FirstOrDefault(p => p.Value == "YinDuJian").Description;
var yindujian= projectList.FirstOrDefault(p => p.Value == "YinDuJian").Description; var beijian = projectList.FirstOrDefault(p => p.Value == "BeiJian").Description;
var beijian= projectList.FirstOrDefault(p => p.Value == "BeiJian").Description; if (type == "JisBBAC" || type == "ZhiGongJianBBAC" || type == "MaiDanJianBBAC" || type == "BeiJian" || type == "YinDuJian")
if (type == "JisBBAC" || type == "ZhiGongJianBBAC" || type == "MaiDanJianBBAC" || type == "BeiJian" || type== "YinDuJian")
{ {
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)
@ -56,12 +55,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
{ {
if (itm.Site == "1040" && string.IsNullOrEmpty(itm.Extend2)) if (itm.Site == "1040" && string.IsNullOrEmpty(itm.Extend2))
{ {
itm.Extend2 =jisbbac; itm.Extend2 = jisbbac;
itm.Extend3 = "有结算无发运"; itm.Extend3 = "有结算无发运";
} }
if (itm.Site == "1046" && string.IsNullOrEmpty(itm.Extend2)) if (itm.Site == "1046" && string.IsNullOrEmpty(itm.Extend2))
{ {
itm.Extend2 =jisbbac_sy; itm.Extend2 = jisbbac_sy;
itm.Extend3 = "有结算无发运"; itm.Extend3 = "有结算无发运";
} }
} }
@ -80,7 +79,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
if (itm.Site == "1046" && string.IsNullOrEmpty(itm.Extend2)) if (itm.Site == "1046" && string.IsNullOrEmpty(itm.Extend2))
{ {
itm.Extend2 =jisbbac_sy; itm.Extend2 = jisbbac_sy;
itm.Extend3 = "有结算无发运"; itm.Extend3 = "有结算无发运";
} }
} }
@ -111,7 +110,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
{ {
if (string.IsNullOrEmpty(itm.Extend2)) if (string.IsNullOrEmpty(itm.Extend2))
{ {
itm.Extend2 =yindujian; itm.Extend2 = yindujian;
itm.Extend3 = "有结算无发运"; itm.Extend3 = "有结算无发运";
} }
} }
@ -143,7 +142,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
itm.Extend3 = "有结算无发运"; itm.Extend3 = "有结算无发运";
} }
} }
if(detailist.Count>0) if (detailist.Count > 0)
{ {
Sync(detailist, EnumDeliverBjBmpBillType.JIS件, email, isout == "out" ? true : false); Sync(detailist, EnumDeliverBjBmpBillType.JIS件, email, isout == "out" ? true : false);
} }
@ -222,14 +221,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
ErpToLoc = itm.Extend2, //寄售库 ErpToLoc = itm.Extend2, //寄售库
ReMark = itm.Extend3 ReMark = itm.Extend3
}; };
var ls = query.ToList(); var ls = query.ToList();
foreach (var itm in ls) foreach (var itm in ls)
{ {
itm.SetId(GuidGenerator.Create()); itm.SetId(GuidGenerator.Create());
} }
var _first = p_ls.FirstOrDefault(); var _first = p_ls.FirstOrDefault();
bool issucess = true; bool issucess = true;
using (var transaction = _dbcontext.Database.BeginTransaction()) using (var transaction = _dbcontext.Database.BeginTransaction())
{ {
try try
@ -246,7 +245,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
// }; // };
// messagelist.Add(message); // messagelist.Add(message);
//} //}
// _dbcontext.BulkInsert(messagelist); // _dbcontext.BulkInsert(messagelist);
_dbcontext.BulkInsert(ls, new BulkConfig() { }); _dbcontext.BulkInsert(ls, new BulkConfig() { });
var billList = p_ls.Select(p => p.BillNum).Distinct().ToList();//同步数据的发票号 var billList = p_ls.Select(p => p.BillNum).Distinct().ToList();//同步数据的发票号
var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();//扣减单内容 var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();//扣减单内容
@ -371,7 +370,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
} }
} }
} }
// _emailSender.SendAsync(e) // _emailSender.SendAsync(e)
// 提交事务 // 提交事务
transaction.Commit(); transaction.Commit();
} }
@ -382,60 +381,60 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
transaction.Rollback(); transaction.Rollback();
} }
} }
if (issucess ==false) if (issucess == false)
{
var billList = p_ls.Select(p => p.BillNum).Distinct().ToList();
var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
if (pdList.Count > 0)
{ {
foreach (var item in pdList) var billList = p_ls.Select(p => p.BillNum).Distinct().ToList();
var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
if (pdList.Count > 0)
{ {
if (flag == true) foreach (var item in pdList)
{
item.State = SettleBillState.;
}
else
{ {
item.State = SettleBillState.; if (flag == true)
{
item.State = SettleBillState.;
}
else
{
item.State = SettleBillState.;
}
} }
_dbcontext.BulkUpdate(pdList);
} }
_dbcontext.BulkUpdate(pdList); var bbacList = _dbcontext.Set<BBAC_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
} if (bbacList.Count > 0)
var bbacList = _dbcontext.Set<BBAC_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
if (bbacList.Count > 0)
{
foreach (var item in bbacList)
{ {
if (flag == true) foreach (var item in bbacList)
{ {
item.State = SettleBillState.; if (flag == true)
} {
else item.State = SettleBillState.;
{ }
item.State = SettleBillState.; else
{
item.State = SettleBillState.;
}
} }
_dbcontext.BulkUpdate(bbacList);
} }
_dbcontext.BulkUpdate(bbacList); var hbpoList = _dbcontext.Set<HBPO_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
} if (hbpoList.Count > 0)
var hbpoList = _dbcontext.Set<HBPO_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
if (hbpoList.Count > 0)
{
foreach (var item in hbpoList)
{ {
if (flag == true) foreach (var item in hbpoList)
{
item.State = SettleBillState.;
}
else
{ {
item.State = SettleBillState.; if (flag == true)
{
item.State = SettleBillState.;
}
else
{
item.State = SettleBillState.;
}
} }
_dbcontext.BulkUpdate(hbpoList);
} }
_dbcontext.BulkUpdate(hbpoList);
} }
} }
}
} }
} }

Loading…
Cancel
Save