Browse Source

更新DomainService

master
学 赵 1 year ago
parent
commit
41c86f9ebd
  1. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/CAN_SA_MNG.cs
  2. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  3. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/NOT_SA_MNG.cs

18
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Managers/CAN_SA_MNG.cs → code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/CAN_SA_MNG.cs

@ -16,9 +16,9 @@ using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.Managers
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
public class CAN_SA_MNG<TEntity,TEntityDetail> : DomainService
public class CAN_SA_MNG<TEntity, TEntityDetail> : DomainService
where TEntity : SA_CAN_BASE_MAIN
where TEntityDetail : SA_CAN_BASE
{
@ -30,10 +30,10 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
INormalEfCoreRepository<TEntityDetail, Guid> detailRepository
)
{
_repository= repository;
_detailRepository= detailRepository;
_repository = repository;
_detailRepository = detailRepository;
}
public virtual async Task<bool> SetState(TEntity p_entiy,SettleBillState state)
public virtual async Task<bool> SetState(TEntity p_entiy, SettleBillState state)
{
switch (p_entiy.State)
{
@ -44,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
}
else
{
throw new BusinessException("8989", "当前状态不是【商务已审核】,无法设置成【财务已审核】状态");
throw new BusinessException("8989", "当前状态不是【商务已审核】,无法设置成【财务已审核】状态");
}
break;
case SettleBillState.:
@ -77,12 +77,12 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
throw new BusinessException("8989", "当前状态不是【商务已审核】,无法设置成【财务已审核】状态");
}
break;
}
}
await _repository.UpdateAsync(p_entiy);
return true;
}
}
@ -93,5 +93,5 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
}

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

@ -10,19 +10,19 @@ using Volo.Abp;
using Volo.Abp.Domain.Services;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.Managers
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
public class INV_MNG:DomainService
public class INV_MNG : DomainService
{
private readonly INormalEfCoreRepository<INVOICE_GRP, Guid> _repository;
private readonly INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> _groupRepository;
private readonly INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> _detailRepository;
private readonly INormalEfCoreRepository<INVOICE_NOT_SETTLE, Guid> _notRepository;
public INV_MNG
(
INormalEfCoreRepository<INVOICE_GRP, Guid> repository,
INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> groupRepository,
INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> detailRepository,
@ -35,7 +35,7 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
_groupRepository = groupRepository;
_notRepository = notRepository;
}
public virtual async Task<bool> SetForwardState(INVOICE_GRP p_entiy,InvoiceBillState p_State)
public virtual async Task<bool> SetForwardState(INVOICE_GRP p_entiy, InvoiceBillState p_State)
{
var state = p_State;
switch (p_entiy.State)
@ -78,7 +78,7 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
public virtual async Task<bool> Reject(INVOICE_GRP p_entity)
{
if (p_entity.State == InvoiceBillState.
|| p_entity.State == InvoiceBillState. || p_entity.State == InvoiceBillState.)
{

22
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Managers/NOT_SA_MNG.cs → code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/NOT_SA_MNG.cs

@ -10,7 +10,7 @@ using Win.Sfs.Shared.RepositoryBase;
using Win.Sfs.SettleAccount.Bases;
using EFCore.BulkExtensions;
namespace Win.Sfs.SettleAccount.Entities.Managers
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
/// <summary>
/// 不能結算管理
@ -18,10 +18,10 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TEntityDetail"></typeparam>
/// <typeparam name="TNOTDetail"></typeparam>
public class NOT_SA_MNG<TEntity,TEntityDetail, TNOTDetail> : DomainService
where TEntity : SA_CAN_BASE_MAIN,new()
where TEntityDetail : SA_CAN_BASE,new()
where TNOTDetail:SA_NOT_BASE
public class NOT_SA_MNG<TEntity, TEntityDetail, TNOTDetail> : DomainService
where TEntity : SA_CAN_BASE_MAIN, new()
where TEntityDetail : SA_CAN_BASE, new()
where TNOTDetail : SA_NOT_BASE
{
private readonly INormalEfCoreRepository<TEntity, Guid> _repository;
private readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository;
@ -37,19 +37,19 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
_detailRepository = detailRepository;
_notRepository = notRepository;
}
public virtual async Task<bool> GenerateSettlementOrder(List<TNOTDetail> p_list,Action<List<TEntityDetail>> p_action=null)
public virtual async Task<bool> GenerateSettlementOrder(List<TNOTDetail> p_list, Action<List<TEntityDetail>> p_action = null)
{
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
TEntity _entity = new TEntity();
var _entity = new TEntity();
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version=DateTime.Now.Year+DateTime.Now.Month;
_entity.State =SettleBillState.;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
List<TEntityDetail> _entityList = new List<TEntityDetail>();
var _entityList = new List<TEntityDetail>();
foreach (var itm in p_list)
{
TEntityDetail _detailEntity = new TEntityDetail();
var _detailEntity = new TEntityDetail();
{
_detailEntity.SettleBillNum = itm.SettleBillNum;
_detailEntity.BillNum = billNumber;
Loading…
Cancel
Save