|
@ -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,16 +430,17 @@ 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() |
|
|
.GroupBy(p => new |
|
|
.GroupBy(p => new |
|
|
{ |
|
|
{ |
|
@ -448,7 +449,7 @@ 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, |
|
@ -476,15 +477,15 @@ 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++)//更新可结信息
|
|
|
{ |
|
|
{ |
|
|
ls[i].RealInvBillNum = entity.RealInvBillNum; |
|
|
ls[i].RealInvBillNum = entity.RealInvBillNum; |
|
|
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); |
|
|
} |
|
|
} |
|
|