|
@ -107,7 +107,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
{ |
|
|
{ |
|
|
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); |
|
|
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); |
|
|
entitys= entitys.OrderBy(p => p.IndexNum).ToList(); |
|
|
entitys= entitys.OrderBy(p => p.IndexNum).ToList(); |
|
|
|
|
|
|
|
|
var dto1s = ObjectMapper.Map<List<PUB_CAN_SA_DETAIL>, List<PUB_CAN_SA_DETAIL_DTO>>(entitys); |
|
|
var dto1s = ObjectMapper.Map<List<PUB_CAN_SA_DETAIL>, List<PUB_CAN_SA_DETAIL_DTO>>(entitys); |
|
|
var q = from d in dto1s |
|
|
var q = from d in dto1s |
|
|
join p in priceList on d.LU equals p.LU |
|
|
join p in priceList on d.LU equals p.LU |
|
@ -133,14 +132,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
EndDate = p.EndTime, |
|
|
EndDate = p.EndTime, |
|
|
PartCode = d.PartCode,//客户零件号
|
|
|
PartCode = d.PartCode,//客户零件号
|
|
|
LineCode=d.IndexNum |
|
|
LineCode=d.IndexNum |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
var dtos = q.ToList(); |
|
|
var dtos = q.ToList(); |
|
|
if (dtos != null && dtos.Count > 0) |
|
|
if (dtos != null && dtos.Count > 0) |
|
|
{ |
|
|
{ |
|
|
if (billnum.Substring(0, 1) == "C")//一次开票
|
|
|
if (billnum.Substring(0, 1) == "C")//一次开票
|
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
var notQuery = await _notRepository.Where(p => p.SettleBillNum == main.SettleBillNum).ToListAsync(); |
|
|
var notQuery = await _notRepository.Where(p => p.SettleBillNum == main.SettleBillNum).ToListAsync(); |
|
|
var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL |
|
|
var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL |
|
|
{ |
|
|
{ |
|
@ -161,9 +158,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
PartCode = p.PartCode |
|
|
PartCode = p.PartCode |
|
|
|
|
|
|
|
|
}).ToList();//不能结算
|
|
|
}).ToList();//不能结算
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType); |
|
|
await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType); |
|
|
} |
|
|
} |
|
|
else//二次开票
|
|
|
else//二次开票
|
|
|