|
|
@ -96,10 +96,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
var entitys = await _bbacMng.GetDetalListAsync(invbillNum);//可结算
|
|
|
|
|
|
|
|
var priceList = _priceRepository.Where(p => p.IsCancel == false).ToList(); |
|
|
|
var datetime = priceList.Select(p => p.Date).Max(); |
|
|
|
var prices = priceList.Where(p => p.Date == datetime).ToList(); |
|
|
|
|
|
|
|
;//价格单
|
|
|
|
var errorList = await CheckInvoiceGenerationRules(entitys,main.Site,prices, main.BusinessType);//校验生成规则
|
|
|
|
var errorList = await CheckInvoiceGenerationRules(entitys,main.Site,priceList, main.BusinessType);//校验生成规则
|
|
|
|
if (errorList.Count() > 0) |
|
|
|
{ |
|
|
|
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "请下载错误信息", fileName = await ExportErrorReportAsync(errorList) }); |
|
|
@ -111,7 +110,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.GroupNum)).ToList();//不能结算
|
|
|
|
var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys); |
|
|
|
var q = from d in dto1s |
|
|
|
join p in prices on d.LU equals p.LU |
|
|
|
join p in priceList on d.LU equals p.LU |
|
|
|
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime && p.IsCancel == false && p.ClientCode ==main.Site |
|
|
|
select new TEMP_CAN_SA_DETAIL |
|
|
|
{ |
|
|
|