Browse Source

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

dev_DY_CC
lvzb 1 year ago
parent
commit
d0b6cd4f24
  1. 12
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile.pubxml
  2. 43
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ContainerJobController.cs
  3. 4
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Properties/PublishProfiles/FolderProfile.pubxml
  4. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/DTOs/ContainerJobDTO.cs
  5. 21
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ContainerJobAutoMapperProfile.cs
  6. 17
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ContainerJobEventHandler.cs
  7. 34
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ContainerRequestEventHandler.cs
  8. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs

12
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile.pubxml

@ -4,13 +4,17 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>False</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>D:\~all-publish\WMS2.0_东阳\Win_in.Sfs.Wms.Store.HttpApi.Host</PublishUrl>
<PublishUrl>D:\发布\WMS\store</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework>
<ProjectGuid>488eeada-cfed-4016-9884-7a1dcbe5eb9c</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

43
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ContainerJobController.cs

@ -1,14 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Polly.Caching;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Auth.Application.Contracts;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs;
@ -24,17 +28,21 @@ public class ContainerJobController : AbpController
private readonly IUserWorkGroupAppService _userWorkGroupAppService;
private readonly IDictAppService _dictApp;
/// <summary>
///
/// </summary>
/// <param name="ContainerJobAppService"></param>
/// <param name="userWorkGroupAppService"></param>
public ContainerJobController(
IContainerJobAppService ContainerJobAppService
IContainerJobAppService containerJobAppService,
IDictAppService dictApp
, IUserWorkGroupAppService userWorkGroupAppService)
{
_userWorkGroupAppService = userWorkGroupAppService;
_containerJobAppService = ContainerJobAppService;
_containerJobAppService = containerJobAppService;
_dictApp=dictApp;
}
/// <summary>
@ -69,30 +77,47 @@ public class ContainerJobController : AbpController
/// <param name="pageIndex"></param>
/// <returns></returns>
[HttpGet("list")]
public virtual async Task<PagedResultDto<ContainerJobDTO>> GetListAsync(int pageSize, int pageIndex)
public virtual async Task<PagedResultDto<ContainerJobDTO>> GetListAsync(int pageSize, int pageIndex, bool isFinished)
{
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
_ = JsonSerializer.Serialize(wlgCodes);
var dtos = await _dictApp.GetByCodeAsync("ContainerSpecificationsType").ConfigureAwait(false);
var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing };
var status = new List<int>();
if(isFinished==true)
{
status.Add((int)EnumJobStatus.Done);
}
else
{
status.Add((int)EnumJobStatus.Open);
}
var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ContainerJobDTO.Priority)} ASC",
Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
Condition = new Condition
{
Filters = new List<Filter>
{
// new(nameof(ContainerJobDTO.WorkGroupCode),jsonCodes,"In"),
{
new(nameof(ContainerJobDTO.JobStatus),jsonStatus,"In")
}
}
};
var list = await _containerJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);
foreach (var item in list.Items)
{
if(!string.IsNullOrEmpty(item.SpecificationsType))
{
var dictName= dtos.Items.FirstOrDefault(t => t.Code == item.SpecificationsType);
item.SpecificationsTypeName = dictName.Name;
}
}
return list;
}

4
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Properties/PublishProfiles/FolderProfile.pubxml

@ -10,11 +10,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>.\..\..\..\OutPut\PDA\</PublishUrl>
<PublishUrl>D:\发布\WMS\pda</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework>
<ProjectGuid>6ea3cf3a-0bb9-49eb-8537-0cb7107052e2</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
</Project>

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ContainerJobs/DTOs/ContainerJobDTO.cs

@ -40,4 +40,10 @@ public class ContainerJobDTO : SfsJobDTOBase<ContainerJobDetailDTO>
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SpecificationsType { get; set; }
/// <summary>
/// 器具规格名称
/// </summary>
[Display(Name = "器具规格名称")]
public string SpecificationsTypeName { get; set; }
}

21
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ContainerJobAutoMapperProfile.cs

@ -0,0 +1,21 @@
using AutoMapper;
using Volo.Abp.AutoMapper;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Event;
public partial class StoreEventAutoMapperProfile : Profile
{
private void ContainerJobAutoMapperProfile()
{
CreateMap<ContainerJob, ContainerNoteEditInput>()
.ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number))
.Ignore(x => x.Confirmed)
.Ignore(x => x.ActiveDate)
.Ignore(x => x.Details)
;
}
}

17
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ContainerJobEventHandler.cs

@ -50,21 +50,8 @@ public class ContainerJobEventHandler :
private async Task<ContainerNoteEditInput> BuildContainerNoteAsync(ContainerJob entity)
{
var ContainerNoteCreateInput = ObjectMapper.Map<ContainerJob, ContainerNoteEditInput>(entity);
ContainerNoteCreateInput.JobNumber = entity.Number;
var locationCodes = ContainerNoteCreateInput.Details.Select(p => p.ToLocationCode).Distinct().ToList();
var locations = await _locationAppService.GetByCodesAsync(locationCodes).ConfigureAwait(false);
ContainerNoteCreateInput.Details.RemoveAll(p => p.Qty == 0);
foreach (var detail in ContainerNoteCreateInput.Details)
{
var location = locations.First(p => p.Code == detail.ToLocationCode);
detail.ToLocationArea = location.AreaCode;
detail.ToLocationGroup = location.LocationGroupCode;
detail.ToLocationErpCode = location.ErpLocationCode;
detail.ToWarehouseCode = location.WarehouseCode;
}
ContainerNoteCreateInput.JobNumber = entity.Number;
return ContainerNoteCreateInput;
}

34
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ContainerRequestEventHandler.cs

@ -124,23 +124,35 @@ public class ContainerRequestEventHandler
private async Task<ContainerNoteEditInput> BuildContainerNoteAsync(ContainerRequest request)
{
var createInput = ObjectMapper.Map<ContainerRequest, ContainerNoteEditInput>(request);
var createInput = ObjectMapper.Map<ContainerRequest, ContainerNoteEditInput>(request);
ContainerNoteDetailInput detail=new ContainerNoteDetailInput();
createInput.Details = new List<ContainerNoteDetailInput>();
detail.ToLocationCode = request.RequestLocationCode;
foreach (var detail in request.Details)
{
detail.ToLocationCode = request.RequestLocationCode;
detail.FromLocationCode = "123";
detail.FromPackingCode = "123";
detail.ToPackingCode = "123";
detail.FromLot = "123";
detail.ToLot = "123";
detail.FromLocationErpCode = "123";
detail.FromWarehouseCode = "123";
detail.ToLocationErpCode = "123";
detail.ToWarehouseCode = "123";
detail.Uom = "123";
detail.ItemCode = "123";
detail.ItemName = "123";
var container = await _equipmentLocApp.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
//var container = await _equipmentLocApp.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
if(container != null)
{
detail.ItemCode = container.Code;
}
}
//if (container != null)
//{
// detail.ItemCode = container.Code;
//}
createInput.Details.Add(detail);
return createInput;
}

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs

@ -30,7 +30,7 @@ public partial class StoreEventAutoMapperProfile : Profile
#endregion
#region Jobs
ContainerJobAutoMapperProfile();
CountJobAutoMapperProfile();
DeliverJobAutoMapperProfile();
InspectJobAutoMapperProfile();

Loading…
Cancel
Save