Browse Source

Merge branch 'Agv分支2024-11-19' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into Agv分支2024-11-19

Agv分支2024-11-19
赵新宇 5 months ago
parent
commit
3c836488b3
  1. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/LocationDeliverys/ILocationDeliveryAppService.cs
  2. 6
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Locations/DTOs/LocationDTO.cs
  3. 5
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Locations/Inputs/LocationEditInput.cs
  4. 6
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Locations/Inputs/LocationImportInput.cs
  5. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/BasedataApplicationAutoMapperProfile.cs
  6. 14
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/LocationDeliverys/LocationDeliveryAppService.cs
  7. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Locations/Location.cs
  8. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContext.cs
  9. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/IBasedataDbContext.cs
  10. 45
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  11. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestManager.cs
  12. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/AssembleIssueRequestEventHandler.cs

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/LocationDeliverys/ILocationDeliveryAppService.cs

@ -1,3 +1,4 @@
using System.Threading.Tasks;
using Win_in.Sfs.Shared.Application.Contracts;
namespace Win_in.Sfs.Basedata.Application.Contracts;
@ -5,4 +6,5 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public interface ILocationDeliveryAppService
: ISfsBaseDataAppServiceBase<LocationDeliveryDTO, SfsBaseDataRequestInputBase, LocationDeliveryEditInput>
{
Task<LocationDeliveryDTO> GetByFromLocationCodeAndToLocationCodeAsync(string fromLocationCode,string toLocationCode);
}

6
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Locations/DTOs/LocationDTO.cs

@ -190,9 +190,5 @@ public class LocationDTO : SfsBaseDataDTOBase, IHasCode, IHasName, IHasLocationS
[Display(Name = "是否可以拆托")]
public bool EnableSplitPallet { get; set; } = true;
/// <summary>
/// 是否AGV配送
/// </summary>
[Display(Name = "是否AGV配送")]
public bool EnableAgv { get; set; } = false; //是否AGV配送
}

5
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Locations/Inputs/LocationEditInput.cs

@ -178,11 +178,6 @@ public class LocationEditInput : SfsBaseDataWithWarehouseCreateOrUpdateInputBase
[Display(Name = "是否可以拆托")]
public bool EnableSplitPallet { get; set; } = true;
/// <summary>
/// 是否AGV配送
/// </summary>
[Display(Name = "是否AGV配送")]
public bool EnableAgv { get; set; } = false; //是否AGV配送
#endregion
#region Create

6
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Locations/Inputs/LocationImportInput.cs

@ -210,12 +210,6 @@ public class LocationImportInput : SfsBaseDataImportInputBase, IHasLocationSwitc
[Required(ErrorMessage = "{0}是必填项")]
public bool EnableSplitPallet { get; set; } = true;
/// <summary>
/// 是否AGV配送
/// </summary>
[Display(Name = "是否AGV配送")]
public bool EnableAgv { get; set; } = false; //是否AGV配送
/// <summary>
/// 描述
/// </summary>

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/BasedataApplicationAutoMapperProfile.cs

@ -58,7 +58,7 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
EquipmentPartCodeAutoMapperProfile();
EquipmentLocCapAutoMapperProfile();
PostionLocationAutoMapperProfile();
LocationDeliveryAutoMapperProfile();
}
}

14
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/LocationDeliverys/LocationDeliveryAppService.cs

@ -5,6 +5,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Basedata.Domain.Shared;
@ -41,4 +42,17 @@ public class LocationDeliveryAppService
{
await base.ValidateImportModelAsync(importInput, validationRresult).ConfigureAwait(false);
}
[HttpPost("get-by-from-location-and-to-location")]
public async Task<LocationDeliveryDTO> GetByFromLocationCodeAndToLocationCodeAsync(string fromLocationCode,string toLocationCode)
{
var locationDelivery=await _repository.FindAsync(p => p.FromLocationCode == fromLocationCode && p.ToLocationCode == toLocationCode).ConfigureAwait(false);
if (locationDelivery == null)
{
return null;
}
else
{
return ObjectMapper.Map<LocationDelivery, LocationDeliveryDTO>(locationDelivery);
}
}
}

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Locations/Location.cs

@ -98,5 +98,4 @@ public class Location : SfsBaseDataAggregateRootBase, IHasCode, IHasName, IHasLo
public bool EnableReturnFromCustomer { get; set; } = true; // 可以接收客户退货
public bool EnableSplitBox { get; set; } = true; //是否可以拆箱
public bool EnableSplitPallet { get; set; } = true; //是否可以拆托
public bool EnableAgv { get; set; } = false; //是否AGV配送
}

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContext.cs

@ -60,7 +60,7 @@ public class BasedataDbContext : AbpDbContext<BasedataDbContext>, IBasedataDbCon
public DbSet<SplitPackingRec> SplitPackingRecs { get; set; }
public DbSet<PostionLocation> PostionLocations { get; set; }
public DbSet<PostionLocation> LocationDeliverys { get; set; }
public DbSet<LocationDelivery> LocationDeliverys { get; set; }
public BasedataDbContext(DbContextOptions<BasedataDbContext> options)
: base(options)

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/IBasedataDbContext.cs

@ -56,5 +56,5 @@ public interface IBasedataDbContext : IEfCoreDbContext
public DbSet<SplitPackingRec> SplitPackingRecs { get; set; }
public DbSet<PostionLocation> LocationDeliverys { get; set; }
public DbSet<LocationDelivery> LocationDeliverys { get; set; }
}

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

@ -59,6 +59,7 @@ public class AssembleIssueJobAppService
private readonly ILogger<AssembleIssueJobAppService> _logger;
private readonly IPostionLocationAppService _postionLocationAppService;
private readonly ILocationDeliveryAppService _locationDeliveryAppService;
public AssembleIssueJobAppService(
ILogger<AssembleIssueJobAppService> logger,
@ -70,15 +71,14 @@ public class AssembleIssueJobAppService
, IOptions<RestoOptions> options, ITransferLibRequestAppService transferLibRequestAppService,
ICurrentUser currentUser, UnitOfWorkManager unitOfWorkManager
, IOptions<AgvOptions> agvOptions
, IPostionLocationAppService postionLocationAppService
) : base(
, IPostionLocationAppService postionLocationAppService, ILocationDeliveryAppService locationDeliveryAppService) : base(
repository, assembleIssueJobManager
)
{
_postionLocationAppService = postionLocationAppService;
_locationDeliveryAppService = locationDeliveryAppService;
_assembleIssueJobManager = assembleIssueJobManager;
_locationAppService = locationAppService;
_assembleIssueNoteAppService = assembleIssueNoteAppService;
@ -120,17 +120,20 @@ public class AssembleIssueJobAppService
: _options.Value.StereosPassword;
}
//如果是Agv
var agvFlag = await UpdateJobStatusWaitByAgvAsync(input).ConfigureAwait(false);
if (agvFlag)
if (dimensionalStorehouseflag == false)
{
input.IsClaims = true;
input.ClaimsUserId = string.IsNullOrEmpty(_options.Value.StereosUser)
? "AGV"
: _options.Value.StereosUser;
input.ClaimsUserName = string.IsNullOrEmpty(_options.Value.StereosPassword)
? "AGV"
: _options.Value.StereosPassword;
//如果是Agv
var agvFlag = await UpdateJobStatusWaitByAgvAsync(input).ConfigureAwait(false);
if (agvFlag)
{
input.IsClaims = true;
input.ClaimsUserId = string.IsNullOrEmpty(_options.Value.StereosUser)
? "AGV"
: _options.Value.StereosUser;
input.ClaimsUserName = string.IsNullOrEmpty(_options.Value.StereosPassword)
? "AGV"
: _options.Value.StereosPassword;
}
}
}
@ -795,10 +798,10 @@ public class AssembleIssueJobAppService
private async Task DoingAgvAsync(AssembleIssueJobDTO assembleIssueJobDto)
{
var jobDetailInputdetail = assembleIssueJobDto.Details.FirstOrDefault();
var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode)
.ConfigureAwait(false);
var locationDeliveryDto = await _locationDeliveryAppService.GetByFromLocationCodeAndToLocationCodeAsync(
jobDetailInputdetail.RecommendFromLocationCode, jobDetailInputdetail.RecommendToLocationCode).ConfigureAwait(false);
if (loctionDto.EnableAgv)
if (locationDeliveryDto != null && locationDeliveryDto.EnumLocationDeliveryType == EnumLocationDeliveryType.Agv)
{
//TODO AGV
var ret = await CallAgvAsync(assembleIssueJobDto).ConfigureAwait(false);
@ -825,15 +828,15 @@ public class AssembleIssueJobAppService
{
var jobDetailInputdetail = input.Details.FirstOrDefault();
var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode)
.ConfigureAwait(false);
if (loctionDto.EnableAgv)
var locationDeliveryDto=await _locationDeliveryAppService.GetByFromLocationCodeAndToLocationCodeAsync(
jobDetailInputdetail.RecommendFromLocationCode, jobDetailInputdetail.RecommendToLocationCode).ConfigureAwait(false);
if (locationDeliveryDto!=null&& locationDeliveryDto.EnumLocationDeliveryType==EnumLocationDeliveryType.Agv)
{
input.JobStatus = EnumJobStatus.WaitAgv;
return true;
}
return false;
}

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestManager.cs

@ -62,6 +62,6 @@ public class AssembleIssueRequestManager
await Task.CompletedTask.ConfigureAwait(false);
var entity = await _repository.GetAsync(request.Id).ConfigureAwait(false);
entity.Details = request.Details;
return await _repository.UpdateAsync(entity, true).ConfigureAwait(false);
return await _repository.UpdateAsync(entity).ConfigureAwait(false);
}
}

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueRequest/AssembleIssueRequestEventHandler.cs

@ -629,7 +629,7 @@ public class AssembleIssueRequestEventHandler
List<AssembleIssueJobDTO> addAssembleIssueJobDtos)
{
//原有任务
var existAssembleIssueJobDtos = await _assembleIssueJobAppService
var existAssembleIssueJobDtos = await _assembleIssueJobAppService
.GetByRequestNumberAsync(assembleIssueRequest.Number)
.ConfigureAwait(false);

Loading…
Cancel
Save