Browse Source

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

dev_DY_CC
郑勃旭 10 months ago
parent
commit
7e1da1002f
  1. 43
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  2. 26
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs
  3. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Options/RestoOptions.cs

43
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs

@ -83,8 +83,6 @@ public class AssembleIssueJobAppService
[HttpPost("add-many")] [HttpPost("add-many")]
public override async Task<List<AssembleIssueJobDTO>> CreateManyAsync(List<AssembleIssueJobEditInput> inputs) public override async Task<List<AssembleIssueJobDTO>> CreateManyAsync(List<AssembleIssueJobEditInput> inputs)
{ {
foreach (var input in inputs) foreach (var input in inputs)
{ {
await CheckMinRowAndSetStatusAsync(input).ConfigureAwait(false); await CheckMinRowAndSetStatusAsync(input).ConfigureAwait(false);
@ -93,8 +91,11 @@ public class AssembleIssueJobAppService
if (dimensionalStorehouseflag) if (dimensionalStorehouseflag)
{ {
input.IsClaims = true; input.IsClaims = true;
input.ClaimsUserId = "LITK"; //todo input.ClaimsUserId = string.IsNullOrEmpty(_options.Value.StereosUser) ? "LYF" : _options.Value.StereosUser;
input.ClaimsUserName = "LITK"; //todo input.ClaimsUserName = string.IsNullOrEmpty(_options.Value.StereosPassword) ? "LYF" : _options.Value.StereosPassword;
} }
} }
var assembleIssueJobDtos = await base.CreateManyAsync(inputs).ConfigureAwait(false); var assembleIssueJobDtos = await base.CreateManyAsync(inputs).ConfigureAwait(false);
@ -102,9 +103,7 @@ public class AssembleIssueJobAppService
{ {
await CheckDimensionalStorehouseAsync(assembleIssueJobDto).ConfigureAwait(false); await CheckDimensionalStorehouseAsync(assembleIssueJobDto).ConfigureAwait(false);
} }
return assembleIssueJobDtos; return assembleIssueJobDtos;
} }
@ -304,9 +303,9 @@ public class AssembleIssueJobAppService
var assembleIssueJob = await _repository.GetAsync(masterId).ConfigureAwait(false); var assembleIssueJob = await _repository.GetAsync(masterId).ConfigureAwait(false);
assembleIssueJob.JobStatus = EnumJobStatus.Doing; assembleIssueJob.JobStatus = EnumJobStatus.Doing;
assembleIssueJob.ClaimsUserId = "LITK"; assembleIssueJob.ClaimsUserId = string.IsNullOrEmpty( _options.Value.StereosUser)? "LYF" : _options.Value.StereosUser;
assembleIssueJob.ClaimsUserName = "LITK"; assembleIssueJob.ClaimsUserName = string.IsNullOrEmpty(_options.Value.StereosPassword) ? "LYF" : _options.Value.StereosPassword;
//if (assembleIssueJob.IsClaims) //if (assembleIssueJob.IsClaims)
//{ //{
@ -330,6 +329,8 @@ public class AssembleIssueJobAppService
issueJobDetail.HandledFromQty = entityDetail.HandledFromQty; issueJobDetail.HandledFromQty = entityDetail.HandledFromQty;
issueJobDetail.HandledToQty = entityDetail.HandledToQty; issueJobDetail.HandledToQty = entityDetail.HandledToQty;
issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty;
issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty;
assembleIssueJob.Details = new EditableList<AssembleIssueJobDetail> { issueJobDetail }; assembleIssueJob.Details = new EditableList<AssembleIssueJobDetail> { issueJobDetail };
@ -550,12 +551,18 @@ public class AssembleIssueJobAppService
var ret = new ReusltObject { Code = int.Parse(GaoTongResultStatus.Success), OperateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Message = "操作成功" }; var ret = new ReusltObject { Code = int.Parse(GaoTongResultStatus.Success), OperateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Message = "操作成功" };
try try
{ {
if (input.Jobs.Count > 0) if (input.Jobs.Count > 0)
{ {
var jobs = input.Jobs; var jobs = input.Jobs;
var numbers = jobs.Select(p => p.JobNumber); var numbers = jobs.Select(p => p.JobNumber);
var query = _repository.WithDetails() var query = _repository.WithDetails()
.Where(p => numbers.Contains(p.Number)); .Where(p => numbers.Contains(p.Number) && p.JobStatus != EnumJobStatus.Done);
var entities = query.ToList(); var entities = query.ToList();
if (entities.Count == 0) if (entities.Count == 0)
{ {
@ -614,16 +621,24 @@ public class AssembleIssueJobAppService
dto.HandledToLocationGroup = toloc.LocationGroupCode; dto.HandledToLocationGroup = toloc.LocationGroupCode;
dto.HandledToLocationArea = toloc.AreaCode; dto.HandledToLocationArea = toloc.AreaCode;
dto.HandledToLocationErpCode = toloc.ErpLocationCode; dto.HandledToLocationErpCode = toloc.ErpLocationCode;
dto.HandledToLot = string.Empty;
dto.HandledToWarehouseCode = toloc.WarehouseCode;
dto.HandledToQty = detail.Qty;
dto.HandledToLot = string.Empty;
dto.HandledToPackingCode = string.Empty;
dto.HandledFromWarehouseCode=fromloc.WarehouseCode;
dto.HandledFromLocationCode = fromloc.Code; dto.HandledFromLocationCode = fromloc.Code;
dto.HandledFromLocationGroup = fromloc.LocationGroupCode; dto.HandledFromLocationGroup = fromloc.LocationGroupCode;
dto.HandledFromLocationArea = fromloc.AreaCode; dto.HandledFromLocationArea = fromloc.AreaCode;
dto.HandledFromLocationErpCode = fromloc.ErpLocationCode; dto.HandledFromLocationErpCode = fromloc.ErpLocationCode;
dto.HandledFromQty = detail.Qty;
dto.HandledFromLot = string.Empty;
dto.HandledFromPackingCode = string.Empty;
//dto.HandledFromPackingCode = "";
details.Add(dto); details.Add(dto);
await ExecuteDetailExtAsync(itm.Id, entity.Id, dto).ConfigureAwait(false); await ExecuteDetailExtAsync(itm.Id, entity.Id, dto).ConfigureAwait(false);
} }

26
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs

@ -19,6 +19,7 @@ using Volo.Abp;
using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Wms.Inventory.Domain.Acl.ErpLocationItem;
/// <summary> /// <summary>
/// 库存初始化记录 /// 库存初始化记录
@ -32,17 +33,20 @@ public class InventoryInitialNoteAppService :
private readonly IInventoryInitialNoteManager _inventoryInitialNoteManager; private readonly IInventoryInitialNoteManager _inventoryInitialNoteManager;
private readonly IInventoryLabelAppService _inventoryLabelService; private readonly IInventoryLabelAppService _inventoryLabelService;
private readonly IItemBasicAppService _itemBasicAppService; private readonly IItemBasicAppService _itemBasicAppService;
private readonly IErpLocationItemAclService _erpLocationItemAclService;
public InventoryInitialNoteAppService( public InventoryInitialNoteAppService(
IInventoryInitialNoteRepository repository IInventoryInitialNoteRepository repository
, IInventoryInitialNoteManager inventoryInitialNoteManager , IInventoryInitialNoteManager inventoryInitialNoteManager
, IInventoryLabelAppService inventoryLabelService, , IInventoryLabelAppService inventoryLabelService,
IErpLocationItemAclService erpLocationItemAclService,
IItemBasicAppService itemBasicAppService IItemBasicAppService itemBasicAppService
) : base(repository) ) : base(repository)
{ {
_inventoryInitialNoteManager = inventoryInitialNoteManager; _inventoryInitialNoteManager = inventoryInitialNoteManager;
_inventoryLabelService = inventoryLabelService; _inventoryLabelService = inventoryLabelService;
_itemBasicAppService = itemBasicAppService; _itemBasicAppService = itemBasicAppService;
_erpLocationItemAclService= erpLocationItemAclService;
} }
/// <summary> /// <summary>
/// 数据加工 /// 数据加工
@ -88,8 +92,8 @@ public class InventoryInitialNoteAppService :
await CheckItemBasicAsync(importInput, validationRresult).ConfigureAwait(false); await CheckItemBasicAsync(importInput, validationRresult).ConfigureAwait(false);
await CheckLocationAsync(importInput, validationRresult).ConfigureAwait(false); await CheckLocationAsync(importInput, validationRresult).ConfigureAwait(false);
await CheckStatusAsync(importInput, validationRresult).ConfigureAwait(false); await CheckStatusAsync(importInput, validationRresult).ConfigureAwait(false);
await CheckPackingAsync(importInput, validationRresult).ConfigureAwait(false); await CheckPackingAsync(importInput, validationRresult).ConfigureAwait(false);
await CheckErpLocationItemAsync(importInput, validationRresult).ConfigureAwait(false);
} }
private static void CheckItemBasic(ItemBasicDTO itemcBasicDto, string itemCode) private static void CheckItemBasic(ItemBasicDTO itemcBasicDto, string itemCode)
@ -130,6 +134,7 @@ public class InventoryInitialNoteAppService :
await CheckLocationAsync(importInput, validationRresult).ConfigureAwait(false); await CheckLocationAsync(importInput, validationRresult).ConfigureAwait(false);
await CheckStatusAsync(importInput, validationRresult).ConfigureAwait(false); await CheckStatusAsync(importInput, validationRresult).ConfigureAwait(false);
await CheckPackingAsync(importInput, validationRresult).ConfigureAwait(false); await CheckPackingAsync(importInput, validationRresult).ConfigureAwait(false);
} }
private async Task CheckPackingAsync(InventoryInitialNoteImportInput importInput, List<ValidationResult> validationRresult) private async Task CheckPackingAsync(InventoryInitialNoteImportInput importInput, List<ValidationResult> validationRresult)
@ -175,6 +180,23 @@ public class InventoryInitialNoteAppService :
} }
} }
/// <summary>
/// 校验开账信息
/// </summary>
/// <param name="importInput"></param>
/// <param name="validationRresult"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
private async Task CheckErpLocationItemAsync(InventoryInitialNoteImportInput importInput, List<ValidationResult> validationRresult)
{
var erpLocationItem = await _erpLocationItemAclService.GetFirstAsync(importInput.ItemCode, importInput.LocationErpCode).ConfigureAwait(false);
if (erpLocationItem == null)
{
validationRresult.Add("ERP料号", $"未找到物品【{importInput.ItemCode}】与ERP储位【{importInput.LocationErpCode}】的开账信息");
}
}
protected async Task CheckLocationAsync(InventoryInitialNoteImportInput importInput, List<ValidationResult> validationRresult) protected async Task CheckLocationAsync(InventoryInitialNoteImportInput importInput, List<ValidationResult> validationRresult)
{ {
var location = await LocationAclService.GetByCodeAsync(importInput.LocationCode).ConfigureAwait(false); var location = await LocationAclService.GetByCodeAsync(importInput.LocationCode).ConfigureAwait(false);

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Options/RestoOptions.cs

@ -15,9 +15,15 @@ public class RestoOptions
public string Password { set; get; } public string Password { set; get; }
// 令牌 // 令牌
public string Token { set; get; } public string Token { set; get; }
// 路径
public string Path { set; get; } public string Path { set; get; }
//立体库用户名
public string StereosUser { set; get; }
//立体库密码
public string StereosPassword { set; get; }
} }

Loading…
Cancel
Save