Browse Source

报错提交,为了拉取

dev_DY_CC
刘云峰 1 year ago
parent
commit
2b075740bf
  1. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/DTOs/TransferLibJobDetailDTO.cs
  2. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobDetailInput.cs
  3. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/DTOs/TransferLibNoteDetailDTO.cs
  4. 45
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteDetailInput.cs
  5. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs
  6. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs
  7. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs
  8. 33
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestMapperProfile.cs
  9. 197
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendFromTo.cs
  10. 148
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendHandledFromTo.cs
  11. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs
  12. 524
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs
  13. 32
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteManager.cs
  14. 47
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs
  15. 32
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestManager.cs
  16. 29756
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240412061448_transferLibV2.Designer.cs
  17. 558
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240412061448_transferLibV2.cs
  18. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteDbContextModelCreatingExtensions.cs
  19. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/DTOs/TransferLibJobDetailDTO.cs

@ -1,12 +1,13 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// //??TransferLib实体
/// </summary>
public class TransferLibJobDetailDTO : SfsStoreDetailWithFromToDTOBase
public class TransferLibJobDetailDTO : NewRecommendHandledFromTo
{
/// <summary>
/// 在途库地址
@ -50,4 +51,47 @@ public class TransferLibJobDetailDTO : SfsStoreDetailWithFromToDTOBase
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
}

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobDetailInput.cs

@ -3,12 +3,13 @@ using Volo.Abp.Data;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// //??TransferLib实体
/// </summary>
public class TransferLibJobDetailInput : SfsStoreDetailWithFromToInputBase
public class TransferLibJobDetailInput : NewRecommendHandledFromTo
{
/// <summary>
/// 在途库地址
@ -54,4 +55,47 @@ public class TransferLibJobDetailInput : SfsStoreDetailWithFromToInputBase
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
}

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/DTOs/TransferLibNoteDetailDTO.cs

@ -1,12 +1,13 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// 库存转移记录-明细表 //??TransferLib实体
/// </summary>
public class TransferLibNoteDetailDTO : SfsStoreDetailWithFromToDTOBase
public class TransferLibNoteDetailDTO : NewRecommendHandledFromTo
{
/// <summary>
@ -50,4 +51,47 @@ public class TransferLibNoteDetailDTO : SfsStoreDetailWithFromToDTOBase
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
}

45
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteDetailInput.cs

@ -1,13 +1,14 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// 库存转移记录-明细表 //??TransferLib实体
/// </summary>
public class TransferLibNoteDetailInput : SfsStoreDetailWithFromToInputBase
public class TransferLibNoteDetailInput : NewRecommendHandledFromTo
{
/// <summary>
@ -53,5 +54,47 @@ public class TransferLibNoteDetailInput : SfsStoreDetailWithFromToInputBase
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
}

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs

@ -1,12 +1,13 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// 库存转移记录-明细表
/// </summary>
public class TransferLibRequestDetailDTO : SfsStoreDetailWithFromToDTOBase
public class TransferLibRequestDetailDTO : NewRecommendFromTo
{
/// <summary>
@ -46,4 +47,47 @@ public class TransferLibRequestDetailDTO : SfsStoreDetailWithFromToDTOBase
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
}

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs

@ -1,13 +1,14 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// 库存转移记录-明细表
/// </summary>
public class TransferLibRequestDetailInput : SfsStoreDetailWithFromToInputBase
public class TransferLibRequestDetailInput : NewRecommendFromTo
{
/// <summary>
/// 原因
@ -47,4 +48,47 @@ public class TransferLibRequestDetailInput : SfsStoreDetailWithFromToInputBase
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
}

12
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs

@ -106,15 +106,15 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase
foreach (var detail in transferLibRequest.Details)
{
var balanceDto = await _balanceAppService.GetByItemLocationAndPackingAsync(detail.FromPackingCode,
detail.ItemCode, detail.FromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode)
var balanceDto = await _balanceAppService.GetByItemLocationAndPackingAsync(detail.RecommendFromPackingCode,
detail.ItemCode, detail.RecommendFromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(detail.RecommendToLocationCode)
.ConfigureAwait(false);
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.FromLocationCode)
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode)
.ConfigureAwait(false);
CheckLocation(toLocationDto, detail.ToLocationCode);
CheckLocation(fromLocationDto, detail.FromLocationCode);
CheckLocation(toLocationDto, detail.RecommendToLocationCode);
CheckLocation(fromLocationDto, detail.RecommendFromLocationCode);
if (toLocationDto.Type != fromLocationDto.Type)
{
throw new UserFriendlyException($"来源库位与目标库位类型不一致");

33
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestMapperProfile.cs

@ -48,35 +48,10 @@ public partial class StoreApplicationAutoMapperProfile : Profile
.Ignore(x => x.Number)
.Ignore(x => x.Id);
CreateMap<TransferLibRequestImportInput, TransferLibRequestDetail>()
CreateMap<TransferLibRequestImportInput, TransferLibRequestDetail>(MemberList.None)
.IgnoreAuditedObjectProperties()
.ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.PackingCode ?? string.Empty))
.ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.PackingCode ?? string.Empty))
.ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status))
.ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status))
.Ignore(x => x.FromLocationGroup)
.Ignore(x => x.FromLocationArea)
.Ignore(x => x.FromLocationErpCode)
.Ignore(x => x.FromWarehouseCode)
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToLocationErpCode)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.Reason)
.Ignore(x => x.SupplierBatch).Ignore(x => x.ArriveDate).Ignore(x => x.ProduceDate).Ignore(x => x.ExpireDate)
.Ignore(x => x.Remark)
.Ignore(x => x.ItemName)
.Ignore(x => x.ItemDesc1)
.Ignore(x => x.ItemDesc2)
.Ignore(x => x.FromContainerCode)
.Ignore(x => x.ToContainerCode)
.Ignore(x => x.FromLot)
.Ignore(x => x.ToLot)
.Ignore(x => x.StdPackQty)
.Ignore(x => x.Uom)
.Ignore(x => x.MasterID)
.Ignore(x => x.TenantId)
.Ignore(x => x.Number)
.Ignore(x => x.Id);
.ForMember(x => x.RecommendFromPackingCode, y => y.MapFrom(d => d.PackingCode ?? string.Empty))
.ForMember(x => x.RecommendToPackingCode, y => y.MapFrom(d => d.PackingCode ?? string.Empty))
.ForMember(x => x.Status, y => y.MapFrom(d => d.Status));
}
}

197
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendFromTo.cs

@ -0,0 +1,197 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Domain;
public class NewRecommendFromTo : SfsStoreDetailEntityBase//SfsDetailEntityBase
{
#region 库存基础信息
/*
/// <summary>
/// 物品代码
/// </summary>
public string ItemCode { get; set; }
/// <summary>
/// 物品名称
/// </summary>
public string ItemName { get; set; }
/// <summary>
/// 物品描述1
/// </summary>
public string ItemDesc1 { get; set; }
/// <summary>
/// 物品描述2
/// </summary>
public string ItemDesc2 { get; set; }
*/
/// <summary>
/// 标包数量
/// </summary>
[Display(Name = "标包数量")]
[Column(TypeName = "decimal(18,6)")]
public decimal StdPackQty { get; set; }
/// <summary>
/// 库存状态
/// </summary>
public EnumInventoryStatus Status { get; set; }
/// <summary>
/// 计量单位
/// </summary>
public string Uom { get; set; }
#endregion
#region 推荐来源
/// <summary>
/// 推荐来源托标签
/// </summary>
public string RecommendFromContainerCode { get; set; }
/// <summary>
/// 推荐来源箱标签
/// </summary>
public string RecommendFromPackingCode { get; set; }
/// <summary>
/// 推荐来源批次供应商批次
/// </summary>
public string RecommendFromSupplierBatch { get; set; }
/// <summary>
/// 推荐来源批次到货时间
/// </summary>
public DateTime RecommendFromArriveDate { get; set; }
/// <summary>
/// 推荐来源批次生产时间
/// </summary>
public DateTime RecommendFromProduceDate { get; set; }
/// <summary>
/// 推荐来源批次过期时间
/// </summary>
public DateTime RecommendFromExpireDate { get; set; }
/// <summary>
/// 推荐来源批次排序
/// </summary>
public string RecommendFromLot { get; set; }
/// <summary>
/// 推荐来源库位
/// </summary>
public string RecommendFromLocationCode { get; set; }
/// <summary>
/// 推荐来源库区
/// </summary>
public string RecommendFromLocationArea { get; set; }
/// <summary>
/// 推荐来源库位组
/// </summary>
public string RecommendFromLocationGroup { get; set; }
/// <summary>
/// 推荐来源ERP库位
/// </summary>
public string RecommendFromLocationErpCode { get; set; }
/// <summary>
/// 推荐来源仓库
/// </summary>
public string RecommendFromWarehouseCode { get; set; }
/// <summary>
/// 推荐来源数量
/// </summary>
public decimal RecommendFromQty { get; set; }
#endregion
#region 推荐目标
/// <summary>
/// 推荐目标托标签
/// </summary>
public string RecommendToContainerCode { get; set; }
/// <summary>
/// 推荐目标箱标签
/// </summary>
public string RecommendToPackingCode { get; set; }
/// <summary>
/// 推荐目标批次供应商批次
/// </summary>
public string RecommendToSupplierBatch { get; set; }
/// <summary>
/// 推荐目标批次到货时间
/// </summary>
public DateTime RecommendToArriveDate { get; set; }
/// <summary>
/// 推荐目标批次生产时间
/// </summary>
public DateTime RecommendToProduceDate { get; set; }
/// <summary>
/// 推荐目标批次过期时间
/// </summary>
public DateTime RecommendToExpireDate { get; set; }
/// <summary>
/// 推荐目标批次排序
/// </summary>
public string RecommendToLot { get; set; }
/// <summary>
/// 推荐目标库位
/// </summary>
public string RecommendToLocationCode { get; set; }
/// <summary>
/// 推荐目标库区
/// </summary>
public string RecommendToLocationArea { get; set; }
/// <summary>
/// 推荐目标库位组
/// </summary>
public string RecommendToLocationGroup { get; set; }
/// <summary>
/// 推荐目标ERP库位
/// </summary>
public string RecommendToLocationErpCode { get; set; }
/// <summary>
/// 推荐目标仓库
/// </summary>
public string RecommendToWarehouseCode { get; set; }
/// <summary>
/// 推荐目标数量
/// </summary>
public decimal RecommendToQty { get; set; }
#endregion
public void SetId(Guid id)
{
this.Id = id;
}
}

148
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendHandledFromTo.cs

@ -0,0 +1,148 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win_in.Sfs.Wms.Store.Domain;
public class NewRecommendHandledFromTo : NewRecommendFromTo
{
#region 实际来源
/// <summary>
/// 实际目标托标签
/// </summary>
public string HandledFromContainerCode { get; set; }
/// <summary>
/// 实际箱标签
/// </summary>
public string HandledFromPackingCode { get; set; }
/// <summary>
/// 实际批次供应商批次
/// </summary>
public string HandledFromSupplierBatch { get; set; }
/// <summary>
/// 实际批次到货时间
/// </summary>
public DateTime HandledFromArriveDate { get; set; }
/// <summary>
/// 实际批次生产时间
/// </summary>
public DateTime HandledFromProduceDate { get; set; }
/// <summary>
/// 实际批次过期时间
/// </summary>
public DateTime HandledFromExpireDate { get; set; }
/// <summary>
/// 实际批次排序
/// </summary>
public string HandledFromLot { get; set; }
/// <summary>
/// 实际库位
/// </summary>
public string HandledFromLocationCode { get; set; }
/// <summary>
/// 实际库区
/// </summary>
public string HandledFromLocationArea { get; set; }
/// <summary>
/// 实际库位组
/// </summary>
public string HandledFromLocationGroup { get; set; }
/// <summary>
/// 实际ERP库位
/// </summary>
public string HandledFromLocationErpCode { get; set; }
/// <summary>
/// 实际仓库
/// </summary>
public string HandledFromWarehouseCode { get; set; }
/// <summary>
/// 实际数量
/// </summary>
public decimal HandledFromQty { get; set; }
#endregion
#region 实际目标
/// <summary>
/// 实际目标托标签
/// </summary>
public string HandledToContainerCode { get; set; }
/// <summary>
/// 实际箱标签
/// </summary>
public string HandledToPackingCode { get; set; }
/// <summary>
/// 实际批次供应商批次
/// </summary>
public string HandledToSupplierBatch { get; set; }
/// <summary>
/// 实际批次到货时间
/// </summary>
public DateTime HandledToArriveDate { get; set; }
/// <summary>
/// 实际批次生产时间
/// </summary>
public DateTime HandledToProduceDate { get; set; }
/// <summary>
/// 实际批次过期时间
/// </summary>
public DateTime HandledToExpireDate { get; set; }
/// <summary>
/// 实际批次排序
/// </summary>
public string HandledToLot { get; set; }
/// <summary>
/// 实际库位
/// </summary>
public string HandledToLocationCode { get; set; }
/// <summary>
/// 实际库区
/// </summary>
public string HandledToLocationArea { get; set; }
/// <summary>
/// 实际库位组
/// </summary>
public string HandledToLocationGroup { get; set; }
/// <summary>
/// 实际ERP库位
/// </summary>
public string HandledToLocationErpCode { get; set; }
/// <summary>
/// 实际仓库
/// </summary>
public string HandledToWarehouseCode { get; set; }
/// <summary>
/// 实际数量
/// </summary>
public decimal HandledToQty { get; set; }
#endregion
}

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs

@ -7,7 +7,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
/// <summary>
/// //??TransferLib实体
/// </summary>
public class TransferLibJobDetail : SfsStoreDetailWithFromToEntityBase
public class TransferLibJobDetail : NewRecommendHandledFromTo
{
/// <summary>
/// 中间库地址
@ -23,6 +23,7 @@ public class TransferLibJobDetail : SfsStoreDetailWithFromToEntityBase
/// 执行任务状态
/// </summary>
public EnumJobStatus JobStatus { get; set; }
#region 回调服务相关
/// <summary>
/// 回调服务名称
@ -45,4 +46,47 @@ public class TransferLibJobDetail : SfsStoreDetailWithFromToEntityBase
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
}

524
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs

@ -1,6 +1,3 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Domain;
@ -8,7 +5,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
/// <summary>
/// 库存转移记录-明细表 //??TransferLib实体
/// </summary>
public class TransferLibNoteDetail : SfsStoreDetailWithFromToEntityBase
public class TransferLibNoteDetail : NewRecommendHandledFromTo
{
/// <summary>
@ -47,510 +44,47 @@ public class TransferLibNoteDetail : SfsStoreDetailWithFromToEntityBase
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
#region 库存基础信息
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
/// <summary>
/// 物品代码
/// </summary>
public string ItemCode { get; set; }
/// <summary>
/// 物品名称
/// </summary>
public string ItemName { get; set; }
/// <summary>
/// 物品描述1
/// </summary>
public string ItemDesc1 { get; set; }
/// <summary>
/// 物品描述2
/// </summary>
public string ItemDesc2 { get; set; }
/// <summary>
/// 标包数量
/// </summary>
[Display(Name = "标包数量")]
[Column(TypeName = "decimal(18,6)")]
public decimal StdPackQty { get; set; }
/// <summary>
/// 库存状态
/// </summary>
public EnumInventoryStatus Status { get; set; }
/// <summary>
/// 计量单位
/// </summary>
public string Uom { get; set; }
#endregion
#region 请求信息
/// <summary>
/// 请求库位
/// </summary>
public string RequestLocationCode { get; set; }
/// <summary>
/// 到库区
/// </summary>
public string RequestLocationArea { get; set; }
/// <summary>
/// 到库位组
/// </summary>
public string RequestLocationGroup { get; set; }
/// <summary>
/// 到ERP库位
/// </summary>
public string RequestLocationErpCode { get; set; }
/// <summary>
/// 到仓库
/// </summary>
public string RequestWarehouseCode { get; set; }
/// <summary>
/// 生产线
/// </summary>
public string ProdLine { get; set; }
/// <summary>
/// 位置码
/// </summary>
public string PositionCode { get; set; }
/// <summary>
/// 推荐的类型
/// </summary>
public EnumRecommendType RecommendType { get; set; }
/// <summary>
/// 需求数量
/// </summary>
public decimal RequestQty { get; set; }
#endregion
#region 推荐来源
/// <summary>
/// 推荐来源托标签
/// </summary>
public string RecommendFromContainerCode { get; set; }
/// <summary>
/// 推荐来源箱标签
/// </summary>
public string RecommendFromPackingCode { get; set; }
/// <summary>
/// 推荐来源批次供应商批次
/// </summary>
public string RecommendFromSupplierBatch { get; set; }
/// <summary>
/// 推荐来源批次到货时间
/// </summary>
public DateTime RecommendFromArriveDate { get; set; }
/// <summary>
/// 推荐来源批次生产时间
/// </summary>
public DateTime RecommendFromProduceDate { get; set; }
/// <summary>
/// 推荐来源批次过期时间
/// </summary>
public DateTime RecommendFromExpireDate { get; set; }
/// <summary>
/// 推荐来源批次排序
/// </summary>
public string RecommendFromLot { get; set; }
/// <summary>
/// 推荐来源库位
/// </summary>
public string RecommendFromLocationCode { get; set; }
/// <summary>
/// 推荐来源库区
/// </summary>
public string RecommendFromLocationArea { get; set; }
/// <summary>
/// 推荐来源库位组
/// </summary>
public string RecommendFromLocationGroup { get; set; }
/// <summary>
/// 推荐来源ERP库位
/// </summary>
public string RecommendFromLocationErpCode { get; set; }
/// <summary>
/// 推荐来源仓库
/// </summary>
public string RecommendFromWarehouseCode { get; set; }
/// <summary>
/// 推荐来源数量
/// </summary>
public decimal RecommendFromQty { get; set; }
#endregion
#region 推荐目标
/// <summary>
/// 推荐目标托标签
/// </summary>
public string RecommendToContainerCode { get; set; }
/// <summary>
/// 推荐目标箱标签
/// </summary>
public string RecommendToPackingCode { get; set; }
/// <summary>
/// 推荐目标批次供应商批次
/// </summary>
public string RecommendToSupplierBatch { get; set; }
/// <summary>
/// 推荐目标批次到货时间
/// </summary>
public DateTime RecommendToArriveDate { get; set; }
/// <summary>
/// 推荐目标批次生产时间
/// </summary>
public DateTime RecommendToProduceDate { get; set; }
/// <summary>
/// 推荐目标批次过期时间
/// </summary>
public DateTime RecommendToExpireDate { get; set; }
/// <summary>
/// 推荐目标批次排序
/// </summary>
public string RecommendToLot { get; set; }
/// <summary>
/// 推荐目标库位
/// </summary>
public string RecommendToLocationCode { get; set; }
/// <summary>
/// 推荐目标库区
/// </summary>
public string RecommendToLocationArea { get; set; }
/// <summary>
/// 推荐目标库位组
/// </summary>
public string RecommendToLocationGroup { get; set; }
/// <summary>
/// 推荐目标ERP库位
/// </summary>
public string RecommendToLocationErpCode { get; set; }
/// <summary>
/// 推荐目标仓库
/// </summary>
public string RecommendToWarehouseCode { get; set; }
/// <summary>
/// 推荐目标数量
/// </summary>
public decimal RecommendToQty { get; set; }
#endregion
#region 库移来源
/// <summary>
/// 库移来源托标签
/// </summary>
public string TransferLibFromContainerCode { get; set; }
/// <summary>
/// 库移来源箱标签
/// </summary>
public string TransferLibFromPackingCode { get; set; }
/// <summary>
/// 库移来源批次供应商批次
/// </summary>
public string TransferLibFromSupplierBatch { get; set; }
/// <summary>
/// 库移来源批次到货时间
/// </summary>
public DateTime TransferLibFromArriveDate { get; set; }
/// <summary>
/// 库移来源批次生产时间
/// </summary>
public DateTime TransferLibFromProduceDate { get; set; }
/// <summary>
/// 库移来源批次过期时间
/// </summary>
public DateTime TransferLibFromExpireDate { get; set; }
/// <summary>
/// 库移来源批次排序
/// </summary>
public string TransferLibFromLot { get; set; }
/// <summary>
/// 库移来源库位
/// </summary>
public string TransferLibFromLocationCode { get; set; }
/// <summary>
/// 库移来源库区
/// </summary>
public string TransferLibFromLocationArea { get; set; }
/// <summary>
/// 库移来源库位组
/// </summary>
public string TransferLibFromLocationGroup { get; set; }
/// <summary>
/// 库移来源ERP库位
/// </summary>
public string TransferLibFromLocationErpCode { get; set; }
/// <summary>
/// 库移来源仓库
/// </summary>
public string TransferLibFromWarehouseCode { get; set; }
/// <summary>
/// 库移来源数量
/// </summary>
public decimal TransferLibFromQty { get; set; }
#endregion
#region 库移目标
/// <summary>
/// 库移目标托标签
/// </summary>
public string TransferLibToContainerCode { get; set; }
/// <summary>
/// 库移目标箱标签
/// </summary>
public string TransferLibToPackingCode { get; set; }
/// <summary>
/// 库移目标批次供应商批次
/// </summary>
public string TransferLibToSupplierBatch { get; set; }
/// <summary>
/// 库移目标批次到货时间
/// </summary>
public DateTime TransferLibToArriveDate { get; set; }
/// <summary>
/// 库移目标批次生产时间
/// </summary>
public DateTime TransferLibToProduceDate { get; set; }
/// <summary>
/// 库移目标批次过期时间
/// </summary>
public DateTime TransferLibToExpireDate { get; set; }
/// <summary>
/// 库移目标批次排序
/// </summary>
public string TransferLibToLot { get; set; }
/// <summary>
/// 库移目标库位
/// </summary>
public string TransferLibToLocationCode { get; set; }
/// <summary>
/// 库移目标库区
/// </summary>
public string TransferLibToLocationArea { get; set; }
/// <summary>
/// 库移目标库位组
/// </summary>
public string TransferLibToLocationGroup { get; set; }
/// <summary>
/// 库移目标ERP库位
/// </summary>
public string TransferLibToLocationErpCode { get; set; }
/// <summary>
/// 库移目标仓库
/// </summary>
public string TransferLibToWarehouseCode { get; set; }
/// <summary>
/// 库移目标数量
/// </summary>
public decimal TransferLibToQty { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
#endregion
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
#region 实际来源
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
/// <summary>
/// 实际目标托标签
/// </summary>
public string HandledFromContainerCode { get; set; }
public bool CheckLocationCodeTo { get; set; }
/// <summary>
/// 实际箱标签
/// </summary>
public string HandledFromPackingCode { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
/// <summary>
/// 实际批次供应商批次
/// </summary>
public string HandledFromSupplierBatch { get; set; }
public bool CheckLocationGroupTo { get; set; }
/// <summary>
/// 实际批次到货时间
/// </summary>
public DateTime HandledFromArriveDate { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
/// <summary>
/// 实际批次生产时间
/// </summary>
public DateTime HandledFromProduceDate { get; set; }
public bool CheckLocationAreaTo { get; set; }
/// <summary>
/// 实际批次过期时间
/// </summary>
public DateTime HandledFromExpireDate { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
/// <summary>
/// 实际批次排序
/// </summary>
public string HandledFromLot { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
/// <summary>
/// 实际库位
/// </summary>
public string HandledFromLocationCode { get; set; }
/// <summary>
/// 实际库区
/// </summary>
public string HandledFromLocationArea { get; set; }
/// <summary>
/// 实际库位组
/// </summary>
public string HandledFromLocationGroup { get; set; }
/// <summary>
/// 实际ERP库位
/// </summary>
public string HandledFromLocationErpCode { get; set; }
/// <summary>
/// 实际仓库
/// </summary>
public string HandledFromWarehouseCode { get; set; }
/// <summary>
/// 实际数量
/// </summary>
public decimal HandledFromQty { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
#region 实际目标
/// <summary>
/// 实际目标托标签
/// </summary>
public string HandledToContainerCode { get; set; }
/// <summary>
/// 实际箱标签
/// </summary>
public string HandledToPackingCode { get; set; }
/// <summary>
/// 实际批次供应商批次
/// </summary>
public string HandledToSupplierBatch { get; set; }
/// <summary>
/// 实际批次到货时间
/// </summary>
public DateTime HandledToArriveDate { get; set; }
/// <summary>
/// 实际批次生产时间
/// </summary>
public DateTime HandledToProduceDate { get; set; }
/// <summary>
/// 实际批次过期时间
/// </summary>
public DateTime HandledToExpireDate { get; set; }
/// <summary>
/// 实际批次排序
/// </summary>
public string HandledToLot { get; set; }
/// <summary>
/// 实际库位
/// </summary>
public string HandledToLocationCode { get; set; }
/// <summary>
/// 实际库区
/// </summary>
public string HandledToLocationArea { get; set; }
/// <summary>
/// 实际库位组
/// </summary>
public string HandledToLocationGroup { get; set; }
/// <summary>
/// 实际ERP库位
/// </summary>
public string HandledToLocationErpCode { get; set; }
/// <summary>
/// 实际仓库
/// </summary>
public string HandledToWarehouseCode { get; set; }
/// <summary>
/// 实际数量
/// </summary>
public decimal HandledToQty { get; set; }
#endregion
}

32
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteManager.cs

@ -87,27 +87,31 @@ public class TransferLibNoteManager : SfsStoreManagerBase<TransferLibNote, Trans
detail.ItemDesc2 = item.Desc2;
}
var balance = await BalanceAppService.GetByItemLocationPackingAndStatusAsync(detail.FromPackingCode, detail.ItemCode, detail.FromLocationCode, detail.FromStatus).ConfigureAwait(false);
var balance = await BalanceAppService.GetByItemLocationPackingAndStatusAsync(detail.HandledFromPackingCode, detail.ItemCode, detail.HandledFromLocationCode, detail.Status).ConfigureAwait(false);
Check.NotNull(balance, "库存", $"不存在箱码为{detail.FromPackingCode},零件编码为{detail.ItemCode},库位为{detail.FromLocationCode},状态为{detail.FromStatus}的库存!");
Check.NotNull(balance, "库存", $"不存在箱码为{detail.HandledFromPackingCode},零件编码为{detail.ItemCode},库位为{detail.HandledFromLocationCode},状态为{detail.Status}的库存!");
detail.SupplierBatch = balance.SupplierBatch;
detail.ArriveDate = balance.ArriveDate;
detail.ProduceDate = balance.ProduceDate;
detail.ExpireDate = balance.ExpireDate;
detail.HandledFromSupplierBatch = balance.SupplierBatch;
detail.HandledToSupplierBatch = balance.SupplierBatch;
detail.HandledFromArriveDate = balance.ArriveDate;
detail.HandledToArriveDate = balance.ArriveDate;
detail.HandledFromProduceDate = balance.ProduceDate;
detail.HandledToProduceDate = balance.ProduceDate;
detail.HandledFromExpireDate = balance.ExpireDate;
detail.HandledToExpireDate = balance.ExpireDate;
//通过箱码和库位获取库存信息
detail.FromStatus = balance.Status;
detail.Status = balance.Status;
detail.FromLot = balance.Lot;
detail.FromWarehouseCode = balance.WarehouseCode;
detail.FromContainerCode = balance.ContainerCode;
detail.HandledFromLot = balance.Lot;
detail.HandledFromWarehouseCode = balance.WarehouseCode;
detail.HandledFromContainerCode = balance.ContainerCode;
detail.ToLot = balance.Lot;
detail.ToWarehouseCode = balance.WarehouseCode;
detail.ToContainerCode = balance.ContainerCode;
detail.HandledToLot = balance.Lot;
detail.HandledToWarehouseCode = balance.WarehouseCode;
detail.HandledToContainerCode = balance.ContainerCode;
detail.ToStatus = balance.Status;
detail.Status = balance.Status;
}
}

47
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs

@ -1,11 +1,12 @@
using System.Text.Json;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Domain;
/// <summary>
/// //??TransferLib实体
/// </summary>
public class TransferLibRequestDetail : SfsStoreDetailWithFromToEntityBase
public class TransferLibRequestDetail : NewRecommendFromTo
{
/// <summary>
/// 原因代码
@ -42,4 +43,48 @@ public class TransferLibRequestDetail : SfsStoreDetailWithFromToEntityBase
/// </summary>
public string CallJobNumber { get; set; }
#endregion
#region 校验
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
#endregion
}

32
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestManager.cs

@ -49,27 +49,31 @@ public class TransferLibRequestManager : SfsStoreRequestManagerBase<TransferLibR
detail.ItemDesc2 = item.Desc2;
}
var balance = await BalanceAppService.GetByItemLocationPackingAndStatusAsync(detail.FromPackingCode, detail.ItemCode, detail.FromLocationCode, detail.FromStatus).ConfigureAwait(false);
var balance = await BalanceAppService.GetByItemLocationPackingAndStatusAsync(detail.RecommendFromPackingCode, detail.ItemCode, detail.RecommendFromLocationCode, detail.Status).ConfigureAwait(false);
Check.NotNull(balance, "库存", $"不存在箱码为{detail.FromPackingCode},零件编码为{detail.ItemCode},库位为{detail.FromLocationCode},状态为{detail.FromStatus}的库存!");
Check.NotNull(balance, "库存", $"不存在箱码为{detail.RecommendFromPackingCode},零件编码为{detail.ItemCode},库位为{detail.RecommendFromLocationCode},状态为{detail.Status}的库存!");
detail.SupplierBatch = balance.SupplierBatch;
detail.ArriveDate = balance.ArriveDate;
detail.ProduceDate = balance.ProduceDate;
detail.ExpireDate = balance.ExpireDate;
detail.RecommendFromSupplierBatch = balance.SupplierBatch;
detail.RecommendToSupplierBatch = balance.SupplierBatch;
detail.RecommendFromArriveDate = balance.ArriveDate;
detail.RecommendToArriveDate = balance.ArriveDate;
detail.RecommendFromProduceDate = balance.ProduceDate;
detail.RecommendToProduceDate = balance.ProduceDate;
detail.RecommendFromExpireDate = balance.ExpireDate;
detail.RecommendToExpireDate = balance.ExpireDate;
//通过箱码和库位获取库存信息
detail.FromStatus = balance.Status;
//detail.Status = balance.Status;
detail.FromLot = balance.Lot;
detail.FromWarehouseCode = balance.WarehouseCode;
detail.FromContainerCode = balance.ContainerCode;
detail.RecommendFromLot = balance.Lot;
detail.RecommendFromWarehouseCode = balance.WarehouseCode;
detail.RecommendFromContainerCode = balance.ContainerCode;
detail.ToLot = balance.Lot;
detail.ToWarehouseCode = balance.WarehouseCode;
detail.ToContainerCode = balance.ContainerCode;
detail.RecommendToLot = balance.Lot;
detail.RecommendToWarehouseCode = balance.WarehouseCode;
detail.RecommendToContainerCode = balance.ContainerCode;
detail.ToStatus = balance.Status;
detail.Status = balance.Status;
}
}
}

29756
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240412061448_transferLibV2.Designer.cs

File diff suppressed because it is too large

558
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240412061448_transferLibV2.cs

@ -0,0 +1,558 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Win_in.Sfs.Wms.Store.Migrations
{
public partial class transferLibV2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "RecommendFromArriveDate",
table: "Store_TransferLibNoteDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "RecommendFromContainerCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendFromExpireDate",
table: "Store_TransferLibNoteDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "RecommendFromLocationArea",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromLocationCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromLocationErpCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromLocationGroup",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromLot",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromPackingCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendFromProduceDate",
table: "Store_TransferLibNoteDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<decimal>(
name: "RecommendFromQty",
table: "Store_TransferLibNoteDetail",
type: "decimal(18,6)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "RecommendFromSupplierBatch",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromWarehouseCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendToArriveDate",
table: "Store_TransferLibNoteDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "RecommendToContainerCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendToExpireDate",
table: "Store_TransferLibNoteDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "RecommendToLocationArea",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToLocationCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToLocationErpCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToLocationGroup",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToLot",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToPackingCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendToProduceDate",
table: "Store_TransferLibNoteDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<decimal>(
name: "RecommendToQty",
table: "Store_TransferLibNoteDetail",
type: "decimal(18,6)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "RecommendToSupplierBatch",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToWarehouseCode",
table: "Store_TransferLibNoteDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendFromArriveDate",
table: "Job_TransferLibJobDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "RecommendFromContainerCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendFromExpireDate",
table: "Job_TransferLibJobDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "RecommendFromLocationArea",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromLocationCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromLocationErpCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromLocationGroup",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromLot",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromPackingCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendFromProduceDate",
table: "Job_TransferLibJobDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<decimal>(
name: "RecommendFromQty",
table: "Job_TransferLibJobDetail",
type: "decimal(18,6)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "RecommendFromSupplierBatch",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendFromWarehouseCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendToArriveDate",
table: "Job_TransferLibJobDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "RecommendToContainerCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendToExpireDate",
table: "Job_TransferLibJobDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "RecommendToLocationArea",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToLocationCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToLocationErpCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToLocationGroup",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToLot",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToPackingCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "RecommendToProduceDate",
table: "Job_TransferLibJobDetail",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<decimal>(
name: "RecommendToQty",
table: "Job_TransferLibJobDetail",
type: "decimal(18,6)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "RecommendToSupplierBatch",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendToWarehouseCode",
table: "Job_TransferLibJobDetail",
type: "nvarchar(max)",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RecommendFromArriveDate",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromContainerCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromExpireDate",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLocationArea",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLocationCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLocationErpCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLocationGroup",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLot",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromPackingCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromProduceDate",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromQty",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromSupplierBatch",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromWarehouseCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToArriveDate",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToContainerCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToExpireDate",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToLocationArea",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToLocationCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToLocationErpCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToLocationGroup",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToLot",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToPackingCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToProduceDate",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToQty",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToSupplierBatch",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendToWarehouseCode",
table: "Store_TransferLibNoteDetail");
migrationBuilder.DropColumn(
name: "RecommendFromArriveDate",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromContainerCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromExpireDate",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLocationArea",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLocationCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLocationErpCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLocationGroup",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromLot",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromPackingCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromProduceDate",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromQty",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromSupplierBatch",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendFromWarehouseCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToArriveDate",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToContainerCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToExpireDate",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToLocationArea",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToLocationCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToLocationErpCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToLocationGroup",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToLot",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToPackingCode",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToProduceDate",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToQty",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToSupplierBatch",
table: "Job_TransferLibJobDetail");
migrationBuilder.DropColumn(
name: "RecommendToWarehouseCode",
table: "Job_TransferLibJobDetail");
}
}
}

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteDbContextModelCreatingExtensions.cs

@ -40,13 +40,13 @@ public static class TransferLibNoteDbContextModelCreatingExtensions
//Properties
b.Property(q => q.Reason).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
//Relations
//Indexes
b.HasIndex(q => new { q.Number, q.FromPackingCode, q.FromLocationCode, q.ToLocationCode, q.FromStatus, q.ToStatus }).IsUnique();
b.HasIndex(q => new { q.Number, q.HandledFromPackingCode, q.HandledFromLocationCode, q.HandledToLocationCode, q.Status, q.Status }).IsUnique();
});
}
}

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs

@ -148,29 +148,29 @@ public class InjectionJobEventHandler :
detailInput.JobStatus = EnumJobStatus.Open;
detailInput.ItemCode = detail.ItemCode;
detailInput.Qty = detail.RecommendFromQty;
detailInput.ArriveDate = detailInput.ArriveDate;
detailInput.ExpireDate = detailInput.ExpireDate;
detailInput.ProduceDate = detail.RecommendFromProduceDate;
detailInput.ToLocationCode = detail.RecommendToLocationCode;
detailInput.ToWarehouseCode = detail.RecommendToWarehouseCode;
detailInput.ToLocationErpCode = detail.RecommendToLocationErpCode;
detailInput.ToLocationGroup = detail.RecommendToLocationGroup;
detailInput.ToLocationArea = detail.RecommendToLocationArea;
detailInput.FromLocationCode = detail.RecommendFromLocationCode;
detailInput.FromLocationArea = detail.RecommendFromLocationArea;
detailInput.FromLocationGroup = detail.RecommendFromLocationGroup;
detailInput.FromLocationErpCode = detail.RecommendFromLocationErpCode;
detailInput.FromWarehouseCode = detail.RecommendFromWarehouseCode;
detailInput.FromLot = detail.RecommendFromLot;
detailInput.ToLot = detail.RecommendToLot;
detailInput.Qty = detail.RecommendFromQty;
detailInput.StdPackQty = detail.StdPackQty;
detailInput.Uom = detail.Uom;
detailInput.SupplierBatch = detail.RecommendFromSupplierBatch;
//detailInput.Qty = detail.RecommendFromQty;
//detailInput.ArriveDate = detailInput.ArriveDate;
//detailInput.ExpireDate = detailInput.ExpireDate;
//detailInput.ProduceDate = detail.RecommendFromProduceDate;
//detailInput.ToLocationCode = detail.RecommendToLocationCode;
//detailInput.ToWarehouseCode = detail.RecommendToWarehouseCode;
//detailInput.ToLocationErpCode = detail.RecommendToLocationErpCode;
//detailInput.ToLocationGroup = detail.RecommendToLocationGroup;
//detailInput.ToLocationArea = detail.RecommendToLocationArea;
//detailInput.FromLocationCode = detail.RecommendFromLocationCode;
//detailInput.FromLocationArea = detail.RecommendFromLocationArea;
//detailInput.FromLocationGroup = detail.RecommendFromLocationGroup;
//detailInput.FromLocationErpCode = detail.RecommendFromLocationErpCode;
//detailInput.FromWarehouseCode = detail.RecommendFromWarehouseCode;
//detailInput.FromLot = detail.RecommendFromLot;
//detailInput.ToLot = detail.RecommendToLot;
//detailInput.Qty = detail.RecommendFromQty;
//detailInput.StdPackQty = detail.StdPackQty;
//detailInput.Uom = detail.Uom;
//detailInput.SupplierBatch = detail.RecommendFromSupplierBatch;
await _transferLibRequestAppService.CreateAsync(input).ConfigureAwait(false);
}

Loading…
Cancel
Save