diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs index cc9880d8..478cc0a4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs @@ -256,23 +256,27 @@ namespace Win.Sfs.SettleAccount.Bases new ERR_EXP_DTO() { ItemCode = $"{itm}", Message = $"[客户零件关系表]不存在客户零件号{itm}" }); } var errorEntitylist = new List(); - if (inv.BusinessType == EnumBusinessType.BeiJian) - { - errorEntitylist = await _baseDomainService.CheckPriceList(entityList, inv.Site,true).ConfigureAwait(false); - } - if (inv.BusinessType == EnumBusinessType.YinDuJian) - { - foreach (var itm in entityList) - { - itm.BusinessType = EnumBusinessType.YinDuJian; - } - errorEntitylist = await _baseDomainService.CheckPriceList(entityList, inv.Site, true).ConfigureAwait(false); - } - else + switch (inv.BusinessType ) { - errorEntitylist = await _baseDomainService.CheckPriceList(entityList, inv.Site).ConfigureAwait(false); + case EnumBusinessType.BeiJian: + errorEntitylist = await _baseDomainService.CheckPriceList(entityList, inv.Site, true).ConfigureAwait(false); + break; + case EnumBusinessType.YinDuJian: + foreach (var itm in entityList) + { + itm.BusinessType = EnumBusinessType.YinDuJian; + } + errorEntitylist = await _baseDomainService.CheckPriceList(entityList, inv.Site, true).ConfigureAwait(false); + break; + default: + errorEntitylist = await _baseDomainService.CheckPriceList(entityList, inv.Site).ConfigureAwait(false); + break; + + } + + if (errorEntitylist.Count > 0) { foreach (var itm in errorEntitylist) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs index 6e973699..466d25c7 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs @@ -143,27 +143,52 @@ namespace Win.Sfs.SettleAccount.Entities.BQ //var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList(); //var notList = _notRepository.Where(p => gNumList.Contains(p.GroupNum)).ToList();//不能结算 List priceList = new List(); - if (inv.BusinessType == EnumBusinessType.BeiJian) + switch (inv.BusinessType) { - var priceListbj = _pricebjRepository.ToList();//价格单 - foreach (var itm in priceListbj) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); - } - } - if (inv.BusinessType == EnumBusinessType.YinDuJian) - { - var priceListYindu = _priceYinDuRepository.ToList();//价格单 - foreach (var itm in priceListYindu) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); - } - } + case EnumBusinessType.BeiJian: + var priceListbj = _pricebjRepository.ToList();//价格单 + foreach (var itm in priceListbj) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + } + break; + case EnumBusinessType.YinDuJian: + var priceListYindu = _priceYinDuRepository.ToList();//价格单 + foreach (var itm in priceListYindu) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + } - else - { - priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + break; + default: + priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + break; } + + + + + //if (inv.BusinessType == EnumBusinessType.BeiJian) + //{ + // var priceListbj = _pricebjRepository.ToList();//价格单 + // foreach (var itm in priceListbj) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + // } + //} + //if (inv.BusinessType == EnumBusinessType.YinDuJian) + //{ + // var priceListYindu = _priceYinDuRepository.ToList();//价格单 + // foreach (var itm in priceListYindu) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + // } + //} + + //else + //{ + // priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + //} var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType).ConfigureAwait(false); if (errorList.Count > 0) { @@ -312,26 +337,30 @@ namespace Win.Sfs.SettleAccount.Entities.BQ //var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList(); //var notList = _notRepository.Where(p => gNumList.Contains(p.GroupNum)).ToList();//不能结算 List priceList = new List(); - if (inv.BusinessType == EnumBusinessType.BeiJian) - { - var priceListbj = _pricebjRepository.ToList();//价格单 - foreach (var itm in priceListbj) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); - } - } - if (inv.BusinessType == EnumBusinessType.YinDuJian) - { - var priceListYindu = _priceYinDuRepository.ToList();//价格单 - foreach (var itm in priceListYindu) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); - } - } - else + + switch (inv.BusinessType) { - priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + case EnumBusinessType.BeiJian: + var priceListbj = _pricebjRepository.ToList();//价格单 + foreach (var itm in priceListbj) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + } + break; + case EnumBusinessType.YinDuJian: + var priceListYindu = _priceYinDuRepository.ToList();//价格单 + foreach (var itm in priceListYindu) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + } + + break; + default: + priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + break; } + + var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType).ConfigureAwait(false); if (errorList.Count > 0) { @@ -451,18 +480,44 @@ namespace Win.Sfs.SettleAccount.Entities.BQ //var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList(); //var notList = _notRepository.Where(p => gNumList.Contains(p.GroupNum)).ToList();//不能结算 List priceList = new List(); - if (inv.BusinessType == EnumBusinessType.BeiJian) - { - var priceListbj = _pricebjRepository.ToList();//价格单 - foreach (var itm in priceListbj) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); - } - } - else + + switch (inv.BusinessType) { - priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + case EnumBusinessType.BeiJian: + var priceListbj = _pricebjRepository.ToList();//价格单 + foreach (var itm in priceListbj) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + } + break; + case EnumBusinessType.YinDuJian: + var priceListYindu = _priceYinDuRepository.ToList();//价格单 + foreach (var itm in priceListYindu) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + } + + break; + default: + priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + break; } + + + + + //if (inv.BusinessType == EnumBusinessType.BeiJian) + //{ + // var priceListbj = _pricebjRepository.ToList();//价格单 + // foreach (var itm in priceListbj) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + // } + //} + //else + //{ + // priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + //} var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType).ConfigureAwait(false); if (errorList.Count > 0) { @@ -629,35 +684,52 @@ namespace Win.Sfs.SettleAccount.Entities.BQ var entitys = bbaclist;//合并库存调整单和就发票可结算明细数据 var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); - - - - - - List priceList = new List(); - if (inv.BusinessType == EnumBusinessType.BeiJian) + switch (inv.BusinessType) { - var priceListbj = _pricebjRepository.Where(p => p.IsCancel == false).ToList(); //价格单 - foreach (var itm in priceListbj) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); - } - } - if (inv.BusinessType == EnumBusinessType.YinDuJian) - { - var priceListYindu = _priceYinDuRepository.ToList();//价格单 - foreach (var itm in priceListYindu) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); - } + case EnumBusinessType.BeiJian: + var priceListbj = _pricebjRepository.ToList();//价格单 + foreach (var itm in priceListbj) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + } + break; + case EnumBusinessType.YinDuJian: + var priceListYindu = _priceYinDuRepository.ToList();//价格单 + foreach (var itm in priceListYindu) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + } + + break; + default: + priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + break; } - else - { - priceList = _priceRepository.Where(p => p.IsCancel == false).ToList();//价格单 - } + //if (inv.BusinessType == EnumBusinessType.BeiJian) + //{ + // var priceListbj = _pricebjRepository.Where(p => p.IsCancel == false).ToList(); //价格单 + // foreach (var itm in priceListbj) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + // } + //} + //if (inv.BusinessType == EnumBusinessType.YinDuJian) + //{ + // var priceListYindu = _priceYinDuRepository.ToList();//价格单 + // foreach (var itm in priceListYindu) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + // } + //} + + + //else + //{ + // priceList = _priceRepository.Where(p => p.IsCancel == false).ToList();//价格单 + //} var dto1s = ObjectMapper.Map, List>(entitys); var q = from d in dto1s join p in priceList on d.LU equals p.LU @@ -846,26 +918,50 @@ namespace Win.Sfs.SettleAccount.Entities.BQ var entitys = bbaclist;//合并库存调整单和就发票可结算明细数据 var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); List priceList = new List(); - if (inv.BusinessType == EnumBusinessType.BeiJian) - { - var priceListbj = _pricebjRepository.Where(p => p.IsCancel == false).ToList(); //价格单 - foreach (var itm in priceListbj) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); - } - } - if (inv.BusinessType == EnumBusinessType.YinDuJian) + switch (inv.BusinessType) { - var priceListYindu = _priceYinDuRepository.ToList();//价格单 - foreach (var itm in priceListYindu) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); - } - } - else - { - priceList = _priceRepository.Where(p => p.IsCancel == false).ToList();//价格单 + case EnumBusinessType.BeiJian: + var priceListbj = _pricebjRepository.ToList();//价格单 + foreach (var itm in priceListbj) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + } + break; + case EnumBusinessType.YinDuJian: + var priceListYindu = _priceYinDuRepository.ToList();//价格单 + foreach (var itm in priceListYindu) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + } + + break; + default: + priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单 + break; } + + + + //if (inv.BusinessType == EnumBusinessType.BeiJian) + //{ + // var priceListbj = _pricebjRepository.Where(p => p.IsCancel == false).ToList(); //价格单 + // foreach (var itm in priceListbj) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + // } + //} + //if (inv.BusinessType == EnumBusinessType.YinDuJian) + //{ + // var priceListYindu = _priceYinDuRepository.ToList();//价格单 + // foreach (var itm in priceListYindu) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + // } + //} + //else + //{ + // priceList = _priceRepository.Where(p => p.IsCancel == false).ToList();//价格单 + //} var dto1s = ObjectMapper.Map, List>(entitys); var q = from d in dto1s join p in priceList on d.LU equals p.LU diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs index 665a3c2f..7c22f1ac 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs @@ -79,26 +79,49 @@ namespace Win.Sfs.SettleAccount.Entities.BQ } var entitys = await _pubMng.GetDetalListAsync(billnum).ConfigureAwait(false); List priceList = new List(); - if (main.BusinessType == EnumBusinessType.BeiJian) - { - var priceListbj = _pricebjRepository.Where(p => p.IsCancel == false).ToList(); //价格单 - foreach (var itm in priceListbj) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price ,ClientCode="1049", ContractNo=itm.ContractNo}); - } - } - if (main.BusinessType == EnumBusinessType.YinDuJian) - { - var priceListbj = _priceYinDuRepository.Where(p => p.IsCancel == false).ToList(); //价格单 - foreach (var itm in priceListbj) - { - priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); - } - } - else + + switch (main.BusinessType) { - priceList = _priceRepository.Where(p => p.IsCancel == false).ToList();//价格单 + case EnumBusinessType.BeiJian: + var priceListbj = _pricebjRepository.ToList();//价格单 + foreach (var itm in priceListbj) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1049", ContractNo = itm.ContractNo }); + } + break; + case EnumBusinessType.YinDuJian: + var priceListYindu = _priceYinDuRepository.ToList();//价格单 + foreach (var itm in priceListYindu) + { + priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + } + + break; + default: + priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == main.Site).ToList();//价格单 + break; } + + //if (main.BusinessType == EnumBusinessType.BeiJian) + //{ + // var priceListbj = _pricebjRepository.Where(p => p.IsCancel == false).ToList(); //价格单 + // foreach (var itm in priceListbj) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price ,ClientCode="1049", ContractNo=itm.ContractNo}); + // } + //} + //if (main.BusinessType == EnumBusinessType.YinDuJian) + //{ + // var priceListbj = _priceYinDuRepository.Where(p => p.IsCancel == false).ToList(); //价格单 + // foreach (var itm in priceListbj) + // { + // priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo }); + // } + //} + //else + //{ + // priceList = _priceRepository.Where(p => p.IsCancel == false).ToList();//价格单 + //} var errorList = await CheckInvoiceGenerationRules(entitys, main.Site, priceList, main.BusinessType).ConfigureAwait(false);//校验生成规则 if (errorList.Count > 0) { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs index dc204d96..7f54b3bd 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs @@ -2204,7 +2204,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers foreach (var detail in adjdetails) { detail.InvBillNum = key; - adjdetails.Add(detail); + adjlist.Add(detail); } } var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID }) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs index 698123b6..7a8b8706 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs @@ -901,21 +901,21 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers var ls = itm.Value;//结算分组号列表 //反向查找结算数据 var invdetails = p_list.Where(p => ls.Contains(p.GroupNum)).ToList(); - foreach (var detail in invdetails) - { - detail.InvbillNum = key; - salist.Add(detail); - } - if (!string.IsNullOrEmpty(p_parentInvBillNum)) - { - //反向查找调整数据 - var adjdetails = p_adjlist.Where(p => ls.Contains(p.GroupNum)).ToList(); - foreach (var detail in adjdetails) - { - detail.InvBillNum = key; + //foreach (var detail in invdetails) + //{ + // detail.InvbillNum = key; + // salist.Add(detail); + //} + //if (!string.IsNullOrEmpty(p_parentInvBillNum)) + //{ + // //反向查找调整数据 + // var adjdetails = p_adjlist.Where(p => ls.Contains(p.GroupNum)).ToList(); + // foreach (var detail in adjdetails) + // { + // detail.InvBillNum = key; - } - } + // } + //} var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID, p.LU }) .Select(itm => new @@ -959,24 +959,24 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers decimal txtAmt = detailDtos.Sum(k => k.Amt) + Math.Round(detailDtos.Sum(k => k.Amt) * 0.13m, 2);//税后金额 decimal readAmt = Math.Round(detailDtos.Sum(k => k.Amt) * 0.13m, 2);//税额 var mapList = new List(); - foreach (var groupnum in ls) - { - mapList.Add(new INVOICE_MAP_GROUP( - guid: GuidGenerator.Create(), - version: p_version, - invbillNum: key, - invGroupNum: p_InvGroupNum, - settleGroupNum: groupnum, - amt: 0, - extend1: string.Empty, - extend2: string.Empty - ) - ); - } - if (mapList.Count > 0) - { - groupList.AddRange(mapList); - } + //foreach (var groupnum in ls) + //{ + // mapList.Add(new INVOICE_MAP_GROUP( + // guid: GuidGenerator.Create(), + // version: p_version, + // invbillNum: key, + // invGroupNum: p_InvGroupNum, + // settleGroupNum: groupnum, + // amt: 0, + // extend1: string.Empty, + // extend2: string.Empty + // ) + // ); + //} + //if (mapList.Count > 0) + //{ + // groupList.AddRange(mapList); + //} List _entityDetailList = new List(); foreach (var detail in query.ToList()) {