Browse Source

修改发票导出,作废和在用一起导出问题

master
学 赵 1 year ago
parent
commit
ea35afdeb4
  1. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs
  3. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  4. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs

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

@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using DocumentFormat.OpenXml.Spreadsheet;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv; using Magicodes.ExporterAndImporter.Csv;
@ -31,6 +32,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers; using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.ExcelImporter; using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports; using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.Filter;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
@ -152,12 +154,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public virtual async Task<INVOICE_GRP_DETAIL_DTO> DetailQueryAsync(INVOICE_GRP_REQ_DTO input) public virtual async Task<INVOICE_GRP_DETAIL_DTO> DetailQueryAsync(INVOICE_GRP_REQ_DTO input)
{ {
INVOICE_GRP_DETAIL_DTO entity = new INVOICE_GRP_DETAIL_DTO(); INVOICE_GRP_DETAIL_DTO entity = new INVOICE_GRP_DETAIL_DTO();
input.Filters.Add(new FilterCondition("InvoiceState", "1", EnumFilterAction.Equal, EnumFilterLogic.And));
var materialList = await _baseservice.GetMaterialList().ConfigureAwait(false); var materialList = await _baseservice.GetMaterialList().ConfigureAwait(false);
var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); var invs = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); var m = await _mRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);
var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m); var mdtos = ObjectMapper.Map<List<INVOICE_MAP_GROUP>, List<INVOICE_MAP_GROUP_DTO>>(m);
var first = invs.FirstOrDefault(); var first = invs.FirstOrDefault();
if (invs.FirstOrDefault().BusinessType == EnumBusinessType.JisBBAC) if (invs.FirstOrDefault().BusinessType == EnumBusinessType.JisBBAC)
{ {
var A = await _wRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); var A = await _wRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false);

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

@ -395,7 +395,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
businessType: itm.BusinessType, businessType: itm.BusinessType,
settleDate: itm.SettleDate, settleDate: itm.SettleDate,
groupNum: itm.GroupNum, groupNum: itm.GroupNum,
invGroupNum: itm.InvGroupNum, invGroupNum: inv.InvGroupNum,
invbillnum: string.Empty, invbillnum: string.Empty,
partcode: relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU).ErpMaterialCode, partcode: relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU).ErpMaterialCode,
pobillnum: string.Empty pobillnum: string.Empty
@ -569,7 +569,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
businessType: itm.BusinessType, businessType: itm.BusinessType,
settleDate: itm.SettleDate, settleDate: itm.SettleDate,
groupNum: itm.GroupNum, groupNum: itm.GroupNum,
invGroupNum: itm.InvGroupNum, invGroupNum: inv.InvGroupNum,
invbillnum: string.Empty, invbillnum: string.Empty,
partcode: relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU).ErpMaterialCode, partcode: relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU).ErpMaterialCode,
pobillnum: string.Empty pobillnum: string.Empty

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -76,7 +76,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
} }
Sync(mdetail.ToList(), EnumDeliverBjBmpBillType.JIS件, email, isout == "out" ? true : false); Sync(mdetail.ToList(), EnumDeliverBjBmpBillType.JIS件, email, isout == "out" ? true : false);
} }
var detailist1 = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => list.Contains(p.BillNum)).ToList(); var detailist1 = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => list.Contains(p.BillNum)).ToList();
if (detailist1.Count > 0) if (detailist1.Count > 0)
@ -151,9 +150,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
} }
Sync(detailist, EnumDeliverBjBmpBillType.JIT直供件, email, isout == "out" ? true : false); Sync(detailist, EnumDeliverBjBmpBillType.JIT直供件, email, isout == "out" ? true : false);
} }
return id.ToString(); return id.ToString();
} }
//public List<T> GetPagedData<T>(List<T> dataList, int pageNumber, int pageSize) //public List<T> GetPagedData<T>(List<T> dataList, int pageNumber, int pageSize)

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs

@ -215,7 +215,12 @@ namespace Win.Sfs.SettleAccount.Bases.DomainServices
} }
return prices; // 所有价格时间都连续 return prices; // 所有价格时间都连续
} }
/// <summary>
///
/// </summary>
/// <param name="range1"></param>
/// <param name="range2"></param>
/// <returns></returns>
public static bool IsTimeOverlap(PriceList range1, PriceList range2) public static bool IsTimeOverlap(PriceList range1, PriceList range2)
{ {
return range1.BeginTime <= range2.EndTime && range1.EndTime >= range2.BeginTime; return range1.BeginTime <= range2.EndTime && range1.EndTime >= range2.BeginTime;

Loading…
Cancel
Save