Browse Source

更新DomainService

master
学 赵 1 year ago
parent
commit
41c86f9ebd
  1. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/CAN_SA_MNG.cs
  2. 6
      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

10
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.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase; 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 TEntity : SA_CAN_BASE_MAIN
where TEntityDetail : SA_CAN_BASE where TEntityDetail : SA_CAN_BASE
{ {
@ -30,10 +30,10 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
INormalEfCoreRepository<TEntityDetail, Guid> detailRepository INormalEfCoreRepository<TEntityDetail, Guid> detailRepository
) )
{ {
_repository= repository; _repository = repository;
_detailRepository= detailRepository; _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) switch (p_entiy.State)
{ {

6
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,9 +10,9 @@ using Volo.Abp;
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
using Win.Sfs.Shared.RepositoryBase; 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_GRP, Guid> _repository;
private readonly INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> _groupRepository; private readonly INormalEfCoreRepository<INVOICE_MAP_GROUP, Guid> _groupRepository;
@ -35,7 +35,7 @@ namespace Win.Sfs.SettleAccount.Entities.Managers
_groupRepository = groupRepository; _groupRepository = groupRepository;
_notRepository = notRepository; _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; var state = p_State;
switch (p_entiy.State) switch (p_entiy.State)

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