|
@ -318,13 +318,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
SettleGroupNum = p.FirstOrDefault().SettleGroupNum, |
|
|
SettleGroupNum = p.FirstOrDefault().SettleGroupNum, |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
var all= entity.INVOICE_NOT_SETTLE.Select(p => p.SettleGroupNum).Distinct().ToList();//全部分组号
|
|
|
if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC) |
|
|
var part = mquery.ToList().Select(p => p.SettleGroupNum).Distinct().ToList();//发票对应分组号
|
|
|
{ |
|
|
var unsettled= all.Where(p => !part.Contains(p));//排除发票对应分组号,都为不可结
|
|
|
//var all = entity.INVOICE_NOT_SETTLE.Select(p => p.SettleGroupNum).Distinct().ToList();//全部分组号
|
|
|
var unsettledList= entity.INVOICE_NOT_SETTLE.Where(p => unsettled.Contains(p.SettleGroupNum)) |
|
|
//var part = mquery.ToList().Select(p => p.SettleGroupNum).Distinct().ToList();//发票对应分组号
|
|
|
|
|
|
//var unsettled = all.Where(p => !part.Contains(p));//排除发票对应分组号,都为不可结
|
|
|
|
|
|
var unsettledList = sdtos |
|
|
.GroupBy(p => new { p.LU, p.SettleGroupNum }) |
|
|
.GroupBy(p => new { p.LU, p.SettleGroupNum }) |
|
|
.Select(p => new UNSETTLED_DETAIL_DTO { LU = p.Key.LU, GroupNum = p.Key.SettleGroupNum, Qty = p.Sum(itm => itm.Qty.Value) }); |
|
|
.Select(p => new UNSETTLED_DETAIL_DTO { LU = p.Key.LU, GroupNum = p.Key.SettleGroupNum, Qty = p.Sum(itm => itm.Qty.Value) }); |
|
|
entity.UNSETTLED_DETAIL = unsettledList.ToList().OrderBy(p=>p.GroupNum).ThenBy(p=>p.LU).ToList(); |
|
|
entity.UNSETTLED_DETAIL = unsettledList.ToList().OrderBy(p => p.GroupNum).ThenBy(p => p.LU).ToList(); |
|
|
|
|
|
} |
|
|
entity.INVOICE_MAP_GROUP = lscompare.ToList().OrderBy(p => p.SettleGroupNum).ToList();//包含不可结结算分组号
|
|
|
entity.INVOICE_MAP_GROUP = lscompare.ToList().OrderBy(p => p.SettleGroupNum).ToList();//包含不可结结算分组号
|
|
|
entity.ADJ_DETAIL = adjQuery.ToList().OrderBy(p=>p.GroupNum).ThenBy(p=>p.LU).ToList(); |
|
|
entity.ADJ_DETAIL = adjQuery.ToList().OrderBy(p=>p.GroupNum).ThenBy(p=>p.LU).ToList(); |
|
|
return entity; |
|
|
return entity; |
|
@ -388,7 +391,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
var adj = invdetail.ADJ_DETAIL;//调整表
|
|
|
var adj = invdetail.ADJ_DETAIL;//调整表
|
|
|
var bbac = invdetail.INVOICE_WAIT_DETAIL_BBAC;//BBACJIS明细
|
|
|
var bbac = invdetail.INVOICE_WAIT_DETAIL_BBAC;//BBACJIS明细
|
|
|
var bj = invdetail.INVOICE_WAIT_DETAIL_BJ;//备件明细
|
|
|
var bj = invdetail.INVOICE_WAIT_DETAIL_BJ;//备件明细
|
|
|
var unsettle = invdetail.UNSETTLED_DETAIL;//未结明细
|
|
|
var unsettle = invdetail.UNSETTLED_DETAIL;//全部未结明细
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name; |
|
|
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name; |
|
@ -413,10 +416,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
{ |
|
|
{ |
|
|
_excel.Append(m, "发票结算分组对应");//发票分组对应结算号
|
|
|
_excel.Append(m, "发票结算分组对应");//发票分组对应结算号
|
|
|
} |
|
|
} |
|
|
if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC || first.BusinessType == EnumBusinessType.ZhiGongJianHBPO) |
|
|
if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC ) |
|
|
{ |
|
|
{ |
|
|
_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(); |
|
|