Browse Source

Merge branch 'dev_DY_CC' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into dev_DY_CC

dev_DY_CC
郑勃旭 12 months ago
parent
commit
6bc5876d74
  1. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs
  2. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CountJobEventHandler.cs
  3. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs
  4. 25
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs

@ -98,10 +98,10 @@ public class ThirdLocationJobAppService
return dtos; return dtos;
} }
[HttpPost("cancel-by-request/{assembleNumber}")] [HttpPost("cancel-by-request/{thirdLocationNumber}")]
public virtual async Task CancelByMaterialRequestAsync(string assembleNumber) public virtual async Task CancelByMaterialRequestAsync(string thirdLocationNumber)
{ {
var entities = await _repository.GetListAsync(p => p.RequestNumber == assembleNumber).ConfigureAwait(false); var entities = await _repository.GetListAsync(p => p.RequestNumber == thirdLocationNumber).ConfigureAwait(false);
foreach (var entity in entities) foreach (var entity in entities)
{ {
await _thirdLocationJobManager.CancelAsync(entity).ConfigureAwait(false); await _thirdLocationJobManager.CancelAsync(entity).ConfigureAwait(false);

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CountJobEventHandler.cs

@ -59,7 +59,10 @@ public class CountJobEventHandler :
foreach (var detail in countPlanUpdateInput.Details) foreach (var detail in countPlanUpdateInput.Details)
{ {
detail.DetailStatus = EnumCountStatus.Completed; if (detail.FinalCountQty != 0)
{
detail.DetailStatus = EnumCountStatus.Completed;
}
await TrySetDetailPropertiesAsync(detail).ConfigureAwait(false); await TrySetDetailPropertiesAsync(detail).ConfigureAwait(false);
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -99,6 +100,7 @@ public class CountPlanEventHandler
foreach (var job in jobs) foreach (var job in jobs)
{ {
var countNote = ObjectMapper.Map<CountJob, CountNote>(job); var countNote = ObjectMapper.Map<CountJob, CountNote>(job);
countNote.EndTime = DateTime.Now;
notes.Add(countNote); notes.Add(countNote);
} }
if (notes.Count > 0) if (notes.Count > 0)

25
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.EventBus; using Volo.Abp.EventBus;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
@ -10,6 +11,7 @@ using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Event.Transaction; using Win_in.Sfs.Wms.Store.Event.Transaction;
using static ClosedXML.Excel.XLPredefinedFormat;
namespace Win_in.Sfs.Wms.Store.Event.Transactions; namespace Win_in.Sfs.Wms.Store.Event.Transactions;
@ -23,12 +25,14 @@ public class ThirdLocationNoteEventHandler
private readonly ILocationAppService _locationAppService; private readonly ILocationAppService _locationAppService;
private readonly IThirdLocationRequestManager _thirdLocationRequestManager; private readonly IThirdLocationRequestManager _thirdLocationRequestManager;
private readonly IThirdLocationRequestRepository _ThirdLocationRequestRepository;
public ThirdLocationNoteEventHandler(ILocationAppService locationAppService public ThirdLocationNoteEventHandler(ILocationAppService locationAppService
, IThirdLocationRequestManager thirdLocationRequestManager) , IThirdLocationRequestRepository ThirdLocationRequestRepository, IThirdLocationRequestManager thirdLocationRequestManager)
{ {
_locationAppService = locationAppService; _locationAppService = locationAppService;
_thirdLocationRequestManager = thirdLocationRequestManager; _thirdLocationRequestManager = thirdLocationRequestManager;
_ThirdLocationRequestRepository = ThirdLocationRequestRepository;
} }
[UnitOfWork] [UnitOfWork]
@ -44,14 +48,21 @@ public class ThirdLocationNoteEventHandler
await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
if (!string.IsNullOrEmpty(entity.RequestNumber)) if (!string.IsNullOrEmpty(entity.RequestNumber))
{ {
var thirdLocationRequest = await _thirdLocationRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); //var thirdLocationRequest = await _thirdLocationRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false);
foreach(var item in thirdLocationRequest.Details)
var entities = await _ThirdLocationRequestRepository.GetListAsync(p => p.Number == entity.RequestNumber, "Number", true).ConfigureAwait(false);
if(entities.Count>0)
{ {
item.IssuedQty = entity.Details[0].RecommendQty; foreach (var item in entities[0].Details)
item.ReceivedQty = entity.Details[0].HandledQty; {
item.IssuedQty = entity.Details[0].RecommendQty;
item.ReceivedQty = entity.Details[0].HandledQty;
}
await _thirdLocationRequestManager.CompleteAsync(entities[0]).ConfigureAwait(false);
} }
await _thirdLocationRequestManager.CompleteAsync(thirdLocationRequest).ConfigureAwait(false);
} }
} }

Loading…
Cancel
Save