Browse Source

生成数据库前提交

dev_DY_CC
刘云峰 1 year ago
parent
commit
8aabbcb3d6
  1. 420
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs
  2. 283
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs
  3. 27
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs
  4. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
  5. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs
  6. 16
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs
  7. 197
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendFromTo.cs
  8. 148
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendHandledFromTo.cs
  9. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs
  10. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs
  11. 283
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs
  12. 62
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs
  13. 30134
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.Designer.cs
  14. 3539
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.cs
  15. 1024
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs
  16. 66
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteDbContextModelCreatingExtensions.cs
  17. 43
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestDbContextModelCreatingExtensions.cs
  18. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/TransferLibRequestAutoMapperProfile.cs
  19. 139
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

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;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
@ -7,7 +10,7 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary> /// <summary>
/// 库存转移记录-明细表 /// 库存转移记录-明细表
/// </summary> /// </summary>
public class TransferLibRequestDetailDTO : NewRecommendFromTo public class TransferLibRequestDetailDTO : SfsDetailDTOBase
{ {
/// <summary> /// <summary>
@ -47,46 +50,423 @@ public class TransferLibRequestDetailDTO : NewRecommendFromTo
public string CallJobNumber { get; set; } public string CallJobNumber { get; set; }
#endregion #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 #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;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
@ -8,7 +11,7 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary> /// <summary>
/// 库存转移记录-明细表 /// 库存转移记录-明细表
/// </summary> /// </summary>
public class TransferLibRequestDetailInput : NewRecommendFromTo public class TransferLibRequestDetailInput : SfsDetailInputBase
{ {
/// <summary> /// <summary>
/// 原因 /// 原因
@ -48,47 +51,285 @@ public class TransferLibRequestDetailInput : NewRecommendFromTo
public string CallJobNumber { get; set; } public string CallJobNumber { get; set; }
#endregion #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 #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; _transferLibJobAppService = transferLibJobAppService;
} }
/// <summary> [HttpPost("add-many")]
/// 批量创建
/// </summary>
/// <param name="inputs"></param>
/// <returns></returns>
[HttpPost("create-many")]
public override async Task<List<InjectionJobDTO>> CreateManyAsync(List<InjectionJobEditInput> inputs) public override async Task<List<InjectionJobDTO>> CreateManyAsync(List<InjectionJobEditInput> inputs)
{ {
foreach (var input in inputs) foreach (var input in inputs)
@ -57,11 +52,6 @@ public class InjectionJobAppService
return await base.CreateManyAsync(inputs).ConfigureAwait(false); return await base.CreateManyAsync(inputs).ConfigureAwait(false);
} }
/// <summary>
/// 创建
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("")] [HttpPost("")]
public override async Task<InjectionJobDTO> CreateAsync(InjectionJobEditInput input) public override async Task<InjectionJobDTO> CreateAsync(InjectionJobEditInput input)
{ {
@ -82,8 +72,10 @@ public class InjectionJobAppService
var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode)
.ConfigureAwait(false); .ConfigureAwait(false);
if (loctionDto.RowCode == 1) if (loctionDto.RowCode != 1)
{ {
input.JobStatus = EnumJobStatus.Wait;
jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate; jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate;
jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode; jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode;
jobDetailInputdetail.TransferLibFromExpireDate = jobDetailInputdetail.RecommendFromExpireDate; jobDetailInputdetail.TransferLibFromExpireDate = jobDetailInputdetail.RecommendFromExpireDate;
@ -112,10 +104,6 @@ public class InjectionJobAppService
jobDetailInputdetail.TransferLibToSupplierBatch = jobDetailInputdetail.RecommendToSupplierBatch; jobDetailInputdetail.TransferLibToSupplierBatch = jobDetailInputdetail.RecommendToSupplierBatch;
jobDetailInputdetail.TransferLibToWarehouseCode = jobDetailInputdetail.RecommendToWarehouseCode; jobDetailInputdetail.TransferLibToWarehouseCode = jobDetailInputdetail.RecommendToWarehouseCode;
} }
else
{
input.JobStatus = EnumJobStatus.Wait;
}
} }
[HttpPost("cancel-by-request/{injectionNumber}")] [HttpPost("cancel-by-request/{injectionNumber}")]
@ -149,8 +137,8 @@ public class InjectionJobAppService
return ObjectMapper.Map<List<InjectionJob>, List<InjectionJobDTO>>(entitys); return ObjectMapper.Map<List<InjectionJob>, List<InjectionJobDTO>>(entitys);
} }
[HttpPost("do-call-back")] [HttpPost("Do-Call-Back")]
public async Task<Tuple<bool?, string>> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum) public async Task<TransferLibJobDTO> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum)
{ {
var job = await _repository.FindAsync(p => p.Number == jobNum).ConfigureAwait(false); var job = await _repository.FindAsync(p => p.Number == jobNum).ConfigureAwait(false);
@ -193,7 +181,8 @@ public class InjectionJobAppService
await _repository.UpdateAsync(job).ConfigureAwait(false); 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")] [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.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Uow;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared; using Win_in.Sfs.Wms.Store.Domain.Shared;
@ -33,6 +34,8 @@ public class TransferLibJobAppService
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="dto"></param> /// <param name="dto"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost("handle/{id}")]
[UnitOfWork]
public override async Task<TransferLibJobDTO> CompleteAsync(Guid id, TransferLibJobDTO dto) public override async Task<TransferLibJobDTO> CompleteAsync(Guid id, TransferLibJobDTO dto)
{ {
//var str = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService"; //var str = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService";
@ -72,10 +75,10 @@ public class TransferLibJobAppService
{ {
throw new UserFriendlyException($"{methodPrefix}类型为{dto.CallServerName}的对象没有实现ITransferLibCallback接口"); throw new UserFriendlyException($"{methodPrefix}类型为{dto.CallServerName}的对象没有实现ITransferLibCallback接口");
} }
Tuple<bool?, string> callbackRet = await transferLibCallback.DoTransferLibCallbackAsync(dto.CallServerName, dto.CallRequestNumber, dto.CallJobNumber); TransferLibJobDTO callbackRet = await transferLibCallback.DoTransferLibCallbackAsync(dto.CallServerName, dto.CallRequestNumber, dto.CallJobNumber).ConfigureAwait(false);
if (callbackRet != null && callbackRet.Item1 == 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 assembly = Assembly.GetExecutingAssembly();
//var ty = assembly.GetType(dto.CallServerName); //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.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Notes; namespace Win_in.Sfs.Wms.Store.Notes;
public interface ITransferLibCallback 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 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) string jobNum)
{ {
return Tuple.Create<bool?, string>(true, "调用新移库回调方法成功!"); return new TransferLibJobDTO();
} }
} }

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 entity = ObjectMapper.Map<TransferLibRequestEditInput, TransferLibRequest>(input);
var subType = Enum.Parse<EnumTransSubType>(input.Type); var subType = Enum.Parse<EnumTransSubType>(input.Type);
//var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, subType) var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, subType)
// .ConfigureAwait(false); .ConfigureAwait(false);
//entity.Type = ((int)subType).ToString(); entity.Type = ((int)subType).ToString();
//entity.AutoCompleteJob = tranType.AutoCompleteJob; entity.AutoCompleteJob = tranType.AutoCompleteJob;
//entity.AutoSubmit = tranType.AutoSubmitRequest; entity.AutoSubmit = tranType.AutoSubmitRequest;
//entity.AutoAgree = tranType.AutoAgreeRequest; entity.AutoAgree = tranType.AutoAgreeRequest;
//entity.AutoHandle = tranType.AutoHandleRequest; entity.AutoHandle = tranType.AutoHandleRequest;
//entity.DirectCreateNote = tranType.DirectCreateNote; entity.DirectCreateNote = tranType.DirectCreateNote;
await _transferLibRequestManager.CreateAsync(entity).ConfigureAwait(false); 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
}

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

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

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

@ -10,7 +10,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
/// <summary> /// <summary>
/// 库存转移记录-明细表 //??TransferLib实体 /// 库存转移记录-明细表 //??TransferLib实体
/// </summary> /// </summary>
public class TransferLibNoteDetail : SfsStoreDetailEntityBase public class TransferLibNoteDetail : SfsDetailEntityBase//SfsStoreDetailEntityBase
{ {
/// <summary> /// <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 System.Text.Json;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
@ -6,7 +10,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
/// <summary> /// <summary>
/// //??TransferLib实体 /// //??TransferLib实体
/// </summary> /// </summary>
public class TransferLibRequestDetail : NewRecommendFromTo public class TransferLibRequestDetail : SfsDetailEntityBase //SfsStoreDetailEntityBase
{ {
/// <summary> /// <summary>
/// 原因代码 /// 原因代码
@ -44,46 +48,285 @@ public class TransferLibRequestDetail : NewRecommendFromTo
public string CallJobNumber { get; set; } public string CallJobNumber { get; set; }
#endregion #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 #endregion

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 //Configure Job base properties
//b.ConfigureJobRecommendFromDetail(); //b.ConfigureJobRecommendFromDetail();
//Properties //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 //Relations
//None //None

30134
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.Designer.cs

File diff suppressed because it is too large

3539
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.cs

File diff suppressed because it is too large

1024
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 //Configure Sfs store detail properties
b.ConfigureSfsStoreDetailBase(); b.ConfigureSfsStoreDetailBase();
//Properties //Properties
b.Property(q => q.Reason).HasMaxLength(SfsPropertyConst.CodeLength); 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 //Relations
//Indexes //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(); b.ConfigureSfsStoreDetailBase();
//Properties //Properties
//b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>(); b.Property(q => q.Reason).HasMaxLength(SfsPropertyConst.DescLength);
//b.Property(q => q.ToStatus).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.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 //Relations
//Indexes //Indexes

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() 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.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using DocumentFormat.OpenXml.Bibliography; using DocumentFormat.OpenXml.Bibliography;
using Volo.Abp;
using Volo.Abp.EventBus; using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Local; using Volo.Abp.EventBus.Local;
using Volo.Abp.SettingManagement; using Volo.Abp.SettingManagement;
@ -56,9 +57,8 @@ public class TransferLibRequestEventHandler
if (entity.DirectCreateNote) if (entity.DirectCreateNote)
{ {
//todo 等云峰做完处理 //todo 等云峰做完处理, lyf complete at 2024-04-15
var input = new TransferLibNote() var input = ObjectMapper.Map<TransferLibRequest, TransferLibNote>(entity);
{ };
//获取在途库 //获取在途库
var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT) var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT)
@ -74,9 +74,9 @@ public class TransferLibRequestEventHandler
} }
else else
{ {
//todo 刘云峰 //todo 刘云峰 1. autoMapper映射 2 校验checkXX实现, 3 回调方法返回
//var input = ObjectMapper.Map<TransferLibRequest, TransferLibJob>(entity); var input = ObjectMapper.Map<TransferLibRequest, TransferLibJob>(entity);
var input = new TransferLibJob(); //var input = new TransferLibJob();
//获取在途库 //获取在途库
var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT) var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT)
@ -88,6 +88,133 @@ public class TransferLibRequestEventHandler
input.Details.ForEach(p => { p.OnTheWayLocationCode = locationDto.Code; }); 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); await _transferLibJobManager.AddAsync(input).ConfigureAwait(false);
} }

Loading…
Cancel
Save