Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
6016553dc1
  1. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  2. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
  3. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  4. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs
  5. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs
  6. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

7
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs

@ -606,14 +606,15 @@ namespace Win.Sfs.SettleAccount.Bases
/// <returns></returns>
protected async Task<List<ERR_EXP_DTO>> CheckInvoiceGenerationRules<T>(List<T> dto1s, List<PriceList> p_pricelist, EnumBusinessType p_businessType) where T : SA_CAN_BASE
{
var first = dto1s.FirstOrDefault();
var first = dto1s.Where(p=>!string.IsNullOrEmpty(p.Site)).FirstOrDefault();
var usepriceList = p_pricelist.Where(p => p.ClientCode == first.Site && p.IsCancel == false).ToList();
var errorlist = _baseservice.CheckPriceListContinuity(usepriceList);
var inner = from d in dto1s
join p in p_pricelist on d.LU equals p.LU
join p in usepriceList on d.LU equals p.LU
where
d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && d.Site == p.ClientCode && p.IsCancel == false
d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && first.Site == p.ClientCode && p.IsCancel == false
select d;
var left = from d in dto1s
join p in inner on new { d.LU, d.PN } equals new { p.LU, p.PN }

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs

@ -331,7 +331,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <returns></returns>
public virtual async Task<IActionResult> ReissueInvoiceList(List<PUB_ADJ_DETAIL_DTO> p_list)
{
var result = await _adjservice.CheckImport(p_list).ConfigureAwait(false);
if (result != "OK")
{
@ -451,8 +450,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
}
var als = invBilllist.Where(p => string.IsNullOrEmpty(p.PartCode)).ToList();
var invlist = invBilllist.OrderBy(p => p.PartCode).ToList();
var als = invBilllist.Where(p => string.IsNullOrEmpty(p.LU)).ToList();
var invlist = invBilllist.OrderBy(p => p.LU).ToList();
return new JsonResult(new { Code = 200, Data = invlist });
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs

@ -73,7 +73,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async Task<IActionResult> GenerateInvoice([FromBody] string invbillNum)
{
var main = await _bbacMng.GetMainAsync(invbillNum).ConfigureAwait(false);
if (main != null)
{
@ -92,9 +91,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
if (await _bbacMng.SetForwardState(main, SettleBillState.).ConfigureAwait(false))
{
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
var notQuery = await _notRepository.Where(p => p.SettleBillNum == main.SettleBillNum).ToListAsync().ConfigureAwait(false);
var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys);
var q = from d in dto1s
join p in priceList on d.LU equals p.LU

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs

@ -58,6 +58,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//var gList = mappingList.Select(p => p.SettleGroupNum).ToList();//获取发票所有结算分组
var inv = await GetInvoiceGroupByInvBillNum(p_invbillnum).ConfigureAwait(false);
var settle = await _hbpoMng.GetMainAsync(inv.InvGroupNum).ConfigureAwait(false);
if (settle == null)
{
throw new UserFriendlyException($"选择发票:{p_invbillnum}对应的可结算单不存在请检查!", "400");
@ -414,14 +415,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
throw new UserFriendlyException($"不存发票号为:{invbillnum}发票", "400");
}
var invlist = invBilllist.OrderBy(p => p.PartCode).ToList();
var invlist = invBilllist.OrderBy(p => p.LU).ToList();
//}
//else
//{
// throw new UserFriendlyException($"不存发票号:{invbillnum}对应的结算分组号");
//}
return new JsonResult(new { Code = 200, Message = "生成成功", Data = invBilllist });
return new JsonResult(new { Code = 200, Message = "生成成功", Data = invlist });
}

15
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

@ -60,9 +60,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var errorlist = await CheckRepeat(p_list).ConfigureAwait(false);
if (errorlist.Count > 0)
{
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorlist) });
}
var first = p_list.FirstOrDefault();
var invbillnum = first.InvBillNum;
@ -78,9 +76,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var version = int.Parse(DateTime.Now.ToString("yyyymm"));
//var gList = mappingList.Select(p => p.SettleGroupNum).ToList();//获取发票所有结算分组
var inv = await GetInvoiceGroupByInvBillNum(invbillnum).ConfigureAwait(false);
var settle = await _pubMng.GetMainAsync(inv.InvGroupNum).ConfigureAwait(false);
if (settle == null)
{
throw new UserFriendlyException($"选择发票:{invbillnum}对应的可结算单不在请检查!", "400");
@ -133,12 +129,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
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 });
priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price,ClientCode="1049" });
}
}
else
{
priceList = _priceRepository.ToList();//价格单
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)
@ -209,9 +205,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var version = int.Parse(DateTime.Now.ToString("yyyymm"));
//var gList = mappingList.Select(p => p.SettleGroupNum).ToList();//获取发票所有结算分组
var inv = await GetInvoiceGroupByInvBillNum(p_invbillnum).ConfigureAwait(false);
var settle = await _pubMng.GetMainAsync(inv.InvGroupNum).ConfigureAwait(false);
if (settle == null)
{
throw new BusinessException("8989", $"选择发票:{p_invbillnum}对应的可结算单不在请检查!");
@ -610,13 +607,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
throw new UserFriendlyException($"不存发票号为:{invbillnum}发票", "400");
}
var invlist = invBilllist.OrderBy(p => p.PartCode).ToList();
var invlist = invBilllist.OrderBy(p => p.LU).ToList();
//}
//else
//{
// throw new UserFriendlyException($"不存发票号:{invbillnum}对应的结算分组号");
//}
return new JsonResult(new { Code = 200, Message = "生成成功", Data = invBilllist });
return new JsonResult(new { Code = 200, Message = "生成成功", Data = invlist });
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@ -1243,7 +1243,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var grouplist = p_list.Select(p => p.GroupNum).Distinct().ToList();//可结分组
lsby.AddRange(grouplist);
var nolist = p_notlist.Where(p => !grouplist.Contains(p.GroupNum)).Select(p => p.GroupNum).ToList();//不可结分组
int count = invoiceMap.Keys.Count;//计算第几张发票计数器
int i = 0;

Loading…
Cancel
Save