Browse Source

更新代码

master
学 赵 1 year ago
parent
commit
c0465997e8
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
  3. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs

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

@ -369,7 +369,7 @@ namespace Win.Sfs.SettleAccount.Bases
name = "BBAC直供件";
keyname = "发货单号";
break;
case EnumBusinessType.YingDuJian:
case EnumBusinessType.YinDuJian:
name = "HBPO印度件";
keyname = "发货单号";
break;

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs

@ -229,7 +229,7 @@ namespace Win.Sfs.SettleAccount.Bases
name = "BBAC直供件";
keyname = "发货单号";
break;
case EnumBusinessType.YingDuJian:
case EnumBusinessType.YinDuJian:
name = "HBPO印度件";
keyname = "发货单号";
break;

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

@ -66,7 +66,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <returns></returns>
public virtual async Task<string> ReissueInvoice(string p_invbillnum)
{
var mappingList= await GetMapGroupAsync(p_invbillnum);//结算分组
var mappingList= await GetMapGroupAsync(p_invbillnum);//发票对应结算分组
if (mappingList != null && mappingList.Count() > 0)
{
@ -110,27 +110,8 @@ 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();//不能结算
var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys);
var priceList = _priceRepository.ToList();//价格单
var inner = from d in dto1s
join p in priceList on d.LU equals p.LU
where
d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
select d;
var left = from d in dto1s
join p in inner on new { d.LU, d.PN } equals new { p.LU, p.PN }
into temp
from tm in temp.DefaultIfEmpty()//校验错误项
where tm == null
select d;
List<ERR_EXP_DTO> errorList = new List<ERR_EXP_DTO>();
foreach (var error in left)
{
errorList.Add(new ERR_EXP_DTO() { ItemCode = error.LU, CustomCode = "业务类别BBAC", Version = version.ToString(), Message = "LU:{0}PN:{1},下线日期:{2}没有对应区间销售价格表!" });
}
var errorList =await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType);
if (errorList.Count() > 0)
{
return await ExportErrorReportAsync(errorList);
@ -167,7 +148,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
else//二次开票
{
await ReissueSecInvoice(dtos, version, p_invbillnum);
}
}
}

Loading…
Cancel
Save