diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
index a29d697f6..2a4bf2295 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
@@ -20,6 +20,8 @@ using System.Text.Json.Serialization;
using System.IdentityModel.Tokens.Jwt;
using Volo.Abp;
using System.Net.NetworkInformation;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
+
namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming;
public class InjectionMoldingRequestReader : IReader
{
@@ -121,7 +123,7 @@ public class InjectionMoldingRequestReader : IReader
InjectionIssueRequestEditInput input = new InjectionIssueRequestEditInput();
input.Worker = "Vision";
- input.Type = "Vision";
+ input.IssueRequestType = EnumIssueRequestType.Vision;
input.AutoSubmit = true;
input.ActiveDate = DateTime.Now;
input.UseOnTheWayLocation = false;
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs
new file mode 100644
index 000000000..2ca84955e
--- /dev/null
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
+public enum EnumIssueRequestType
+{
+ None = 0,
+
+ ///
+ /// 视觉
+ ///
+ [Display(Name = "视觉发起")]
+ Vision =1,
+
+ ///
+ /// Mes
+ ///
+ [Display(Name = "Mes发起")]
+ Mes =2,
+
+ ///
+ /// 立体库
+ ///
+ [Display(Name = "立体库发起")]
+ DimensionalStorehouse=3,
+
+ ///
+ /// 位置码
+ ///
+ [Display(Name = "位置码")]
+ PositionCode =4,
+}
diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs
index fb4faedca..5bb01a0cd 100644
--- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs
+++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -10,20 +11,20 @@ public enum EnumIssueType
None=0,
///
- /// 按箱 叫料
+ /// 原材料
///
- BoxQty=1,
+ [Display(Name = "原材料")]
+ RAW =1,
///
- /// 按数量 叫料
+ /// 半成品
///
- Qty=2,
-
+ [Display(Name = "半成品")]
+ SEMI= 2,
///
- /// 按视觉 叫料
+ /// 立体库
///
- Vision = 3,
-
-
+ [Display(Name = "立体库")]
+ DimensionalStorehouse = 2,
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs
index a1d432a34..6601669a4 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -10,11 +11,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionIssueJobDTO : SfsJobDTOBase
{
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 生产线
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs
index b045edec5..8a5f8739b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs
@@ -3,6 +3,7 @@ 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.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -47,6 +48,12 @@ public class InjectionIssueJobDetailDTO : SfsDetailDTOBase
///
public string Uom { get; set; }
+ ///
+ /// 发料方式
+ ///
+ [Display(Name = "发料方式")]
+ public EnumIssueType IssueType { get; set; }
+
#endregion
#region 请求信息
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs
index ce12a5905..dc7855d5f 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs
@@ -3,6 +3,7 @@ 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.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -47,6 +48,12 @@ public class InjectionIssueJobDetailInput : SfsDetailInputBase
///
public string Uom { get; set; }
+ ///
+ /// 发料方式
+ ///
+ [Display(Name = "发料方式")]
+ public EnumIssueType IssueType { get; set; }
+
#endregion
#region 请求信息
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs
index 744659c31..a64b8e588 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs
@@ -9,16 +9,15 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput
{
- #region Create
///
- /// 上游任务编号
+ /// 上游任务编号
///
[Display(Name = "上游任务编号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string UpStreamJobNumber { get; set; }
///
- /// 要货单号
+ /// 要货单号
///
[Display(Name = "要货单号")]
[Required(ErrorMessage = "{0}是必填项")]
@@ -26,44 +25,42 @@ public class InjectionIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCr
public string InjectionIssueRequestNumber { get; set; }
///
- /// 叫料请求类型
- ///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
-
- ///
- /// 任务类型
+ /// 任务类型
///
[Display(Name = "任务类型")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumJobType JobType { get; set; }
///
- /// 是否自动完成
+ /// 是否自动完成
///
[Display(Name = "是否自动完成")]
[Required(ErrorMessage = "{0}是必填项")]
public bool IsAutoComplete { get; set; }
///
- /// 过期时间
+ /// 过期时间
///
[Display(Name = "过期时间")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime ExpiredTime { get; set; }
///
- /// 任务明细
+ /// 任务明细
///
[Display(Name = "任务明细")]
[Required(ErrorMessage = "{0}是必填项")]
public List Details { get; set; } = new();
///
- /// 使用在途库
+ /// 使用在途库
///
[Display(Name = "使用在途库")]
public bool UseOnTheWayLocation { get; set; }
- #endregion
+
+ ///
+ /// 叫料类型
+ ///
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDTO.cs
index bd4ec40ee..fa7ffbc0f 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDTO.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -20,11 +21,10 @@ public class InjectionIssueNoteDTO : SfsStoreDTOBase
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDetailDTO.cs
index 7d9411de5..0d403b11a 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDetailDTO.cs
@@ -3,6 +3,7 @@ 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.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -47,6 +48,12 @@ public class InjectionIssueNoteDetailDTO : SfsDetailDTOBase
///
public string Uom { get; set; }
+ ///
+ /// 发料方式
+ ///
+ [Display(Name = "发料方式")]
+ public EnumIssueType IssueType { get; set; }
+
#endregion
#region 请求信息
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/IInjectionIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/IInjectionIssueNoteAppService.cs
index f2d341edd..1c1b06e64 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/IInjectionIssueNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/IInjectionIssueNoteAppService.cs
@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
-public interface IInjectionIssueNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase
+public interface IInjectionIssueNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase
{
Task CreateAsync(InjectionIssueNoteEditInput input);
@@ -14,8 +16,9 @@ public interface IInjectionIssueNoteAppService : ISfsStoreMasterReadOnlyAppServi
Task ConfirmAsync(string number);
- Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
- string requestType, bool includeDetails = false, CancellationToken cancellationToken = default);
+ Task> GetListUnConfirmedByTypeAsync(EnumIssueRequestType issueRequestType);
- Task> GetListUnConfirmedByTypeAsync(string requestType);
+ Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
+ EnumIssueRequestType issueRequestType, bool includeDetails = false,
+ CancellationToken cancellationToken = default);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteDetailInput.cs
index f05f28827..a85eb8000 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteDetailInput.cs
@@ -3,6 +3,7 @@ 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.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -47,6 +48,12 @@ public class InjectionIssueNoteDetailInput : SfsDetailInputBase
///
public string Uom { get; set; }
+ ///
+ /// 发料方式
+ ///
+ [Display(Name = "发料方式")]
+ public EnumIssueType IssueType { get; set; }
+
#endregion
#region 请求信息
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteEditInput.cs
index ac52e49e9..369d92783 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteEditInput.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -41,11 +42,10 @@ public class InjectionIssueNoteEditInput : SfsStoreCreateOrUpdateInputBase
public string RequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteImportInput.cs
index 8e79cfec6..2fe3b17ba 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteImportInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteImportInput.cs
@@ -1,17 +1,18 @@
using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNumber, IHasRequestNumber
{
///
- /// 任务ID
+ /// 任务ID
///
[Display(Name = "任务ID")]
public string JobNumber { get; set; }
///
- /// 车间
+ /// 车间
///
[Display(Name = "车间")]
public string Workshop { get; set; }
@@ -19,13 +20,13 @@ public class InjectionIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNum
public string RequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [Display(Name = "叫料请求类型")]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
- /// 使用在途库
+ /// 使用在途库
///
[Display(Name = "使用在途库")]
[Required(ErrorMessage = "{0}是必填项")]
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDTO.cs
index fd24d8341..f4bdf0723 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDTO.cs
@@ -1,14 +1,16 @@
using System.ComponentModel.DataAnnotations;
+using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionIssueRequestDTO : SfsStoreRequestDTOBase, IHasNumber
{
///
- /// 叫料类型
+ /// 叫料类型
///
[Display(Name = "叫料类型")]
- public string Type { get; set; }
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 是否使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs
index e4607976b..13c1f6bc0 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs
@@ -53,10 +53,3 @@ public class InjectionIssueRequestDetailDTO : SfsStoreDetailWithQtyDTOBase
[Display(Name = "需求箱数量")]
public decimal BoxQty { get; set; }
}
-public class UnCompletedRequestDto
-{
- public string ItemCode { get; set; }
- public string LocCode { get; set; }
- public string PositionCode { get; set; }
-
-}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/UnCompletedRequestDto.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/UnCompletedRequestDto.cs
new file mode 100644
index 000000000..fbf8d2754
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/UnCompletedRequestDto.cs
@@ -0,0 +1,8 @@
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
+
+public class UnCompletedRequestDto
+{
+ public string ItemCode { get; set; }
+ public string LocCode { get; set; }
+ public string PositionCode { get; set; }
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs
index dca017df7..a90672c54 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs
@@ -10,14 +10,6 @@ public interface IInjectionIssueRequestAppService
: ISfsStoreRequestMasterAppServiceBase
{
- Task CreateAndHandleAsync(InjectionIssueRequestEditInput input);
-
- ///
- /// 获取已完成的叫料单数量
- ///
- ///
- Task GetCountAsync();
-
///
/// 获取物品类别列表
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestEditInput.cs
index 850f3ee63..791f34047 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestEditInput.cs
@@ -1,33 +1,26 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionIssueRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase
{
- #region Base
-
///
- /// 叫料类型
+ /// 叫料类型
///
[Display(Name = "叫料类型")]
- public string Type { get; set; }
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
- /// 使用在途库
+ /// 使用在途库
///
[Display(Name = "使用在途库")]
- public bool UseOnTheWayLocation { get; set; }
+ public bool UseOnTheWayLocation { get; set; }
///
- /// 明细列表
+ /// 明细列表
///
[Display(Name = "明细列表")]
- public List Details { get; set; } = new List();
- #endregion
-
- #region Create
-
- #endregion
+ public List Details { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestImportInput.cs
index cca7cf5eb..f1b773911 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestImportInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestImportInput.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
-using Win_in.Sfs.Shared.Application.Contracts;
-using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -8,45 +7,41 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class InjectionIssueRequestImportInput : SfsStoreImportInputBase
{
///
- /// 叫料类型
+ /// 叫料类型
///
[Display(Name = "叫料类型")]
- [Required(ErrorMessage = "{0}是必填项")]
- [ImporterHeader(Name = "叫料类型")]
- [ExporterHeader(DisplayName = "叫料类型")]
- [ValueMapping("人工拉动", EnumMaterialRequestType.Issue_Manual)]
- public string Type { get; set; }
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
- /// 物品代码
+ /// 物品代码
///
[Display(Name = "物品代码")]
[Required]
public string ItemCode { get; set; }
///
- /// 目标库位
+ /// 目标库位
///
[Display(Name = "目标库位")]
[Required]
public string ToLocationCode { get; set; }
///
- /// 来源库区
+ /// 来源库区
///
[Display(Name = "调出库区")]
[Required]
public string FromLocationArea { get; set; }
///
- /// 数量
+ /// 数量
///
[Display(Name = "数量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal Qty { get; set; }
///
- /// 备注
+ /// 备注
///
[Display(Name = "备注")]
public string Remark { get; set; }
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs
index 5bddd6b32..148f6439d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs
@@ -10,6 +10,7 @@ using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@@ -85,9 +86,9 @@ public class InjectionIssueNoteAppService :
///
[HttpPost("by-type/{requestType}")]
public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
- string requestType, bool includeDetails = false, CancellationToken cancellationToken = default)
+ EnumIssueRequestType issueRequestType, bool includeDetails = false, CancellationToken cancellationToken = default)
{
- Expression> expression = p => p.RequestType == requestType;
+ Expression> expression = p => p.IssueRequestType == issueRequestType;
if (requestInput.Condition.Filters?.Count > 0)
{
expression = expression.And(requestInput.Condition.Filters.ToLambda());
@@ -97,10 +98,10 @@ public class InjectionIssueNoteAppService :
requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false);
}
- [HttpGet("list/un-confirmed/{requestType}")]
- public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType)
+ [HttpPost("list-by-type-and-un-confirmed")]
+ public virtual async Task> GetListUnConfirmedByTypeAsync(EnumIssueRequestType issueRequestType)
{
- var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType)
+ var entities = await _repository.GetListAsync(c => !c.Confirmed && c.IssueRequestType == issueRequestType)
.ConfigureAwait(false);
var dtos = ObjectMapper.Map, List>(entities);
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs
index 119c5d67f..e02f54e3a 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs
@@ -1,26 +1,13 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using System.Linq;
-using System.Linq.Expressions;
-using System.Threading;
using System.Threading.Tasks;
-using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main;
-using IdentityModel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
using Volo.Abp;
-using Volo.Abp.Application.Dtos;
-using Volo.Abp.Domain.Entities;
-using Volo.Abp.Domain.Repositories;
-using Volo.Abp.ObjectMapping;
-using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts;
-using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
-using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
@@ -28,52 +15,41 @@ using Win_in.Sfs.Wms.Store.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application;
///
-/// 注塑发料申请
+/// 注塑发料申请
///
[Authorize]
[Route($"{StoreConsts.RootPath}injection-issue-request")]
-public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase,
IInjectionIssueRequestAppService
{
private readonly IInjectionIssueRequestManager _injectionRequestManager;
- private readonly IItemStoreRelationAppService _itemStoreRelationApp;
- private readonly IAreaAppService _areaApp;
private readonly ILocationAppService _locationAppService;
private readonly IItemBasicAppService _itemBasicAppService;
private readonly IItemContainerAppService _itemContainerAppService;
- private readonly IProductionLineAppService _productionLineAppService;
-
+
private readonly ITransactionTypeAppService _transactionTypeAppService;
public InjectionIssueRequestAppService(
IInjectionIssueRequestRepository repository,
IInjectionIssueRequestManager injectionRequestManager,
- IPreparationPlanManager preparationPlanManager,
- IItemStoreRelationAppService itemStoreRelationApp,
- IAreaAppService areaApp,
ILocationAppService locationAppService,
IItemBasicAppService itemBasicAppService,
IItemContainerAppService itemContainerAppService,
- IProductionLineAppService productionLineAppService,
ITransactionTypeAppService transactionTypeAppService
- )
+ )
: base(repository, injectionRequestManager)
{
_injectionRequestManager = injectionRequestManager;
- _itemStoreRelationApp = itemStoreRelationApp;
- _areaApp = areaApp;
_locationAppService = locationAppService;
_itemBasicAppService = itemBasicAppService;
- _itemContainerAppService= itemContainerAppService;
- _productionLineAppService = productionLineAppService;
+ _itemContainerAppService = itemContainerAppService;
_transactionTypeAppService = transactionTypeAppService;
}
-
- #region 东阳V2
-
public override async Task HandleAsync(Guid id)
{
await Task.CompletedTask.ConfigureAwait(false);
@@ -101,7 +77,7 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase0)
+ var itemContainerDto = await _itemContainerAppService.GetListByItemCodeAsync(detailInput.ItemCode)
+ .ConfigureAwait(false);
+ if (itemContainerDto.Count > 0)
{
detailInput.Uom = itemContainerDto[0].BasicUom;
detailInput.Qty = itemContainerDto[0].Qty;
@@ -121,7 +98,7 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase
- /// 赋值Request业务属性
+ /// 赋值Request业务属性
///
///
///
private async Task SetRequestAutoPropertiesAsync(InjectionIssueRequestEditInput entity)
{
- var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);
+ var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None)
+ .ConfigureAwait(false);
Check.NotNull(tranType, "事务类型", "事务类型不存在");
entity.AutoSubmit = tranType.AutoSubmitRequest;
entity.AutoAgree = tranType.AutoAgreeRequest;
@@ -166,125 +144,51 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase
- /// 获取物品类别列表
+ /// 获取物品类别列表
///
///
///
[HttpGet("list/item-category")]
public virtual async Task> GetItemCategoryListAsync()
{
- var entities = await _itemBasicAppService.GetCategoryListAsync().ConfigureAwait(false);
+ var entities = await _itemBasicAppService.GetCategoryListAsync().ConfigureAwait(false);
return entities;
}
- #endregion
-
- #region 导入
-
///
- /// 用来重写 导入数据时可以加工数据
+ /// 获取已完成的叫料单数量
///
- ///
///
- protected override async Task> ImportProcessingEntityAsync(
- Dictionary dictionary)
+ [HttpPost("get-uncompleted-request")]
+ public async Task> GetUnCompletedRequestAsync(List p_list)
{
- var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key);
-
- foreach (var injectionRequest in addList)
+ var returnList = new List();
+ //枚举类型查不到改成SQL查询
+ var list = await _repository.GetListAsync(p =>
+ p.RequestStatus != EnumRequestStatus.Completed && p.IssueRequestType == EnumIssueRequestType.Vision)
+ .ConfigureAwait(false);
+ foreach (var itm in list)
{
- injectionRequest.Worker = CurrentUser.GetUserName();
- injectionRequest.CreatorId = CurrentUser.Id;
- if (injectionRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName())
- {
- injectionRequest.Type = EnumTransSubType.Issue_Manual.ToString();
- }
-
- foreach (var detail in injectionRequest.Details)
- {
- var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
- CheckLocation(locationDto, detail.ToLocationCode);
-
- var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
- CheckItemBasic(itemBasicDto, detail.ItemCode);
-
- detail.ToLocationArea = locationDto.AreaCode;
- detail.ToLocationErpCode = locationDto.ErpLocationCode;
- detail.ToLocationGroup = locationDto.LocationGroupCode;
- detail.ToWarehouseCode = locationDto.WarehouseCode;
- detail.ItemDesc1 = itemBasicDto.Desc1;
- detail.ItemDesc2 = itemBasicDto.Desc2;
- detail.ItemName = itemBasicDto.Name;
- detail.Uom = itemBasicDto.BasicUom;
- detail.StdPackQty = itemBasicDto.StdPackQty;
- }
+ var query = from detail in itm.Details
+ join citm in p_list on new
+ {
+ detail.ItemCode, locCode = detail.ToLocationCode, areaCode = detail.PositionCode
+ } equals
+ new { citm.ItemCode, locCode = citm.LocCode, areaCode = citm.PositionCode }
+ select new UnCompletedRequestDto
+ {
+ ItemCode = detail.ItemCode, LocCode = detail.ToLocationCode, PositionCode = detail.PositionCode
+ };
+
+ returnList.AddRange(query.ToList());
}
- return dictionary;
- }
-
- ///
- /// 导入验证
- ///
- ///
- ///
- ///
- protected override async Task ValidateImportModelAsync(InjectionIssueRequestImportInput model,
- List validationRresult)
- {
- _ = new Dictionary();
- _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false);
- _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false);
- await CheckAreaAsync(model, validationRresult).ConfigureAwait(false);
- await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false);
+ return returnList;
}
- #endregion
-
#region 校验
- protected override async Task ValidateImportEntities(Dictionary dict)
- {
- foreach (var entity in dict.Keys)
- {
- var tranType = await TransactionTypeAclService
- .GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);
-
- Check.NotNull(tranType, "事务类型", "事务类型不存在");
-
- entity.AutoCompleteJob = tranType.AutoCompleteJob;
- entity.AutoSubmit = tranType.AutoSubmitRequest;
- entity.AutoAgree = tranType.AutoAgreeRequest;
- entity.AutoHandle = tranType.AutoHandleRequest;
- entity.DirectCreateNote = tranType.DirectCreateNote;
- }
-
- return await base.ValidateImportEntities(dict).ConfigureAwait(false);
- }
-
- protected async Task CheckAreaAsync(InjectionIssueRequestImportInput importInput,
- List validationRresult)
- {
- var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false);
- if (area == null)
- {
- validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" }));
- }
- }
-
- protected async Task CheckStoreRelationAsync(InjectionIssueRequestImportInput importInput,
- List validationRresult)
- {
- var itemStoreRelation = await _itemStoreRelationApp
- .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false);
- if (itemStoreRelation == null)
- {
- validationRresult.Add(new ValidationResult(
- $"物品代码{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" }));
- }
- }
-
private void CheckItemBasic(ItemBasicDTO itemBasicDto, string itemCode)
{
if (itemBasicDto == null)
@@ -306,78 +210,5 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase CheckItemBasicAsync(InjectionIssueRequestImportInput importInput,
- List validationRresult)
- {
- var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false);
- if (item == null)
- {
- validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" }));
- }
- else if (item.StdPackQty == 0)
- {
- validationRresult.Add(
- new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" }));
- }
-
- return item;
- }
-
- protected async Task CheckLocationAsync(InjectionIssueRequestImportInput importInput,
- List validationRresult)
- {
- var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false);
- if (location == null)
- {
- validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" }));
- }
-
- return location;
- }
-
- ///
- /// 获取已完成的叫料单数量
- ///
- ///
- [HttpGet("get-completed-injection-request-count")]
- public async Task GetCountAsync()
- {
- //枚举类型查不到改成SQL查询
- var query =await _repository.GetCountAsync(p => p.RequestStatus != EnumRequestStatus.Completed
- &&p.Type==nameof(EnumIssueType.Vision)).ConfigureAwait(false);
-
- return query;
- }
-
- ///
- /// 获取已完成的叫料单数量
- ///
- ///
- [HttpPost("get-uncompleted-request")]
- public async Task> GetUnCompletedRequestAsync(List p_list)
- {
- List returnList = new List();
- //枚举类型查不到改成SQL查询
- var list =await _repository.WithDetails().Where(p => p.RequestStatus != EnumRequestStatus.Completed && p.Type == nameof(EnumIssueType.Vision)).ToListAsync().ConfigureAwait(false);
- foreach (var itm in list)
- {
- var query = from detail in itm.Details join citm in p_list on new { detail.ItemCode, locCode= detail.ToLocationCode,areaCode=detail.PositionCode } equals
- new { citm.ItemCode, locCode= citm.LocCode,areaCode=citm.PositionCode }
- select new UnCompletedRequestDto { ItemCode = detail.ItemCode, LocCode = detail.ToLocationCode, PositionCode = detail.PositionCode } ;
-
- returnList.AddRange(query.ToList());
- }
- return returnList;
- }
-
-
-
-
-
-
-
-
-
-
#endregion
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAutoMapperProfile.cs
index b4a66ebf8..99eef2047 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAutoMapperProfile.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAutoMapperProfile.cs
@@ -25,7 +25,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap()
.IgnoreAuditedObjectProperties()
- .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString()))
.Ignore(x => x.UseOnTheWayLocation)
.Ignore(x => x.Details)
.Ignore(x => x.Remark)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJob.cs
index 44bcd96f8..819c4104e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJob.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJob.cs
@@ -1,47 +1,44 @@
-using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using System.Threading.Tasks;
using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Domain;
///
-/// 注塑发料任务
+/// 注塑发料任务
///
[Display(Name = "注塑发料任务")]
public class InjectionIssueJob : SfsJobAggregateRootBase
{
///
- /// 叫料请求类型
+ /// 叫料类型
///
- [IgnoreUpdate]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
- /// 生产线
+ /// 生产线
///
[IgnoreUpdate]
public string ProdLine { get; set; }
///
- /// 注塑要料单号
+ /// 注塑要料单号
///
[IgnoreUpdate]
public string InjectionIssueRequestNumber { get; set; }
///
- /// 使用在途库
+ /// 使用在途库
///
[Display(Name = "使用在途库")]
[IgnoreUpdate]
public bool UseOnTheWayLocation { get; set; }
///
- /// 任务明细
+ /// 任务明细
///
[IgnoreUpdate]
- public override List Details { get; set; } = new List();
-
-
+ public override List Details { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDetail.cs
index 436d8104e..21bbb00e8 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDetail.cs
@@ -1,8 +1,9 @@
using System;
-using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
+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.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Domain;
@@ -11,93 +12,105 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase
#region 库存基础信息
///
- /// 物品代码
+ /// 物品代码
///
+ [Display(Name = "物品代码")]
public string ItemCode { get; set; }
///
- /// 物品名称
+ /// 物品名称
///
+ [Display(Name = "物品名称")]
public string ItemName { get; set; }
///
- /// 物品描述1
+ /// 物品描述1
///
+ [Display(Name = "物品描述1")]
public string ItemDesc1 { get; set; }
///
- /// 物品描述2
+ /// 物品描述2
///
+ [Display(Name = "物品描述2")]
public string ItemDesc2 { get; set; }
///
- /// 标包数量
+ /// 标包数量
///
[Display(Name = "标包数量")]
[Column(TypeName = "decimal(18,6)")]
public decimal StdPackQty { get; set; }
///
- /// 库存状态
+ /// 库存状态
///
+ [Display(Name = "库存状态")]
public EnumInventoryStatus Status { get; set; }
///
- /// 计量单位
+ /// 计量单位
///
+ [Display(Name = "计量单位")]
public string Uom { get; set; }
+ ///
+ /// 发料方式
+ ///
+ [Display(Name = "发料方式")]
+ public EnumIssueType IssueType { get; set; }
+
#endregion
#region 请求信息
///
- /// 请求库位
+ /// 请求库位
///
public string RequestLocationCode { get; set; }
///
- /// 到库区
+ /// 到库区
///
public string RequestLocationArea { get; set; }
///
- /// 到库位组
+ /// 到库位组
///
public string RequestLocationGroup { get; set; }
///
- /// 到ERP库位
+ /// 到ERP库位
///
public string RequestLocationErpCode { get; set; }
///
- /// 到仓库
+ /// 到仓库
///
public string RequestWarehouseCode { get; set; }
///
- /// 在途库库位
+ /// 在途库库位
///
public string OnTheWayLocationCode { get; set; }
///
- /// 生产线
+ /// 生产线
///
public string ProdLine { get; set; }
///
- /// 位置码
+ /// 位置码
///
public string PositionCode { get; set; }
///
- /// 推荐的类型
+ /// 推荐的类型
///
public EnumRecommendType RecommendType { get; set; }
///
- /// 需求数量
+ /// 需求数量
///
public decimal RequestQty { get; set; }
@@ -106,67 +119,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase
#region 推荐来源
///
- /// 推荐来源托标签
+ /// 推荐来源托标签
///
public string RecommendFromContainerCode { get; set; }
///
- /// 推荐来源箱标签
+ /// 推荐来源箱标签
///
public string RecommendFromPackingCode { get; set; }
///
- /// 推荐来源批次供应商批次
+ /// 推荐来源批次供应商批次
///
public string RecommendFromSupplierBatch { get; set; }
///
- /// 推荐来源批次到货时间
+ /// 推荐来源批次到货时间
///
public DateTime RecommendFromArriveDate { get; set; }
///
- /// 推荐来源批次生产时间
+ /// 推荐来源批次生产时间
///
public DateTime RecommendFromProduceDate { get; set; }
///
- /// 推荐来源批次过期时间
+ /// 推荐来源批次过期时间
///
public DateTime RecommendFromExpireDate { get; set; }
///
- /// 推荐来源批次排序
+ /// 推荐来源批次排序
///
public string RecommendFromLot { get; set; }
///
- /// 推荐来源库位
+ /// 推荐来源库位
///
public string RecommendFromLocationCode { get; set; }
///
- /// 推荐来源库区
+ /// 推荐来源库区
///
public string RecommendFromLocationArea { get; set; }
///
- /// 推荐来源库位组
+ /// 推荐来源库位组
///
public string RecommendFromLocationGroup { get; set; }
///
- /// 推荐来源ERP库位
+ /// 推荐来源ERP库位
///
public string RecommendFromLocationErpCode { get; set; }
///
- /// 推荐来源仓库
+ /// 推荐来源仓库
///
public string RecommendFromWarehouseCode { get; set; }
///
- /// 推荐来源数量
+ /// 推荐来源数量
///
public decimal RecommendFromQty { get; set; }
@@ -175,67 +188,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase
#region 推荐目标
///
- /// 推荐目标托标签
+ /// 推荐目标托标签
///
public string RecommendToContainerCode { get; set; }
///
- /// 推荐目标箱标签
+ /// 推荐目标箱标签
///
public string RecommendToPackingCode { get; set; }
///
- /// 推荐目标批次供应商批次
+ /// 推荐目标批次供应商批次
///
public string RecommendToSupplierBatch { get; set; }
///
- /// 推荐目标批次到货时间
+ /// 推荐目标批次到货时间
///
public DateTime RecommendToArriveDate { get; set; }
///
- /// 推荐目标批次生产时间
+ /// 推荐目标批次生产时间
///
public DateTime RecommendToProduceDate { get; set; }
///
- /// 推荐目标批次过期时间
+ /// 推荐目标批次过期时间
///
public DateTime RecommendToExpireDate { get; set; }
///
- /// 推荐目标批次排序
+ /// 推荐目标批次排序
///
public string RecommendToLot { get; set; }
///
- /// 推荐目标库位
+ /// 推荐目标库位
///
public string RecommendToLocationCode { get; set; }
///
- /// 推荐目标库区
+ /// 推荐目标库区
///
public string RecommendToLocationArea { get; set; }
///
- /// 推荐目标库位组
+ /// 推荐目标库位组
///
public string RecommendToLocationGroup { get; set; }
///
- /// 推荐目标ERP库位
+ /// 推荐目标ERP库位
///
public string RecommendToLocationErpCode { get; set; }
///
- /// 推荐目标仓库
+ /// 推荐目标仓库
///
public string RecommendToWarehouseCode { get; set; }
///
- /// 推荐目标数量
+ /// 推荐目标数量
///
public decimal RecommendToQty { get; set; }
@@ -244,67 +257,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase
#region 库移来源
///
- /// 库移来源托标签
+ /// 库移来源托标签
///
public string TransferLibFromContainerCode { get; set; }
///
- /// 库移来源箱标签
+ /// 库移来源箱标签
///
public string TransferLibFromPackingCode { get; set; }
///
- /// 库移来源批次供应商批次
+ /// 库移来源批次供应商批次
///
public string TransferLibFromSupplierBatch { get; set; }
///
- /// 库移来源批次到货时间
+ /// 库移来源批次到货时间
///
public DateTime TransferLibFromArriveDate { get; set; }
///
- /// 库移来源批次生产时间
+ /// 库移来源批次生产时间
///
public DateTime TransferLibFromProduceDate { get; set; }
///
- /// 库移来源批次过期时间
+ /// 库移来源批次过期时间
///
public DateTime TransferLibFromExpireDate { get; set; }
///
- /// 库移来源批次排序
+ /// 库移来源批次排序
///
public string TransferLibFromLot { get; set; }
///
- /// 库移来源库位
+ /// 库移来源库位
///
public string TransferLibFromLocationCode { get; set; }
///
- /// 库移来源库区
+ /// 库移来源库区
///
public string TransferLibFromLocationArea { get; set; }
///
- /// 库移来源库位组
+ /// 库移来源库位组
///
public string TransferLibFromLocationGroup { get; set; }
///
- /// 库移来源ERP库位
+ /// 库移来源ERP库位
///
public string TransferLibFromLocationErpCode { get; set; }
///
- /// 库移来源仓库
+ /// 库移来源仓库
///
public string TransferLibFromWarehouseCode { get; set; }
///
- /// 库移来源数量
+ /// 库移来源数量
///
public decimal TransferLibFromQty { get; set; }
@@ -313,67 +326,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase
#region 库移目标
///
- /// 库移目标托标签
+ /// 库移目标托标签
///
public string TransferLibToContainerCode { get; set; }
///
- /// 库移目标箱标签
+ /// 库移目标箱标签
///
public string TransferLibToPackingCode { get; set; }
///
- /// 库移目标批次供应商批次
+ /// 库移目标批次供应商批次
///
public string TransferLibToSupplierBatch { get; set; }
///
- /// 库移目标批次到货时间
+ /// 库移目标批次到货时间
///
public DateTime TransferLibToArriveDate { get; set; }
///
- /// 库移目标批次生产时间
+ /// 库移目标批次生产时间
///
public DateTime TransferLibToProduceDate { get; set; }
///
- /// 库移目标批次过期时间
+ /// 库移目标批次过期时间
///
public DateTime TransferLibToExpireDate { get; set; }
///
- /// 库移目标批次排序
+ /// 库移目标批次排序
///
public string TransferLibToLot { get; set; }
///
- /// 库移目标库位
+ /// 库移目标库位
///
public string TransferLibToLocationCode { get; set; }
///
- /// 库移目标库区
+ /// 库移目标库区
///
public string TransferLibToLocationArea { get; set; }
///
- /// 库移目标库位组
+ /// 库移目标库位组
///
public string TransferLibToLocationGroup { get; set; }
///
- /// 库移目标ERP库位
+ /// 库移目标ERP库位
///
public string TransferLibToLocationErpCode { get; set; }
///
- /// 库移目标仓库
+ /// 库移目标仓库
///
public string TransferLibToWarehouseCode { get; set; }
///
- /// 库移目标数量
+ /// 库移目标数量
///
public decimal TransferLibToQty { get; set; }
@@ -382,67 +395,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase
#region 实际来源
///
- /// 实际目标托标签
+ /// 实际目标托标签
///
public string HandledFromContainerCode { get; set; }
///
- /// 实际箱标签
+ /// 实际箱标签
///
public string HandledFromPackingCode { get; set; }
///
- /// 实际批次供应商批次
+ /// 实际批次供应商批次
///
public string HandledFromSupplierBatch { get; set; }
///
- /// 实际批次到货时间
+ /// 实际批次到货时间
///
public DateTime HandledFromArriveDate { get; set; }
///
- /// 实际批次生产时间
+ /// 实际批次生产时间
///
public DateTime HandledFromProduceDate { get; set; }
///
- /// 实际批次过期时间
+ /// 实际批次过期时间
///
public DateTime HandledFromExpireDate { get; set; }
///
- /// 实际批次排序
+ /// 实际批次排序
///
public string HandledFromLot { get; set; }
///
- /// 实际库位
+ /// 实际库位
///
public string HandledFromLocationCode { get; set; }
///
- /// 实际库区
+ /// 实际库区
///
public string HandledFromLocationArea { get; set; }
///
- /// 实际库位组
+ /// 实际库位组
///
public string HandledFromLocationGroup { get; set; }
///
- /// 实际ERP库位
+ /// 实际ERP库位
///
public string HandledFromLocationErpCode { get; set; }
///
- /// 实际仓库
+ /// 实际仓库
///
public string HandledFromWarehouseCode { get; set; }
///
- /// 实际数量
+ /// 实际数量
///
public decimal HandledFromQty { get; set; }
@@ -451,67 +464,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase
#region 实际目标
///
- /// 实际目标托标签
+ /// 实际目标托标签
///
public string HandledToContainerCode { get; set; }
///
- /// 实际箱标签
+ /// 实际箱标签
///
public string HandledToPackingCode { get; set; }
///
- /// 实际批次供应商批次
+ /// 实际批次供应商批次
///
public string HandledToSupplierBatch { get; set; }
///
- /// 实际批次到货时间
+ /// 实际批次到货时间
///
public DateTime HandledToArriveDate { get; set; }
///
- /// 实际批次生产时间
+ /// 实际批次生产时间
///
public DateTime HandledToProduceDate { get; set; }
///
- /// 实际批次过期时间
+ /// 实际批次过期时间
///
public DateTime HandledToExpireDate { get; set; }
///
- /// 实际批次排序
+ /// 实际批次排序
///
public string HandledToLot { get; set; }
///
- /// 实际库位
+ /// 实际库位
///
public string HandledToLocationCode { get; set; }
///
- /// 实际库区
+ /// 实际库区
///
public string HandledToLocationArea { get; set; }
///
- /// 实际库位组
+ /// 实际库位组
///
public string HandledToLocationGroup { get; set; }
///
- /// 实际ERP库位
+ /// 实际ERP库位
///
public string HandledToLocationErpCode { get; set; }
///
- /// 实际仓库
+ /// 实际仓库
///
public string HandledToWarehouseCode { get; set; }
///
- /// 实际数量
+ /// 实际数量
///
public decimal HandledToQty { get; set; }
@@ -519,6 +532,6 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase
public void SetId(Guid id)
{
- this.Id = id;
+ Id = id;
}
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNote.cs
index 6f650d255..960879c43 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNote.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNote.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp;
using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Domain;
@@ -27,10 +28,10 @@ public class InjectionIssueNote : SfsStoreAggregateRootBase
- /// 叫料请求类型
+ /// 叫料类型
///
- [IgnoreUpdate]
- public string RequestType { get; set; }
+ [Display(Name = "叫料类型")]
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDetail.cs
index 2ebdcc003..cd266a08b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDetail.cs
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
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.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Domain;
@@ -47,6 +48,12 @@ public class InjectionIssueNoteDetail : SfsStoreDetailEntityBase
///
public string Uom { get; set; }
+ ///
+ /// 发料方式
+ ///
+ [Display(Name = "发料方式")]
+ public EnumIssueType IssueType { get; set; }
+
#endregion
#region 请求信息
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequest.cs
index fc8355c98..55a447a0f 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequest.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequest.cs
@@ -1,29 +1,29 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Domain;
///
-/// 注塑申请
+/// 注塑申请
///
public class InjectionIssueRequest : SfsStoreRequestAggregateRootBase
{
///
- /// 叫料类型
+ /// 叫料类型
///
[Display(Name = "叫料类型")]
- [IgnoreUpdate]
- public string Type { get; set; }
+ public EnumIssueRequestType IssueRequestType { get; set; }
///
- /// 使用在途库
+ /// 使用在途库
///
public bool UseOnTheWayLocation { get; set; }
///
- /// 明细列表
+ /// 明细列表
///
[IgnoreUpdate]
- public override List Details { get; set; } = new List();
+ public override List Details { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequestDetail.cs
index 843bdcb62..9dc2a536f 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequestDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequestDetail.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Domain;
@@ -7,96 +6,96 @@ using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Domain;
///
-/// 注塑叫料申请明细
+/// 注塑叫料申请明细
///
public class InjectionIssueRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasToLocation
{
#region 目标库位信息
///
- /// 目标库位
+ /// 目标库位
///
[Display(Name = "目标库位")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ToLocationCode { get; set; }
///
- /// 目标库区
+ /// 目标库区
///
[Display(Name = "目标库区")]
public string ToLocationArea { get; set; }
///
- /// 目标库位组
+ /// 目标库位组
///
[Display(Name = "目标库位组")]
public string ToLocationGroup { get; set; }
///
- /// 目标ERP储位
+ /// 目标ERP储位
///
[Display(Name = "目标ERP储位")]
public string ToLocationErpCode { get; set; }
///
- /// 目标仓库
+ /// 目标仓库
///
[Display(Name = "目标仓库")]
public string ToWarehouseCode { get; set; }
#endregion
-
+
///
- /// 生产线
+ /// 生产线
///
public string ProdLine { get; set; }
///
- /// 已发数量
+ /// 已发数量
///
public decimal IssuedQty { get; set; }
///
- /// 已收数量
+ /// 已收数量
///
public decimal ReceivedQty { get; set; }
///
- /// 明细状态
+ /// 明细状态
///
public EnumStatus Status { get; set; }
///
- /// 请求未发 还未发送的数量
+ /// 请求未发 还未发送的数量
///
[NotMapped]
public decimal ToBeIssuedQty => Qty - IssuedQty;
///
- /// 已发未收
+ /// 已发未收
///
[NotMapped]
public decimal ToBeReceivedQty => IssuedQty - ReceivedQty;
///
- /// 请求未收
+ /// 请求未收
///
[NotMapped]
public decimal NotFinishQty => Qty - ReceivedQty;
///
- /// 位置码
+ /// 位置码
///
public string PositionCode { get; set; }
///
- /// 推荐类型
+ /// 推荐类型
///
public EnumRecommendType RecommendType { get; set; }
///
- /// 需求箱数量
+ /// 需求箱数量
///
[Display(Name = "需求箱数量")]
public decimal BoxQty { get; set; }
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDbContextModelCreatingExtensions.cs
index 70a34bc6f..0a5feec23 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDbContextModelCreatingExtensions.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDbContextModelCreatingExtensions.cs
@@ -21,7 +21,6 @@ public static class InjectionIssueJobDbContextModelCreatingExtensions
//Configure Job base properties
b.ConfigureJob();
//Properties
- b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.InjectionIssueRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.JobType).HasConversion();
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDbContextModelCreatingExtensions.cs
index c6f35b84b..f36696af3 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDbContextModelCreatingExtensions.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDbContextModelCreatingExtensions.cs
@@ -20,7 +20,6 @@ public static class InjectionIssueNoteDbContextModelCreatingExtensions
//Properties
b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength);
- b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength);
//Relations
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/InjectionRequests/InjectionIssueRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/InjectionRequests/InjectionIssueRequestDbContextModelCreatingExtensions.cs
index 0e5261b27..ee878d764 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/InjectionRequests/InjectionIssueRequestDbContextModelCreatingExtensions.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/InjectionRequests/InjectionIssueRequestDbContextModelCreatingExtensions.cs
@@ -19,7 +19,6 @@ public static class InjectionIssueRequestDbContextModelCreatingExtensions
b.ConfigureSfsStoreBase();
//Properties
- b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
//Relations
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs
index a2e5c6569..ec7195320 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs
@@ -13,7 +13,6 @@ public partial class StoreEventAutoMapperProfile : Profile
{
CreateMap()
.ForMember(x => x.InjectionIssueRequestNumber, y => y.MapFrom(d => d.Number))
- .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type))
.Ignore(x => x.WarehouseCode)
.Ignore(x => x.UpStreamJobNumber)
.Ignore(x => x.JobType)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleIssueRequestEventHandler.cs
index 01990dc2b..fdb4e5d3f 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleIssueRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleIssueRequestEventHandler.cs
@@ -72,15 +72,15 @@ public class AssembleIssueRequestEventHandler
List assembleJobs = new EditableList();
- switch (entity.Type)
- {
- case nameof(EnumIssueType.BoxQty):
- assembleJobs = await CreateAssembleIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false);
- break;
- case nameof(EnumIssueType.Qty):
- assembleJobs = await CreateAssembleIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false);
- break;
- }
+ //switch (entity.Type)
+ //{
+ // case nameof(EnumIssueType.BoxQty):
+ // assembleJobs = await CreateAssembleIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false);
+ // break;
+ // case nameof(EnumIssueType.Qty):
+ // assembleJobs = await CreateAssembleIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false);
+ // break;
+ //}
if (assembleJobs.Any())
{
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueRequestEventHandler.cs
index aca5239a6..120155d66 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueRequestEventHandler.cs
@@ -74,15 +74,15 @@ public class CoatingIssueRequestEventHandler
List coatingIssueJobs = new EditableList();
- switch (entity.Type)
- {
- case nameof(EnumIssueType.BoxQty):
- coatingIssueJobs = await CreateCoatingIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false);
- break;
- case nameof(EnumIssueType.Qty):
- coatingIssueJobs = await CreateCoatingIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false);
- break;
- }
+ //switch (entity.Type)
+ //{
+ // case nameof(EnumIssueType.BoxQty):
+ // coatingIssueJobs = await CreateCoatingIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false);
+ // break;
+ // case nameof(EnumIssueType.Qty):
+ // coatingIssueJobs = await CreateCoatingIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false);
+ // break;
+ //}
if (coatingIssueJobs.Any())
{
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionIssueRequestEventHandler.cs
index 29927219a..8096320f7 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionIssueRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionIssueRequestEventHandler.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Castle.Components.DictionaryAdapter;
@@ -8,12 +7,10 @@ using Volo.Abp;
using Volo.Abp.EventBus;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
-using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
-using Win_in.Sfs.Wms.Store.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest;
@@ -72,15 +69,7 @@ public class InjectionIssueRequestEventHandler
List injectionJobs = new EditableList();
- switch (entity.Type)
- {
- case nameof(EnumIssueType.BoxQty):
- injectionJobs = await CreateInjectionIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false);
- break;
- case nameof(EnumIssueType.Qty):
- injectionJobs = await CreateInjectionIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false);
- break;
- }
+ injectionJobs = await CreateInjectionIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false);
if (injectionJobs.Any())
{
@@ -113,249 +102,6 @@ public class InjectionIssueRequestEventHandler
#region 私有
- #region 按数量叫料
-
- ///
- /// 创建注塑任务
- ///
- ///
- ///
- ///
- private async Task> CreateInjectionIssueJobWithQtyTypeAsync
- (InjectionIssueRequest injectionRequest)
- {
- var jobs = new List();
-
- var toLocationCodes = injectionRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList(); //所有发送库位的集合
- var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false); //所有库位的集合
-
- var injectionRequestDetails = injectionRequest.Details.Where(p => p.ToBeIssuedQty > 0); //所有还没发送物品的集合
- foreach (var injectionRequestDetail in injectionRequestDetails) //如果有还有剩余未叫料的数量 则创建新的任务
- {
- var toLocation =
- toLocations.FirstOrDefault(p => p.Code == injectionRequestDetail.ToLocationCode); //判断目标库位是否存在
- Check.NotNull(toLocation, "库位代码", $"库位 {injectionRequestDetail.ToLocationCode} 不存在");
-
- //创建详情
- var jobDetails =
- await CreateInjectionIssueJobDetailInputsWithQtyTypeAsync(injectionRequest, injectionRequestDetail,
- toLocation.LocationGroupCode).ConfigureAwait(false);
- if (!jobDetails.Any())
- {
- continue;
- }
-
- var fromLocationCode = jobDetails[0].RecommendFromLocationCode;
- var fromLocation = await _locationAppService.GetByCodeAsync(fromLocationCode).ConfigureAwait(false);
- var job = jobs.FirstOrDefault(p => p.WorkGroupCode == fromLocation?.WorkGroupCode);
- if (job == null || job.Details.Any(p => p.RecommendToLocationCode != injectionRequestDetail.ToLocationCode))
- {
- job = await BuildInjectionIssueJobCreateInputWithQtyTypeAsync(injectionRequest, fromLocation)
- .ConfigureAwait(false);
- jobs.Add(job);
- }
-
- job.Details.AddRange(jobDetails);
- if (injectionRequestDetail.ToBeIssuedQty < 0)
- {
- injectionRequestDetail.Status = EnumStatus.Close;
- }
- }
-
- jobs = jobs.Where(p => p.Details.Any()).ToList();
-
- var openRequestDetails =
- injectionRequest.Details.Where(p => p.Status != EnumStatus.Close).ToList();
-
- if (!openRequestDetails.Any())
- {
- return jobs;
- }
-
-
- var enableMultipleCreateInjectionIssueJob = await SettingManager
- .IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false);
- if (enableMultipleCreateInjectionIssueJob)
- {
- //injectionRequest.Partial();
- }
- else
- {
- var sb = new StringBuilder();
- foreach (var openRequestDetail in openRequestDetails)
- {
- sb.AppendLine(
- $"{openRequestDetail.ItemCode}请求数量 {openRequestDetail.Qty},可用库存数量 {openRequestDetail.IssuedQty}");
- }
-
- throw new UserFriendlyException($"{sb} 可用库存数量不足, 无法生成发料任务");
- }
-
- return jobs;
- }
-
- ///
- /// 构造注塑任务
- ///
- ///
- ///
- ///
- private async Task BuildInjectionIssueJobCreateInputWithQtyTypeAsync(
- InjectionIssueRequest injectionRequest,
- LocationDTO fromLocation)
- {
- InjectionIssueJobEditInput job;
- job = ObjectMapper.Map(injectionRequest);
- job.JobType = EnumJobType.IssueJob;
- job.JobStatus = EnumJobStatus.Open;
- job.WorkGroupCode = fromLocation.WorkGroupCode;
- job.WarehouseCode = fromLocation.WarehouseCode;
- job.Worker = injectionRequest.Worker;
- if (string.IsNullOrEmpty(job.Worker))
- {
- job.Worker = "admin";
- }
-
- job.InjectionIssueRequestNumber = injectionRequest.Number;
-
- await Task.CompletedTask.ConfigureAwait(false);
-
- return job;
- }
-
- ///
- /// 创建注塑任务明细
- ///
- ///
- ///
- ///
- ///
- ///
- private async Task> CreateInjectionIssueJobDetailInputsWithQtyTypeAsync(
- InjectionIssueRequest injectionRequest,
- InjectionIssueRequestDetail injectionRequestDetail, string toLocationGroupCode)
- {
- var jobDetails = new List();
-
- //获取推荐库存
- var productionLineDto = await _productionLineAppService
- .GetByLocationCodeAsync(injectionRequestDetail.ToLocationCode).ConfigureAwait(false);
- var productionLineItemDtos = await _productionLineItemAppService
- .GetByProductLineCodeAsync(productionLineDto.Code).ConfigureAwait(false);
- if (productionLineItemDtos == null)
- {
- throw new UserFriendlyException($"物品代码【{injectionRequestDetail.ItemCode}】没有对应的【生产线物品关系】");
- }
-
- var productionLineItemDto =
- productionLineItemDtos.FirstOrDefault(p => p.ItemCode == injectionRequestDetail.ItemCode);
- if (productionLineItemDto == null)
- {
- throw new UserFriendlyException(
- $"物品代码【{injectionRequestDetail.ItemCode}】在生产线【{productionLineDto.Code}】中没有对应的【生产线物品关系】");
- }
- var input = new RecommendBalanceRequestInput
- {
- ItemCode = injectionRequestDetail.ItemCode,
- Qty = injectionRequestDetail.ToBeIssuedQty,
- //LocationTypes = transactionType.OutLocationTypes, productionLineItemDto.RawLocationCodeListJson
- Statuses = new EditableList { EnumInventoryStatus.OK },
- Locations = JsonSerializer.Deserialize>(productionLineItemDto.RawLocationCodeListJson)
- };
-
- var recommendList = await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false);
- //没有推荐库存时 跳过此明细 不生成任务
- if (recommendList.Count != 0)
- {
- foreach (var recommend in recommendList)
- {
- //拿走需求量
- var detail =
- await BuildInjectionIssueJobDetailWithQtyTypeAsync(injectionRequestDetail, recommend,
- toLocationGroupCode)
- .ConfigureAwait(false);
-
- jobDetails.Add(detail);
-
- }
- }
-
- return jobDetails;
- }
-
- ///
- /// 构造注塑任务明细
- ///
- ///
- ///
- ///
- ///
- private async Task BuildInjectionIssueJobDetailWithQtyTypeAsync(
- InjectionIssueRequestDetail injectionRequestDetail, BalanceDTO balance, string toLocationGroupCode)
- {
- var detail = new InjectionIssueJobDetailInput();
- detail.RequestLocationCode = injectionRequestDetail.ToLocationCode;
- detail.RequestLocationGroup=injectionRequestDetail.ToLocationGroup;
- detail.RequestLocationArea = injectionRequestDetail.ToLocationArea;
- detail.RequestLocationErpCode = injectionRequestDetail.ToLocationErpCode;
- detail.RequestWarehouseCode=injectionRequestDetail.ToWarehouseCode;
-
- detail.PositionCode = injectionRequestDetail.PositionCode;
- detail.RecommendType = injectionRequestDetail.RecommendType;
- detail.ProdLine = injectionRequestDetail.ToLocationCode;
-
- detail.ItemCode = injectionRequestDetail.ItemCode;
- detail.ItemName=injectionRequestDetail.ItemName;
- detail.ItemDesc1=injectionRequestDetail.ItemDesc1;
- detail.ItemDesc2 = injectionRequestDetail.ItemDesc2;
- detail.StdPackQty = injectionRequestDetail.StdPackQty;
- detail.RequestQty= injectionRequestDetail.Qty;
-
- detail.Status = EnumInventoryStatus.OK;
- detail.Uom = balance.Uom;
-
- detail.RecommendFromPackingCode = balance.PackingCode;
- detail.RecommendFromContainerCode = balance.ContainerCode;
- detail.RecommendFromLot = balance.Lot;
-
- detail.RecommendFromQty = balance.Qty;
-
- detail.RecommendFromSupplierBatch = balance.SupplierBatch;
- detail.RecommendFromProduceDate = balance.ProduceDate;
- detail.RecommendFromExpireDate = balance.ExpireDate;
- detail.RecommendFromProduceDate = balance.ProduceDate;
- detail.RecommendFromArriveDate = balance.ArriveDate;
-
- detail.RecommendFromLocationArea = balance.LocationArea;
- detail.RecommendFromLocationCode = balance.LocationCode;
- detail.RecommendFromLocationErpCode = balance.LocationErpCode;
- detail.RecommendFromLocationGroup = balance.LocationGroup;
- detail.RecommendFromWarehouseCode = balance.WarehouseCode;
-
- detail.RecommendToPackingCode = balance.PackingCode;
- detail.RecommendToContainerCode = balance.ContainerCode;
- detail.RecommendToLot = balance.Lot;
-
- detail.RecommendToQty = balance.Qty;
-
- detail.RecommendToSupplierBatch = balance.SupplierBatch;
- detail.RecommendToProduceDate = balance.ProduceDate;
- detail.RecommendToExpireDate = balance.ExpireDate;
- detail.RecommendToProduceDate = balance.ProduceDate;
- detail.RecommendToArriveDate = balance.ArriveDate;
-
- detail.RecommendToLocationCode = injectionRequestDetail.ToLocationCode;
- detail.RecommendToLocationErpCode = injectionRequestDetail.ToLocationErpCode;
- detail.RecommendToLocationArea = injectionRequestDetail.ToLocationArea;
- detail.RecommendToWarehouseCode = injectionRequestDetail.ToWarehouseCode;
- detail.RecommendToLocationGroup = injectionRequestDetail.ToLocationGroup;
-
- await Task.CompletedTask.ConfigureAwait(false);
- return detail;
- }
-
- #endregion
-
#region 按箱叫料
///
@@ -410,7 +156,7 @@ public class InjectionIssueRequestEventHandler
.RawLocationCodeListJson)
};
var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false);
- usableList = usableList.Where(p => !useBalanceList.Contains(p.PackingCode) && p.Qty!=0).ToList();
+ usableList = usableList.Where(p => !useBalanceList.Contains(p.PackingCode) && p.Qty != 0).ToList();
if (usableList.Any())
{
for (var i = 0; i < sumBoxQty; i++)
@@ -420,7 +166,8 @@ public class InjectionIssueRequestEventHandler
usableList.Remove(firstUsable);
var injectionJobEditInput =
- await BuildInjectionIssueJobCreateInputWithBoxQtyTypeAsync(injectionRequest, inputDetailTemplate,
+ await BuildInjectionIssueJobCreateInputWithBoxQtyTypeAsync(injectionRequest,
+ inputDetailTemplate,
firstUsable)
.ConfigureAwait(false);
@@ -471,18 +218,18 @@ public class InjectionIssueRequestEventHandler
{
var detail = new InjectionIssueJobDetailInput();
detail.RequestLocationCode = injectionRequestDetail.ToLocationCode;
- detail.RequestLocationGroup=injectionRequestDetail.ToLocationGroup;
+ detail.RequestLocationGroup = injectionRequestDetail.ToLocationGroup;
detail.RequestLocationArea = injectionRequestDetail.ToLocationArea;
detail.RequestLocationErpCode = injectionRequestDetail.ToLocationErpCode;
- detail.RequestWarehouseCode=injectionRequestDetail.ToWarehouseCode;
+ detail.RequestWarehouseCode = injectionRequestDetail.ToWarehouseCode;
detail.PositionCode = injectionRequestDetail.PositionCode;
detail.RecommendType = injectionRequestDetail.RecommendType;
detail.ProdLine = injectionRequestDetail.ToLocationCode;
detail.ItemCode = injectionRequestDetail.ItemCode;
- detail.ItemName=injectionRequestDetail.ItemName;
- detail.ItemDesc1=injectionRequestDetail.ItemDesc1;
+ detail.ItemName = injectionRequestDetail.ItemName;
+ detail.ItemDesc1 = injectionRequestDetail.ItemDesc1;
detail.ItemDesc2 = injectionRequestDetail.ItemDesc2;
detail.StdPackQty = injectionRequestDetail.StdPackQty;
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/KittingIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/KittingIssueRequestEventHandler.cs
index 204731cca..34efc97f3 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/KittingIssueRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/KittingIssueRequestEventHandler.cs
@@ -72,15 +72,15 @@ public class KittingIssueRequestEventHandler
List kittingIssueJobs = new EditableList();
- switch (entity.Type)
- {
- case nameof(EnumIssueType.BoxQty):
- kittingIssueJobs = await CreateKittingIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false);
- break;
- case nameof(EnumIssueType.Qty):
- kittingIssueJobs = await CreateKittingIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false);
- break;
- }
+ //switch (entity.Type)
+ //{
+ // case nameof(EnumIssueType.BoxQty):
+ // kittingIssueJobs = await CreateKittingIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false);
+ // break;
+ // case nameof(EnumIssueType.Qty):
+ // kittingIssueJobs = await CreateKittingIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false);
+ // break;
+ //}
if (kittingIssueJobs.Any())
{