diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/AssembleIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/AssembleIssueRequestEventHandler.cs
similarity index 94%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/AssembleIssueRequestEventHandler.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/AssembleIssueRequestEventHandler.cs
index c1c404a71..a2141a90d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/AssembleIssueRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/AssembleIssueRequestEventHandler.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using AutoMapper;
@@ -15,7 +14,6 @@ using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
-using Win_in.Sfs.Wms.Store.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest;
@@ -33,13 +31,11 @@ public class AssembleIssueRequestEventHandler
private readonly ILocationAppService _locationAppService;
private readonly IBalanceAppService _balanceAppService;
private IMapper _mapper;
- //private readonly IAssembleIssueRequestManager _assembleIssueRequestManager;
public AssembleIssueRequestEventHandler(
IAssembleIssueJobAppService assembleIssueJobAppService, IProductionLineAppService productionLineAppService,
ILocationAppService locationAppService,
IBalanceAppService balanceAppService, IProductionLineItemAppService productionLineItemAppService
- //, IAssembleIssueRequestManager assembleIssueRequestManager
)
{
_assembleIssueJobAppService = assembleIssueJobAppService;
@@ -47,7 +43,6 @@ public class AssembleIssueRequestEventHandler
_locationAppService = locationAppService;
_balanceAppService = balanceAppService;
_productionLineItemAppService = productionLineItemAppService;
- //_assembleIssueRequestManager = assembleIssueRequestManager;
}
///
@@ -67,8 +62,6 @@ public class AssembleIssueRequestEventHandler
/// Event data
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData)
{
- var entity = eventData.Entity;
-
await Task.CompletedTask.ConfigureAwait(false);
}
@@ -102,7 +95,7 @@ public class AssembleIssueRequestEventHandler
public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData)
{
_ = eventData.Entity;
- // await _assembleIssueJobAppService.CompleteByAssembleIssueRequestAsync(entity.Number);
+ // await _AssembleIssueJobAppService.CompleteByAssembleIssueRequestAsync(entity.Number);
await Task.CompletedTask.ConfigureAwait(false);
}
@@ -179,8 +172,8 @@ public class AssembleIssueRequestEventHandler
if (assembleIssueJobDetailInputs.Any())
{
- var assembleIssueJobEditInput = new AssembleIssueJobEditInput();
- assembleIssueJobEditInput = await BuildAssembleIssueJobCreateInputWithQtyTypeAsync(assembleIssueRequest,
+ var assembleIssueJobEditInput = await BuildAssembleIssueJobCreateInputWithQtyTypeAsync(
+ assembleIssueRequest,
assembleIssueRequestDetails.First()).ConfigureAwait(false);
assembleIssueJobEditInput.Details = assembleIssueJobDetailInputs;
jobs.Add(assembleIssueJobEditInput);
@@ -212,7 +205,6 @@ public class AssembleIssueRequestEventHandler
return job;
}
-
///
/// 构造注塑任务明细-按数量
///
@@ -339,22 +331,19 @@ public class AssembleIssueRequestEventHandler
{
var inputJobs = new List();
- var jobs = await _assembleIssueJobAppService.GetByRequestNumberAsync(assembleIssueRequest.Number).ConfigureAwait(false);
-
- //已用的库存的集合
- useBalanceList = useBalanceList;
+ var jobs = await _assembleIssueJobAppService.GetByRequestNumberAsync(assembleIssueRequest.Number)
+ .ConfigureAwait(false);
foreach (var detail in assembleIssueRequestDetailList)
{
//当前零件的集合
var inputDetails = assembleIssueRequestDetailList;
//获取请求下 这个零件和这个库位一个需要多少箱
- var sumBoxQty = inputDetails.Sum(p => p.BoxQty -jobs.Count);
+ var sumBoxQty = inputDetails.Sum(p => p.BoxQty - jobs.Count);
//获取生产线
var productionLineDto = await _productionLineAppService
.GetByLocationCodeAsync(inputDetails.First().ToLocationCode).ConfigureAwait(false);
-
var productLineCodeAndItemCode = await _productionLineItemAppService
.GetByProductLineCodeAndItemCodeAsync(productionLineDto.Code, detail.ItemCode)
.ConfigureAwait(false);
@@ -366,7 +355,8 @@ public class AssembleIssueRequestEventHandler
//可用库存
var usableList = recommendbalanceDtos;
- usableList = usableList.Where(p => !useBalanceList.Select(p => p.PackingCode).Contains(p.PackingCode))
+ usableList = usableList.Where(p =>
+ !useBalanceList.Select(balanceDto => balanceDto.PackingCode).Contains(p.PackingCode))
.ToList();
if (usableList.Any())
{
@@ -375,7 +365,7 @@ public class AssembleIssueRequestEventHandler
if (usableList.Any())
{
var firstUsable = usableList.First();
- useBalanceList.Add((BalanceDTO)firstUsable);
+ useBalanceList.Add(firstUsable);
usableList.Remove(firstUsable);
var assembleIssueJobEditInput =
@@ -429,7 +419,6 @@ public class AssembleIssueRequestEventHandler
///
///
///
- ///
///
private async Task BuildAssembleIssueJobDetailWithBoxQtyTypeAsync(
AssembleIssueRequestDetail assembleIssueRequestDetail, BalanceDTO balance)
@@ -594,8 +583,6 @@ public class AssembleIssueRequestEventHandler
}
}
- usableList = temp;
-
assembleIssueJobEditInputs.AddRange(
await CreateAssembleIssueJobWithQtyTypeAsync(assembleIssueRequest,
new List { assembleIssueRequestDetail }, temp,
@@ -608,7 +595,8 @@ public class AssembleIssueRequestEventHandler
if (assembleIssueJobEditInputs.Count > 0) //有库存 可以创建任务
{
//新增任务
- var addAssembleIssueJobDtos = await _assembleIssueJobAppService.CreateManyAsync(assembleIssueJobEditInputs)
+ var addAssembleIssueJobDtos = await _assembleIssueJobAppService
+ .CreateManyAsync(assembleIssueJobEditInputs)
.ConfigureAwait(false);
await UpdateAssembleIssueRequestDetailQtyAsync(assembleIssueRequest, addAssembleIssueJobDtos)
@@ -665,18 +653,15 @@ public class AssembleIssueRequestEventHandler
requestDetail.ReceivedQty = allReceivedQty;
}
}
-
- //await _assembleIssueRequestManager.UpdateAsync(assembleIssueRequest).ConfigureAwait(false);
}
///
- /// 排序规则 1.批次正序 2.底层 3.到货日期正序 4.数量倒序(整箱优先) 5.库位正序 6.箱码正序
+ /// 排序规则 1.批次正序 2.底层 3.到货日期正序 4.数量倒序(整箱优先) 5.库位正序 6.箱码正序
///
///
///
public async Task> SortByFifoAsync(List balances)
{
- var sortBalances = new List();
var config = new MapperConfiguration(cfg =>
{
cfg.CreateMap()
@@ -687,15 +672,16 @@ public class AssembleIssueRequestEventHandler
var resultBalances = _mapper.Map, List>(balances);
foreach (var resultBalance in resultBalances)
{
- var locationDto = await _locationAppService.GetByCodeAsync(resultBalance.LocationCode).ConfigureAwait(false);
+ var locationDto =
+ await _locationAppService.GetByCodeAsync(resultBalance.LocationCode).ConfigureAwait(false);
resultBalance.LocationRow = locationDto.RowCode;
}
- resultBalances
+ resultBalances = resultBalances
.OrderBy(p => p.Lot)
.ThenBy(p => p.LocationRow)
.ThenBy(p => p.PutInTime)
- .ThenBy(p => p.Qty)//2023-9-14 苑静雯 从小数开始发料
+ .ThenBy(p => p.Qty) //2023-9-14 苑静雯 从小数开始发料
.ThenBy(p => p.LocationCode)
.ThenBy(p => p.PackingCode)
.ToList();
@@ -703,4 +689,3 @@ public class AssembleIssueRequestEventHandler
return resultBalances;
}
}
-
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/CoatingIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/CoatingIssueRequestEventHandler.cs
similarity index 95%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/CoatingIssueRequestEventHandler.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/CoatingIssueRequestEventHandler.cs
index 350cab8a7..1519695a2 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/CoatingIssueRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/CoatingIssueRequestEventHandler.cs
@@ -12,7 +12,6 @@ using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
-using Win_in.Sfs.Wms.Inventory.Domain;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@@ -32,13 +31,11 @@ public class CoatingIssueRequestEventHandler
private readonly ILocationAppService _locationAppService;
private readonly IBalanceAppService _balanceAppService;
private IMapper _mapper;
- //private readonly ICoatingIssueRequestManager _coatingIssueRequestManager;
public CoatingIssueRequestEventHandler(
ICoatingIssueJobAppService coatingIssueJobAppService, IProductionLineAppService productionLineAppService,
ILocationAppService locationAppService,
IBalanceAppService balanceAppService, IProductionLineItemAppService productionLineItemAppService
- //, ICoatingIssueRequestManager coatingIssueRequestManager
)
{
_coatingIssueJobAppService = coatingIssueJobAppService;
@@ -46,7 +43,6 @@ public class CoatingIssueRequestEventHandler
_locationAppService = locationAppService;
_balanceAppService = balanceAppService;
_productionLineItemAppService = productionLineItemAppService;
- //_coatingIssueRequestManager = coatingIssueRequestManager;
}
///
@@ -66,8 +62,6 @@ public class CoatingIssueRequestEventHandler
/// Event data
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData)
{
- var entity = eventData.Entity;
-
await Task.CompletedTask.ConfigureAwait(false);
}
@@ -101,7 +95,7 @@ public class CoatingIssueRequestEventHandler
public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData)
{
_ = eventData.Entity;
- // await _coatingIssueJobAppService.CompleteByCoatingIssueRequestAsync(entity.Number);
+ // await _CoatingIssueJobAppService.CompleteByCoatingIssueRequestAsync(entity.Number);
await Task.CompletedTask.ConfigureAwait(false);
}
@@ -178,8 +172,8 @@ public class CoatingIssueRequestEventHandler
if (coatingIssueJobDetailInputs.Any())
{
- var coatingIssueJobEditInput = new CoatingIssueJobEditInput();
- coatingIssueJobEditInput = await BuildCoatingIssueJobCreateInputWithQtyTypeAsync(coatingIssueRequest,
+ var coatingIssueJobEditInput = await BuildCoatingIssueJobCreateInputWithQtyTypeAsync(
+ coatingIssueRequest,
coatingIssueRequestDetails.First()).ConfigureAwait(false);
coatingIssueJobEditInput.Details = coatingIssueJobDetailInputs;
jobs.Add(coatingIssueJobEditInput);
@@ -211,7 +205,6 @@ public class CoatingIssueRequestEventHandler
return job;
}
-
///
/// 构造注塑任务明细-按数量
///
@@ -338,10 +331,8 @@ public class CoatingIssueRequestEventHandler
{
var inputJobs = new List();
- var jobs = await _coatingIssueJobAppService.GetByRequestNumberAsync(coatingIssueRequest.Number).ConfigureAwait(false);
-
- //已用的库存的集合
- useBalanceList = useBalanceList;
+ var jobs = await _coatingIssueJobAppService.GetByRequestNumberAsync(coatingIssueRequest.Number)
+ .ConfigureAwait(false);
foreach (var detail in coatingIssueRequestDetailList)
{
@@ -353,7 +344,6 @@ public class CoatingIssueRequestEventHandler
var productionLineDto = await _productionLineAppService
.GetByLocationCodeAsync(inputDetails.First().ToLocationCode).ConfigureAwait(false);
-
var productLineCodeAndItemCode = await _productionLineItemAppService
.GetByProductLineCodeAndItemCodeAsync(productionLineDto.Code, detail.ItemCode)
.ConfigureAwait(false);
@@ -365,7 +355,8 @@ public class CoatingIssueRequestEventHandler
//可用库存
var usableList = recommendbalanceDtos;
- usableList = usableList.Where(p => !useBalanceList.Select(p => p.PackingCode).Contains(p.PackingCode))
+ usableList = usableList.Where(p =>
+ !useBalanceList.Select(balanceDto => balanceDto.PackingCode).Contains(p.PackingCode))
.ToList();
if (usableList.Any())
{
@@ -374,7 +365,7 @@ public class CoatingIssueRequestEventHandler
if (usableList.Any())
{
var firstUsable = usableList.First();
- useBalanceList.Add((BalanceDTO)firstUsable);
+ useBalanceList.Add(firstUsable);
usableList.Remove(firstUsable);
var coatingIssueJobEditInput =
@@ -428,7 +419,6 @@ public class CoatingIssueRequestEventHandler
///
///
///
- ///
///
private async Task BuildCoatingIssueJobDetailWithBoxQtyTypeAsync(
CoatingIssueRequestDetail coatingIssueRequestDetail, BalanceDTO balance)
@@ -593,8 +583,6 @@ public class CoatingIssueRequestEventHandler
}
}
- usableList = temp;
-
coatingIssueJobEditInputs.AddRange(
await CreateCoatingIssueJobWithQtyTypeAsync(coatingIssueRequest,
new List { coatingIssueRequestDetail }, temp,
@@ -607,7 +595,8 @@ public class CoatingIssueRequestEventHandler
if (coatingIssueJobEditInputs.Count > 0) //有库存 可以创建任务
{
//新增任务
- var addCoatingIssueJobDtos = await _coatingIssueJobAppService.CreateManyAsync(coatingIssueJobEditInputs)
+ var addCoatingIssueJobDtos = await _coatingIssueJobAppService
+ .CreateManyAsync(coatingIssueJobEditInputs)
.ConfigureAwait(false);
await UpdateCoatingIssueRequestDetailQtyAsync(coatingIssueRequest, addCoatingIssueJobDtos)
@@ -664,18 +653,15 @@ public class CoatingIssueRequestEventHandler
requestDetail.ReceivedQty = allReceivedQty;
}
}
-
- //await _coatingIssueRequestManager.UpdateAsync(coatingIssueRequest).ConfigureAwait(false);
}
///
- /// 排序规则 1.批次正序 2.底层 3.到货日期正序 4.数量倒序(整箱优先) 5.库位正序 6.箱码正序
+ /// 排序规则 1.批次正序 2.底层 3.到货日期正序 4.数量倒序(整箱优先) 5.库位正序 6.箱码正序
///
///
///
public async Task> SortByFifoAsync(List balances)
{
- var sortBalances = new List();
var config = new MapperConfiguration(cfg =>
{
cfg.CreateMap()
@@ -686,15 +672,16 @@ public class CoatingIssueRequestEventHandler
var resultBalances = _mapper.Map, List>(balances);
foreach (var resultBalance in resultBalances)
{
- var locationDto = await _locationAppService.GetByCodeAsync(resultBalance.LocationCode).ConfigureAwait(false);
+ var locationDto =
+ await _locationAppService.GetByCodeAsync(resultBalance.LocationCode).ConfigureAwait(false);
resultBalance.LocationRow = locationDto.RowCode;
}
- resultBalances
+ resultBalances = resultBalances
.OrderBy(p => p.Lot)
.ThenBy(p => p.LocationRow)
.ThenBy(p => p.PutInTime)
- .ThenBy(p => p.Qty)//2023-9-14 苑静雯 从小数开始发料
+ .ThenBy(p => p.Qty) //2023-9-14 苑静雯 从小数开始发料
.ThenBy(p => p.LocationCode)
.ThenBy(p => p.PackingCode)
.ToList();
@@ -702,4 +689,3 @@ public class CoatingIssueRequestEventHandler
return resultBalances;
}
}
-
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/InjectionIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/InjectionIssueRequestEventHandler.cs
similarity index 94%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/InjectionIssueRequestEventHandler.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/InjectionIssueRequestEventHandler.cs
index 70476cec1..9b01d9a4a 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/InjectionIssueRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/InjectionIssueRequestEventHandler.cs
@@ -12,7 +12,6 @@ using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
-using Win_in.Sfs.Wms.Inventory.Domain;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@@ -32,13 +31,11 @@ public class InjectionIssueRequestEventHandler
private readonly ILocationAppService _locationAppService;
private readonly IBalanceAppService _balanceAppService;
private IMapper _mapper;
- //private readonly IInjectionIssueRequestManager _injectionIssueRequestManager;
public InjectionIssueRequestEventHandler(
IInjectionIssueJobAppService injectionIssueJobAppService, IProductionLineAppService productionLineAppService,
ILocationAppService locationAppService,
IBalanceAppService balanceAppService, IProductionLineItemAppService productionLineItemAppService
- //, IInjectionIssueRequestManager injectionIssueRequestManager
)
{
_injectionIssueJobAppService = injectionIssueJobAppService;
@@ -46,7 +43,6 @@ public class InjectionIssueRequestEventHandler
_locationAppService = locationAppService;
_balanceAppService = balanceAppService;
_productionLineItemAppService = productionLineItemAppService;
- //_injectionIssueRequestManager = injectionIssueRequestManager;
}
///
@@ -66,8 +62,6 @@ public class InjectionIssueRequestEventHandler
/// Event data
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData)
{
- var entity = eventData.Entity;
-
await Task.CompletedTask.ConfigureAwait(false);
}
@@ -101,7 +95,7 @@ public class InjectionIssueRequestEventHandler
public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData)
{
_ = eventData.Entity;
- // await _injectionIssueJobAppService.CompleteByInjectionIssueRequestAsync(entity.Number);
+ // await _InjectionIssueJobAppService.CompleteByInjectionIssueRequestAsync(entity.Number);
await Task.CompletedTask.ConfigureAwait(false);
}
@@ -178,8 +172,8 @@ public class InjectionIssueRequestEventHandler
if (injectionIssueJobDetailInputs.Any())
{
- var injectionIssueJobEditInput = new InjectionIssueJobEditInput();
- injectionIssueJobEditInput = await BuildInjectionIssueJobCreateInputWithQtyTypeAsync(injectionIssueRequest,
+ var injectionIssueJobEditInput = await BuildInjectionIssueJobCreateInputWithQtyTypeAsync(
+ injectionIssueRequest,
injectionIssueRequestDetails.First()).ConfigureAwait(false);
injectionIssueJobEditInput.Details = injectionIssueJobDetailInputs;
jobs.Add(injectionIssueJobEditInput);
@@ -211,7 +205,6 @@ public class InjectionIssueRequestEventHandler
return job;
}
-
///
/// 构造注塑任务明细-按数量
///
@@ -338,22 +331,19 @@ public class InjectionIssueRequestEventHandler
{
var inputJobs = new List();
- var jobs=await _injectionIssueJobAppService.GetByRequestNumberAsync(injectionIssueRequest.Number).ConfigureAwait(false);
-
- //已用的库存的集合
- useBalanceList = useBalanceList;
+ var jobs = await _injectionIssueJobAppService.GetByRequestNumberAsync(injectionIssueRequest.Number)
+ .ConfigureAwait(false);
foreach (var detail in injectionIssueRequestDetailList)
{
//当前零件的集合
var inputDetails = injectionIssueRequestDetailList;
- //获取请求下 这个零件和这个库位一共需要多少箱
+ //获取请求下 这个零件和这个库位一个需要多少箱
var sumBoxQty = inputDetails.Sum(p => p.BoxQty - jobs.Count);
//获取生产线
var productionLineDto = await _productionLineAppService
.GetByLocationCodeAsync(inputDetails.First().ToLocationCode).ConfigureAwait(false);
-
var productLineCodeAndItemCode = await _productionLineItemAppService
.GetByProductLineCodeAndItemCodeAsync(productionLineDto.Code, detail.ItemCode)
.ConfigureAwait(false);
@@ -365,7 +355,8 @@ public class InjectionIssueRequestEventHandler
//可用库存
var usableList = recommendbalanceDtos;
- usableList = usableList.Where(p => !useBalanceList.Select(p => p.PackingCode).Contains(p.PackingCode))
+ usableList = usableList.Where(p =>
+ !useBalanceList.Select(balanceDto => balanceDto.PackingCode).Contains(p.PackingCode))
.ToList();
if (usableList.Any())
{
@@ -374,7 +365,7 @@ public class InjectionIssueRequestEventHandler
if (usableList.Any())
{
var firstUsable = usableList.First();
- useBalanceList.Add((BalanceDTO)firstUsable);
+ useBalanceList.Add(firstUsable);
usableList.Remove(firstUsable);
var injectionIssueJobEditInput =
@@ -428,7 +419,6 @@ public class InjectionIssueRequestEventHandler
///
///
///
- ///
///
private async Task BuildInjectionIssueJobDetailWithBoxQtyTypeAsync(
InjectionIssueRequestDetail injectionIssueRequestDetail, BalanceDTO balance)
@@ -593,8 +583,6 @@ public class InjectionIssueRequestEventHandler
}
}
- usableList = temp;
-
injectionIssueJobEditInputs.AddRange(
await CreateInjectionIssueJobWithQtyTypeAsync(injectionIssueRequest,
new List { injectionIssueRequestDetail }, temp,
@@ -607,7 +595,8 @@ public class InjectionIssueRequestEventHandler
if (injectionIssueJobEditInputs.Count > 0) //有库存 可以创建任务
{
//新增任务
- var addInjectionIssueJobDtos = await _injectionIssueJobAppService.CreateManyAsync(injectionIssueJobEditInputs)
+ var addInjectionIssueJobDtos = await _injectionIssueJobAppService
+ .CreateManyAsync(injectionIssueJobEditInputs)
.ConfigureAwait(false);
await UpdateInjectionIssueRequestDetailQtyAsync(injectionIssueRequest, addInjectionIssueJobDtos)
@@ -664,18 +653,15 @@ public class InjectionIssueRequestEventHandler
requestDetail.ReceivedQty = allReceivedQty;
}
}
-
- //await _injectionIssueRequestManager.UpdateAsync(injectionIssueRequest).ConfigureAwait(false);
}
///
- /// 排序规则 1.批次正序 2.底层 3.到货日期正序 4.数量倒序(整箱优先) 5.库位正序 6.箱码正序
+ /// 排序规则 1.批次正序 2.底层 3.到货日期正序 4.数量倒序(整箱优先) 5.库位正序 6.箱码正序
///
///
///
public async Task> SortByFifoAsync(List balances)
{
- var sortBalances = new List();
var config = new MapperConfiguration(cfg =>
{
cfg.CreateMap()
@@ -686,7 +672,8 @@ public class InjectionIssueRequestEventHandler
var resultBalances = _mapper.Map, List>(balances);
foreach (var resultBalance in resultBalances)
{
- var locationDto = await _locationAppService.GetByCodeAsync(resultBalance.LocationCode).ConfigureAwait(false);
+ var locationDto =
+ await _locationAppService.GetByCodeAsync(resultBalance.LocationCode).ConfigureAwait(false);
resultBalance.LocationRow = locationDto.RowCode;
}
@@ -694,7 +681,7 @@ public class InjectionIssueRequestEventHandler
.OrderBy(p => p.Lot)
.ThenBy(p => p.LocationRow)
.ThenBy(p => p.PutInTime)
- .ThenBy(p => p.Qty)//2023-9-14 苑静雯 从小数开始发料
+ .ThenBy(p => p.Qty) //2023-9-14 苑静雯 从小数开始发料
.ThenBy(p => p.LocationCode)
.ThenBy(p => p.PackingCode)
.ToList();
@@ -702,4 +689,3 @@ public class InjectionIssueRequestEventHandler
return resultBalances;
}
}
-
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/KittingIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/KittingIssueRequestEventHandler.cs
similarity index 100%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/KittingIssueRequestEventHandler.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/KittingIssueRequestEventHandler.cs
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/SortBalance.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/SortBalance.cs
similarity index 100%
rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Issue/SortBalance.cs
rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/SortBalance.cs
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs
deleted file mode 100644
index 124982cd5..000000000
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Volo.Abp.EventBus;
-using Volo.Abp.Uow;
-using Win_in.Sfs.Shared.Domain.Shared;
-using Win_in.Sfs.Shared.Event;
-using Win_in.Sfs.Wms.Store.Domain;
-
-namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest;
-
-public class CoatingIssueNoteEventHandler
- : StoreEventHandlerBase
- , ILocalEventHandler>
- , ILocalEventHandler>>
- , ILocalEventHandler>
-{
- private readonly ICoatingIssueRequestManager _materialRequestManager;
-
- public CoatingIssueNoteEventHandler(
- ICoatingIssueRequestManager materialRequestManager
- )
- {
- _materialRequestManager = materialRequestManager;
- }
-
- ///
- /// 当叫料记录创建后 修改请求的值
- ///
- ///
- ///
- [UnitOfWork]
- public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData)
- {
- var entity = eventData.Entity;
-
- await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false);
- }
-
- ///
- /// 当叫料记录创建后 修改请求的值
- ///
- ///
- ///
- [UnitOfWork]
- public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData)
- {
- var entity = eventData.Entity;
- if (!entity.UseOnTheWayLocation)
- {
- await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false);
- }
- }
-
- ///
- /// 当叫料记录创建后 修改请求的值
- ///
- ///
- ///
- [UnitOfWork]
- public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData)
- {
- var entities = eventData.Entity;
- foreach (var entity in entities.Where(entity => !entity.UseOnTheWayLocation))
- {
- await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false);
- }
- }
-
- private async Task UpdateReceivedQtyMaterialRequestAsync(CoatingIssueNote entity)
- {
- //var receiveQtyGroup = entity.Details
- // .GroupBy(p => new { p.ItemCode, p.ToLocationCode })
- // .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) })
- // .ToList();
-
- //var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false);
-
- //if (entity.RequestType != EnumMaterialRequestType.Issue_Direct.ToString())
- //{
- // //更新叫料请求的已收数量
- // foreach (var materialRequestDetail in materialRequest.Details)
- // {
- // var receiveQty = receiveQtyGroup.FirstOrDefault(p =>
- // p.ItemCode == materialRequestDetail.ItemCode &&
- // p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty;
- // if (receiveQty != null)
- // {
- // materialRequestDetail.ReceivedQty += receiveQty.Value;
- // }
- // }
-
-
- //}
- }
-}