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
33298c32d6
  1. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDTO.cs
  2. 58
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs
  3. 25
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestEditInput.cs
  4. 420
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs
  5. 283
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs
  6. 27
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs
  7. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
  8. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs
  9. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs
  10. 16
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs
  11. 197
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendFromTo.cs
  12. 148
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendHandledFromTo.cs
  13. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJob.cs
  14. 51
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDependentDetail.cs
  15. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs
  16. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs
  17. 283
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs
  18. 25
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/CountJobs/CountJobDbContextModelCreatingExtensions.cs
  19. 62
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs
  20. 30131
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415063138_transferLibV2222.Designer.cs
  21. 6132
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415063138_transferLibV2222.cs
  22. 1037
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs
  23. 66
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteDbContextModelCreatingExtensions.cs
  24. 43
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestDbContextModelCreatingExtensions.cs
  25. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs
  26. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs
  27. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/TransferLibRequestAutoMapperProfile.cs
  28. 139
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

7
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDTO.cs

@ -1,6 +1,9 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Entities;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -51,4 +54,8 @@ public class CountJobDTO : SfsJobDTOBase<CountJobDetailDTO>
[Display(Name = "库位代码")]
public string LocationCode { get; set; }
/// <summary>
/// 任务从表明细(记录每次扫得明细)
/// </summary>
public List<CountJobDependentDetailDTO> DepDetails { get; set; }
}

58
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs

@ -0,0 +1,58 @@
using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class CountJobDependentDetailDTO : SfsJobDetailDTOBase, IHasCountResult
{
/// <summary>
/// 盘点标签
/// </summary>
[Display(Name = "盘点标签")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string CountLabel { get; set; }
/// <summary>
/// 计量单位
/// </summary>
[Display(Name = "计量单位")]
public string Uom { get; set; }
/// <summary>
/// 库存数量
/// </summary>
[Display(Name = "库存数量")]
public decimal InventoryQty { get; set; }
/// <summary>
/// 库存库位
/// </summary>
[Display(Name = "库存库位")]
public string InventoryLocationCode { get; set; }
/// <summary>
/// 盘点数量
/// </summary>
[Display(Name = "盘点数量")]
public decimal CountQty { get; set; }
/// <summary>
/// 盘点时间
/// </summary>
[Display(Name = "盘点时间")]
public DateTime? CountTime { get; set; }
/// <summary>
/// 盘点操作员
/// </summary>
[Display(Name = "盘点操作员")]
public string CountOperator { get; set; }
/// <summary>
/// 盘点描述
/// </summary>
[Display(Name = "盘点描述")]
public string CountDescription { get; set; }
}

25
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestEditInput.cs

@ -6,13 +6,7 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase
{
#region Base
/// <summary>
/// 车间
/// </summary>
[Display(Name = "车间")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Workshop { get; set; }
#region Base
/// <summary>
/// 使用在途库
@ -21,26 +15,13 @@ public class InjectionRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase
public bool UseOnTheWayLocation { get; set; }
#endregion
#region Create
/// <summary>
/// 要货单号
/// </summary>
[Display(Name = "要货单号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Number { get; set; }
#region Create
/// <summary>
/// 叫料类型
/// </summary>
[Display(Name = "叫料类型")]
public string Type { get; set; }
/// <summary>
/// 备料计划单号
/// </summary>
[Display(Name = "备料计划单号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string PreparationPlanNumber { get; set; }
public string Type { get; set; }
/// <summary>
/// 明细列表

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

@ -1,4 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
@ -7,7 +10,7 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// 库存转移记录-明细表
/// </summary>
public class TransferLibRequestDetailDTO : NewRecommendFromTo
public class TransferLibRequestDetailDTO : SfsDetailDTOBase
{
/// <summary>
@ -47,46 +50,423 @@ public class TransferLibRequestDetailDTO : NewRecommendFromTo
public string CallJobNumber { get; set; }
#endregion
#region 校验
#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 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 OnTheWayLocationCode { 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 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
#region 开关
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool IsPackingCodeFrom { get; set; }
public bool IsPackingCodeTo { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool IsLotFrom { get; set; }
public bool IsLotTo { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool IsItemCodeFrom { get; set; }
public bool IsItemCodeTo { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool IsStatusFrom { get; set; }
public bool IsStatusTo { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool IsLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
public bool IsLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool IsLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
public bool IsLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool IsLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
public bool IsLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool IsLocationErpCodeFrom { get; set; }
public bool IsLocationErpCodeTo { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool IsQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
public bool IsQtyTo { get; set; }
#endregion

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

@ -1,4 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
@ -8,7 +11,7 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary>
/// 库存转移记录-明细表
/// </summary>
public class TransferLibRequestDetailInput : NewRecommendFromTo
public class TransferLibRequestDetailInput : SfsDetailInputBase
{
/// <summary>
/// 原因
@ -48,47 +51,285 @@ public class TransferLibRequestDetailInput : NewRecommendFromTo
public string CallJobNumber { get; set; }
#endregion
#region 校验
#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 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 OnTheWayLocationCode { 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 开关
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool IsPackingCodeFrom { get; set; }
public bool IsPackingCodeTo { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool IsLotFrom { get; set; }
public bool IsLotTo { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool IsItemCodeFrom { get; set; }
public bool IsItemCodeTo { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool IsStatusFrom { get; set; }
public bool IsStatusTo { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool IsLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
public bool IsLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool IsLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
public bool IsLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool IsLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
public bool IsLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool IsLocationErpCodeFrom { get; set; }
public bool IsLocationErpCodeTo { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool IsQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
public bool IsQtyTo { get; set; }
#endregion
}

27
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs

@ -41,12 +41,7 @@ public class InjectionJobAppService
_transferLibJobAppService = transferLibJobAppService;
}
/// <summary>
/// 批量创建
/// </summary>
/// <param name="inputs"></param>
/// <returns></returns>
[HttpPost("create-many")]
[HttpPost("add-many")]
public override async Task<List<InjectionJobDTO>> CreateManyAsync(List<InjectionJobEditInput> inputs)
{
foreach (var input in inputs)
@ -57,11 +52,6 @@ public class InjectionJobAppService
return await base.CreateManyAsync(inputs).ConfigureAwait(false);
}
/// <summary>
/// 创建
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("")]
public override async Task<InjectionJobDTO> CreateAsync(InjectionJobEditInput input)
{
@ -82,8 +72,10 @@ public class InjectionJobAppService
var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode)
.ConfigureAwait(false);
if (loctionDto.RowCode == 1)
if (loctionDto.RowCode != 1)
{
input.JobStatus = EnumJobStatus.Wait;
jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate;
jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode;
jobDetailInputdetail.TransferLibFromExpireDate = jobDetailInputdetail.RecommendFromExpireDate;
@ -112,10 +104,6 @@ public class InjectionJobAppService
jobDetailInputdetail.TransferLibToSupplierBatch = jobDetailInputdetail.RecommendToSupplierBatch;
jobDetailInputdetail.TransferLibToWarehouseCode = jobDetailInputdetail.RecommendToWarehouseCode;
}
else
{
input.JobStatus = EnumJobStatus.Wait;
}
}
[HttpPost("cancel-by-request/{injectionNumber}")]
@ -149,8 +137,8 @@ public class InjectionJobAppService
return ObjectMapper.Map<List<InjectionJob>, List<InjectionJobDTO>>(entitys);
}
[HttpPost("do-call-back")]
public async Task<Tuple<bool?, string>> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum)
[HttpPost("Do-Call-Back")]
public async Task<TransferLibJobDTO> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum)
{
var job = await _repository.FindAsync(p => p.Number == jobNum).ConfigureAwait(false);
@ -193,7 +181,8 @@ public class InjectionJobAppService
await _repository.UpdateAsync(job).ConfigureAwait(false);
return new Tuple<bool?, string>(true,"s");
//return new Tuple<bool?, string>(true,"s");
return new TransferLibJobDTO();
}
[HttpPost("test")]

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

@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.Uow;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
@ -33,6 +34,8 @@ public class TransferLibJobAppService
/// <param name="id"></param>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("handle/{id}")]
[UnitOfWork]
public override async Task<TransferLibJobDTO> CompleteAsync(Guid id, TransferLibJobDTO dto)
{
//var str = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService";
@ -72,10 +75,10 @@ public class TransferLibJobAppService
{
throw new UserFriendlyException($"{methodPrefix}类型为{dto.CallServerName}的对象没有实现ITransferLibCallback接口");
}
Tuple<bool?, string> callbackRet = await transferLibCallback.DoTransferLibCallbackAsync(dto.CallServerName, dto.CallRequestNumber, dto.CallJobNumber);
if (callbackRet != null && callbackRet.Item1 == false)
TransferLibJobDTO callbackRet = await transferLibCallback.DoTransferLibCallbackAsync(dto.CallServerName, dto.CallRequestNumber, dto.CallJobNumber).ConfigureAwait(false);
if (callbackRet == null || callbackRet.Number == null)
{
throw new UserFriendlyException($"{methodPrefix}执行回调服务{dto.CallServerName}出错,返回错误信息:{callbackRet.Item2}");
throw new UserFriendlyException($"{methodPrefix}执行回调服务{dto.CallServerName}出错,返回实体为空!");
}
//var assembly = Assembly.GetExecutingAssembly();
//var ty = assembly.GetType(dto.CallServerName);

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs

@ -4,11 +4,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Notes;
public interface ITransferLibCallback
{
Task<Tuple<bool?, string>> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum);
Task<TransferLibJobDTO> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum);
}
public class TestTransferLibCallback : ITransferLibCallback
@ -17,10 +18,9 @@ public class TestTransferLibCallback : ITransferLibCallback
{
}
public async Task<Tuple<bool?, string>> DoTransferLibCallbackAsync(string businessType, string requestNum,
public async Task<TransferLibJobDTO> DoTransferLibCallbackAsync(string businessType, string requestNum,
string jobNum)
{
return Tuple.Create<bool?, string>(true, "调用新移库回调方法成功!");
return new TransferLibJobDTO();
}
}

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs

@ -99,6 +99,12 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase<Injectio
detailInput.ToWarehouseCode= toLocationDto.WarehouseCode;
detailInput.ProdLine = detailInput.ToLocationCode;
detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode;
detailInput.ItemDesc1 = itemBasicDto.Desc1;
detailInput.ItemDesc2 = itemBasicDto.Desc2;
detailInput.ItemName = itemBasicDto.Name;
detailInput.Uom = itemBasicDto.BasicUom;
detailInput.StdPackQty = itemBasicDto.StdPackQty;
detailInput.Status = EnumStatus.Open;
//因为是刚创建的 所以发料数一定是0

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

@ -319,14 +319,14 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase
var entity = ObjectMapper.Map<TransferLibRequestEditInput, TransferLibRequest>(input);
var subType = Enum.Parse<EnumTransSubType>(input.Type);
//var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, subType)
// .ConfigureAwait(false);
//entity.Type = ((int)subType).ToString();
//entity.AutoCompleteJob = tranType.AutoCompleteJob;
//entity.AutoSubmit = tranType.AutoSubmitRequest;
//entity.AutoAgree = tranType.AutoAgreeRequest;
//entity.AutoHandle = tranType.AutoHandleRequest;
//entity.DirectCreateNote = tranType.DirectCreateNote;
var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, subType)
.ConfigureAwait(false);
entity.Type = ((int)subType).ToString();
entity.AutoCompleteJob = tranType.AutoCompleteJob;
entity.AutoSubmit = tranType.AutoSubmitRequest;
entity.AutoAgree = tranType.AutoAgreeRequest;
entity.AutoHandle = tranType.AutoHandleRequest;
entity.DirectCreateNote = tranType.DirectCreateNote;
await _transferLibRequestManager.CreateAsync(entity).ConfigureAwait(false);

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

@ -1,197 +0,0 @@
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

@ -1,148 +0,0 @@
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
}

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJob.cs

@ -62,6 +62,11 @@ public class CountJob : SfsJobAggregateRootBase<CountJobDetail>
/// </summary>
[IgnoreUpdate]
public override List<CountJobDetail> Details { get; set; } = new List<CountJobDetail>();
/// <summary>
/// 任务从表明细(记录每次扫得明细)
/// </summary>
[IgnoreUpdate]
public List<CountJobDependentDetail> DepDetails { get; set; } = new List<CountJobDependentDetail>();
/// <summary>
/// 设置任务明细的实际库位和实际数量

51
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDependentDetail.cs

@ -0,0 +1,51 @@
using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Domain;
public class CountJobDependentDetail : SfsJobDetailEntityBase, IHasCountResult, IHasInventoryQty
{
/// <summary>
/// 盘点标签
/// </summary>
public string CountLabel { get; set; }
/// <summary>
/// 库存数量
/// </summary>
public decimal InventoryQty { get; set; }
/// <summary>
/// 计量单位
/// </summary>
[Display(Name = "计量单位")]
public string Uom { get; set; }
/// <summary>
/// 库存库位
/// </summary>
public string InventoryLocationCode { get; set; }
/// <summary>
/// 盘点数量(每次扫得数量)
/// </summary>
public decimal CountQty { get; set; }
/// <summary>
/// 盘点时间
/// </summary>
public DateTime? CountTime { get; set; }
/// <summary>
/// 盘点操作员
/// </summary>
public string CountOperator { get; set; }
/// <summary>
/// 盘点描述
/// </summary>
public string CountDescription { get; set; }
}

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

@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Domain;
@ -8,7 +9,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
/// <summary>
/// //??TransferLib实体
/// </summary>
public class TransferLibJobDetail : SfsStoreDetailEntityBase
public class TransferLibJobDetail : SfsDetailEntityBase
{
/// <summary>
/// 原因

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

@ -49,22 +49,22 @@ public class TransferLibNoteDetail : SfsStoreDetailEntityBase
/// <summary>
/// 物品代码
/// </summary>
public string ItemCode { get; set; }
public new string ItemCode { get; set; }
/// <summary>
/// 物品名称
/// </summary>
public string ItemName { get; set; }
public new string ItemName { get; set; }
/// <summary>
/// 物品描述1
/// </summary>
public string ItemDesc1 { get; set; }
public new string ItemDesc1 { get; set; }
/// <summary>
/// 物品描述2
/// </summary>
public string ItemDesc2 { get; set; }
public new string ItemDesc2 { get; set; }
/// <summary>
/// 标包数量

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

@ -1,4 +1,8 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
@ -6,7 +10,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
/// <summary>
/// //??TransferLib实体
/// </summary>
public class TransferLibRequestDetail : NewRecommendFromTo
public class TransferLibRequestDetail : SfsStoreDetailEntityBase
{
/// <summary>
/// 原因代码
@ -44,46 +48,285 @@ public class TransferLibRequestDetail : NewRecommendFromTo
public string CallJobNumber { get; set; }
#endregion
#region 校验
#region 库存基础信息
/// <summary>
/// 物品代码
/// </summary>
public new string ItemCode { get; set; }
/// <summary>
/// 物品名称
/// </summary>
public new string ItemName { get; set; }
/// <summary>
/// 物品描述1
/// </summary>
public new string ItemDesc1 { get; set; }
/// <summary>
/// 物品描述2
/// </summary>
public new 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 OnTheWayLocationCode { 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 开关
//箱码
public bool CheckPackingCodeFrom { get; set; }
public bool IsPackingCodeFrom { get; set; }
public bool IsPackingCodeTo { get; set; }
public bool CheckPackingCodeTo { get; set; }
//批次
public bool CheckLotFrom { get; set; }
public bool IsLotFrom { get; set; }
public bool IsLotTo { get; set; }
public bool CheckLotTo { get; set; }
//零件号
public bool CheckItemCodeFrom { get; set; }
public bool IsItemCodeFrom { get; set; }
public bool IsItemCodeTo { get; set; }
public bool CheckItemCodeTo { get; set; }
//状态
public bool CheckStatusFrom { get; set; }
public bool IsStatusFrom { get; set; }
public bool IsStatusTo { get; set; }
public bool CheckStatusTo { get; set; }
//库位
public bool CheckLocationCodeFrom { get; set; }
public bool IsLocationCodeFrom { get; set; }
public bool CheckLocationCodeTo { get; set; }
public bool IsLocationCodeTo { get; set; }
//库位组
public bool CheckLocationGroupFrom { get; set; }
public bool IsLocationGroupFrom { get; set; }
public bool CheckLocationGroupTo { get; set; }
public bool IsLocationGroupTo { get; set; }
//区域
public bool CheckLocationAreaFrom { get; set; }
public bool IsLocationAreaFrom { get; set; }
public bool CheckLocationAreaTo { get; set; }
public bool IsLocationAreaTo { get; set; }
//储位
public bool CheckLocationErpCodeFrom { get; set; }
public bool IsLocationErpCodeFrom { get; set; }
public bool IsLocationErpCodeTo { get; set; }
public bool CheckLocationErpCodeTo { get; set; }
//数量
public bool CheckQtyFrom { get; set; }
public bool IsQtyFrom { get; set; }
public bool CheckQtyTo { get; set; }
public bool IsQtyTo { get; set; }
#endregion

25
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/CountJobs/CountJobDbContextModelCreatingExtensions.cs

@ -29,6 +29,7 @@ public static class CountJobDbContextModelCreatingExtensions
b.Property(q => q.LocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired();
b.HasMany(q => q.DepDetails).WithOne().HasForeignKey(d => d.MasterID).IsRequired();
//Indexes
b.HasIndex(q => new { q.Number }).IsUnique();
});
@ -55,5 +56,29 @@ public static class CountJobDbContextModelCreatingExtensions
//Indexes
//b.HasIndex(q => new { q.PackingCode }).IsUnique();
});
builder.Entity<CountJobDependentDetail>(b =>
{
//Configure table & schema name
b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(CountJobDependentDetail), options.Schema);
//Configure ABP properties
b.ConfigureByConvention();
//Configure Sfs base properties
b.ConfigureSfsBase();
//Configure Job base properties
b.ConfigureJobDetail();
//Properties
b.Property(q => q.CountLabel).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.InventoryLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CountOperator).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CountDescription).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
//None
//Indexes
//b.HasIndex(q => new { q.PackingCode }).IsUnique();
});
}
}

62
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs

@ -41,6 +41,68 @@ public static class TransferLibJobDbContextModelCreatingExtensions
//Configure Job base properties
//b.ConfigureJobRecommendFromDetail();
//Properties
b.Property(q => q.Reason).HasMaxLength(SfsPropertyConst.CodeLength);
//b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.ItemCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ItemName).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ItemDesc1).HasMaxLength(SfsPropertyConst.DescLength);
b.Property(q => q.ItemDesc2).HasMaxLength(SfsPropertyConst.DescLength);
b.Property(q => q.CallServerName).HasMaxLength(SfsPropertyConst.TitleLength);
b.Property(q => q.CallBusinessType).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.CallRequestNumber).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.CallJobNumber).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.Uom).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
//Relations
//None

30131
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415063138_transferLibV2222.Designer.cs

File diff suppressed because it is too large

6132
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415063138_transferLibV2222.cs

File diff suppressed because it is too large

1037
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs

File diff suppressed because it is too large

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

@ -38,15 +38,75 @@ public static class TransferLibNoteDbContextModelCreatingExtensions
//Configure Sfs store detail properties
b.ConfigureSfsStoreDetailBase();
//Properties
b.Property(q => q.Reason).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Status).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>();
b.Property(q => q.ItemCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ItemName).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ItemDesc1).HasMaxLength(SfsPropertyConst.DescLength);
b.Property(q => q.ItemDesc2).HasMaxLength(SfsPropertyConst.DescLength);
b.Property(q => q.CallServerName).HasMaxLength(SfsPropertyConst.TitleLength);
b.Property(q => q.CallBusinessType).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.CallRequestNumber).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.CallJobNumber).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.Uom).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledFromWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.HandledToWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
//Relations
//Indexes
b.HasIndex(q => new { q.Number, q.HandledFromPackingCode, q.HandledFromLocationCode, q.HandledToLocationCode, q.Status }).IsUnique();
b.HasIndex(q => new { q.Number }).IsUnique();
});
}
}

43
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestDbContextModelCreatingExtensions.cs

@ -40,9 +40,48 @@ public static class TransferLibRequestDbContextModelCreatingExtensions
b.ConfigureSfsStoreDetailBase();
//Properties
//b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
//b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.Reason).HasMaxLength(SfsPropertyConst.DescLength);
//b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.ItemCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ItemName).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ItemDesc1).HasMaxLength(SfsPropertyConst.DescLength);
b.Property(q => q.ItemDesc2).HasMaxLength(SfsPropertyConst.DescLength);
b.Property(q => q.CallServerName).HasMaxLength(SfsPropertyConst.TitleLength);
b.Property(q => q.CallBusinessType).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.CallRequestNumber).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.CallJobNumber).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.Uom).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RequestWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendFromWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToLot).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.RecommendToWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
//Relations
//Indexes

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs

@ -337,7 +337,7 @@ public class StoreEntityFrameworkCoreModule : AbpModule
#region Jobs
options.Entity<CountJob>(orderOptions =>
orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details));
orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details).Include(o => o.DepDetails));
options.Entity<CheckJob>(orderOptions =>
orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details));
options.Entity<ProductReceiveJob>(orderOptions =>

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs

@ -99,6 +99,7 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.CompleteUserId)
.Ignore(x => x.CompleteUserName)
.Ignore(x => x.CompleteTime)
.Ignore(x => x.DepDetails)
;
CreateMap<CountPlanDetailDTO, CountJobDetail>()

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/TransferLibRequestAutoMapperProfile.cs

@ -9,6 +9,50 @@ public partial class StoreEventAutoMapperProfile : Profile
{
private void TransferLibRequestAutoMapperProfile()
{
CreateMap<TransferLibRequest, TransferLibNote>()
.IgnoreAuditedObjectProperties()
.ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.Number))
.ForMember(x => x.Confirmed, y => y.MapFrom(d => !d.UseOnTheWayLocation))
.Ignore(x => x.ConfirmTime)
.Ignore(x => x.JobNumber)
.Ignore(x => x.Number)
.Ignore(x => x.Id);
CreateMap<TransferLibRequestDetail, TransferLibNoteDetail>(MemberList.None)
.Ignore(x => x.OnTheWayLocationCode);
CreateMap<TransferLibRequest, TransferLibJob>()
.IgnoreAuditedObjectProperties()
.ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.Number))
.ForMember(x => x.Confirmed, y => y.MapFrom(d => !d.UseOnTheWayLocation))
.ForMember(dest => dest.Details, option => option.MapFrom(src => src.Details))
.Ignore(x => x.ConfirmTime)
.Ignore(x => x.JobNumber)
.Ignore(x => x.Number)
.Ignore(x => x.Id)
.Ignore(x => x.WarehouseCode)
//.Ignore(x => x.Details)
.Ignore(x => x.IsAutoComplete)
.Ignore(x => x.JobType)
.Ignore(x => x.JobDescription)
.Ignore(x => x.JobStatus)
.Ignore(x => x.WorkGroupCode)
.Ignore(x => x.Priority)
.Ignore(x => x.PriorityIncrement)
.Ignore(x => x.AcceptUserId)
.Ignore(x => x.AcceptUserName)
.Ignore(x => x.AcceptTime)
.Ignore(x => x.CompleteUserId)
.Ignore(x => x.CompleteUserName)
.Ignore(x => x.CompleteTime)
.Ignore(x => x.UpStreamJobNumber)
.BeforeMap((notice, input) => input.JobType = EnumJobType.Transfer)
.BeforeMap((notice, input) => input.JobStatus = EnumJobStatus.Open)
.BeforeMap((notice, input) => input.IsAutoComplete = false)
;
CreateMap<TransferLibRequestDetail, TransferLibJobDetail>(MemberList.None)
.Ignore(x => x.OnTheWayLocationCode)
;
}
}

139
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DocumentFormat.OpenXml.Bibliography;
using Volo.Abp;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Local;
using Volo.Abp.SettingManagement;
@ -56,9 +57,8 @@ public class TransferLibRequestEventHandler
if (entity.DirectCreateNote)
{
//todo 等云峰做完处理
var input = new TransferLibNote()
{ };
//todo 等云峰做完处理, lyf complete at 2024-04-15
var input = ObjectMapper.Map<TransferLibRequest, TransferLibNote>(entity);
//获取在途库
var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT)
@ -74,9 +74,9 @@ public class TransferLibRequestEventHandler
}
else
{
//todo 刘云峰
//var input = ObjectMapper.Map<TransferLibRequest, TransferLibJob>(entity);
var input = new TransferLibJob();
//todo 刘云峰 1. autoMapper映射 2 校验checkXX实现, 3 回调方法返回
var input = ObjectMapper.Map<TransferLibRequest, TransferLibJob>(entity);
//var input = new TransferLibJob();
//获取在途库
var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT)
@ -88,6 +88,133 @@ public class TransferLibRequestEventHandler
input.Details.ForEach(p => { p.OnTheWayLocationCode = locationDto.Code; });
//校验
foreach (var detailObj in input.Details)
{
if (detailObj.IsPackingCodeFrom)
{
if (detailObj.RecommendFromPackingCode != detailObj.HandledFromPackingCode)
{
throw new UserFriendlyException($"触发校验:推荐From箱码必须等于实际From箱码");
}
}
if (detailObj.IsPackingCodeTo)
{
if (detailObj.RecommendToPackingCode != detailObj.HandledToPackingCode)
{
throw new UserFriendlyException($"触发校验:推荐To箱码必须等于实际To箱码");
}
}
if (detailObj.IsLotFrom)
{
if (detailObj.RecommendFromLot != detailObj.HandledFromLot)
{
throw new UserFriendlyException($"触发校验:推荐From批次必须等于实际From批次");
}
}
if (detailObj.IsLotTo)
{
if (detailObj.RecommendToLot != detailObj.HandledToLot)
{
throw new UserFriendlyException($"触发校验:推荐To批次必须等于实际To批次");
}
}
//if (detailObj.IsItemCodeFrom)
//{
//}
//if (detailObj.IsItemCodeTo)
//{
//}
//if (detailObj.IsStatusFrom)
//{
//}
//if (detailObj.IsStatusTo)
//{
//}
if (detailObj.IsLocationCodeFrom)
{
if (detailObj.RecommendFromLocationCode != detailObj.HandledFromLocationCode)
{
throw new UserFriendlyException($"触发校验:推荐From库位必须等于实际From库位");
}
}
if (detailObj.IsLocationCodeTo)
{
if (detailObj.RecommendToLocationCode != detailObj.HandledToLocationCode)
{
throw new UserFriendlyException($"触发校验:推荐To库位必须等于实际To库位");
}
}
if (detailObj.IsLocationGroupFrom)
{
if (detailObj.RecommendFromLocationGroup != detailObj.HandledFromLocationGroup)
{
throw new UserFriendlyException($"触发校验:推荐From库位组必须等于实际From库位组");
}
}
if (detailObj.IsLocationGroupTo)
{
if (detailObj.RecommendToLocationGroup != detailObj.HandledToLocationGroup)
{
throw new UserFriendlyException($"触发校验:推荐To库位组必须等于实际To库位组");
}
}
if (detailObj.IsLocationAreaFrom)
{
if (detailObj.RecommendFromLocationArea != detailObj.HandledFromLocationArea)
{
throw new UserFriendlyException($"触发校验:推荐From库区必须等于实际From库区");
}
}
if (detailObj.IsLocationAreaTo)
{
if (detailObj.RecommendToLocationArea != detailObj.HandledToLocationArea)
{
throw new UserFriendlyException($"触发校验:推荐To库区必须等于实际To库区");
}
}
if (detailObj.IsLocationErpCodeFrom)
{
if (detailObj.RecommendFromLocationErpCode != detailObj.HandledFromLocationErpCode)
{
throw new UserFriendlyException($"触发校验:推荐From ERP库区必须等于实际From ERP库区");
}
}
if (detailObj.IsLocationErpCodeTo)
{
if (detailObj.RecommendToLocationErpCode != detailObj.HandledToLocationErpCode)
{
throw new UserFriendlyException($"触发校验:推荐To ERP库区必须等于实际To ERP库区");
}
}
if (detailObj.IsQtyFrom)
{
if (detailObj.RecommendFromQty != detailObj.HandledFromQty)
{
throw new UserFriendlyException($"触发校验:推荐From数量必须等于实际From数量");
}
}
if (detailObj.IsQtyTo)
{
if (detailObj.RecommendToQty != detailObj.HandledToQty)
{
throw new UserFriendlyException($"触发校验:推荐To数量必须等于实际To数量");
}
}
}
await _transferLibJobManager.AddAsync(input).ConfigureAwait(false);
}

Loading…
Cancel
Save