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. 41
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ContainerJobController.cs
  3. 2
      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. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ContainerJobEventHandler.cs
  7. 30
      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> <Project>
<PropertyGroup> <PropertyGroup>
<DeleteExistingFiles>False</DeleteExistingFiles> <DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data> <ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform> <LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider> <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> <WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework>
<ProjectGuid>488eeada-cfed-4016-9884-7a1dcbe5eb9c</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

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

@ -1,14 +1,18 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Polly.Caching;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Auth.Application.Contracts; 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;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs; namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs;
@ -24,17 +28,21 @@ public class ContainerJobController : AbpController
private readonly IUserWorkGroupAppService _userWorkGroupAppService; private readonly IUserWorkGroupAppService _userWorkGroupAppService;
private readonly IDictAppService _dictApp;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="ContainerJobAppService"></param> /// <param name="ContainerJobAppService"></param>
/// <param name="userWorkGroupAppService"></param> /// <param name="userWorkGroupAppService"></param>
public ContainerJobController( public ContainerJobController(
IContainerJobAppService ContainerJobAppService IContainerJobAppService containerJobAppService,
IDictAppService dictApp
, IUserWorkGroupAppService userWorkGroupAppService) , IUserWorkGroupAppService userWorkGroupAppService)
{ {
_userWorkGroupAppService = userWorkGroupAppService; _userWorkGroupAppService = userWorkGroupAppService;
_containerJobAppService = ContainerJobAppService; _containerJobAppService = containerJobAppService;
_dictApp=dictApp;
} }
/// <summary> /// <summary>
@ -69,30 +77,47 @@ public class ContainerJobController : AbpController
/// <param name="pageIndex"></param> /// <param name="pageIndex"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("list")] [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); var dtos = await _dictApp.GetByCodeAsync("ContainerSpecificationsType").ConfigureAwait(false);
_ = JsonSerializer.Serialize(wlgCodes);
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 jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase var request = new SfsJobRequestInputBase
{ {
MaxResultCount = pageSize, MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize, SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ContainerJobDTO.Priority)} ASC", Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
Condition = new Condition Condition = new Condition
{ {
Filters = new List<Filter> Filters = new List<Filter>
{ {
// new(nameof(ContainerJobDTO.WorkGroupCode),jsonCodes,"In"),
new(nameof(ContainerJobDTO.JobStatus),jsonStatus,"In") new(nameof(ContainerJobDTO.JobStatus),jsonStatus,"In")
} }
} }
}; };
var list = await _containerJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); 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; return list;
} }

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

@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform> <LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider> <PublishProvider>FileSystem</PublishProvider>
<PublishUrl>.\..\..\..\OutPut\PDA\</PublishUrl> <PublishUrl>D:\发布\WMS\pda</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod> <WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish /> <SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>

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}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SpecificationsType { get; set; } 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)
;
}
}

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

@ -51,20 +51,7 @@ public class ContainerJobEventHandler :
{ {
var ContainerNoteCreateInput = ObjectMapper.Map<ContainerJob, ContainerNoteEditInput>(entity); var ContainerNoteCreateInput = ObjectMapper.Map<ContainerJob, ContainerNoteEditInput>(entity);
ContainerNoteCreateInput.JobNumber = entity.Number; 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;
}
return ContainerNoteCreateInput; return ContainerNoteCreateInput;
} }

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

@ -126,20 +126,32 @@ public class ContainerRequestEventHandler
var createInput = ObjectMapper.Map<ContainerRequest, ContainerNoteEditInput>(request); var createInput = ObjectMapper.Map<ContainerRequest, ContainerNoteEditInput>(request);
createInput.Details = new List<ContainerNoteDetailInput>();
foreach (var detail in request.Details) ContainerNoteDetailInput detail=new ContainerNoteDetailInput();
{ createInput.Details = new List<ContainerNoteDetailInput>();
detail.ToLocationCode = request.RequestLocationCode; detail.ToLocationCode = request.RequestLocationCode;
var container = await _equipmentLocApp.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); 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);
if(container != null) //if (container != null)
{ //{
detail.ItemCode = container.Code; // detail.ItemCode = container.Code;
} //}
} createInput.Details.Add(detail);
return createInput; 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 #endregion
#region Jobs #region Jobs
ContainerJobAutoMapperProfile();
CountJobAutoMapperProfile(); CountJobAutoMapperProfile();
DeliverJobAutoMapperProfile(); DeliverJobAutoMapperProfile();
InspectJobAutoMapperProfile(); InspectJobAutoMapperProfile();

Loading…
Cancel
Save