Browse Source

修改撤销时,数据状态不正确,修改添加发票状态

master
学 赵 1 year ago
parent
commit
2362395074
  1. 59
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs
  2. 59
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_PD_DTO.cs
  3. 63
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_PD_DTO.cs
  4. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  5. 19
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

59
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs

@ -8,7 +8,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
namespace SettleAccount.Domain.BQ
{
public class BBAC_PD_DTO : EntityDto<Guid>
public class PD_DTO : EntityDto<Guid>
{
/// <summary>
@ -37,8 +37,61 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "地点")]
public string Site { get; set; }
[Display(Name = "状态")]
public EnumBillState State { set; get; }
[Display(Name = "扣减单状态")]
public SettleBillState State { set; get; }
[Display(Name = "发票状态")]
public SettleBillState InvState { set; get; }
}
//public interface IPD_DTO
//{
// public EnumBillState InvState { set; get; }
//}
public class BBAC_PD_DTO :PD_DTO
{
///// <summary>
/////期间
///// </summary>
//[Display(Name = "期间")]
//public int Version { get; set; }
///// <summary>
/////结算单据
///// </summary>
//[Display(Name = "发票号")]
//public string BillNum { get; set; }
///// <summary>
/////关联结算单号
///// </summary>
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; }
///// <summary>
/////发票分组号
///// </summary>
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; }
///// <summary>
/////地点
///// </summary>
//[Display(Name = "地点")]
//public string Site { get; set; }
//[Display(Name = "扣减单状态")]
//public EnumBillState State { set; get; }
//[Display(Name = "发票状态")]
//public EnumBillState InvState { set; get; }
}
public class BBAC_PD_EXP_DTO

59
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_PD_DTO.cs

@ -3,41 +3,44 @@ using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Volo.Abp.Application.Dtos;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
public class HBPO_PD_DTO : EntityDto<Guid>
public class HBPO_PD_DTO : PD_DTO
{
/// <summary>
///期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
///结算单据
/// </summary>
[Display(Name = "发票分组号")]
public string BillNum { get; set; }
/// <summary>
///关联结算单号
/// </summary>
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///地点
/// </summary>
[Display(Name = "地点")]
public string Site { get; set; }
///// <summary>
/////期间
///// </summary>
//[Display(Name = "期间")]
//public int Version { get; set; }
///// <summary>
/////结算单据
///// </summary>
//[Display(Name = "发票分组号")]
//public string BillNum { get; set; }
///// <summary>
/////关联结算单号
///// </summary>
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; }
///// <summary>
/////发票分组号
///// </summary>
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; }
///// <summary>
/////地点
///// </summary>
//[Display(Name = "地点")]
//public string Site { get; set; }
[Display(Name = "状态")]
public EnumBillState State { set; get; }
//[Display(Name = "扣减单状态")]
//public SettleBillState State { set; get; }
//[Display(Name = "发票状态")]
//public SettleBillState InvState { set; get; }
}
public class HBPO_PD_EXPORT
{

63
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_PD_DTO.cs

@ -3,42 +3,45 @@ using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Volo.Abp.Application.Dtos;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
public class PUB_PD_DTO : EntityDto<Guid>
public class PUB_PD_DTO : PD_DTO
{
/// <summary>
///期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
///结算单据
/// </summary>
[Display(Name = "发票分组号")]
public string BillNum { get; set; }
/// <summary>
///关联结算单号
/// </summary>
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///地点
/// </summary>
[Display(Name = "地点")]
public string Site { get; set; }
[Display(Name = "业务类型")]
public EnumBusinessType BusinessType { get; set; }
///// <summary>
/////期间
///// </summary>
//[Display(Name = "期间")]
//public int Version { get; set; }
///// <summary>
/////结算单据
///// </summary>
//[Display(Name = "发票分组号")]
//public string BillNum { get; set; }
///// <summary>
/////关联结算单号
///// </summary>
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; }
///// <summary>
/////发票分组号
///// </summary>
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; }
///// <summary>
/////地点
///// </summary>
//[Display(Name = "地点")]
//public string Site { get; set; }
//[Display(Name = "业务类型")]
//public EnumBusinessType BusinessType { get; set; }
[Display(Name = "状态")]
public EnumBillState State { set; get; }
//[Display(Name = "状态")]
//public EnumBillState State { set; get; }
//[Display(Name = "发票状态")]
//public EnumBillState InvState { set; get; }
}
public class PUB_PD_EXPORT

15
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs

@ -30,6 +30,7 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
@ -43,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Bases
public class PD_SERVICE<TEntity, TEntityDto, TEntityDetail, TEntityDetailDto, TRequestMainInput, TRequestDetailInput, TEntityDetailExportDto> : BASE_SERVICE
where TEntity : PD_BASE_MAIN
where TEntityDetail : PD_BASE
where TEntityDto : class, IEntityDto<Guid>, new()
where TEntityDto : PD_DTO, new()
where TEntityDetailDto : class, IEntityDto<Guid>, new()
where TRequestMainInput : RequestInputBase
where TRequestDetailInput : RequestInputBase
@ -290,6 +291,18 @@ namespace Win.Sfs.SettleAccount.Bases
var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
var dtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(entitys);
var entity= entitys.FirstOrDefault();
var invoices =entitys.Select(p => p.BillNum);
var entities=_invRepository.Where(p => invoices.Contains(p.InvbillNum)).ToList();
foreach (var itm in dtos)
{
var pd = entities.FirstOrDefault(p => p.InvbillNum == itm.BillNum);
if (pd != null)
{
itm.InvState = pd.State;
}
}
return new PagedResultDto<TEntityDto>(totalCount, dtos);
}

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

@ -236,6 +236,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
{
if (flag == true)
{
foreach (var item in pdList)
{
item.State = SettleBillState.;
@ -288,10 +291,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in bbacinvList)
{
//if (item.State != SettleBillState.已提交QAD)
//{
item.State = SettleBillState.;
//}
if (item.State != SettleBillState.QAD)
{
item.State = SettleBillState.;
}
}
_dbcontext.BulkUpdate(bbacList);
_dbcontext.BulkUpdate(bbacinvList);
@ -322,10 +325,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in hbpoinvList)
{
// if (item.State != SettleBillState.已提交QAD)
// {
item.State = SettleBillState.;
// }
if (item.State != SettleBillState.QAD)
{
item.State = SettleBillState.;
}
}
_dbcontext.BulkUpdate(hbpoList);
_dbcontext.BulkUpdate(hbpoinvList);

Loading…
Cancel
Save