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. 3
      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. 19
      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;
}
[HttpPost("cancel-by-request/{assembleNumber}")]
public virtual async Task CancelByMaterialRequestAsync(string assembleNumber)
[HttpPost("cancel-by-request/{thirdLocationNumber}")]
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)
{
await _thirdLocationJobManager.CancelAsync(entity).ConfigureAwait(false);

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

@ -58,8 +58,11 @@ public class CountJobEventHandler :
var countPlanUpdateInput = ObjectMapper.Map<CountJob, CountPlanEditInput>(entity);
foreach (var detail in countPlanUpdateInput.Details)
{
if (detail.FinalCountQty != 0)
{
detail.DetailStatus = EnumCountStatus.Completed;
}
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.Linq;
using System.Threading.Tasks;
@ -99,6 +100,7 @@ public class CountPlanEventHandler
foreach (var job in jobs)
{
var countNote = ObjectMapper.Map<CountJob, CountNote>(job);
countNote.EndTime = DateTime.Now;
notes.Add(countNote);
}
if (notes.Count > 0)

19
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.Linq;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.EventBus;
using Volo.Abp.Uow;
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.Store.Domain;
using Win_in.Sfs.Wms.Store.Event.Transaction;
using static ClosedXML.Excel.XLPredefinedFormat;
namespace Win_in.Sfs.Wms.Store.Event.Transactions;
@ -23,12 +25,14 @@ public class ThirdLocationNoteEventHandler
private readonly ILocationAppService _locationAppService;
private readonly IThirdLocationRequestManager _thirdLocationRequestManager;
private readonly IThirdLocationRequestRepository _ThirdLocationRequestRepository;
public ThirdLocationNoteEventHandler(ILocationAppService locationAppService
, IThirdLocationRequestManager thirdLocationRequestManager)
, IThirdLocationRequestRepository ThirdLocationRequestRepository, IThirdLocationRequestManager thirdLocationRequestManager)
{
_locationAppService = locationAppService;
_thirdLocationRequestManager = thirdLocationRequestManager;
_ThirdLocationRequestRepository = ThirdLocationRequestRepository;
}
[UnitOfWork]
@ -45,13 +49,20 @@ public class ThirdLocationNoteEventHandler
if (!string.IsNullOrEmpty(entity.RequestNumber))
{
var thirdLocationRequest = await _thirdLocationRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false);
foreach(var item in thirdLocationRequest.Details)
//var thirdLocationRequest = await _thirdLocationRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false);
var entities = await _ThirdLocationRequestRepository.GetListAsync(p => p.Number == entity.RequestNumber, "Number", true).ConfigureAwait(false);
if(entities.Count>0)
{
foreach (var item in entities[0].Details)
{
item.IssuedQty = entity.Details[0].RecommendQty;
item.ReceivedQty = entity.Details[0].HandledQty;
}
await _thirdLocationRequestManager.CompleteAsync(thirdLocationRequest).ConfigureAwait(false);
await _thirdLocationRequestManager.CompleteAsync(entities[0]).ConfigureAwait(false);
}
}
}

Loading…
Cancel
Save