|
|
@ -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; |