mahao 1 year ago
parent
commit
6e8e53dd6c
  1. 42
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 44
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  3. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
  4. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/NOT_SA_SERVICE.cs
  5. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
  6. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  7. 141
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs
  8. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  9. 122
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  10. 140
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs
  11. 33
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  12. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs
  13. 788
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  14. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_NOT_SA_DETAIL.cs
  15. 31
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
  16. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_CAN_SA_MNG.cs
  17. 30
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  18. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_CAN_SA_MNG.cs
  19. 31
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

42
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.Filter; using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
@ -85,42 +86,45 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "未税金额")] [ExporterHeader(DisplayName = "未税金额")]
public decimal Amt { get; set; } public decimal Amt { get; set; }
/// <summary> /// <summary>
///税额
/// </summary>
[ExporterHeader(DisplayName = "税额")]
public decimal Tax { get; set; }
/// <summary>
///税后金额 ///税后金额
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "税后金额")] [ExporterHeader(DisplayName = "税后金额")]
public decimal TaxAmt { get; set; } public decimal TaxAmt { get; set; }
/// <summary>
///发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///开票Excel文件
/// </summary>
[ExporterHeader(DisplayName = "开票Excel文件")]
public string FileName { get; set; }
/// <summary>
///业务类别
/// </summary>
[ExporterHeader(DisplayName = "业务类别")]
public EnumBusinessType BusinessType { get; set; }
} }
public class INVOICE_GRP_IMP_DTO public class INVOICE_GRP_IMP_DTO
{ {
/// <summary> /// <summary>
///实际纸质发票号 ///实际纸质发票号
/// </summary> /// </summary>
[ImporterHeader(Name = "实际纸质发票号")] [ImporterHeader(Name = "实际纸质发票号", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string RealnvBillNum { get; set; } public string RealnvBillNum { get; set; }
/// <summary> /// <summary>
///系统生成发票号 ///实际纸质发票号
/// </summary> /// </summary>
[ImporterHeader(Name = "系统生成发票号")] [ImporterHeader(Name = "系统生成发票号", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(200, ErrorMessage = "{0}最多输入{1}个字符")]
public string InvbillNum { get; set; } public string InvbillNum { get; set; }
/// <summary>
///税额
/// </summary>
[ImporterHeader(Name = "税额", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
public decimal Tax { get; set; }
} }

44
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs

@ -14,9 +14,11 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.LinqAsync;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
@ -45,9 +47,9 @@ namespace Win.Sfs.SettleAccount.Bases
protected readonly INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> _sRepository; protected readonly INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> _sRepository;
protected readonly INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> _mRepository; protected readonly INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> _mRepository;
protected readonly INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> _adjRepository; protected readonly INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> _adjRepository;
protected readonly HBPO_CAN_SA_MNG _pubMng; protected readonly HBPO_CAN_SA_MNG _hbpoMng;
protected readonly BBAC_CAN_SA_MNG _bbacMng; protected readonly BBAC_CAN_SA_MNG _bbacMng;
protected readonly PUB_CAN_SA_MNG _hbpoMng; protected readonly PUB_CAN_SA_MNG _pubMng;
protected readonly INV_MNG _invMng; protected readonly INV_MNG _invMng;
@ -60,9 +62,9 @@ namespace Win.Sfs.SettleAccount.Bases
INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository, INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository,
INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository, INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository,
IExcelImportAppService excelImportService, IExcelImportAppService excelImportService,
HBPO_CAN_SA_MNG pubMng, HBPO_CAN_SA_MNG hbpoMng,
BBAC_CAN_SA_MNG bbacMng, BBAC_CAN_SA_MNG bbacMng,
PUB_CAN_SA_MNG hbpoMng, PUB_CAN_SA_MNG pubMng,
INV_MNG invMng INV_MNG invMng
//INormalEfCoreRepository<TEntityDetail, Guid> detailRepository //INormalEfCoreRepository<TEntityDetail, Guid> detailRepository
@ -103,7 +105,12 @@ namespace Win.Sfs.SettleAccount.Bases
{ {
} }
/// <summary>
/// 审核通过
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public virtual async Task<string> GenerateInvoice(INVOICE_GRP_REQ_DTO input) public virtual async Task<string> GenerateInvoice(INVOICE_GRP_REQ_DTO input)
{ {
@ -117,7 +124,8 @@ namespace Win.Sfs.SettleAccount.Bases
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
public virtual async Task<string> ReissueInvoice(INVOICE_GRP_REQ_DTO input) [HttpPost]
public virtual async Task<string> ReissueInvoice(string input)
{ {
// await _invMng.SetForwardState(input.InvGroupNum, SettleBillState.商务已审核); // await _invMng.SetForwardState(input.InvGroupNum, SettleBillState.商务已审核);
@ -206,15 +214,12 @@ namespace Win.Sfs.SettleAccount.Bases
public virtual async Task<string> RejectAsync(INVOICE_GRP_REQ_DTO input) public virtual async Task<string> RejectAsync(INVOICE_GRP_REQ_DTO input)
{ {
await _invMng.Reject(input.InvGroupNum);
return ApplicationConsts.SuccessStr; return ApplicationConsts.SuccessStr;
} }
[HttpPost] [HttpPost]
public virtual async Task<string> ReceivedAsync(INVOICE_GRP_REQ_DTO input) public virtual async Task<string> ReceivedAsync(INVOICE_GRP_REQ_DTO input)
{ {
@ -299,16 +304,16 @@ namespace Win.Sfs.SettleAccount.Bases
} }
return null; return null;
} }
/// <summary>
/// hbpo、jit、备件等 /// <summary>
/// </summary> /// hbpo、jit、备件等
/// <param name="dtos">可结算明细列表</param> /// </summary>
/// <param name="p_version">版本号</param> /// <param name="dtos">可结算明细列表</param>
/// <param name="p_InvGroupNum">发票分组</param> /// <param name="p_version">版本号</param>
/// <param name="p_parentInvBillNum">原发票号</param> /// <param name="p_InvGroupNum">发票分组</param>
protected async Task<bool> ReissueSecInvoice(List<TEMP_CAN_SA_DETAIL> p_list, int p_version, string p_parentInvBillNum) /// <param name="p_parentInvBillNum">原发票号</param>
protected async Task<bool> ReissueSecInvoice(List<TEMP_CAN_SA_DETAIL> p_list, int p_version, string p_parentInvBillNum)
{ {
return await _invMng.ReissueSecInvoice(p_list,p_parentInvBillNum, p_version); return await _invMng.ReissueSecInvoice(p_list,p_parentInvBillNum, p_version);
@ -345,7 +350,6 @@ namespace Win.Sfs.SettleAccount.Bases
select d; select d;
var left = from d in dto1s var left = from d in dto1s
join p in inner on new { d.LU, d.PN } equals new { p.LU, p.PN } join p in inner on new { d.LU, d.PN } equals new { p.LU, p.PN }
into temp into temp
from tm in temp.DefaultIfEmpty()//校验错误项 from tm in temp.DefaultIfEmpty()//校验错误项
where tm == null where tm == null

13
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs

@ -40,12 +40,6 @@ using static Win.Sfs.SettleAccount.SettleAccountPermissions;
namespace Win.Sfs.SettleAccount.Bases namespace Win.Sfs.SettleAccount.Bases
{ {
public abstract class CAN_SA_SERVICE<TEntity, TEntityDto, TEntityDetail, TEntityDetailDto, TRequestMainInput, TRequestDetailInput, TEntityDetailExportDto> : BASE_SERVICE public abstract class CAN_SA_SERVICE<TEntity, TEntityDto, TEntityDetail, TEntityDetailDto, TRequestMainInput, TRequestDetailInput, TEntityDetailExportDto> : BASE_SERVICE
where TEntity : SA_CAN_BASE_MAIN where TEntity : SA_CAN_BASE_MAIN
where TEntityDetail:SA_CAN_BASE where TEntityDetail:SA_CAN_BASE
@ -144,8 +138,10 @@ namespace Win.Sfs.SettleAccount.Bases
//[Route("generateinvoice")] //[Route("generateinvoice")]
public virtual async Task<string> GenerateInvoice(TRequestMainInput input) public virtual async Task<string> GenerateInvoice(TRequestMainInput input)
{ {
return ApplicationConsts.SuccessStr; return ApplicationConsts.SuccessStr;
} }
/// <summary> /// <summary>
/// 查询主表 /// 查询主表
/// </summary> /// </summary>
@ -205,14 +201,11 @@ namespace Win.Sfs.SettleAccount.Bases
select d; select d;
var left = from d in dto1s var left = from d in dto1s
join p in inner on new { d.LU, d.PN } equals new { p.LU, p.PN } join p in inner on new { d.LU, d.PN } equals new { p.LU, p.PN }
into temp into temp
from tm in temp.DefaultIfEmpty()//校验错误项 from tm in temp.DefaultIfEmpty()//校验错误项
where tm == null where tm == null
select d; select d;
List<ERR_EXP_DTO> errorList = new List<ERR_EXP_DTO> (); List<ERR_EXP_DTO> errorList = new List<ERR_EXP_DTO> ();
string name = string.Empty; string name = string.Empty;
string keyname = string.Empty; string keyname = string.Empty;
switch (p_businessType) switch (p_businessType)
@ -245,9 +238,7 @@ namespace Win.Sfs.SettleAccount.Bases
name = "备件"; name = "备件";
keyname = "交付识别号"; keyname = "交付识别号";
break; break;
} }
foreach (var error in left) foreach (var error in left)
{ {
errorList.Add(new ERR_EXP_DTO() { ItemCode = error.LU, CustomCode = $"{name}", Message = $"LU:{error.LU}{keyname}:{error.PN},下线日期:{error.SettleDate}没有对应区间销售价格表!" }); errorList.Add(new ERR_EXP_DTO() { ItemCode = error.LU, CustomCode = $"{name}", Message = $"LU:{error.LU}{keyname}:{error.PN},下线日期:{error.SettleDate}没有对应区间销售价格表!" });

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/NOT_SA_SERVICE.cs

@ -60,12 +60,10 @@ namespace Win.Sfs.SettleAccount.Bases
//[Route("detailquery")] //[Route("detailquery")]
public virtual async Task<PagedResultDto<TEntityDetailDto>> DetailQueryAsync(TRequestDetailInput input) public virtual async Task<PagedResultDto<TEntityDetailDto>> DetailQueryAsync(TRequestDetailInput input)
{ {
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount); var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);
var totalCount = await _detailRepository.GetCountByFilterAsync(input.Filters); var totalCount = await _detailRepository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailDto>>(entitys); var dtos = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailDto>>(entitys);
return new PagedResultDto<TEntityDetailDto>(totalCount, dtos); return new PagedResultDto<TEntityDetailDto>(totalCount, dtos);
} }
/// <summary> /// <summary>
/// 导出 /// 导出
@ -78,10 +76,8 @@ namespace Win.Sfs.SettleAccount.Bases
{ {
IExporter _csv = new CsvExporter(); IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter(); IExporter _excel = new ExcelExporter();
var entities = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true); var entities = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtoDetails = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailExportDto>>(entities); var dtoDetails = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailExportDto>>(entities);
var classDisplayName = typeof(TEntityDetailExportDto).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(TEntityDetailExportDto).Name; var classDisplayName = typeof(TEntityDetailExportDto).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(TEntityDetailExportDto).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx"; string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null; byte[] result = null;

24
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs

@ -1,7 +1,8 @@
using DocumentFormat.OpenXml.Bibliography; using DocumentFormat.OpenXml.Bibliography;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using System; using System;
@ -23,7 +24,6 @@ using Win.Sfs.SettleAccount.Entities.BQ.Temp;
using Win.Sfs.SettleAccount.Entities.Prices; using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.ExportReports; using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
/// <summary> /// <summary>
@ -33,7 +33,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[Route("api/settleaccount/[controller]/[action]")] [Route("api/settleaccount/[controller]/[action]")]
public class BBAC_BA_SERVICE : BA_SERVICE public class BBAC_BA_SERVICE : BA_SERVICE
{ {
private readonly INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> _adjRepository; private readonly INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> _adjRepository;
private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository; private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository;
public BBAC_BA_SERVICE(IExcelImportAppService excelImportService, public BBAC_BA_SERVICE(IExcelImportAppService excelImportService,
@ -55,8 +54,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
_adjRepository = adjRepository; _adjRepository = adjRepository;
_priceRepository = priceRepository; _priceRepository = priceRepository;
} }
/// <summary> /// <summary>
@ -64,15 +61,23 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
public virtual async Task<string> ReissueInvoice(string p_invbillnum) public override async Task<string> ReissueInvoice(string p_invbillnum)
{ {
var mappingList= await GetMapGroupAsync(p_invbillnum);//发票对应结算分组 var mappingList= await GetMapGroupAsync(p_invbillnum);//发票对应结算分组
if (mappingList != null && mappingList.Count() > 0) if (mappingList != null && mappingList.Count() > 0)
{ {
var version=int.Parse(DateTime.Now.ToString("yyyymm")); var version=int.Parse(DateTime.Now.ToString("yyyymm"));
var gList = mappingList.Select(p => p.SettleGroupNum).ToList();//获取发票所有结算分组 var gList = mappingList.Select(p => p.SettleGroupNum).ToList();//获取发票所有结算分组
var inv= await GetInvoiceGroupByInvBillNum(p_invbillnum); var inv= await GetInvoiceGroupByInvBillNum(p_invbillnum);
var settle =await _bbacMng.GetMainAsync(inv.InvGroupNum);
if(settle==null)
{
throw new BusinessException("8989", $"选择发票:{p_invbillnum}对应的可结算单不在请检查!");
}
version=settle.Version;
if (inv != null) if (inv != null)
{ {
if (inv.InvoiceState == InvoiceBillState.) if (inv.InvoiceState == InvoiceBillState.)
@ -109,13 +114,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList(); //var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
//var notList = _notRepository.Where(p => gNumList.Contains(p.GroupNum)).ToList();//不能结算 //var notList = _notRepository.Where(p => gNumList.Contains(p.GroupNum)).ToList();//不能结算
var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys);
var priceList = _priceRepository.ToList();//价格单 var priceList = _priceRepository.ToList();//价格单
var errorList =await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType); var errorList =await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType);
if (errorList.Count() > 0) if (errorList.Count() > 0)
{ {
return await ExportErrorReportAsync(errorList); return await ExportErrorReportAsync(errorList);
} }
var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_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
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
@ -141,7 +147,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var dtos = q.ToList(); var dtos = q.ToList();
if (dtos != null && dtos.Count > 0) if (dtos != null && dtos.Count > 0)
{ {
if (p_invbillnum.Substring(0, 1) == "INV")//一次开票重开 if (p_invbillnum.Substring(0, 3) == "INV")//一次开票重开
{ {
await ReissueFirstInvoice(dtos, version, p_invbillnum); await ReissueFirstInvoice(dtos, version, p_invbillnum);
} }

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs

@ -93,7 +93,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList(); //var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();//不能结算 var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();//不能结算
var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_CAN_SA_DETAIL_DTO>>(entitys);
var priceList = _priceRepository.ToList();//价格单 var priceList = _priceRepository.ToList();//价格单
var errorList = await CheckInvoiceGenerationRules(entitys, priceList,main.BusinessType);//校验生成规则 var errorList = await CheckInvoiceGenerationRules(entitys, priceList,main.BusinessType);//校验生成规则
@ -102,6 +102,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
return await ExportErrorReportAsync(errorList); return await ExportErrorReportAsync(errorList);
} }
var dto1s = ObjectMapper.Map<List<BBAC_CAN_SA_DETAIL>, List<BBAC_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
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime

141
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_BA_SERVICE.cs

@ -1,17 +1,24 @@
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.LinqAsync;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Win.Abp.Snowflakes; using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers; using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
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.Entities.BQ.Temp;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
@ -20,8 +27,138 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[Route("api/settleaccount/[controller]/[action]")] [Route("api/settleaccount/[controller]/[action]")]
public class HBPO_BA_SERVICE : BA_SERVICE public class HBPO_BA_SERVICE : BA_SERVICE
{ {
public HBPO_BA_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> pubRepository, INormalEfCoreRepository<INVOICE_GRP, Guid> repository, INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> wRepository, INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository, INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository, BBAC_CAN_SA_MNG pubMng, HBPO_CAN_SA_MNG bbacMng, PUB_CAN_SA_MNG hbpoMng, INV_MNG invMng) : base(excelImportService, snowflakeIdGenerator, commonManager, pubRepository, repository, wRepository, sRepository, mRepository, pubMng, bbacMng, hbpoMng, invMng) private readonly INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> _adjRepository;
private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository;
public HBPO_BA_SERVICE(
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> pubRepository,
INormalEfCoreRepository<INVOICE_GRP, Guid> repository,
INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> wRepository,
INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository,
INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository,
BBAC_CAN_SA_MNG pubMng,
HBPO_CAN_SA_MNG bbacMng,
PUB_CAN_SA_MNG hbpoMng,
INV_MNG invMng,
INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> adjRepository,
INormalEfCoreRepository<PriceList, Guid> priceRepository
) : base(excelImportService, snowflakeIdGenerator, commonManager, pubRepository, repository, wRepository, sRepository, mRepository, pubMng, bbacMng, hbpoMng, invMng)
{
_adjRepository = adjRepository;
_priceRepository = priceRepository;
}
/// <summary>
/// 发票重开
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public override async Task<string> ReissueInvoice(string p_invbillnum)
{ {
var mappingList = await GetMapGroupAsync(p_invbillnum);//发票对应结算分组
if (mappingList != null && mappingList.Count() > 0)
{
var version = int.Parse(DateTime.Now.ToString("yyyymm"));
var gList = mappingList.Select(p => p.SettleGroupNum).ToList();//获取发票所有结算分组
var inv = await GetInvoiceGroupByInvBillNum(p_invbillnum);
var settle = await _hbpoMng.GetMainAsync(inv.InvGroupNum);
if (settle == null)
{
throw new BusinessException("8989", $"选择发票:{p_invbillnum}对应的可结算单不在请检查!");
}
version = settle.Version;
if (inv != null)
{
if (inv.InvoiceState == InvoiceBillState.)
{
throw new BusinessException("8989", $"选择发票:{p_invbillnum}状态为报废状态不能重开!");
}
var hbpolist = await _hbpoMng.GetContainsAsync(inv.InvbillNum, gList);//结算分组对应结算零件
var adjlist = await _adjRepository.Where(p => p.InvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
if (adjlist != null && adjlist.Count() > 0)
{
foreach (var itm in adjlist)
{
hbpolist.Add(new HBPO_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,
version: itm.Version,
billNum: itm.InvGroupNum,
settleBillNum: itm.SettleBillNum,
lU: itm.LU,
pN: itm.PN,
site: itm.Site,
qty: itm.Qty,
price: itm.Price,
businessType: itm.BusinessType,
settleDate: itm.SettleDate,
groupNum: itm.GroupNum,
invGroupNum: itm.InvGroupNum
));
}
}
var entitys = hbpolist;//合并库存调整单和就发票可结算明细数据
var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
//var notList = _notRepository.Where(p => gNumList.Contains(p.GroupNum)).ToList();//不能结算
var priceList = _priceRepository.ToList();//价格单
var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType);
if (errorList.Count() > 0)
{
return await ExportErrorReportAsync(errorList);
}
// var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
var q = from d in entitys
join p in priceList on d.LU equals p.LU
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
select new TEMP_CAN_SA_DETAIL
{
SettleBillNum = d.SettleBillNum,
Site = d.Site,
Version = d.Version,
Price = p.Price,
BillNum = d.BillNum,
SettleDate = d.SettleDate,
InvGroupNum = d.InvGroupNum,
LU = d.LU,
// MaterialDesc = d.MaterialDesc,
PN = d.PN,
Qty = d.Qty,
GroupNum = d.GroupNum,
Amt = Math.Round(d.Qty * p.Price, 2),
ContractDocID = "n",
BeginDate = p.BeginTime,
EndDate = p.EndTime
};
var dtos = q.ToList();
if (dtos != null && dtos.Count > 0)
{
if (p_invbillnum.Substring(0, 3) == "INV")//一次开票重开
{
await ReissueFirstInvoice(dtos, version, p_invbillnum);
}
else//二次开票
{
await ReissueSecInvoice(dtos, version, p_invbillnum);
}
}
}
else
{
throw new BusinessException("8989", $"不存发票号为:{p_invbillnum}发票");
}
}
else
{
throw new BusinessException("8989", $"不存发票号:{p_invbillnum}对应的结算分组号");
}
return ApplicationConsts.SuccessStr;
} }
} }
} }

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs

@ -86,13 +86,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var entitys = await _hbpoMng.GetDetalListAsync(input.BillNum); var entitys = await _hbpoMng.GetDetalListAsync(input.BillNum);
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList(); var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();
var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
var priceList = _priceRepository.ToList();//价格单 var priceList = _priceRepository.ToList();//价格单
var errorList=await CheckInvoiceGenerationRules(entitys, priceList,main.BusinessType);//校验生成规则 var errorList=await CheckInvoiceGenerationRules(entitys, priceList,main.BusinessType);//校验生成规则
if (errorList.Count() > 0) if (errorList.Count() > 0)
{ {
return await ExportErrorReportAsync(errorList); return await ExportErrorReportAsync(errorList);
} }
var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_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
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime

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

@ -1,8 +1,13 @@
using DocumentFormat.OpenXml.Bibliography;
using DocumentFormat.OpenXml.Drawing.Diagrams;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv; using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel; using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NPOI.HPSF;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Shouldly; using Shouldly;
using System; using System;
@ -14,17 +19,21 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; 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.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
[AllowAnonymous] [AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")] [Route("api/settleaccount/[controller]/[action]")]
public class INVOICE_SERVICE:ApplicationService public class INVOICE_SERVICE : BASE_SERVICE
{ {
private readonly INormalEfCoreRepository<INVOICE_GRP, Guid> _repository; private readonly INormalEfCoreRepository<INVOICE_GRP, Guid> _repository;
private readonly INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> _wRepository; private readonly INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> _wRepository;
@ -34,22 +43,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
private readonly BBAC_CAN_SA_MNG _bbacMng; private readonly BBAC_CAN_SA_MNG _bbacMng;
private readonly HBPO_CAN_SA_MNG _hbpoMng; private readonly HBPO_CAN_SA_MNG _hbpoMng;
private readonly INV_MNG _invMng; private readonly INV_MNG _invMng;
//private readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository; public INVOICE_SERVICE(IExcelImportAppService excelImportService,
private readonly IExcelImportAppService _excelImportService; ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
protected INVOICE_SERVICE(
INormalEfCoreRepository<INVOICE_GRP, Guid> repository, INormalEfCoreRepository<INVOICE_GRP, Guid> repository,
INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> wRepository, INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> wRepository,
INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository, INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository,
INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository, INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository,
IExcelImportAppService excelImportService, PUB_CAN_SA_MNG pubMng,
PUB_CAN_SA_MNG pubMng,
BBAC_CAN_SA_MNG bbacMng, BBAC_CAN_SA_MNG bbacMng,
HBPO_CAN_SA_MNG hbpoMng, HBPO_CAN_SA_MNG hbpoMng,
INV_MNG invMng INV_MNG invMng
)
) : base(excelImportService, snowflakeIdGenerator, commonManager)
{ {
_excelImportService = excelImportService;
_repository = repository; _repository = repository;
_wRepository = wRepository; _wRepository = wRepository;
_mRepository = mRepository; _mRepository = mRepository;
@ -59,14 +66,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_hbpoMng = hbpoMng; _hbpoMng = hbpoMng;
_invMng = invMng; _invMng = invMng;
} }
[HttpPost] [HttpPost]
public virtual async Task<string> ApprovalPassed(INVOICE_GRP_REQ_DTO input) public virtual async Task<string> ApprovalPassed(INVOICE_GRP_REQ_DTO input)
{ {
var inv=_repository.Where(p=>p.InvGroupNum == input.InvGroupNum).FirstOrDefault(); var inv = _repository.Where(p => p.InvGroupNum == input.InvGroupNum).FirstOrDefault();
await _invMng.SetForwardState(inv, SettleBillState.); await _invMng.SetForwardState(inv, SettleBillState.);
return ApplicationConsts.SuccessStr; return ApplicationConsts.SuccessStr;
} }
@ -131,11 +136,53 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
); );
return _fileName; return _fileName;
} }
/// <summary>
/// 导出发票组明细
/// </summary>
/// <param name="input">查询条件</param>
/// <returns></returns>
[HttpPost]
public virtual async Task<string> ExportDetailAsync(INVOICE_GRP_REQ_DTO input)
{
IExporter _csv = new CsvExporter();
ExcelExporter _excel = new ExcelExporter();
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtoDetails = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_EXP_DTO>>(entities);
var invdetail= await DetailQueryAsync(input);
var m = invdetail.INVOICE_MAP_GROUP;
var not=invdetail.INVOICE_NOT_SETTLE;
var detail =invdetail.INVOICE_WAIT_DETAIL;
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
var result = _excel.Append(dtoDetails,"发票表").SeparateBySheet()
.Append(m, "发票和结算分组关系")
.SeparateBySheet()
.Append(not, "对应未结结算分组")
.SeparateBySheet()
.Append(detail, "发票明细")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result.Result
}
);
return _fileName;
}
[HttpPost] [HttpPost]
public virtual async Task<string> RejectAsync(INVOICE_GRP_REQ_DTO input) public virtual async Task<string> RejectAsync(INVOICE_GRP_REQ_DTO input)
{ {
bool state = await _invMng.Reject(input.InvGroupNum); bool state = await _invMng.Reject(input.InvGroupNum);
if (state==true) if (state == true)
{ {
switch (input.BusinessType) switch (input.BusinessType)
{ {
@ -143,6 +190,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
await _pubMng.SetNewState(input.InvGroupNum); await _pubMng.SetNewState(input.InvGroupNum);
break; break;
case EnumBusinessType.ZhiGongJianBBAC: case EnumBusinessType.ZhiGongJianBBAC:
await _pubMng.SetNewState(input.InvGroupNum);
break;
case EnumBusinessType.ZhiGongJianHBPO: case EnumBusinessType.ZhiGongJianHBPO:
await _pubMng.SetNewState(input.InvGroupNum); await _pubMng.SetNewState(input.InvGroupNum);
break; break;
@ -159,21 +208,50 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
return string.Empty; return string.Empty;
} }
/// <summary>
/// 同步QAD
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost] [HttpPost]
public virtual async Task<string> Sync_QAD(INVOICE_GRP_REQ_DTO input) public virtual async Task<string> Sync_QAD(INVOICE_GRP_REQ_DTO input)
{ {
return string.Empty; return string.Empty;
} }
/// <summary>
/// 导入发票
/// </summary>
/// <param name="files"></param>
/// <param name="branchId"></param>
/// <returns></returns>
[HttpPost]
[DisableRequestSizeLimit]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<INVOICE_GRP_IMP_DTO>(files, _excelImportService);
var ls = ObjectMapper.Map<List<INVOICE_GRP_IMP_DTO>, List<INVOICE_GRP>>(result);
var namelist = ls.Select(p => p.InvbillNum).Distinct();
var invlist = _repository.Where(p => namelist.Contains(p.InvbillNum)).ToList();
var invdetail = _wRepository.Where(p => namelist.Contains(p.InvbillNum)).ToList();
var first = ls.FirstOrDefault();
foreach (var inv in invlist)
{
var newinv = ls.Where(p => p.InvbillNum == inv.InvbillNum).FirstOrDefault();
inv.Tax = newinv.Tax;
inv.TaxAmt = Math.Round(inv.Amt * newinv.Tax, 2);
inv.RealnvBillNum = newinv.RealnvBillNum;
}
foreach (var detail in invdetail)
{
detail.Extend1 = Math.Round(detail.Amt * first.Tax, 2).ToString();
}
await _repository.DbContext.BulkUpdateAsync(invlist);
await _repository.DbContext.BulkUpdateAsync(invdetail);
return ApplicationConsts.SuccessStr;
}
} }
} }

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

@ -1,17 +1,23 @@
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.LinqAsync;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Win.Abp.Snowflakes; using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers; using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Managers; using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Temp;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
@ -20,8 +26,138 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[Route("api/settleaccount/[controller]/[action]")] [Route("api/settleaccount/[controller]/[action]")]
public class PUB_BA_SERVICE : BA_SERVICE public class PUB_BA_SERVICE : BA_SERVICE
{ {
public PUB_BA_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> pubRepository, INormalEfCoreRepository<INVOICE_GRP, Guid> repository, INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> wRepository, INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository, INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository, BBAC_CAN_SA_MNG pubMng, HBPO_CAN_SA_MNG bbacMng, PUB_CAN_SA_MNG hbpoMng, INV_MNG invMng) : base(excelImportService, snowflakeIdGenerator, commonManager, pubRepository, repository, wRepository, sRepository, mRepository, pubMng, bbacMng, hbpoMng, invMng)
private readonly INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> _adjRepository;
private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository;
public PUB_BA_SERVICE(IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> pubRepository,
INormalEfCoreRepository<INVOICE_GRP, Guid> repository,
INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> wRepository,
INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> sRepository,
INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> mRepository,
BBAC_CAN_SA_MNG pubMng,
HBPO_CAN_SA_MNG bbacMng,
PUB_CAN_SA_MNG hbpoMng,
INormalEfCoreRepository<PUB_ADJ_DETAIL, Guid> adjRepository,
INormalEfCoreRepository<PriceList, Guid> priceRepository,
INV_MNG invMng) : base(excelImportService, snowflakeIdGenerator, commonManager, pubRepository, repository, wRepository, sRepository, mRepository, pubMng, bbacMng, hbpoMng, invMng)
{
_adjRepository = adjRepository;
_priceRepository = priceRepository;
}
// <summary>
/// 发票重开
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public override async Task<string> ReissueInvoice(string p_invbillnum)
{ {
var mappingList = await GetMapGroupAsync(p_invbillnum);//发票对应结算分组
if (mappingList != null && mappingList.Count() > 0)
{
var version = int.Parse(DateTime.Now.ToString("yyyymm"));
var gList = mappingList.Select(p => p.SettleGroupNum).ToList();//获取发票所有结算分组
var inv = await GetInvoiceGroupByInvBillNum(p_invbillnum);
var settle = await _pubMng.GetMainAsync(inv.InvGroupNum);
if (settle == null)
{
throw new BusinessException("8989", $"选择发票:{p_invbillnum}对应的可结算单不在请检查!");
}
version = settle.Version;
if (inv != null)
{
if (inv.InvoiceState == InvoiceBillState.)
{
throw new BusinessException("8989", $"选择发票:{p_invbillnum}状态为报废状态不能重开!");
}
var hbpolist = await _pubMng.GetContainsAsync(inv.InvbillNum, gList);//结算分组对应结算零件
var adjlist = await _adjRepository.Where(p => p.InvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
if (adjlist != null && adjlist.Count() > 0)
{
foreach (var itm in adjlist)
{
hbpolist.Add(new PUB_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,
version: itm.Version,
billNum: itm.InvGroupNum,
settleBillNum: itm.SettleBillNum,
lU: itm.LU,
pN: itm.PN,
site: itm.Site,
qty: itm.Qty,
price: itm.Price,
businessType: itm.BusinessType,
settleDate: itm.SettleDate,
groupNum: itm.GroupNum,
invGroupNum: itm.InvGroupNum
));
}
}
var entitys = hbpolist;//合并库存调整单和就发票可结算明细数据
var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
//var notList = _notRepository.Where(p => gNumList.Contains(p.GroupNum)).ToList();//不能结算
var priceList = _priceRepository.ToList();//价格单
var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType);
if (errorList.Count() > 0)
{
return await ExportErrorReportAsync(errorList);
}
// var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
var q = from d in entitys
join p in priceList on d.LU equals p.LU
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
select new TEMP_CAN_SA_DETAIL
{
SettleBillNum = d.SettleBillNum,
Site = d.Site,
Version = d.Version,
Price = p.Price,
BillNum = d.BillNum,
SettleDate = d.SettleDate,
InvGroupNum = d.InvGroupNum,
LU = d.LU,
// MaterialDesc = d.MaterialDesc,
PN = d.PN,
Qty = d.Qty,
GroupNum = d.GroupNum,
Amt = Math.Round(d.Qty * p.Price, 2),
ContractDocID = "n",
BeginDate = p.BeginTime,
EndDate = p.EndTime
};
var dtos = q.ToList();
if (dtos != null && dtos.Count > 0)
{
if (p_invbillnum.Substring(0, 3) == "INV")//一次开票重开
{
await ReissueFirstInvoice(dtos, version, p_invbillnum);
}
else//二次开票
{
await ReissueSecInvoice(dtos, version, p_invbillnum);
}
}
}
else
{
throw new BusinessException("8989", $"不存发票号为:{p_invbillnum}发票");
}
}
else
{
throw new BusinessException("8989", $"不存发票号:{p_invbillnum}对应的结算分组号");
}
return ApplicationConsts.SuccessStr;
} }
} }
} }

33
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs

@ -71,31 +71,26 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
var entitys = await _pubMng.GetDetalListAsync(input.BillNum); var entitys = await _pubMng.GetDetalListAsync(input.BillNum);
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
List<PriceList> priceList = new List<PriceList>();
var dto1s = ObjectMapper.Map<List<PUB_CAN_SA_DETAIL>, List<PUB_CAN_SA_DETAIL_DTO>>(entitys);
List<PriceList> priceList=new List<PriceList>();
if (main.BusinessType == EnumBusinessType.BeiJian) if (main.BusinessType == EnumBusinessType.BeiJian)
{ {
var priceListbj = _pricebjRepository.ToList();//价格单 var priceListbj = _pricebjRepository.ToList();//价格单
foreach (var itm in priceListbj) foreach (var itm in priceListbj)
{ {
priceList.Add(new PriceList() {LU=itm.LU,BeginTime=itm.BeginDate,EndTime=itm.EndDate }); priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price });
} }
} }
else else
{ {
priceList = _priceRepository.ToList();//价格单 priceList = _priceRepository.ToList();//价格单
}
var errorList = await CheckInvoiceGenerationRules(entitys, priceList,main.BusinessType);//校验生成规则
if (errorList.Count() > 0)
{
return await ExportErrorReportAsync(errorList);
} }
var errorList = await CheckInvoiceGenerationRules(entitys, priceList, main.BusinessType);//校验生成规则
if (errorList.Count() > 0) if (errorList.Count() > 0)
{ {
return await ExportErrorReportAsync(errorList); return await ExportErrorReportAsync(errorList);
} }
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
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
@ -114,22 +109,22 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
Qty = d.Qty, Qty = d.Qty,
GroupNum = d.GroupNum, GroupNum = d.GroupNum,
Amt = Math.Round(d.Qty * p.Price, 2), Amt = Math.Round(d.Qty * p.Price, 2),
ContractDocID="no", ContractDocID = "no",
BeginDate = p.BeginTime, BeginDate = p.BeginTime,
EndDate = p.EndTime EndDate = p.EndTime
}; };
var dtos = q.ToList(); var dtos = q.ToList();
if (dtos != null && dtos.Count > 0) if (dtos != null && dtos.Count > 0)
{ {
if (input.BillNum.Substring(0, 1) == "C")//一次开票 if (input.BillNum.Substring(0, 1) == "C")//一次开票
{ {
await FirstInvoice(dtos,new List<TEMP_NOT_SA_DETAIL>(), main.Version, main.InvGroupNum, string.Empty, main.BusinessType); await FirstInvoice(dtos, new List<TEMP_NOT_SA_DETAIL>(), main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
} }
else//二次开票 else//二次开票
{ {
await SecInvoice(dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType); await SecInvoice(dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
} }
} }
} }
} }

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs

@ -44,7 +44,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public override async Task<string> GenerateSettlementOrder(PUB_NOT_SA_DETAIL_REQ_DTO input) public override async Task<string> GenerateSettlementOrder(PUB_NOT_SA_DETAIL_REQ_DTO input)
{ {
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount); var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
_pubNotMng.GenerateSettlementOrder(entitys); _pubNotMng.GenerateSettlementOrder(entitys);
return ApplicationConsts.SuccessStr; return ApplicationConsts.SuccessStr;

788
code/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -1,4 +1,4 @@
using Magicodes.ExporterAndImporter.Excel; using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
@ -77,255 +77,255 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
_service = service; _service = service;
} }
#region 派格大众看板-备件结算报表 //#region 派格大众看板-备件结算报表
/// <summary> ///// <summary>
/// 大众准时化结算门板价格差异比对报表 ///// 大众准时化结算门板价格差异比对报表
/// </summary> ///// </summary>
/// <param name="materialCode">客户物料号</param> ///// <param name="materialCode">客户物料号</param>
/// <param name="version">版本</param> ///// <param name="version">版本</param>
/// <param name="customerCode"></param> ///// <param name="customerCode"></param>
/// <param name="sapCode">厂内物料号</param> ///// <param name="sapCode">厂内物料号</param>
/// <param name="estimateTypeDesc">物料组</param> ///// <param name="estimateTypeDesc">物料组</param>
/// <returns></returns> ///// <returns></returns>
[HttpPost] //[HttpPost]
[Route("SettleDoorPanel")] //[Route("SettleDoorPanel")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
public async Task<string> SettleDoorPanel(
BaseRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(input.Version) ? string.Empty : input.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(input.MaterialCode) ? string.Empty : input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(input.Begin) ? string.Empty : input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(input.End) ? string.Empty : input.End });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(input.Cp7Begin) ? string.Empty : input.Cp7Begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(input.Cp7End) ? string.Empty : input.Cp7End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("准时化结算门板价格差异比对报表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary>
/// 有条码看板结算核对
/// </summary>
/// <param name="kanBan">看板号</param>
/// <param name="sapMaterialCode">厂内零件号</param>
/// <param name="version">版本</param>
/// <param name="customerCode"></param>
/// <param name="customerPartCode">客户物料号</param>
/// <param name="estimateTypeDesc">物料组(车型)</param>
/// <param name="state"></param>
/// <param name="begin"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpPost]
[Route("SettleKanBan-WithCode")]
[DisableRequestSizeLimit]
public async Task<string> SettledKanBanWithCode(BaseKanbanReqestDto input)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = input.CustomerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerPartCode", Value = input.CustomerPartCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = input.State ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "EstimateTypeDesc", Value = input.EstimateTypeDesc ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "有条码看板结算核对" });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.KanBan ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = input.SapMaterialCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = input.Begin ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End ?? string.Empty });
var _taskid = await _service.ExportEnqueueAsync("看板结算输出", ExportExtentsion.Excel,input.Version ,string.Empty,CurrentUser, typeof(SettleKBWithCodeExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
[HttpPost]
[Route("SettleKanBan-WithOutCode")]
[DisableRequestSizeLimit]
public async Task<string> SettledKanBanWithOutCode(BaseKanbanReqestDto input) //public async Task<string> SettleDoorPanel(
{ // BaseRequestDto input
List<CustomCondition> customConditionList = new List<CustomCondition>(); // )
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version ?? string.Empty }); //{
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = input.CustomerCode ?? string.Empty }); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "CustomerPartCode", Value = input.CustomerPartCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(input.Version) ? string.Empty : input.Version });
customConditionList.Add(new CustomCondition() { Name = "State", Value = input.State ?? "0" }); // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(input.MaterialCode) ? string.Empty : input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "EstimateTypeDesc", Value = input.EstimateTypeDesc ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(input.Begin) ? string.Empty : input.Begin });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "有条码看板结算核对" }); // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(input.End) ? string.Empty : input.End });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.KanBan ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(input.Cp7Begin) ? string.Empty : input.Cp7Begin });
customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = input.SapMaterialCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(input.Cp7End) ? string.Empty : input.Cp7End });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = input.Begin ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
var _taskid = await _service.ExportEnqueueAsync("无条码看板结算输出", ExportExtentsion.Excel, input.Version,string.Empty, CurrentUser, typeof(SettleKBWithOutCodeExportService), customConditionList, (rs) => // customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
{ // customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
}); // var _taskid = await _service.ExportEnqueueAsync("准时化结算门板价格差异比对报表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
return _taskid; // {
} // });
#region 大众备件0-90天和90天以上输出 // return _taskid;
//}
///// <summary>
///// 有条码看板结算核对
///// </summary>
///// <param name="kanBan">看板号</param>
///// <param name="sapMaterialCode">厂内零件号</param>
///// <param name="version">版本</param>
///// <param name="customerCode"></param>
///// <param name="customerPartCode">客户物料号</param>
///// <param name="estimateTypeDesc">物料组(车型)</param>
///// <param name="state"></param>
///// <param name="begin"></param>
///// <param name="end"></param>
///// <returns></returns>
//[HttpPost]
//[Route("SettleKanBan-WithCode")]
//[DisableRequestSizeLimit]
/// <summary> //public async Task<string> SettledKanBanWithCode(BaseKanbanReqestDto input)
/// 大众备件数据调整结算输出 //{
/// </summary> // List<CustomCondition> customConditionList = new List<CustomCondition>();
/// <param name="purchaseOrderNo"></param> // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version ?? string.Empty });
/// <param name="sapCode"></param> // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = input.CustomerCode ?? string.Empty });
/// <param name="version"></param> // customConditionList.Add(new CustomCondition() { Name = "CustomerPartCode", Value = input.CustomerPartCode ?? string.Empty });
/// <param name="customerCode"></param> // customConditionList.Add(new CustomCondition() { Name = "State", Value = input.State ?? "0" });
/// <param name="factory"></param> // customConditionList.Add(new CustomCondition() { Name = "EstimateTypeDesc", Value = input.EstimateTypeDesc ?? string.Empty });
/// <param name="matialCode"></param> // customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "有条码看板结算核对" });
/// <param name="state"></param> // customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.KanBan ?? string.Empty });
/// <param name="begin"></param> // customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = input.SapMaterialCode ?? string.Empty });
/// <param name="end"></param> // customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = input.Begin ?? string.Empty });
/// <returns></returns> // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End ?? string.Empty });
[HttpGet] // var _taskid = await _service.ExportEnqueueAsync("看板结算输出", ExportExtentsion.Excel,input.Version ,string.Empty,CurrentUser, typeof(SettleKBWithCodeExportService), customConditionList, (rs) =>
[Route("SettleSparePart90Export")] // {
[DisableRequestSizeLimit] // });
// return _taskid;
//}
public async Task<string> SettledSparePart90(string purchaseOrderNo, string sapCode, string version, string customerCode, string factory, string matialCode, //[HttpPost]
string state, DateTime begin, DateTime end) //[Route("SettleKanBan-WithOutCode")]
{ //[DisableRequestSizeLimit]
List<CustomCondition> customConditionList = new List<CustomCondition>(); //public async Task<string> SettledKanBanWithOutCode(BaseKanbanReqestDto input)
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); //{
customConditionList.Add(new CustomCondition() { Name = "PurchaseOrderNo", Value = purchaseOrderNo ?? string.Empty }); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = input.CustomerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" }); // customConditionList.Add(new CustomCondition() { Name = "CustomerPartCode", Value = input.CustomerPartCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "State", Value = input.State ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" }); // customConditionList.Add(new CustomCondition() { Name = "EstimateTypeDesc", Value = input.EstimateTypeDesc ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() }); // customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "有条码看板结算核对" });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() }); // customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.KanBan ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = input.SapMaterialCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = input.Begin ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End ?? string.Empty });
// var _taskid = await _service.ExportEnqueueAsync("无条码看板结算输出", ExportExtentsion.Excel, input.Version,string.Empty, CurrentUser, typeof(SettleKBWithOutCodeExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
//#region 大众备件0-90天和90天以上输出
var _taskid = await _service.ExportEnqueueAsync("大众备件数据调整结算输出", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettleSparePart90ExportService), customConditionList, (rs) => ///// <summary>
{ ///// 大众备件数据调整结算输出
///// </summary>
///// <param name="purchaseOrderNo"></param>
///// <param name="sapCode"></param>
///// <param name="version"></param>
///// <param name="customerCode"></param>
///// <param name="factory"></param>
///// <param name="matialCode"></param>
///// <param name="state"></param>
///// <param name="begin"></param>
///// <param name="end"></param>
///// <returns></returns>
//[HttpGet]
//[Route("SettleSparePart90Export")]
//[DisableRequestSizeLimit]
}); //public async Task<string> SettledSparePart90(string purchaseOrderNo, string sapCode, string version, string customerCode, string factory, string matialCode,
return _taskid; // string state, DateTime begin, DateTime end)
} //{
/// <summary> // List<CustomCondition> customConditionList = new List<CustomCondition>();
/// 大众备件输出(包括带订货单号和无订单号) // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
/// </summary> // customConditionList.Add(new CustomCondition() { Name = "PurchaseOrderNo", Value = purchaseOrderNo ?? string.Empty });
/// <param name="purchaseOrderNo">采购订单号</param> // customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty });
/// <param name="sapCode">厂内物料号</param> // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
/// <param name="version">版本</param> // customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
/// <param name="customerCode"></param> // customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? string.Empty });
/// <param name="factory"></param> // customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" });
/// <param name="matialCode">物料代码</param> // customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
/// <param name="state"></param> // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
/// <param name="begin"></param>
/// <param name="end"></param> // var _taskid = await _service.ExportEnqueueAsync("大众备件数据调整结算输出", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettleSparePart90ExportService), customConditionList, (rs) =>
/// <returns></returns> // {
[HttpGet]
[Route("SettleSparePartExport")]
[DisableRequestSizeLimit]
public async Task<string> SettledSparePart(string purchaseOrderNo, string sapCode, string version, string customerCode, string factory, string matialCode, // });
string state, DateTime begin, DateTime end) // return _taskid;
{ //}
List<CustomCondition> customConditionList = new List<CustomCondition>(); ///// <summary>
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); ///// 大众备件输出(包括带订货单号和无订单号)
customConditionList.Add(new CustomCondition() { Name = "PurchaseOrderNo", Value = purchaseOrderNo ?? string.Empty }); ///// </summary>
customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty }); ///// <param name="purchaseOrderNo">采购订单号</param>
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty }); ///// <param name="sapCode">厂内物料号</param>
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" }); ///// <param name="version">版本</param>
customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? string.Empty }); ///// <param name="customerCode"></param>
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" }); ///// <param name="factory"></param>
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() }); ///// <param name="matialCode">物料代码</param>
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() }); ///// <param name="state"></param>
///// <param name="begin"></param>
///// <param name="end"></param>
///// <returns></returns>
//[HttpGet]
//[Route("SettleSparePartExport")]
//[DisableRequestSizeLimit]
var _taskid = await _service.ExportEnqueueAsync("大众备件结算输出", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettleSparePartExportService), customConditionList, (rs) => //public async Task<string> SettledSparePart(string purchaseOrderNo, string sapCode, string version, string customerCode, string factory, string matialCode,
{ // string state, DateTime begin, DateTime end)
//{
}); // List<CustomCondition> customConditionList = new List<CustomCondition>();
return _taskid; // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
} // customConditionList.Add(new CustomCondition() { Name = "PurchaseOrderNo", Value = purchaseOrderNo ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" });
// customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
// var _taskid = await _service.ExportEnqueueAsync("大众备件结算输出", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettleSparePartExportService), customConditionList, (rs) =>
// {
/// <summary> // });
/// 大众备件未结明细 // return _taskid;
/// </summary> //}
/// <param name="purchaseOrderNo"></param>
/// <param name="sapCode"></param>
/// <param name="version"></param>
/// <param name="customerCode"></param>
/// <param name="factory"></param>
/// <param name="matialCode"></param>
/// <param name="state"></param>
/// <param name="begin"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpGet]
[Route("UnSettleSparePartExport")]
[DisableRequestSizeLimit]
public async Task<string> UnSettledSparePart(string purchaseOrderNo, string sapCode, string version, string customerCode, string factory, string matialCode, ///// <summary>
string state, DateTime begin, DateTime end) ///// 大众备件未结明细
{ ///// </summary>
///// <param name="purchaseOrderNo"></param>
///// <param name="sapCode"></param>
///// <param name="version"></param>
///// <param name="customerCode"></param>
///// <param name="factory"></param>
///// <param name="matialCode"></param>
///// <param name="state"></param>
///// <param name="begin"></param>
///// <param name="end"></param>
///// <returns></returns>
//[HttpGet]
//[Route("UnSettleSparePartExport")]
//[DisableRequestSizeLimit]
List<CustomCondition> customConditionList = new List<CustomCondition>(); //public async Task<string> UnSettledSparePart(string purchaseOrderNo, string sapCode, string version, string customerCode, string factory, string matialCode,
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); // string state, DateTime begin, DateTime end)
customConditionList.Add(new CustomCondition() { Name = "PurchaseOrderNo", Value = purchaseOrderNo ?? string.Empty }); //{
customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
var _taskid = await _service.ExportEnqueueAsync("大众备件未结输出", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettleUnSparePartExportService), customConditionList, (rs) => // List<CustomCondition> customConditionList = new List<CustomCondition>();
{ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "PurchaseOrderNo", Value = purchaseOrderNo ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" });
// customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
// var _taskid = await _service.ExportEnqueueAsync("大众备件未结输出", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettleUnSparePartExportService), customConditionList, (rs) =>
// {
}); // });
return _taskid; // return _taskid;
} //}
#endregion //#endregion
/// <summary> ///// <summary>
/// 无订单备件结算输出 ///// 无订单备件结算输出
/// </summary> ///// </summary>
/// <param name="purchaseOrderNo">采购订单号</param> ///// <param name="purchaseOrderNo">采购订单号</param>
/// <param name="sapCode">厂内物料号</param> ///// <param name="sapCode">厂内物料号</param>
/// <param name="version">版本</param> ///// <param name="version">版本</param>
/// <param name="customerCode"></param> ///// <param name="customerCode"></param>
/// <param name="factory"></param> ///// <param name="factory"></param>
/// <param name="matialCode">物料代码</param> ///// <param name="matialCode">物料代码</param>
/// <param name="state"></param> ///// <param name="state"></param>
/// <param name="begin"></param> ///// <param name="begin"></param>
/// <param name="end"></param> ///// <param name="end"></param>
/// <returns></returns> ///// <returns></returns>
[HttpGet] //[HttpGet]
[Route("SettleSparePartExportExtend")] //[Route("SettleSparePartExportExtend")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
public async Task<string> SettledSparePartExtend(string purchaseOrderNo, string sapCode, string version, string customerCode, string factory, string matialCode, //public async Task<string> SettledSparePartExtend(string purchaseOrderNo, string sapCode, string version, string customerCode, string factory, string matialCode,
string state, DateTime begin, DateTime end) // string state, DateTime begin, DateTime end)
{ //{
List<CustomCondition> customConditionList = new List<CustomCondition>(); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "PurchaseOrderNo", Value = purchaseOrderNo ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "PurchaseOrderNo", Value = purchaseOrderNo ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" }); // customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? "0" }); // customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" }); // customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "大众备件结算核对" });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() }); // customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() }); // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
var _taskid = await _service.ExportEnqueueAsync("无订单备件结算输出", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettleSparePartExportService), customConditionList, (rs) => // var _taskid = await _service.ExportEnqueueAsync("无订单备件结算输出", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettleSparePartExportService), customConditionList, (rs) =>
{ // {
}); // });
return _taskid; // return _taskid;
} //}
#endregion //#endregion
[HttpGet] [HttpGet]
[Route("SharePartUnSettledExport")] [Route("SharePartUnSettledExport")]
@ -692,189 +692,189 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
// return _taskid; // return _taskid;
//} //}
#region 红旗、一汽轿车的输出报表 //#region 红旗、一汽轿车的输出报表
/// <summary> ///// <summary>
///红旗工厂核对明细 /////红旗工厂核对明细
/// </summary> ///// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> ///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> ///// <returns></returns>
[HttpPost] //[HttpPost]
[Route("HQHSettledDetailDiffExportService")] //[Route("HQHSettledDetailDiffExportService")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
[UnitOfWork(false)] //[UnitOfWork(false)]
public async Task<string> HQHSettledDetailDiffExportServiceMake( //public async Task<string> HQHSettledDetailDiffExportServiceMake(
HQKanbanRequestDto input // HQKanbanRequestDto input
) // )
{ //{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("红旗工厂核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
// customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
// customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
// customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
// customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
// var _taskid = await _service.ExportEnqueueAsync("红旗工厂核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHSettledDetailDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
///红旗工厂未结明细
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("HQHUnSettledDetailDiffExportService")]
[DisableRequestSizeLimit]
public async Task<string> HQHUnSettledDetailDiffExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>(); ///// <summary>
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version }); /////红旗工厂未结明细
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode }); ///// </summary>
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin }); ///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End }); ///// <returns></returns>
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode }); //[HttpPost]
customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo }); //[Route("HQHUnSettledDetailDiffExportService")]
customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc }); //[DisableRequestSizeLimit]
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban }); //public async Task<string> HQHUnSettledDetailDiffExportServiceMake(
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup }); // HQKanbanRequestDto input
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode }); // )
customConditionList.Add(new CustomCondition() { Name = "IsContainVersion", Value = input.IsContainVersion }); //{
var _taskid = await _service.ExportEnqueueAsync("红旗工厂未结明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHUnSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary> // List<CustomCondition> customConditionList = new List<CustomCondition>();
///红旗未结核对 // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
/// </summary> // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
/// <returns></returns> // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
[HttpPost] // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
[Route("HQFactoryUnSettledDetailDiffExportService")] // customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
[DisableRequestSizeLimit] // customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
public async Task<string> HQFactoryUnSettledDetailDiffExportService( // customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
HQKanbanRequestDto input // customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
) // customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
{ // customConditionList.Add(new CustomCondition() { Name = "IsContainVersion", Value = input.IsContainVersion });
// var _taskid = await _service.ExportEnqueueAsync("红旗工厂未结明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHUnSettledDetailDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
List<CustomCondition> customConditionList = new List<CustomCondition>(); ///// <summary>
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version }); /////红旗未结核对
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode }); ///// </summary>
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin }); ///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End }); ///// <returns></returns>
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode }); //[HttpPost]
customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo }); //[Route("HQFactoryUnSettledDetailDiffExportService")]
customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc }); //[DisableRequestSizeLimit]
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban }); //public async Task<string> HQFactoryUnSettledDetailDiffExportService(
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup }); // HQKanbanRequestDto input
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode }); // )
customConditionList.Add(new CustomCondition() { Name = "IsContainVersion", Value = input.IsContainVersion }); //{
var _taskid = await _service.ExportEnqueueAsync("红旗未结核对", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFactoryUnSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary> // List<CustomCondition> customConditionList = new List<CustomCondition>();
/// 红旗工厂备件明细 // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
/// </summary> // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
/// <param name="input"></param> // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
/// <returns></returns> // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
[HttpPost] // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
[Route("HQHSharePartSettledDetailDiffExportService")] // customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
[DisableRequestSizeLimit] // customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
public async Task<string> HQHSharePartSettledDetailDiffExportServiceMake( // customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
HQKanbanRequestDto input // customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
) // customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
{ // customConditionList.Add(new CustomCondition() { Name = "IsContainVersion", Value = input.IsContainVersion });
List<CustomCondition> customConditionList = new List<CustomCondition>(); // var _taskid = await _service.ExportEnqueueAsync("红旗未结核对", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFactoryUnSettledDetailDiffExportService), customConditionList, (rs) =>
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version }); // {
// });
// return _taskid;
//}
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin }); ///// <summary>
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End }); ///// 红旗工厂备件明细
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode }); ///// </summary>
customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo }); ///// <param name="input"></param>
customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc }); ///// <returns></returns>
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban }); //[HttpPost]
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup }); //[Route("HQHSharePartSettledDetailDiffExportService")]
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode }); //[DisableRequestSizeLimit]
var _taskid = await _service.ExportEnqueueAsync("H平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHSharePartSettledDetailDiffExportService), customConditionList, (rs) => //public async Task<string> HQHSharePartSettledDetailDiffExportServiceMake(
{ // HQKanbanRequestDto input
}); // )
return _taskid; //{
} // List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
// customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
// customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
// customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
// customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
// customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
// customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
// customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
// var _taskid = await _service.ExportEnqueueAsync("H平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQHSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
[HttpPost] //[HttpPost]
[Route("FisUpdateExportService")] //[Route("FisUpdateExportService")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
[UnitOfWork(isTransactional: false)] //[UnitOfWork(isTransactional: false)]
public async Task<string> FisUpdateExportServiceMake( //public async Task<string> FisUpdateExportServiceMake(
HQKanbanRequestDto input // HQKanbanRequestDto input
) // )
{ //{
List<CustomCondition> customConditionList = new List<CustomCondition>(); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin }); // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End }); // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
var _taskid = await _service.ExportEnqueueAsync("Fis发货数据更新状态", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(FisUpdateExportService), customConditionList, (rs) => // var _taskid = await _service.ExportEnqueueAsync("Fis发货数据更新状态", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(FisUpdateExportService), customConditionList, (rs) =>
{ // {
}); // });
return _taskid; // return _taskid;
} //}
/// <summary> ///// <summary>
/// 结算未结寄售核对表 ///// 结算未结寄售核对表
/// </summary> ///// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> ///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> ///// <returns></returns>
[HttpPost] //[HttpPost]
[Route("UnSettledSum-Make")] //[Route("UnSettledSum-Make")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
[UnitOfWork(false)] //[UnitOfWork(false)]
public async Task<string> UnSettledSumServiceMake( //public async Task<string> UnSettledSumServiceMake(
BaseRequestDto input // BaseRequestDto input
) // )
{ //{
List<CustomCondition> customConditionList = new List<CustomCondition>(); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = !string.IsNullOrEmpty(input.Version) ? input.Version : string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = !string.IsNullOrEmpty(input.Version) ? input.Version : string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = string.Empty });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(input.MaterialCode) ? input.MaterialCode : string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(input.MaterialCode) ? input.MaterialCode : string.Empty });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = !string.IsNullOrEmpty(input.MaterialGroup) ? input.MaterialGroup : string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = !string.IsNullOrEmpty(input.MaterialGroup) ? input.MaterialGroup : string.Empty });
customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Begin", Value = string.IsNullOrEmpty(input.Begin) ? string.Empty : input.Begin }); // customConditionList.Add(new CustomCondition() { Name = "Begin", Value = string.IsNullOrEmpty(input.Begin) ? string.Empty : input.Begin });
customConditionList.Add(new CustomCondition() { Name = "End", Value = string.IsNullOrEmpty(input.End) ? string.Empty : input.End }); // customConditionList.Add(new CustomCondition() { Name = "End", Value = string.IsNullOrEmpty(input.End) ? string.Empty : input.End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode }); // customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber }); // customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode }); // customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("结算未结寄售核对表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(UnSettledSumService), customConditionList, (rs) => // var _taskid = await _service.ExportEnqueueAsync("结算未结寄售核对表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(UnSettledSumService), customConditionList, (rs) =>
{ // {
}); // });
return _taskid; // return _taskid;
} //}
#endregion //#endregion
} }
} }

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_NOT_SA_DETAIL.cs

@ -67,7 +67,7 @@ public class BBAC_NOT_SA_DETAIL:SA_NOT_BASE
/// 对应字段MovementType,996正常,997为退货 /// 对应字段MovementType,996正常,997为退货
/// </summary> /// </summary>
[Display(Name = "是否退货")] [Display(Name = "是否退货")]
public string IsReturn { get; set; } = null!; public bool IsReturn { get; set; } =false;
//[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; } = null!; //public string InvGroupNum { get; set; } = null!;
@ -92,7 +92,7 @@ public class BBAC_NOT_SA_DETAIL:SA_NOT_BASE
} }
public BBAC_NOT_SA_DETAIL(Guid guid, string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, EnumBusinessType category, string isReturn, string invGroupNum, DateTime settleDate, string groupNum,string contractDocID) public BBAC_NOT_SA_DETAIL(Guid guid, string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, EnumBusinessType category, bool isReturn, string invGroupNum, DateTime settleDate, string groupNum,string contractDocID)
{ {
Id = guid; Id = guid;

31
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs

@ -53,18 +53,25 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var _entityList = new List<BBAC_CAN_SA_DETAIL>(); var _entityList = new List<BBAC_CAN_SA_DETAIL>();
foreach (var itm in p_list) foreach (var itm in p_list)
{ {
var _detailEntity = new BBAC_CAN_SA_DETAIL(); var _detailEntity = new BBAC_CAN_SA_DETAIL(
{ guid: GuidGenerator.Create(),
_detailEntity.SettleBillNum = itm.SettleBillNum; keyCode: itm.KeyCode,
_detailEntity.BillNum = billNumber; version: itm.Version,
_detailEntity.InvGroupNum = billNumber; billNum: billNumber,
_detailEntity.LU = itm.LU; settleBillNum: itm.SettleBillNum,
_detailEntity.PN = itm.PN; lU: itm.LU,
_detailEntity.GroupNum = itm.GroupNum; pN: itm.PN,
_detailEntity.KeyCode = itm.KeyCode; site: itm.Site,
_detailEntity.Price = itm.Price; qty: itm.Qty,
_detailEntity.Version = itm.Version; price: itm.Price,
}; category: itm.BusinessType,
isReturn: itm.IsReturn,
settleDate: itm.SettleDate,
groupNum: itm.GroupNum,
invGroupNum: billNumber,
contactid: itm.ContractDocID
);
_entityList.Add(_detailEntity); _entityList.Add(_detailEntity);
} }
await _repository.DbContext.BulkDeleteAsync(p_list); await _repository.DbContext.BulkDeleteAsync(p_list);

10
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_CAN_SA_MNG.cs

@ -253,7 +253,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return await _repository.Where(p => p.InvGroupNum == billNum).FirstOrDefaultAsync(); return await _repository.Where(p => p.InvGroupNum == billNum).FirstOrDefaultAsync();
} }
/// <summary>
/// 获取发票对应结算分组所有零件
/// </summary>
/// <param name="billNum"></param>
/// <returns></returns>
public virtual async Task<List<HBPO_CAN_SA_DETAIL>> GetContainsAsync(string p_canSettleBillNum, List<string> p_list)
{
return await _detailRepository.Where(p => p.InvGroupNum == p_canSettleBillNum && p_list.Contains(p.GroupNum)).ToListAsync();
}

30
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -265,6 +265,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
/// <summary> /// <summary>
/// 客户已收票 /// 客户已收票
/// </summary> /// </summary>
@ -497,10 +501,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
} }
} }
//if (_ls != null && _ls.Count > 0) //if (_ls != null && _ls.Count > 0)
//{ //{
// foreach (var p_entity in _ls) // foreach (var p_entity in _ls)
@ -522,28 +522,17 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
// await _repository.DbContext.BulkDeleteAsync(notList); // await _repository.DbContext.BulkDeleteAsync(notList);
// await _repository.DbContext.BulkDeleteAsync(detailList); // await _repository.DbContext.BulkDeleteAsync(detailList);
// //await _repository.DbContext.BulkUpdateAsync(canList); // //await _repository.DbContext.BulkUpdateAsync(canList);
// } // }
// if (p_entity.State == InvoiceBillState.已扣减) // if (p_entity.State == InvoiceBillState.已扣减)
// { // {
// } // }
// } // }
//} //}
//else //else
//{ //{
//} //}
return true; return true;
} }
/// <summary> /// <summary>
/// hbpo、jit、备件等 /// hbpo、jit、备件等
@ -572,6 +561,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
Amt = p.Sum(itm => itm.Amt), Amt = p.Sum(itm => itm.Amt),
Qty = p.Sum(itm => itm.Qty), Qty = p.Sum(itm => itm.Qty),
Price = p.Key.Price, Price = p.Key.Price,
ContractDocID = p.Key.ContractDocID,
BeginDate = p.Key.BeginDate, BeginDate = p.Key.BeginDate,
EndDate = p.Key.EndDate EndDate = p.Key.EndDate
}).ToList();//汇总记录不出现重复值 }).ToList();//汇总记录不出现重复值
@ -629,7 +619,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
ContractDocID = itm.ContractDocID, ContractDocID = itm.ContractDocID,
EndDate = itm.EndDate EndDate = itm.EndDate
}; };
groups1 = query.ToList(); groups1 = query.ToList();
} }
} }
@ -669,6 +658,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
} }
decimal amt = detailList.Sum(k => k.Amt); decimal amt = detailList.Sum(k => k.Amt);
decimal txtAmt = Math.Round(detailList.Sum(k => k.Amt), 2); decimal txtAmt = Math.Round(detailList.Sum(k => k.Amt), 2);
var contractList = ls.Select(p => p.ContractDocID).Distinct(); var contractList = ls.Select(p => p.ContractDocID).Distinct();
var _groupList = dtos.Where(p => contractList.Contains(p.ContractDocID)).GroupBy(p => new { p.GroupNum }) var _groupList = dtos.Where(p => contractList.Contains(p.ContractDocID)).GroupBy(p => new { p.GroupNum })
.Select(p => new { GroupNum = p.Key.GroupNum, Amt = p.Sum(itm => itm.Amt) }).Distinct(); .Select(p => new { GroupNum = p.Key.GroupNum, Amt = p.Sum(itm => itm.Amt) }).Distinct();
@ -790,6 +780,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{ {
var key = itm.Key;//发票票号 var key = itm.Key;//发票票号
var ls = itm.Value;//结算分组号列表 var ls = itm.Value;//结算分组号列表
//if(businessType==EnumBusinessType.JisBBAC)
//{
//}
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.LU, p.Price, p.BeginDate, p.EndDate, p.ContractDocID }) var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.LU, p.Price, p.BeginDate, p.EndDate, p.ContractDocID })
.Select(itm => new .Select(itm => new
{ {
@ -902,7 +896,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
} }
/// <summary> /// <summary>
/// /// 重开一次开票
/// </summary> /// </summary>
/// <param name="dtos"></param> /// <param name="dtos"></param>
/// <param name="p_OldInvBillNum"></param> /// <param name="p_OldInvBillNum"></param>
@ -931,7 +925,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return false; return false;
} }
/// <summary> /// <summary>
/// /// 重开二次开票
/// </summary> /// </summary>
/// <param name="dtos"></param> /// <param name="dtos"></param>
/// <param name="p_OldInvBillNum"></param> /// <param name="p_OldInvBillNum"></param>

13
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_CAN_SA_MNG.cs

@ -219,10 +219,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var entity= await GetMainAsync(billNum); var entity= await GetMainAsync(billNum);
if (entity != null ) if (entity != null )
{ {
entity.State = SettleBillState.; entity.State = SettleBillState.;
await _repository.UpdateAsync(entity); await _repository.UpdateAsync(entity);
return true; return true;
} }
@ -247,7 +244,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{ {
return await _repository.Where(p => p.InvGroupNum == billNum).FirstOrDefaultAsync(); return await _repository.Where(p => p.InvGroupNum == billNum).FirstOrDefaultAsync();
} }
/// <summary>
/// 获取发票对应结算分组所有零件
/// </summary>
/// <param name="billNum"></param>
/// <returns></returns>
public virtual async Task<List<PUB_CAN_SA_DETAIL>> GetContainsAsync(string p_canSettleBillNum, List<string> p_list)
{
return await _detailRepository.Where(p => p.InvGroupNum == p_canSettleBillNum && p_list.Contains(p.GroupNum)).ToListAsync();
}

31
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

@ -55,18 +55,25 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var _entityList = new List<PUB_CAN_SA_DETAIL>(); var _entityList = new List<PUB_CAN_SA_DETAIL>();
foreach (var itm in p_list) foreach (var itm in p_list)
{ {
var _detailEntity = new PUB_CAN_SA_DETAIL(); var _detailEntity = new PUB_CAN_SA_DETAIL(
{ guid: GuidGenerator.Create(),
_detailEntity.SettleBillNum = itm.SettleBillNum; keyCode: itm.KeyCode,
_detailEntity.BillNum = billNumber; version: itm.Version,
_detailEntity.InvGroupNum = billNumber; billNum: billNumber,
_detailEntity.LU = itm.LU; settleBillNum: itm.SettleBillNum,
_detailEntity.PN = itm.PN; lU: itm.LU,
_detailEntity.GroupNum = itm.GroupNum; pN: itm.PN,
_detailEntity.KeyCode = itm.KeyCode; site: itm.Site,
_detailEntity.Price = itm.Price; qty: itm.Qty,
_detailEntity.Version = itm.Version; price: itm.Price,
}; businessType: itm.BusinessType,
settleDate: itm.SettleDate,
groupNum: itm.GroupNum,
invGroupNum: billNumber
);
_entityList.Add(_detailEntity); _entityList.Add(_detailEntity);
} }
await _notRepository.DbContext.BulkDeleteAsync(p_list); await _notRepository.DbContext.BulkDeleteAsync(p_list);

Loading…
Cancel
Save