Browse Source

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

dev_DY_CC
郑勃旭 1 year ago
parent
commit
d54035ae14
  1. 6
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile1.pubxml
  2. 5
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs
  3. 12
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs
  4. 7
      be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs
  5. 16
      be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs
  6. 22
      be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Statuses/EnumRequestStatus.cs
  7. 35
      be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Types/EnumInjectionModelType.cs
  8. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ProductRecycleJobs/IProductRecycleJobAppService.cs
  9. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/DTOs/CustomerProductionReturnNoteDTO.cs
  10. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/Inputs/CustomerProductionReturnNoteEditInput.cs
  11. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/Inputs/CustomerProductionReturnNoteImportInput.cs
  12. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/DTOs/MesNoteDTO.cs
  13. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesNoteEditInput.cs
  14. 17
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/DTOs/InjectioModelPlanDTO.cs
  15. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanEditInput.cs
  16. 31
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs
  17. 31
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDetailDTO.cs
  18. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs
  19. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsStoreRequestAppServiceBase.cs
  20. 29
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductRecycleJobs/ProductRecycleJobAppService.cs
  21. 35
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
  22. 62
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs
  23. 36
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs
  24. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs
  25. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
  26. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs
  27. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs
  28. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNote.cs
  29. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesNote.cs
  30. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlan.cs
  31. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs
  32. 77
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs
  33. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteDbContextModelCreatingExtensions.cs
  34. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/InjectioModelPlans/InjectioModelPlanDbContextModelCreatingExtensions.cs
  35. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ThirdLocationRequests/ThirdLocationRequestDbContextModelCreatingExtensions.cs
  36. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/NoOkConvertOKNoteAutoMapperProfile.cs
  37. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs
  38. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs
  39. 18
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductRecycleRequestEventHandler.cs
  40. 157
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs
  41. 57
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/MesNoteEventHandler.cs
  42. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/NoOkConvertOKNoteEventHandler.cs
  43. 166
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs

6
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile1.pubxml

@ -10,8 +10,12 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
<PublishUrl>D:\发布\WMS\store</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework>
<ProjectGuid>488eeada-cfed-4016-9884-7a1dcbe5eb9c</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

5
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs

@ -1,3 +1,6 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Shared.Application.Contracts;
namespace Win_in.Sfs.Basedata.Application.Contracts;
@ -7,5 +10,5 @@ public interface ICustomerItemAppService
, ISfsUpsertAppService<CustomerItemEditInput>
{
Task<List<CustomerItem>> GetListByPartsAsync(List<string> inputs);
}

12
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs

@ -1,8 +1,11 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Caching;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
@ -36,7 +39,6 @@ public class CustomerItemAppService : SfsBaseDataAppServiceBase<CustomerItem, Cu
}
[HttpPost("upsert")]
public virtual async Task UpsertAsync(CustomerItemEditInput input)
{
var entity = ObjectMapper.Map<CustomerItemEditInput, CustomerItem>(input);
@ -48,4 +50,12 @@ public class CustomerItemAppService : SfsBaseDataAppServiceBase<CustomerItem, Cu
await base.CheckItemBasicItemCodeAsync(importInput.ItemCode, validationRresult).ConfigureAwait(false);
await base.CheckCustomerCodeAsync(importInput.CustomerCode, validationRresult).ConfigureAwait(false);
}
[HttpPost("get-part-list")]
public virtual async Task<List<CustomerItem>> GetListByPartsAsync(List<string> inputs)
{
return await _repository.WithDetails().Where(p => inputs.Contains(p.ItemCode)).ToListAsync().ConfigureAwait(false);
}
}

7
be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs

@ -214,12 +214,7 @@ public enum EnumTransSubType
/// </summary>
[Display(Name = "导入盘点计划")]
ExcelInCountPlan = 6002,
[Display(Name = "MES冻结")]
MesFreeze = 10001,
[Display(Name = "MES解冻")]
MesUnFreeze = 10002,
[Display(Name = "MES不合格")]
MesUnQualified = 10003

16
be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs

@ -161,5 +161,21 @@ public enum EnumTransType
/// <summary>
/// MES冻结
/// </summary>
[Display(Name = "Mes冻结")]
MesFreezed= 40,
/// <summary>
/// MES冻结
/// </summary>
[Display(Name = "Mes解冻")]
MesUnFreezed = 41,
}

22
be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Statuses/EnumRequestStatus.cs

@ -65,17 +65,17 @@ public enum EnumRequestStatus
Partial = 9,
/// <summary>
/// 部分完成
/// </summary>
[Display(Name = "已过时")]
Deprecated = 10,
/// <summary>
/// 有更新
/// </summary>
[Display(Name = "有更新")]
Updated = 10,
///// <summary>
///// 部分完成
///// </summary>
//[Display(Name = "已过时")]
//Deprecated = 11,
///// <summary>
///// 有更新
///// </summary>
//[Display(Name = "有更新")]
//Updated = 10,

35
be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/Types/EnumInjectionModelType.cs

@ -0,0 +1,35 @@
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Shared.Domain.Shared;
public enum EnumInjectionModelStatus
{
/// <summary>
/// 有更新
/// </summary>
[Display(Name = "有更新")]
Updated = 10,
/// <summary>
/// 执行中
/// </summary>
[Display(Name = "执行中")]
Handling = 5,
/// <summary>
/// 部分完成
/// </summary>
[Display(Name = "已过时")]
Deprecated = 11,
/// <summary>
/// 已完成
/// </summary>
[Display(Name = "已完成")]
Completed = 6,
/// <summary>
/// 新增
/// </summary>
[Display(Name = "新增")]
New = 1
}

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ProductRecycleJobs/IProductRecycleJobAppService.cs

@ -7,5 +7,5 @@ public interface IProductRecycleJobAppService
: ISfsJobAppServiceBase<ProductRecycleJobDTO, SfsJobRequestInputBase, ProductRecycleJobCheckInput, ProductRecycleJobEditInput>
{
Task<ProductRecycleJobDTO> CompleteByRequestNumberAsync(string number);
}

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/DTOs/CustomerProductionReturnNoteDTO.cs

@ -15,6 +15,14 @@ public class CustomerProductionReturnNoteDTO : SfsStoreDTOBase<CustomerProductio
[Display(Name = "任务ID")]
public string JobNumber { get; set; }
/// <summary>
///客户编码
/// </summary>
[Display(Name = "客户编码")]
public string CustomerCode { get; set; }
/// <summary>
/// 退料单号
/// </summary>

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/Inputs/CustomerProductionReturnNoteEditInput.cs

@ -23,6 +23,14 @@ public class CustomerProductionReturnNoteEditInput : SfsStoreCreateOrUpdateInput
[Display(Name = "退料时间")]
public DateTime ReturnTime { get; set; }
/// <summary>
///客户编码
/// </summary>
[Display(Name = "客户编码")]
public string CustomerCode { get; set; }
/// <summary>
/// 退料申请单号
/// </summary>

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/Inputs/CustomerProductionReturnNoteImportInput.cs

@ -26,6 +26,14 @@ public class CustomerProductionReturnNoteImportInput : SfsStoreImportInputBase
[Display(Name = "退料单号")]
public string ProductionReturnRequestNumber { get; set; }
/// <summary>
///客户编码
/// </summary>
[Display(Name = "客户编码")]
public string CustomerCode { get; set; }
/// <summary>
/// 采购订单号
/// </summary>

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/DTOs/MesNoteDTO.cs

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -12,7 +13,7 @@ public class MesNoteDTO : SfsStoreDTOBase<MesNoteDetailDTO>, IHasNumber
public string JobNumber { get; set; }
/// <summary>
/// 类型
/// Mes类型(40-冻结、41-解冻 )
/// </summary>
[Display(Name = "类型")]
public string Type { get; set; }

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/MesNotes/Inputs/MesNoteEditInput.cs

@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store.Types;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -28,7 +29,7 @@ public class MesNoteEditInput : SfsStoreCreateOrUpdateInputBase
public string MesRequestNumber { get; set; }
/// <summary>
/// 报废类型
/// Mes类型(40-冻结、41-解冻 )
/// </summary>
[Display(Name = "类型")]
public string Type { get; set; }
@ -38,5 +39,10 @@ public class MesNoteEditInput : SfsStoreCreateOrUpdateInputBase
/// </summary>
[Display(Name = "明细列表")]
public List<MesNoteDetailInput> Details { get; set; }
#endregion
}

17
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/DTOs/InjectioModelPlanDTO.cs

@ -2,6 +2,7 @@ using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -10,6 +11,22 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// </summary>
public class InjectioModelPlanDTO : SfsStoreRequestDTOBase<InjectioModelPlanDetailDTO>, IHasNumber
{
[ExporterHeader(DisplayName = "状态")]
public EnumInjectionModelStatus Status { get; set; }
[ExporterHeader(DisplayName = "版本号")]
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 车间
/// </summary>

15
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/InjectioModelPlans/Inputs/InjectioModelPlanEditInput.cs

@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -67,6 +69,19 @@ public class InjectioModelPlanEditInput : SfsStoreRequestCreateOrUpdateInputBase
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Number { get; set; }
[Display(Name = "状态")]
public EnumInjectionModelStatus Status { get; set; }
[Display(Name = "版本号")]
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 明细列表
/// </summary>

31
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs

@ -5,41 +5,22 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationRequestDTO : SfsStoreRequestDTOBase<ThirdLocationRequestDetailDTO>, IHasNumber
{
/// <summary>
/// 叫料类型
/// 类型
/// </summary>
[Display(Name = "叫料类型")]
[Display(Name = "类型")]
public string Type { get; set; }
/// <summary>
/// 生产线
/// 生产线
/// </summary>
[Display(Name = "生产线")]
public string ProdLine { get; set; }
/// <summary>
/// 是否使用在途库
/// 是否使用在途库
/// </summary>
[Display(Name = "是否使用在途库")]
public bool IsUseOnTheWayLocation { get; set; }
public bool IsUseOnTheWayLocation { get; set; }
/// <summary>
/// 可用来源库位Json集合
/// </summary>
public string FromLocationCodeJsonList { get; set; }
/// <summary>
/// 叫料库位
/// </summary>
public string ToLocationCode { get; set; }
/// <summary>
/// 目标ERP储位
/// </summary>
[Display(Name = "目标ERP储位")]
public string ToLocationErpCode { get; set; }
/// <summary>
/// 来源库区
/// </summary>
public string FromLocationArea { get; set; }
}

31
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDetailDTO.cs

@ -8,6 +8,30 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationRequestDetailDTO : SfsStoreDetailWithQtyDTOBase
{
/// <summary>
/// 目标库位
/// </summary>
[Display(Name = "目标库位")]
public string ToLocationCode { get; set; }
/// <summary>
/// 目标ERP储位
/// </summary>
[Display(Name = "目标ERP储位")]
public string ToLocationErpCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLocationCode { get; set; }
/// <summary>
/// 来源库区
/// </summary>
[Display(Name = "来源库区")]
public string FromLocationArea { get; set; }
/// <summary>
/// 已发数量
/// </summary>
@ -19,12 +43,7 @@ public class ThirdLocationRequestDetailDTO : SfsStoreDetailWithQtyDTOBase
/// </summary>
[Display(Name = "已收数量")]
public decimal ReceivedQty { get; set; }
/// <summary>
/// 明细状态
/// </summary>
[Display(Name = "明细状态")]
public EnumStatus Status { get; set; }
/// <summary>
/// 请求未发

7
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs

@ -71,12 +71,7 @@ public class ThirdLocationRequestDetailInput : SfsStoreDetailWithQtyInputBase
/// </summary>
[Display(Name = "已收数量")]
public decimal ReceivedQty { get; set; }
/// <summary>
/// 明细状态
/// </summary>
[Display(Name = "明细状态")]
public EnumStatus Status { get; set; }
/// <summary>
/// 位置码

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsStoreRequestAppServiceBase.cs

@ -129,7 +129,7 @@ public abstract class SfsStoreRequestAppServiceBase<TEntity, TEntityDto, TReques
/// <returns></returns>
[HttpPost("abort/{id}")]
public virtual async Task<TEntityDto> AbortAsync(Guid id)
{
{
var entity = await _repository.FindAsync(id).ConfigureAwait(false);
Check.NotNull(entity, typeof(TEntity).Name);
var result = await _requestManager.AbortAsync(entity).ConfigureAwait(false);

29
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductRecycleJobs/ProductRecycleJobAppService.cs

@ -8,6 +8,10 @@ using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
using Volo.Abp.Domain.Entities;
using static Volo.Abp.Identity.Settings.IdentitySettingNames;
using Volo.Abp.Users;
using Volo.Abp.Domain.Repositories;
namespace Win_in.Sfs.Wms.Store.Application;
@ -19,13 +23,14 @@ public class ProductRecycleJobAppService
, IProductRecycleJobAppService
{
private readonly IProductRecycleJobManager _productRecycleJobManager;
private readonly IProductRecycleJobRepository _repository;
private readonly IProductRecycleRequestAppService _productRecycleRequestAppService;
public ProductRecycleJobAppService(
IProductRecycleJobRepository repository, IProductRecycleJobManager productRecycleJobManager,
IProductRecycleRequestAppService productRecycleRequestAppService)
: base(repository, productRecycleJobManager)
{
_repository = repository;
_productRecycleJobManager = productRecycleJobManager;
_productRecycleRequestAppService = productRecycleRequestAppService;
}
@ -37,7 +42,7 @@ public class ProductRecycleJobAppService
/// <returns></returns>
[HttpPost("handle/{id}")]
[UnitOfWork]
public override async Task<ProductRecycleJobDTO> CompleteAsync(Guid id, ProductRecycleJobDTO dto)
public override async Task<ProductRecycleJobDTO> CompleteAsync(Guid id, ProductRecycleJobDTO dto)
{
var handleEntity = ObjectMapper.Map<ProductRecycleJobDTO, ProductRecycleJob>(dto);
var job = await _repository.GetAsync(id).ConfigureAwait(false);
@ -48,11 +53,27 @@ public class ProductRecycleJobAppService
var handleResult = await _productRecycleJobManager.CompleteAsync(handleEntity, job, CurrentUser).ConfigureAwait(false);
//判断申请是否执行完成
if(job.JobStatus== EnumJobStatus.Done)
if (job.JobStatus == EnumJobStatus.Done)
{
await _productRecycleRequestAppService.UpdateStatusByNumberAsync(job.RequestNumber).ConfigureAwait(false);
await _productRecycleRequestAppService.UpdateStatusByNumberAsync(job.RequestNumber).ConfigureAwait(false);
}
var handleDto = ObjectMapper.Map<ProductRecycleJob, ProductRecycleJobDTO>(handleResult);
return handleDto;
}
/// <summary>
/// 根据请求号完成任务
/// </summary>
/// <param name="number"></param>
/// <returns></returns>
[HttpPost("complete-by-request-number")]
public async Task<ProductRecycleJobDTO> CompleteByRequestNumberAsync(string number)
{
var entity = await _repository.FirstOrDefaultAsync(r => r.RequestNumber == number).ConfigureAwait(false);
await entity.CompleteAsync(CurrentUser.Id, CurrentUser.Name, Clock.Now).ConfigureAwait(false);
var updatejob = await _repository.UpdateAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<ProductRecycleJob, ProductRecycleJobDTO>(updatejob);
return dto;
}
}

35
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs

@ -35,13 +35,8 @@ public class TransferLibJobAppService
/// <returns></returns>
public override async Task<TransferLibJobDTO> CompleteAsync(Guid id, TransferLibJobDTO dto)
{
var str = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService";
var implementation=_serviceProvider.GetService(Type.GetType("Win_in.Sfs.Wms.Store.Application.InjectionJobAppService"));
MethodInfo methodInfo=implementation.GetType().GetMethod("Test");
methodInfo.Invoke(implementation, null);
//var str = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService";
string methodPrefix = "TransferLibJobAppService.CompleteAsync - ";
if (dto.CallServerName.IsNullOrEmpty())
{
throw new UserFriendlyException($"{methodPrefix}CallServerName 不能为空");
@ -62,18 +57,17 @@ public class TransferLibJobAppService
var ret = await base.CompleteAsync(id, dto).ConfigureAwait(false);
if (ret != null)
{
var assembly = Assembly.GetExecutingAssembly();
var ty = assembly.GetType(dto.CallServerName);
Type ty = Type.GetType(dto.CallServerName);
if (ty == null)
{
throw new UserFriendlyException($"{methodPrefix}没有找到类型为{dto.CallServerName}的对象");
}
var instance = Activator.CreateInstance(ty);
var instance = _serviceProvider.GetService(ty);
if (instance == null)
{
throw new UserFriendlyException($"{methodPrefix}类型为{dto.CallServerName}的对象创建失败");
}
ITransferLibCallback transferLibCallback = (ITransferLibCallback)instance;
ITransferLibCallback transferLibCallback = (Win_in.Sfs.Wms.Store.Notes.ITransferLibCallback)instance;
if (transferLibCallback == null)
{
throw new UserFriendlyException($"{methodPrefix}类型为{dto.CallServerName}的对象没有实现ITransferLibCallback接口");
@ -83,6 +77,27 @@ public class TransferLibJobAppService
{
throw new UserFriendlyException($"{methodPrefix}执行回调服务{dto.CallServerName}出错,返回错误信息:{callbackRet.Item2}");
}
//var assembly = Assembly.GetExecutingAssembly();
//var ty = assembly.GetType(dto.CallServerName);
//if (ty == null)
//{
// throw new UserFriendlyException($"{methodPrefix}没有找到类型为{dto.CallServerName}的对象");
//}
//var instance = Activator.CreateInstance(ty);
//if (instance == null)
//{
// throw new UserFriendlyException($"{methodPrefix}类型为{dto.CallServerName}的对象创建失败");
//}
//ITransferLibCallback transferLibCallback = (ITransferLibCallback)instance;
//if (transferLibCallback == null)
//{
// throw new UserFriendlyException($"{methodPrefix}类型为{dto.CallServerName}的对象没有实现ITransferLibCallback接口");
//}
//Tuple<bool?, string> callbackRet = transferLibCallback.DoTransferLibCallback(dto.CallServerName, dto.CallRequestNumber, dto.CallJobNumber);
//if (callbackRet != null && callbackRet.Item1 == false)
//{
// throw new UserFriendlyException($"{methodPrefix}执行回调服务{dto.CallServerName}出错,返回错误信息:{callbackRet.Item2}");
//}
}
return ret;
}

62
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs

@ -1,6 +1,10 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Omu.ValueInjecter;
using Volo.Abp;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@ -20,11 +24,21 @@ public class CustomerProductionReturnNoteAppService :
{
private readonly ICustomerProductionReturnNoteManager _CustomerProductionReturnNoteManager;
private readonly ICustomerItemAppService _customerItemAppService;
public CustomerProductionReturnNoteAppService(
ICustomerProductionReturnNoteRepository repository
, ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager
, ICustomerItemAppService customerItemAppService
) : base(repository)
{
_customerItemAppService = customerItemAppService;
_CustomerProductionReturnNoteManager = CustomerProductionReturnNoteManager;
}
@ -37,16 +51,56 @@ public class CustomerProductionReturnNoteAppService :
//[Authorize(CustomerProductionReturnNotePermissions.Create)]
public override async Task<CustomerProductionReturnNoteDTO> CreateAsync(CustomerProductionReturnNoteEditInput input)
{
var entity = ObjectMapper.Map<CustomerProductionReturnNoteEditInput, CustomerProductionReturnNote>(input);
var entity = ObjectMapper.Map<CustomerProductionReturnNoteEditInput, CustomerProductionReturnNote>(input);
var parts= input.Details.Select(itm => itm.ItemCode).Distinct();
var custitmDetail = await _customerItemAppService.GetListByPartsAsync(parts.ToList()).ConfigureAwait(false);
var checkPart= from itm in entity.Details.ToList()
join itm1 in custitmDetail
on itm.ItemCode equals itm1.ItemCode
into temp
from tm in temp.DefaultIfEmpty()
where tm == null
select itm;
var partErr = checkPart.Select(x => x.ItemCode).Distinct().ToList();
if (partErr.Count > 0)
{
throw new UserFriendlyException($"客户零件{string.Join(",",partErr)}不在零件关系表中,不能退货!");
}
var checkCustomer= from itm in entity.Details.ToList()
join itm1 in custitmDetail
on itm.ItemCode equals itm1.ItemCode
select itm1;
var custErr= checkCustomer.Select(x => x.CustomerCode).Distinct().ToList();
if (custErr.Count > 1)
{
throw new UserFriendlyException($"提交客户退货零件{string.Join(",", custErr)}存在多个客户,不能退货!");
}
if(entity.Details.Count>0)
{
entity.CustomerCode = checkCustomer.FirstOrDefault().CustomerCode;
}
foreach (var itm in entity.Details)
{
itm.FromLocationCode = "HOLD";
itm.FromLocationCode = "OK";
itm.FromStatus = EnumInventoryStatus.OK;
itm.ToStatus=EnumInventoryStatus.OK;
itm.FromLocationArea = "OK";
itm.FromLocationErpCode= "OK";
itm.FromLot = "NONE";
itm.FromPackingCode = "NONE";
itm.FromWarehouseCode = "OK";
itm.FromLocationGroup = "OK";
itm.FromContainerCode = "OK";
itm.ToContainerCode =string.IsNullOrEmpty(itm.ToContainerCode)? "OK": itm.ToContainerCode;
itm.ToWarehouseCode= string.IsNullOrEmpty(itm.ToWarehouseCode)? "OK": itm.ToContainerCode;
}
await _CustomerProductionReturnNoteManager.CreateAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<CustomerProductionReturnNote, CustomerProductionReturnNoteDTO>(entity);
return dto;

36
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs

@ -83,24 +83,24 @@ public class MesNoteAppService :
#region 添加校验
//RecommendBalanceRequestInput rInput = new RecommendBalanceRequestInput();
//rInput.ItemCode = detail.ItemCode;
//rInput.Locations = new List<string>() { detail.FromLocationCode };
//rInput.Qty = detail.Qty;
//rInput.Statuses = new List<EnumInventoryStatus> { EnumInventoryStatus.OK };
//var balanceLst = await _balanceAppService.GetRecommendBalancesByLocationsAsync(rInput).ConfigureAwait(false);
//var first = balanceLst.FirstOrDefault();
//if (first != null)
//{
// if (detail.Qty <= first.Qty)
// {
// throw new UserFriendlyException($"库存数量不足");
// }
//}
//else
//{
// throw new UserFriendlyException($"库存数量不足");
//}
RecommendBalanceRequestInput rInput = new RecommendBalanceRequestInput();
rInput.ItemCode = detail.ItemCode;
rInput.Locations = new List<string>() { detail.FromLocationCode };
rInput.Qty = detail.Qty;
rInput.Statuses = new List<EnumInventoryStatus> { EnumInventoryStatus.OK };
var balanceLst = await _balanceAppService.GetRecommendBalancesByLocationsAsync(rInput).ConfigureAwait(false);
var first = balanceLst.FirstOrDefault();
if (first != null)
{
if (detail.Qty <= first.Qty)
{
throw new UserFriendlyException($"库存数量不足");
}
}
else
{
throw new UserFriendlyException($"库存数量不足");
}
#endregion
}

13
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs

@ -29,24 +29,17 @@ public class InjectioModelPlanAppService :
{
private readonly IBomAppService _bomAppService;
private readonly IInjectioModelPlanManager _InjectioModelPlanManager;
//private readonly IWorkShopAppService _workShopApp;
/* private readonly IProductionLineAppService _productionLineApp*/
//private readonly ITeamAppService _teamApp;
//private readonly IShiftAppService _shiftApp;
public InjectioModelPlanAppService(IInjectioModelPlanRepository repository,
IInjectioModelPlanManager InjectioModelPlanManager
, IWorkShopAppService workShopApp
, IBomAppService bomAppService
, IProductionLineAppService productionLineApp
//, ITeamAppService teamApp
//, IShiftAppService shiftApp
) : base(repository, InjectioModelPlanManager)
{
//_workShopApp = workShopApp;
//_productionLineApp = productionLineApp;
//_teamApp = teamApp;
//_shiftApp = shiftApp;
_InjectioModelPlanManager = InjectioModelPlanManager;
_bomAppService=bomAppService;
base.CreatePolicyName = InjectioModelPlanPermissions.Create;

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs

@ -248,7 +248,9 @@ public class DeliverRequestAppService :
private async Task SetRequestAutoPropertiesAsync(DeliverRequest entity)
{
//普通件
var transType = EnumTransSubType.Deliver_Standard;
//jis件
if (entity.DeliverRequestType == EnumDeliverRequestType.FIS)
{
transType = EnumTransSubType.Deliver_FIS;

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs

@ -20,6 +20,7 @@ using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
@ -44,6 +45,8 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
private readonly IProductionLineAppService _productionLineAppService;
private readonly IInjectionJobAppService _issueJobAppService;
private readonly ITransactionTypeAppService _transactionTypeAppService;
private readonly IExpectOutAppService _expectOutAppService;
private readonly IBalanceAppService _balanceAppService;
public ThirdLocationRequestAppService(
IThirdLocationRequestRepository repository,
@ -55,6 +58,8 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
IItemBasicAppService itemBasicAppService,
IProductionLineAppService productionLineAppService,
ITransactionTypeAppService transactionTypeAppService,
IExpectOutAppService expectOutAppService,
IBalanceAppService balanceAppService,
IInjectionJobAppService issueJobAppService)
: base(repository, thirdLocationRequestManager)
{
@ -66,6 +71,8 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
_productionLineAppService = productionLineAppService;
_issueJobAppService = issueJobAppService;
_transactionTypeAppService = transactionTypeAppService;
_expectOutAppService= expectOutAppService;
_balanceAppService= balanceAppService;
}
@ -97,6 +104,23 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false);
CheckItemBasic(itemBasicDto, detailInput.ItemCode);
var balanceNums= await _balanceAppService.GetListByLocationCodeAndItemCodeAsync(detailInput.ToLocationCode, detailInput.ItemCode).ConfigureAwait(false);
decimal balanceSum = 0;
foreach (var item in balanceNums)
{
balanceSum += item.Qty;
}
var expectOutNums= await _expectOutAppService.GetListByItemAsync(detailInput.ItemCode).ConfigureAwait(false);
decimal expectOutSum = 0;
foreach (var item in expectOutNums)
{
expectOutSum += item.Qty;
}
decimal realityBalance = balanceSum - expectOutSum;
if (detailInput.Qty> realityBalance)
{
throw new UserFriendlyException($"{detailInput.ItemCode} 物品的库存为 {realityBalance} ,库存不够");
}
detailInput.ProdLine = detailInput.ToLocationCode;
detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode;

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs

@ -42,8 +42,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile
.Ignore(x => x.Remark);
CreateMap<ThirdLocationRequestImportInput, ThirdLocationRequestDetail>()
.IgnoreAuditedObjectProperties()
.ForMember(x => x.Status, y => y.MapFrom(t => EnumStatus.Open))
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ToLocationErpCode)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.ToLocationArea)

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNote.cs

@ -20,6 +20,14 @@ public class CustomerProductionReturnNote : SfsStoreAggregateRootBase<CustomerPr
/// </summary>
public string ProductionReturnRequestNumber { get; set; }
/// <summary>
///客户编码
/// </summary>
public string CustomerCode { get; set; }
/// <summary>
/// 退料时间
/// </summary>

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/MesNotes/MesNote.cs

@ -1,11 +1,12 @@
using System.Collections.Generic;
using Win_in.Sfs.Shared.Domain.Entities;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store.Types;
namespace Win_in.Sfs.Wms.Store.Domain;
/// <summary>
/// 报废记录
/// MES冻结记录
/// </summary>
public class MesNote : SfsStoreAggregateRootBase<MesNoteDetail>, IHasJobNumber
{
@ -22,7 +23,7 @@ public class MesNote : SfsStoreAggregateRootBase<MesNoteDetail>, IHasJobNumber
public string MesRequestNumber { get; set; }
/// <summary>
/// Mes类型
/// Mes类型(40-冻结、41-解冻 )
/// </summary>
[IgnoreUpdate]
public string Type { get; set; }

13
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/InjectioModelPlans/InjectioModelPlan.cs

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Win_in.Sfs.Shared.Domain.Entities;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Domain;
@ -41,6 +42,18 @@ public class InjectioModelPlan : SfsStoreRequestAggregateRootBase<InjectioModelP
/// </summary>
public DateTime PlanTime { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 状态
/// </summary>
public EnumInjectionModelStatus Status { get; set; }
/// <summary>
/// 明细列表
/// </summary>

15
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs

@ -44,13 +44,13 @@ public class ThirdLocationRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasT
/// 来源库区
/// </summary>
public string FromLocationArea { get; set; }
// /// <summary>
// /// 在途库库位
// /// </summary>
// public string OnTheWayLocationCode { get; set; }
/// <summary>
/// 在途库库位
/// </summary>
public string OnTheWayLocationCode { get; set; }
/// <summary>
/// 生产线
@ -77,10 +77,7 @@ public class ThirdLocationRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasT
/// </summary>
public decimal ReceivedQty { get; set; }
/// <summary>
/// 明细状态
/// </summary>
public EnumStatus Status { get; set; }
/// <summary>
/// 请求未发 还未发送的数量

77
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs

@ -73,48 +73,49 @@ public class ThirdLocationRequestManager
private void SetMaterialRequestDetailStatus(ThirdLocationRequestDetail detail)
{
if (detail.ReceivedQty >= detail.Qty)//执行的时候 实际收料 多余 要料数
{
detail.Status = EnumStatus.Close;
}
else
{
detail.Status = EnumStatus.Open;
}
//if (detail.ReceivedQty >= detail.Qty)//执行的时候 实际收料 多余 要料数
//{
// detail.Status = EnumStatus.Close;
//}
//else
//{
// detail.Status = EnumStatus.Open;
//}
}
private async Task SetMaterialRequestStatusAsync(ThirdLocationRequest materialRequest)
{
if (materialRequest.Details.All(p => p.Status == EnumStatus.Close))
{
materialRequest.RequestStatus = EnumRequestStatus.Completed;
}
else
{
var issueJobs = await _issueJobRepository.GetListAsync(t => t.MaterialRequestNumber == materialRequest.Number).ConfigureAwait(false);
if (issueJobs.Count > 0)
{
if (issueJobs.All(t => t.JobStatus is EnumJobStatus.Done or EnumJobStatus.Closed or EnumJobStatus.Cancelled))
{
if (materialRequest.Details.All(p => p.ReceivedQty >= p.Qty))
{
materialRequest.RequestStatus = EnumRequestStatus.Completed;
}
else
{
materialRequest.RequestStatus = EnumRequestStatus.Partial;
}
}
else
{
materialRequest.RequestStatus = EnumRequestStatus.Partial;
}
}
else
{
materialRequest.RequestStatus = EnumRequestStatus.Partial;
}
}
//if (materialRequest.Details.All(p => p.Status == EnumStatus.Close))
//{
// materialRequest.RequestStatus = EnumRequestStatus.Completed;
//}
//else
//{
// var issueJobs = await _issueJobRepository.GetListAsync(t => t.MaterialRequestNumber == materialRequest.Number).ConfigureAwait(false);
// if (issueJobs.Count > 0)
// {
// if (issueJobs.All(t => t.JobStatus is EnumJobStatus.Done or EnumJobStatus.Closed or EnumJobStatus.Cancelled))
// {
// if (materialRequest.Details.All(p => p.ReceivedQty >= p.Qty))
// {
// materialRequest.RequestStatus = EnumRequestStatus.Completed;
// }
// else
// {
// materialRequest.RequestStatus = EnumRequestStatus.Partial;
// }
// }
// else
// {
// materialRequest.RequestStatus = EnumRequestStatus.Partial;
// }
// }
// else
// {
// materialRequest.RequestStatus = EnumRequestStatus.Partial;
// }
//}
}
public virtual async Task CompleteAsync(string number)

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteDbContextModelCreatingExtensions.cs

@ -20,6 +20,8 @@ public static class CustomerProductionReturnNoteDbContextModelCreatingExtensions
b.ConfigureSfsStoreBase();
//Properties
b.Property(q => q.JobNumber).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CustomerCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ProductionReturnRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired();

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/InjectioModelPlans/InjectioModelPlanDbContextModelCreatingExtensions.cs

@ -26,6 +26,9 @@ public static class InjectioModelPlanDbContextModelCreatingExtensions
b.Property(q => q.PlanDate).IsRequired();
b.Property(q => q.PlanTime).IsRequired();
b.Property(q => q.Version).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
//Relations

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ThirdLocationRequests/ThirdLocationRequestDbContextModelCreatingExtensions.cs

@ -48,12 +48,12 @@ public static class ThirdLocationRequestDbContextModelCreatingExtensions
b.Property(q => q.ToLocationGroup).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromLocationCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.OnTheWayLocationCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ExpiredTime).IsRequired();
b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.IssuedQty).HasPrecision(18, 6);
b.Property(q => q.ReceivedQty).HasPrecision(18, 6);
b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.ReceivedQty).HasPrecision(18, 6);
b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/NoOkConvertOKNoteAutoMapperProfile.cs

@ -14,10 +14,10 @@ public partial class StoreEventAutoMapperProfile : Profile
.ForMember(x => x.DocNumber, y => y.MapFrom(d => d.Number))
.Ignore(x => x.SupplierBatch)
.Ignore(x => x.ProduceDate)
// .Ignore(x => x.ProduceDate)
.Ignore(x => x.Worker)
.Ignore(x => x.ArriveDate)
.Ignore(x => x.ExpireDate)
// .Ignore(x => x.ArriveDate)
//.Ignore(x => x.ExpireDate)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.TransType)

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs

@ -11,6 +11,30 @@ public partial class StoreEventAutoMapperProfile : Profile
{
private void ThirdLocationRequestAutoMapperProfile()
{
CreateMap<ThirdLocationRequestDetail, TransferLogEditInput>()
.Ignore(x => x.DocNumber)
.Ignore(x => x.JobNumber)
.Ignore(x => x.Worker)
.Ignore(x => x.TransType)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.TransSubType)
.Ignore(x => x.FromPackingCode)
.Ignore(x => x.ToPackingCode)
.Ignore(x => x.FromLot)
.Ignore(x => x.FromStatus)
.Ignore(x => x.FromWarehouseCode)
.Ignore(x => x.FromLocationGroup)
.Ignore(x => x.FromLocationErpCode)
.Ignore(x => x.FromContainerCode)
.Ignore(x => x.ToLot)
.Ignore(x => x.SupplierBatch)
.Ignore(x => x.ArriveDate)
.Ignore(x => x.ProduceDate)
.Ignore(x => x.ExpireDate)
.Ignore(x => x.ToStatus)
.Ignore(x => x.ToContainerCode)
;
CreateMap<ThirdLocationRequest, ThirdLocationJobEditInput>()
.ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.Number))
.ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type))

9
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs

@ -37,6 +37,15 @@ public class ThirdLocationJobEventHandler :
public virtual async Task HandleEventAsync(SfsCompletedEntityEventData<ThirdLocationJob> eventData)
{
var entity = eventData.Entity;
entity.CompleteTime = Clock.Now;
entity.JobStatus = EnumJobStatus.Done;
foreach (var detail in eventData.Entity.Details)
{
detail.SetHandledFromRecommend();
}
var thirdLocationNote = await BuildThirdLocationNoteAsync(entity).ConfigureAwait(false);
await _thirdLocationNoteAppService.CreateAsync(thirdLocationNote).ConfigureAwait(false);
}

18
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductRecycleRequestEventHandler.cs

@ -21,6 +21,7 @@ public class ProductRecycleRequestEventHandler
, ILocalEventHandler<SfsHandledEntityEventData<ProductRecycleRequest>>
, ILocalEventHandler<SfsCreatedEntityEventData<ProductRecycleRequest>>
, ILocalEventHandler<SfsCreatedEntityEventData<List<ProductRecycleRequest>>>
, ILocalEventHandler<SfsAbortedEntityEventData<ProductRecycleRequest>>
{
private readonly IProductRecycleJobAppService _productRecycleJobAppService;
private readonly IProductRecycleNoteAppService _productRecycleNoteApp;
@ -50,6 +51,21 @@ public class ProductRecycleRequestEventHandler
}
/// <summary>
/// 中止
/// </summary>
/// <param name="eventData"></param>
/// <returns></returns>
/// <exception cref="System.NotImplementedException"></exception>
[UnitOfWork]
public async Task HandleEventAsync(SfsAbortedEntityEventData<ProductRecycleRequest> eventData)
{
var number = eventData.Entity?.Number;
if (!string.IsNullOrEmpty(number))
{
await _productRecycleJobAppService.CompleteByRequestNumberAsync(number).ConfigureAwait(false);
}
}
/// <summary>
/// 创建后
/// </summary>
@ -278,6 +294,8 @@ public class ProductRecycleRequestEventHandler
return detailInput;
}
#endregion

157
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs

@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentValidation.Validators;
using IdentityServer4.Models;
using Volo.Abp;
using Volo.Abp.EventBus;
using Volo.Abp.SettingManagement;
@ -13,6 +15,7 @@ using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
using Win_in.Sfs.Wms.Store.Event.Transactions;
namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest;
@ -30,11 +33,16 @@ public class ThirdLocationRequestEventHandler
private readonly ILocationAppService _locationAppService;
private readonly IBalanceAppService _balanceAppService;
private const EnumTransType TransType = EnumTransType.TransferLib;
private readonly ITransferLogAppService _transferLogAppService;
public ThirdLocationRequestEventHandler(
IThirdLocationJobAppService thirdLocationJobAppService
, IProductionLineAppService productionLineAppService
, IThirdLocationRequestManager thirdLocationRequestManager
, ILocationAppService locationAppService
, ITransferLogAppService transferLogAppService
, IBalanceAppService balanceAppService)
{
_thirdLocationJobAppService = thirdLocationJobAppService;
@ -42,6 +50,7 @@ public class ThirdLocationRequestEventHandler
_thirdLocationRequestManager = thirdLocationRequestManager;
_locationAppService = locationAppService;
_balanceAppService = balanceAppService;
_transferLogAppService = transferLogAppService;
}
/// <summary>
@ -88,8 +97,108 @@ public class ThirdLocationRequestEventHandler
{
await _thirdLocationJobAppService.CreateManyAsync(thirdLocationJobs).ConfigureAwait(false);
}
//来源库位更新为在途库位
var transferLogs = new List<TransferLogEditInput>();
var route = entity.UseOnTheWayLocation
? EnumTransferRoute.SourceToOnTheWay
: EnumTransferRoute.SourceToDestination;
transferLogs.AddRange(await BuildTransferLogsAsync(entity, route).ConfigureAwait(false));
await _transferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
}
private async Task<List<TransferLogEditInput>> BuildTransferLogsAsync(ThirdLocationRequest thirdLocationRequest, EnumTransferRoute route)
{
var transferLogs = new List<TransferLogEditInput>();
foreach (var detail in thirdLocationRequest.Details.Where(detail => detail.Qty != 0))
{
var transferLog = ObjectMapper.Map<ThirdLocationRequestDetail, TransferLogEditInput>(detail);
LocationDTO fromLocationDTO = null;
LocationDTO toLocationDTO = null;
var transportLocation = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false);
if (transportLocation != null)
{
detail.OnTheWayLocationCode = transportLocation.Code;
}
else
{
throw new UserFriendlyException($"未获取到在途库代码");
}
if (thirdLocationRequest.UseOnTheWayLocation)
{
var location = await _locationAppService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false);
switch (route)
{
case EnumTransferRoute.SourceToOnTheWay:
fromLocationDTO = await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false);
toLocationDTO = await _locationAppService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false);
break;
case EnumTransferRoute.OnTheWayToDestination:
fromLocationDTO = await _locationAppService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false);
toLocationDTO = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
await RemovePackingCodeAndContainerCodeAndLotAsync(transferLog).ConfigureAwait(false);
break;
case EnumTransferRoute.SourceToDestination:
default:
throw new ArgumentOutOfRangeException(nameof(route), route, null);
}
}
else
{
fromLocationDTO = await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false);
toLocationDTO = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
}
transferLog.FromLocationCode = fromLocationDTO.Code;
transferLog.FromLocationArea = fromLocationDTO.AreaCode;
transferLog.FromLocationErpCode = fromLocationDTO.ErpLocationCode;
transferLog.FromLocationGroup = fromLocationDTO.LocationGroupCode;
transferLog.FromWarehouseCode = fromLocationDTO.WarehouseCode;
transferLog.ToLocationCode = toLocationDTO.Code;
transferLog.ToLocationArea = toLocationDTO.AreaCode;
transferLog.ToLocationErpCode = toLocationDTO.ErpLocationCode;
transferLog.ToLocationGroup = toLocationDTO.LocationGroupCode;
transferLog.ToWarehouseCode = toLocationDTO.WarehouseCode;
transferLog.TransSubType = Enum.Parse<EnumTransSubType>(thirdLocationRequest.Type);
transferLog.TransType = TransType;
transferLog.DocNumber = thirdLocationRequest.Number;
transferLog.JobNumber = "";
transferLog.FromPackingCode = "";
transferLog.FromLot = "";
transferLog.ToPackingCode = "";
transferLog.ToLot = "";
transferLog.FromStatus = EnumInventoryStatus.OK;
transferLog.ToStatus = EnumInventoryStatus.OK;
transferLogs.Add(transferLog);
}
return transferLogs;
}
private async Task RemovePackingCodeAndContainerCodeAndLotAsync(TransferLogEditInput transferLogCreateInput)
{
transferLogCreateInput.ToPackingCode = "";
transferLogCreateInput.ToLot = "";
transferLogCreateInput.ToContainerCode = "";
transferLogCreateInput.FromPackingCode = "";
transferLogCreateInput.FromLot = "";
transferLogCreateInput.FromContainerCode = "";
}
/// <summary>
/// 驳回后
/// </summary>
@ -147,38 +256,12 @@ public class ThirdLocationRequestEventHandler
jobs.Add(job);
}
job.Details.AddRange(jobDetails);
if (thirdLocationRequestDetail.ToBeIssuedQty < 0)
{
thirdLocationRequestDetail.Status = EnumStatus.Close;
}
}
jobs = jobs.Where(p => p.Details.Any()).ToList();
var openRequestDetails =
thirdLocationRequest.Details.Where(p => p.Status != EnumStatus.Close).ToList();
if (!openRequestDetails.Any())
{
return jobs;
}
var enableMultipleCreateThirdLocationJob = await SettingManager.IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false);
if (enableMultipleCreateThirdLocationJob)
{
//thirdLocationRequest.Partial();
}
else
{
var sb = new StringBuilder();
foreach (var openRequestDetail in openRequestDetails)
{
sb.AppendLine($"{openRequestDetail.ItemCode}请求数量 {openRequestDetail.Qty},可用库存数量 {openRequestDetail.IssuedQty}");
}
throw new UserFriendlyException($"{sb} 可用库存数量不足, 无法生成发料任务");
}
return jobs;
}
@ -245,7 +328,7 @@ public class ThirdLocationRequestEventHandler
//ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false);
var detail = ObjectMapper.Map<BalanceDTO, ThirdLocationJobDetailInput>(balance);
detail.FromLocationCode = thirdLocationRequestDetail.FromLocationCode;
detail.WorkStation = thirdLocationRequestDetail.WorkStation;
detail.ExpiredTime = thirdLocationRequestDetail.ExpiredTime;
detail.PositionCode = thirdLocationRequestDetail.PositionCode;
@ -271,7 +354,19 @@ public class ThirdLocationRequestEventHandler
detail.ToLocationErpCode = thirdLocationRequestDetail.ToLocationErpCode;
detail.ToLocationArea = thirdLocationRequestDetail.ToLocationArea;
detail.ToWarehouseCode = thirdLocationRequestDetail.ToWarehouseCode;
detail.FromLocationArea = thirdLocationRequestDetail.FromLocationArea;
var transportLocation = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false);
if (transportLocation != null)
{
detail.FromLocationCode = transportLocation.Code;
detail.FromLocationArea = transportLocation.AreaCode;
}
else
{
throw new UserFriendlyException($"未获取到在途库代码");
}
//detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code;
detail.ProdLine = toLocationGroupCode;

57
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/MesNoteEventHandler.cs

@ -19,7 +19,9 @@ public class MesNoteEventHandler
, ILocalEventHandler<SfsCreatedEntityEventData<List<MesNote>>>
{
private const EnumTransType TransType = EnumTransType.Scrap;
//private const EnumTransType FreezedTransType = EnumTransType.MesFreezed;
//private const EnumTransType UnFreezedTransType = EnumTransType.MesUnFreezed;
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<MesNote> eventData)
@ -52,9 +54,6 @@ public class MesNoteEventHandler
//else
//{
var transferLogs = new List<TransferLogEditInput>();
foreach (var MesNote in MesNotes)
@ -63,24 +62,26 @@ public class MesNoteEventHandler
}
await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
var transactions = new List<TransactionEditInput>();
foreach (var MesNote in MesNotes)
{
transactions.AddRange(BuildTransactions(MesNote));
}
//var transactions = new List<TransactionEditInput>();
//foreach (var MesNote in MesNotes)
//{
// transactions.AddRange(BuildTransactions(MesNote));
//}
await TransactionAppService.AddManyAsync(transactions).ConfigureAwait(false);
//await TransactionAppService.AddManyAsync(transactions).ConfigureAwait(false);
//}
}
private List<TransferLogEditInput> BuildTransferLogs(MesNote MesNote)
{
var transferLogs = new List<TransferLogEditInput>();
foreach (var detail in MesNote.Details.Where(detail => detail.Qty != 0))
{
var transferLog = ObjectMapper.Map<MesNoteDetail, TransferLogEditInput>(detail);
transferLog.TransType = TransType;
transferLog.TransSubType = Enum.Parse<EnumTransSubType>(MesNote.Type);
transferLog.TransType = Enum.Parse<EnumTransType>(MesNote.Type); ;
transferLog.TransSubType = EnumTransSubType.None;
transferLog.Worker = MesNote.Worker;
transferLog.DocNumber = MesNote.Number;
transferLog.JobNumber = MesNote.JobNumber;
@ -90,24 +91,24 @@ public class MesNoteEventHandler
return transferLogs;
}
private List<TransactionEditInput> BuildTransactions(MesNote deliverNote)
{
var transactions = new List<TransactionEditInput>();
//private List<TransactionEditInput> BuildTransactions(MesNote deliverNote)
//{
// var transactions = new List<TransactionEditInput>();
foreach (var detail in deliverNote.Details)
{
var transaction = ObjectMapper.Map<MesNoteDetail, TransactionEditInput>(detail);
transaction.TransType = TransType;
transaction.TransInOut = EnumTransInOut.Out;
transaction.Worker = deliverNote.Worker;
transaction.DocNumber = deliverNote.Number;
transaction.JobNumber = deliverNote.JobNumber;
transactions.Add(transaction);
}
// foreach (var detail in deliverNote.Details)
// {
// var transaction = ObjectMapper.Map<MesNoteDetail, TransactionEditInput>(detail);
// transaction.TransType = deliverNote.Type;
// transaction.TransInOut = EnumTransInOut.Out;
// transaction.Worker = deliverNote.Worker;
// transaction.DocNumber = deliverNote.Number;
// transaction.JobNumber = deliverNote.JobNumber;
return transactions;
}
// transactions.Add(transaction);
// }
// return transactions;
//}
#endregion
}

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

@ -11,7 +11,7 @@ using Win_in.Sfs.Wms.Store.Event.Transaction;
namespace Win_in.Sfs.Wms.Store.Event.Transactions;
public class NoOkConvertOkNoteEventHandler
public class NoOkConvertOkNoteEventHandler
: StoreInventoryEventHandlerBase
, ILocalEventHandler<SfsCreatedEntityEventData<NoOkConvertOkNote>>
{

166
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs

@ -0,0 +1,166 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.EventBus;
using Volo.Abp.Uow;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Event.Transaction;
namespace Win_in.Sfs.Wms.Store.Event.Transactions;
public class ThirdLocationNoteEventHandler
: StoreInventoryEventHandlerBase
, ILocalEventHandler<SfsCreatedEntityEventData<ThirdLocationNote>>
, ILocalEventHandler<SfsCreatedEntityEventData<List<ThirdLocationNote>>>
, ILocalEventHandler<SfsConfirmedEntityEventData<ThirdLocationNote>>
{
private const EnumTransType TransType = EnumTransType.TransferLib;
private readonly ILocationAppService _locationAppService;
private readonly IThirdLocationRequestManager _thirdLocationRequestManager;
public ThirdLocationNoteEventHandler(ILocationAppService locationAppService
, IThirdLocationRequestManager thirdLocationRequestManager)
{
_locationAppService = locationAppService;
_thirdLocationRequestManager = thirdLocationRequestManager;
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<ThirdLocationNote> eventData)
{
var entity = eventData.Entity;
var transferLogs = new List<TransferLogEditInput>();
var route = EnumTransferRoute.OnTheWayToDestination;
transferLogs.AddRange(await BuildTransferLogsAsync(entity, route).ConfigureAwait(false));
await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
if (!string.IsNullOrEmpty(entity.RequestNumber))
{
var thirdLocationRequest = await _thirdLocationRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false);
await _thirdLocationRequestManager.CompleteAsync(thirdLocationRequest).ConfigureAwait(false);
}
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<ThirdLocationNote>> eventData)
{
var entities = eventData.Entity;
var transferLogs = new List<TransferLogEditInput>();
//如果要做库存事务汇总,可以修改此处
foreach (var thirdLocationNote in entities)
{
var route = EnumTransferRoute.OnTheWayToDestination;
transferLogs.AddRange(await BuildTransferLogsAsync(thirdLocationNote, route).ConfigureAwait(false));
}
await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData<ThirdLocationNote> eventData)
{
var entity = eventData.Entity;
var inputList = await BuildTransferLogsAsync(entity, EnumTransferRoute.OnTheWayToDestination).ConfigureAwait(false);
await AddTransferLogsAsync(inputList).ConfigureAwait(false);
}
private async Task AddTransferLogsAsync(List<TransferLogEditInput> inputList)
{
var transferLogs = new List<TransferLogEditInput>();
transferLogs.AddRange(inputList);
await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
}
private async Task<List<TransferLogEditInput>> BuildTransferLogsAsync(ThirdLocationNote thirdLocationNote, EnumTransferRoute route)
{
var transferLogs = new List<TransferLogEditInput>();
foreach (var detail in thirdLocationNote.Details.Where(detail => detail.Qty != 0))
{
var transferLog = ObjectMapper.Map<ThirdLocationNoteDetail, TransferLogEditInput>(detail);
LocationDTO fromLocationDTO = null;
LocationDTO toLocationDTO = null;
if (thirdLocationNote.UseOnTheWayLocation)
{
var location = await _locationAppService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false);
switch (route)
{
case EnumTransferRoute.SourceToOnTheWay:
fromLocationDTO = await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false);
toLocationDTO = await _locationAppService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false);
break;
case EnumTransferRoute.OnTheWayToDestination:
fromLocationDTO = await _locationAppService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false);
toLocationDTO = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
await RemovePackingCodeAndContainerCodeAndLotAsync(transferLog).ConfigureAwait(false);
break;
case EnumTransferRoute.SourceToDestination:
default:
throw new ArgumentOutOfRangeException(nameof(route), route, null);
}
}
else
{
fromLocationDTO = await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false);
toLocationDTO = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
}
transferLog.FromLocationCode = fromLocationDTO.Code;
transferLog.FromLocationArea = fromLocationDTO.AreaCode;
transferLog.FromLocationErpCode = fromLocationDTO.ErpLocationCode;
transferLog.FromLocationGroup = fromLocationDTO.LocationGroupCode;
transferLog.ToLocationCode = toLocationDTO.Code;
transferLog.ToLocationArea = toLocationDTO.AreaCode;
transferLog.ToLocationErpCode = toLocationDTO.ErpLocationCode;
transferLog.ToLocationGroup = toLocationDTO.LocationGroupCode;
transferLog.TransSubType = Enum.Parse<EnumTransSubType>(thirdLocationNote.RequestType);
transferLog.TransType = TransType;
transferLog.DocNumber = thirdLocationNote.Number;
transferLog.JobNumber = thirdLocationNote.JobNumber;
transferLog.FromPackingCode = "";
transferLog.FromLot = "";
transferLog.ToPackingCode = "";
transferLog.ToLot = "";
transferLog.FromStatus = EnumInventoryStatus.OK;
transferLog.ToStatus = EnumInventoryStatus.OK;
transferLogs.Add(transferLog);
}
return transferLogs;
}
private async Task RemovePackingCodeAndContainerCodeAndLotAsync(TransferLogEditInput transferLogCreateInput)
{
transferLogCreateInput.ToPackingCode = "";
transferLogCreateInput.ToLot = "";
transferLogCreateInput.ToContainerCode = "";
transferLogCreateInput.FromPackingCode = "";
transferLogCreateInput.FromLot = "";
transferLogCreateInput.FromContainerCode = "";
}
}
Loading…
Cancel
Save