Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
f197bf0a7c
  1. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 33
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

5
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -275,10 +275,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
} }
public class UNSETTLED_DETAIL_DTO public class UNSETTLED_DETAIL_DTO
{ {
[Display(Name ="结算分组号")]
public string GroupNum { set; get; } public string GroupNum { set; get; }
[Display(Name = "零件号")]
public string LU { set; get; } public string LU { set; get; }
[Display(Name = "数量")]
public decimal Qty { set; get; } public decimal Qty { set; get; }

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

@ -408,18 +408,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
_excel.Append(detail, "发票明细"); _excel.Append(detail, "发票明细");
} }
_excel.Append(m, "发票结算分组对应");//发票分组对应结算号
if (first.BusinessType == EnumBusinessType.JisBBAC || first.BusinessType == EnumBusinessType.JisHBPO)
{
_excel.Append(m, "发票结算分组对应");//发票分组对应结算号
}
if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC || first.BusinessType == EnumBusinessType.ZhiGongJianHBPO) if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC || first.BusinessType == EnumBusinessType.ZhiGongJianHBPO)
{ {
_excel.Append(unsettle, "未结零件结算汇总"); _excel.Append(unsettle, "未结零件结算汇总");
} }
foreach (var itm in entities) foreach (var itm in entities)
{ {
var mgroup =m.Where(p => p.InvbillNum == itm.InvbillNum).ToList(); var mgroup = m.Where(p => p.InvbillNum == itm.InvbillNum).ToList();
var adjp = adj.Where(p => p.InvBillNum == itm.InvbillNum).ToList(); var adjp = adj.Where(p => p.InvBillNum == itm.InvbillNum).ToList();
var nolist = not.Where(p => p.InvBillNum == itm.InvbillNum).ToList(); var nolist = not.Where(p => p.InvBillNum == itm.InvbillNum).ToList();
var lsC = nolist.Where(p => p.Extend1 == "可结算") var lsC = nolist.Where(p => p.Extend1 == "可结算")
@ -430,14 +430,15 @@ 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, {
RealInvBillNum =p.Key.RealInvBillNum, LU = p.Key.LU,
InvDate =p.Key.InvDate, RealInvBillNum = p.Key.RealInvBillNum,
InvBillNum =p.Key.InvBillNum, InvDate = p.Key.InvDate,
InvBillNum = p.Key.InvBillNum,
InvGroupNum =p.Key.InvGroupNum, InvGroupNum = p.Key.InvGroupNum,
Qty=p.Sum(itm=>itm.Qty) Qty = p.Sum(itm => itm.Qty)
}).ToList(); }).ToList();
var lsN = nolist.Where(p => p.Extend1 == "不可结算").ToList() var lsN = nolist.Where(p => p.Extend1 == "不可结算").ToList()
@ -476,7 +477,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
invnot.Qty = string.Empty; invnot.Qty = string.Empty;
ls.Add(invnot); ls.Add(invnot);
} }
var entity= nolist.FirstOrDefault(); var entity = nolist.FirstOrDefault();
var disList = mgroup.Select(p => p.SettleGroupNum).Distinct().ToList(); var disList = mgroup.Select(p => p.SettleGroupNum).Distinct().ToList();
for (int i = 0; i < lineC; i++)//更新可结信息 for (int i = 0; i < lineC; i++)//更新可结信息
{ {
@ -484,7 +485,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
ls[i].InvDate = entity.InvDate; ls[i].InvDate = entity.InvDate;
ls[i].InvBillNum = entity.InvBillNum; ls[i].InvBillNum = entity.InvBillNum;
ls[i].InvGroupNum = entity.InvGroupNum; ls[i].InvGroupNum = entity.InvGroupNum;
// ls[i].SettleGroupNum = entity.SettleGroupNum; // ls[i].SettleGroupNum = entity.SettleGroupNum;
ls[i].SettleLU = lsC[i].LU; ls[i].SettleLU = lsC[i].LU;
ls[i].SettleQty = lsC[i].Qty == null ? string.Empty : lsC[i].Qty.ToString(); ls[i].SettleQty = lsC[i].Qty == null ? string.Empty : lsC[i].Qty.ToString();
} }
@ -502,7 +503,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
ls[i].SettleGroupNum = disList[i]; ls[i].SettleGroupNum = disList[i];
} }
if (first.BusinessType == EnumBusinessType.JisBBAC || first.BusinessType == EnumBusinessType.JisHBPO) if (first.BusinessType == EnumBusinessType.JisBBAC || first.BusinessType == EnumBusinessType.JisHBPO)
{ {
_excel.Append(ls, "结算分组零件" + itm.InvbillNum); _excel.Append(ls, "结算分组零件" + itm.InvbillNum);
} }

Loading…
Cancel
Save