|
@ -90,9 +90,7 @@ public class ProductionLineItemAppService : |
|
|
await CheckItemBasicItemCodeAsync(importInput.ItemCode, validationRresult).ConfigureAwait(false); |
|
|
await CheckItemBasicItemCodeAsync(importInput.ItemCode, validationRresult).ConfigureAwait(false); |
|
|
await CheckProductionLineProdLineCodeAsync(importInput.ProdLineCode, validationRresult).ConfigureAwait(false); |
|
|
await CheckProductionLineProdLineCodeAsync(importInput.ProdLineCode, validationRresult).ConfigureAwait(false); |
|
|
await CheckSameItem(importInput.ProdLineCode, importInput.ItemCode, validationRresult).ConfigureAwait(false); |
|
|
await CheckSameItem(importInput.ProdLineCode, importInput.ItemCode, validationRresult).ConfigureAwait(false); |
|
|
CheckProductionLineProdLineCodeJsonAsync(importInput.RawLocationCodeListJson, validationRresult); |
|
|
CheckProductionLineProdLineCodeJsonAsync(importInput,validationRresult); |
|
|
CheckProductionLineProdLineCodeJsonAsync(importInput.ProductLocationCodeListJson, validationRresult); |
|
|
|
|
|
CheckProductionLineProdLineCodeJsonAsync(importInput.WipLocationCodeListJson, validationRresult); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
private async Task CheckSameItem(string ProdLineCode,string ItemCode, List<ValidationResult> validationRresult) |
|
|
private async Task CheckSameItem(string ProdLineCode,string ItemCode, List<ValidationResult> validationRresult) |
|
@ -104,15 +102,16 @@ public class ProductionLineItemAppService : |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
private void CheckProductionLineProdLineCodeJsonAsync(string locationCodeList, List<ValidationResult> validationRresult) |
|
|
private void CheckProductionLineProdLineCodeJsonAsync(ProductionLineItemImportInput input, |
|
|
|
|
|
List<ValidationResult> validationRresult) |
|
|
{ |
|
|
{ |
|
|
if (string.IsNullOrEmpty(locationCodeList)) |
|
|
if (string.IsNullOrEmpty(input.ProductLocationCodeListJson) && |
|
|
|
|
|
string.IsNullOrEmpty(input.RawLocationCodeListJson) && |
|
|
|
|
|
string.IsNullOrEmpty(input.WipLocationCodeListJson)) |
|
|
{ |
|
|
{ |
|
|
validationRresult.Add(new ValidationResult($"请维护生产线和库位关系")); |
|
|
validationRresult.Add(new ValidationResult("[来源]成品/半成品库位 或 [来源]原材料库位 或 [完工]线边库位 不能都为空")); |
|
|
} |
|
|
} |
|
|
|
|
|
[HttpPost("get-by-product")] |
|
|
} |
|
|
|
|
|
[HttpPost("get-by-product")] |
|
|
|
|
|
public virtual async Task<List<ProductionLineItemDTO>> GetByProductLineCodeAsync(string productLineCode) |
|
|
public virtual async Task<List<ProductionLineItemDTO>> GetByProductLineCodeAsync(string productLineCode) |
|
|
{ |
|
|
{ |
|
|
var entityList = await _repository.GetListAsync(p => p.ProdLineCode == productLineCode).ConfigureAwait(false); |
|
|
var entityList = await _repository.GetListAsync(p => p.ProdLineCode == productLineCode).ConfigureAwait(false); |
|
|