|
@ -166,7 +166,7 @@ public class CoatingMaterialRequestAppService : SfsStoreRequestAppServiceBase<Co |
|
|
{ |
|
|
{ |
|
|
var location = await LocationAclService.GetByCodeAsync(item.ToLocationCode).ConfigureAwait(false); |
|
|
var location = await LocationAclService.GetByCodeAsync(item.ToLocationCode).ConfigureAwait(false); |
|
|
item.ProdLine = location.LocationGroupCode; |
|
|
item.ProdLine = location.LocationGroupCode; |
|
|
input.ProdLine = location.LocationGroupCode; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var entity = ObjectMapper.Map<CoatingMaterialRequestEditInput, CoatingMaterialRequest>(input); |
|
|
var entity = ObjectMapper.Map<CoatingMaterialRequestEditInput, CoatingMaterialRequest>(input); |
|
@ -270,7 +270,7 @@ public class CoatingMaterialRequestAppService : SfsStoreRequestAppServiceBase<Co |
|
|
|
|
|
|
|
|
var location = await LocationAclService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); |
|
|
var location = await LocationAclService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); |
|
|
detailInput.ProdLine = location.LocationGroupCode; |
|
|
detailInput.ProdLine = location.LocationGroupCode; |
|
|
input.ProdLine = location.LocationGroupCode; |
|
|
|
|
|
input.Worker = input.Worker; |
|
|
input.Worker = input.Worker; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -289,38 +289,6 @@ public class CoatingMaterialRequestAppService : SfsStoreRequestAppServiceBase<Co |
|
|
return dto; |
|
|
return dto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据备料计划生成 叫料请求
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost("create-and-handle-by-preparation-plan/{number}")] |
|
|
|
|
|
public virtual async Task<CoatingMaterialRequestDTO> CreateAndHandleByPreparationPlan(string number) |
|
|
|
|
|
{ |
|
|
|
|
|
var prodPreparationPlan = await _preparationPlanManager.GetByNumberAsync(number).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
var materialRequestCreateInput = new CoatingMaterialRequestEditInput { Worker = CurrentUser.GetUserName() }; |
|
|
|
|
|
|
|
|
|
|
|
foreach (var preparationPlanDetail in prodPreparationPlan.Details) |
|
|
|
|
|
{ |
|
|
|
|
|
var detail = new CoatingMaterialRequestDetailInput |
|
|
|
|
|
{ |
|
|
|
|
|
ItemCode = preparationPlanDetail.ItemCode, |
|
|
|
|
|
ItemName = preparationPlanDetail.ItemName, |
|
|
|
|
|
ItemDesc1 = preparationPlanDetail.ItemDesc1, |
|
|
|
|
|
ItemDesc2 = preparationPlanDetail.ItemDesc2, |
|
|
|
|
|
Uom = preparationPlanDetail.Uom, |
|
|
|
|
|
Qty = preparationPlanDetail.Qty, |
|
|
|
|
|
StdPackQty = preparationPlanDetail.StdPackQty, |
|
|
|
|
|
ToLocationCode = preparationPlanDetail.ToLocationCode |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
materialRequestCreateInput.Details.Add(detail); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var dto = await CreateAndHandleAsync(materialRequestCreateInput).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
return dto; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 根据类型获取叫料请求
|
|
|
/// 根据类型获取叫料请求
|
|
|