Browse Source

三方库更新

dev_DY_CC
周红军 1 year ago
parent
commit
bd9941950e
  1. 1
      be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs
  2. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs
  3. 14
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs
  4. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs
  5. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs
  6. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestImportInput.cs
  7. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs
  8. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobDetail.cs
  9. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs
  10. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs
  11. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs
  12. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ThirdLocationRequests/ThirdLocationRequestDbContextModelCreatingExtensions.cs
  13. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs
  14. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs

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

@ -98,6 +98,7 @@ public enum EnumTransType
TransferLib = 68, TransferLib = 68,
/// <summary> /// <summary>
/// 库间调拨 /// 库间调拨
/// </summary> /// </summary>

12
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs

@ -9,10 +9,16 @@ public class ThirdLocationJobDetailDTO : SfsJobRecommendFromDetailDTOBase, IHasT
{ {
/// <summary> /// <summary>
/// 请求库位 /// 来源库位
/// </summary> /// </summary>
[Display(Name = "请求库位")] [Display(Name = "来源库位")]
public string RequestLocationCode { get; set; } public string FromLocationCode { get; set; }
/// <summary>
/// 来源库区
/// </summary>
[Display(Name = "来源库区")]
public string FromLocationArea { get; set; }
/// <summary> /// <summary>
/// 到库位 /// 到库位

14
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs

@ -9,12 +9,20 @@ public class ThirdLocationJobDetailInput : SfsJobRecommendFromDetailInputBase, I
{ {
/// <summary> /// <summary>
/// 请求库位 /// 来源库位
/// </summary> /// </summary>
[Display(Name = "请求库位")] [Display(Name = "来源库位")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string RequestLocationCode { get; set; } public string FromLocationCode { get; set; }
/// <summary>
/// 来源库区
/// </summary>
[Display(Name = "来源库位")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string FromLocationArea { get; set; }
/// <summary> /// <summary>
/// 到库位 /// 到库位

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

@ -37,4 +37,9 @@ public class ThirdLocationRequestDTO : SfsStoreRequestDTOBase<ThirdLocationReque
/// </summary> /// </summary>
[Display(Name = "目标ERP储位")] [Display(Name = "目标ERP储位")]
public string ToLocationErpCode { get; set; } public string ToLocationErpCode { get; set; }
/// <summary>
/// 来源库区
/// </summary>
public string FromLocationArea { get; set; }
} }

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

@ -14,6 +14,13 @@ public class ThirdLocationRequestDetailInput : SfsStoreDetailWithQtyInputBase
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ToLocationCode { get; set; } public string ToLocationCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string FromLocationCode { get; set; }
/// <summary> /// <summary>
/// 来源库区 /// 来源库区
/// </summary> /// </summary>

9
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestImportInput.cs

@ -31,10 +31,17 @@ public class ThirdLocationRequestImportInput : SfsStoreImportInputBase
[Required] [Required]
public string ToLocationCode { get; set; } public string ToLocationCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
[Required]
public string FromLocationCode { get; set; }
/// <summary> /// <summary>
/// 来源库区 /// 来源库区
/// </summary> /// </summary>
[Display(Name = "调出库区")] [Display(Name = "来源库区")]
[Required] [Required]
public string FromLocationArea { get; set; } public string FromLocationArea { get; set; }

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

@ -86,7 +86,7 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
{ {
if (item.Qty <= 0) if (item.Qty <= 0)
{ {
throw new UserFriendlyException($"{item.ItemCode} 物的需求量必须大于0"); throw new UserFriendlyException($"{item.ItemCode} 物的需求量必须大于0");
} }
} }
@ -94,6 +94,7 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
{ {
var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false);
CheckLocation(toLocationDto, detailInput.ToLocationCode); CheckLocation(toLocationDto, detailInput.ToLocationCode);
var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false); var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false);
CheckItemBasic(itemBasicDto, detailInput.ItemCode); CheckItemBasic(itemBasicDto, detailInput.ItemCode);
@ -102,11 +103,6 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
} }
//input.AutoSubmit = true;
//input.AutoAgree = true;
//input.AutoHandle = true;
//input.AutoCompleteJob = false;
//input.DirectCreateNote = false;
await SetRequestAutoPropertiesAsync(input).ConfigureAwait(false); await SetRequestAutoPropertiesAsync(input).ConfigureAwait(false);
@ -333,9 +329,9 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
throw new UserFriendlyException($"库位代码为【{LocationCode}】不存在"); throw new UserFriendlyException($"库位代码为【{LocationCode}】不存在");
} }
if (LocationDto.Type != EnumLocationType.WIP) if (LocationDto.Type != EnumLocationType.THIRDPARTY)
{ {
throw new UserFriendlyException($"库位代码【{LocationCode}】不是【{EnumLocationType.WIP.GetDisplayName()}】类型"); throw new UserFriendlyException($"库位代码【{LocationCode}】不是【{EnumLocationType.THIRDPARTY.GetDisplayName()}】类型");
} }
} }

9
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobDetail.cs

@ -7,9 +7,14 @@ namespace Win_in.Sfs.Wms.Store.Domain;
public class ThirdLocationJobDetail : SfsJobRecommendFromDetailEntityBase, IHasToLocation public class ThirdLocationJobDetail : SfsJobRecommendFromDetailEntityBase, IHasToLocation
{ {
/// <summary> /// <summary>
/// 请求库位 /// 来源库位
/// </summary> /// </summary>
public string RequestLocationCode { get; set; } public string FromLocationCode { get; set; }
/// <summary>
/// 来源库区
/// </summary>
public string FromLocationArea { get; set; }
/// <summary> /// <summary>
/// 到库位 /// 到库位

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs

@ -7,7 +7,7 @@ public class ThirdLocationNoteDetail : SfsStoreRecommendFromDetailWithFromToEnti
{ {
/// <summary> /// <summary>
/// 发时间 /// 发时间
/// </summary> /// </summary>
public DateTime IssueTime { get; set; } public DateTime IssueTime { get; set; }

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

@ -35,11 +35,18 @@ public class ThirdLocationRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasT
/// </summary> /// </summary>
public string ToWarehouseCode { get; set; } public string ToWarehouseCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
public string FromLocationCode { get; set; }
/// <summary> /// <summary>
/// 来源库区 /// 来源库区
/// </summary> /// </summary>
public string FromLocationArea { get; set; } public string FromLocationArea { get; set; }
// /// <summary> // /// <summary>
// /// 在途库库位 // /// 在途库库位
// /// </summary> // /// </summary>

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs

@ -48,7 +48,8 @@ public static class ThirdLocationJobDbContextModelCreatingExtensions
b.Property(q => q.ToWarehouseCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToWarehouseCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ToLocationArea).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLocationArea).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ToLocationGroup).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLocationGroup).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.FromLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromLocationArea).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength);

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

@ -46,6 +46,8 @@ public static class ThirdLocationRequestDbContextModelCreatingExtensions
b.Property(q => q.ToWarehouseCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToWarehouseCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ToLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ToLocationGroup).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLocationGroup).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromLocationCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ExpiredTime).IsRequired(); b.Property(q => q.ExpiredTime).IsRequired();
b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength);

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

@ -35,7 +35,7 @@ public partial class StoreEventAutoMapperProfile : Profile
; ;
CreateMap<ThirdLocationRequestDetail, ThirdLocationJobDetailInput>() CreateMap<ThirdLocationRequestDetail, ThirdLocationJobDetailInput>()
.ForMember(x => x.RequestLocationCode, y => y.MapFrom(d => d.ToLocationCode)) .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode))
.Ignore(x => x.RecommendFromLocationArea) .Ignore(x => x.RecommendFromLocationArea)
.Ignore(x => x.RecommendFromLocationGroup) .Ignore(x => x.RecommendFromLocationGroup)
.Ignore(x => x.HandledFromLocationArea) .Ignore(x => x.HandledFromLocationArea)
@ -99,7 +99,7 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.ToLocationArea) .Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup) .Ignore(x => x.ToLocationGroup)
.Ignore(x => x.HandledFromWarehouseCode) .Ignore(x => x.HandledFromWarehouseCode)
.Ignore(x => x.RequestLocationCode) .Ignore(x => x.FromLocationCode)
.Ignore(x => x.ToLocationCode) .Ignore(x => x.ToLocationCode)
.Ignore(x => x.ProdLine) .Ignore(x => x.ProdLine)
.Ignore(x => x.WorkStation) .Ignore(x => x.WorkStation)
@ -123,12 +123,13 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.PlanBeginTime) .Ignore(x => x.PlanBeginTime)
.Ignore(x => x.PlannedSplitRule) .Ignore(x => x.PlannedSplitRule)
.Ignore(x => x.DeliveryQty) .Ignore(x => x.DeliveryQty)
.Ignore(x => x.RequestLocationCode) .Ignore(x => x.FromLocationCode)
.Ignore(x => x.ToLocationCode) .Ignore(x => x.ToLocationCode)
.Ignore(x => x.ProdLine) .Ignore(x => x.ProdLine)
.Ignore(x => x.WorkStation) .Ignore(x => x.WorkStation)
.Ignore(x => x.PositionCode) .Ignore(x => x.PositionCode)
.Ignore(x => x.RecommendType) .Ignore(x => x.RecommendType)
.Ignore(x => x.FromLocationArea)
.IgnoreIHasRecommendAndHandledFrom(); .IgnoreIHasRecommendAndHandledFrom();
} }

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

@ -120,7 +120,7 @@ public class ThirdLocationRequestEventHandler
{ {
var jobs = new List<ThirdLocationJobEditInput>(); var jobs = new List<ThirdLocationJobEditInput>();
var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);//库存事务 var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, EnumTransSubType.Transfer_Warehouse).ConfigureAwait(false);//库存事务
var toLocationCodes = thirdLocationRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合 var toLocationCodes = thirdLocationRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合
var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合 var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合
@ -245,7 +245,7 @@ public class ThirdLocationRequestEventHandler
//ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false);
var detail = ObjectMapper.Map<BalanceDTO, ThirdLocationJobDetailInput>(balance); var detail = ObjectMapper.Map<BalanceDTO, ThirdLocationJobDetailInput>(balance);
detail.RequestLocationCode = thirdLocationRequestDetail.ToLocationCode; detail.FromLocationCode = thirdLocationRequestDetail.FromLocationCode;
detail.WorkStation = thirdLocationRequestDetail.WorkStation; detail.WorkStation = thirdLocationRequestDetail.WorkStation;
detail.ExpiredTime = thirdLocationRequestDetail.ExpiredTime; detail.ExpiredTime = thirdLocationRequestDetail.ExpiredTime;
detail.PositionCode = thirdLocationRequestDetail.PositionCode; detail.PositionCode = thirdLocationRequestDetail.PositionCode;
@ -271,6 +271,7 @@ public class ThirdLocationRequestEventHandler
detail.ToLocationErpCode = thirdLocationRequestDetail.ToLocationErpCode; detail.ToLocationErpCode = thirdLocationRequestDetail.ToLocationErpCode;
detail.ToLocationArea = thirdLocationRequestDetail.ToLocationArea; detail.ToLocationArea = thirdLocationRequestDetail.ToLocationArea;
detail.ToWarehouseCode = thirdLocationRequestDetail.ToWarehouseCode; detail.ToWarehouseCode = thirdLocationRequestDetail.ToWarehouseCode;
detail.FromLocationArea = thirdLocationRequestDetail.FromLocationArea;
//detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; //detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code;
detail.ProdLine = toLocationGroupCode; detail.ProdLine = toLocationGroupCode;

Loading…
Cancel
Save