diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs
index d1e4744c5..1699a4705 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs
@@ -23,12 +23,6 @@ public class CountJobCreateRequestInput
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Description { get; set; }
- ///
- /// 盘点执行形式
- ///
- [Display(Name = "盘点执行形式")]
- public CountPlanRequestType RequestType { get; set; }
-
///
/// 类型
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanDTO.cs
index 94786e527..9e398755b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanDTO.cs
@@ -88,9 +88,5 @@ public class CountPlanDTO : SfsStoreRequestDTOBase
[Display(Name = "盘点的库存状态集合")]
public string JsonInventoryStatus { get; set; }
- ///
- /// 盘点的库存状态集合
- ///
- [Display(Name = "盘点的库存状态集合")]
- public CountPlanRequestType RequestType { get; set; }
+
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanForNoteExportDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanForNoteExportDTO.cs
index ff01cb52e..5299f9435 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanForNoteExportDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanForNoteExportDTO.cs
@@ -87,11 +87,6 @@ public class CountPlanForNoteExportDTO
[Display(Name = "盘点数量")]
public decimal FirstCountQty { get; set; }
- ///
- /// 盘点方式
- ///
- [Display(Name = "盘点方式")]
- public CountPlanRequestType RequestType { get; set; }
///
/// 库存状态
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanCreateRequestInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanCreateRequestInput.cs
index 7e9cab750..a681599cd 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanCreateRequestInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanCreateRequestInput.cs
@@ -48,13 +48,6 @@ public class CountPlanCreateRequestInput : SfsStoreRequestCreateOrUpdateInputBas
[Display(Name = "计划时间")]
public DateTime PlanTime { get; set; }
- ///
- /// 盘点方式
- ///
- [Display(Name = "盘点方式")]
- public CountPlanRequestType RequestType { get; set; }
-
-
///
/// 盘点次数
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanEditInput.cs
index 8a09a9185..7b809e0dc 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanEditInput.cs
@@ -76,11 +76,6 @@ public class CountPlanEditInput : SfsStoreRequestCreateOrUpdateInputBase, IHasNu
[Display(Name = "类型")]
public EnumCountType Type { get; set; }
- ///
- /// 盘点方式
- ///
- [Display(Name = "盘点方式")]
- public CountPlanRequestType RequestType { get; set; }
///
/// 盘点的零件集合
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs
index d6a62e406..e14b1c846 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs
@@ -131,10 +131,10 @@ public class CountNoteAppService :
private static void CheckCountPlanRequestType(CountPlanDTO countPlanDto)
{
- if (countPlanDto.RequestType != CountPlanRequestType.Import)
- {
- throw new UserFriendlyException("非Excel盘点执行方式不能使用导入");
- }
+ //if (countPlanDto.RequestType != CountPlanRequestType.Import)
+ //{
+ // throw new UserFriendlyException("非Excel盘点执行方式不能使用导入");
+ //}
}
private static void CheckCountPlanNumber(CountPlanDTO countPlanDto, string countPlanNumber)
@@ -196,10 +196,10 @@ public class CountNoteAppService :
if (countplan != null)
{
- if (countplan.RequestType != CountPlanRequestType.Import)
- {
- throw new UserFriendlyException("非Excel盘点执行方式不能使用导入");
- }
+ //if (countplan.RequestType != CountPlanRequestType.Import)
+ //{
+ // throw new UserFriendlyException("非Excel盘点执行方式不能使用导入");
+ //}
}
else
{
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs
index 2f2f67939..2abff99a5 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs
@@ -65,36 +65,42 @@ public class CountPlanAppService :
var entity = ObjectMapper.Map(input);
entity.Worker = CurrentUser.GetUserName();
-
- TransactionTypeDTO tranTypeDto = null;
- switch (input.RequestType)
+ TransactionTypeDTO tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan,
+ EnumTransSubType.None).ConfigureAwait(false);
+ if (tranTypeDto == null)
{
- case CountPlanRequestType.Manual:
- tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan,
- EnumTransSubType.ArtificialCountPlan).ConfigureAwait(false);
- if (tranTypeDto == null)
- {
- throw new UserFriendlyException(
- $"盘点方式 {input.RequestType} 没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," +
- $"子事务类型{EnumTransSubType.ArtificialCountPlan}");
- }
-
- break;
- case CountPlanRequestType.Import:
- tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan,
- EnumTransSubType.ExcelInCountPlan).ConfigureAwait(false);
- if (tranTypeDto == null)
- {
- throw new UserFriendlyException(
- $"盘点方式 {input.RequestType} 没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," +
- $"子事务类型{EnumTransSubType.ExcelInCountPlan}");
- }
-
- break;
- case CountPlanRequestType.None:
- default:
- throw new UserFriendlyException($"{input.RequestType}盘点方式设置错误");
+ throw new UserFriendlyException(
+ $"没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," +
+ $"子事务类型{EnumTransSubType.None}");
}
+ //switch (input.RequestType)
+ //{
+ // case CountPlanRequestType.Manual:
+ // tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan,
+ // EnumTransSubType.ArtificialCountPlan).ConfigureAwait(false);
+ // if (tranTypeDto == null)
+ // {
+ // throw new UserFriendlyException(
+ // $"盘点方式 {input.RequestType} 没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," +
+ // $"子事务类型{EnumTransSubType.ArtificialCountPlan}");
+ // }
+
+ // break;
+ // case CountPlanRequestType.Import:
+ // tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan,
+ // EnumTransSubType.ExcelInCountPlan).ConfigureAwait(false);
+ // if (tranTypeDto == null)
+ // {
+ // throw new UserFriendlyException(
+ // $"盘点方式 {input.RequestType} 没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," +
+ // $"子事务类型{EnumTransSubType.ExcelInCountPlan}");
+ // }
+
+ // break;
+ // case CountPlanRequestType.None:
+ // default:
+ // throw new UserFriendlyException($"{input.RequestType}盘点方式设置错误");
+ //}
entity.AutoCompleteJob = tranTypeDto.AutoCompleteJob;
entity.AutoSubmit = tranTypeDto.AutoSubmitRequest;
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CountNotes/CountNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CountNotes/CountNoteManager.cs
index 6443cadce..427684168 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CountNotes/CountNoteManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CountNotes/CountNoteManager.cs
@@ -95,12 +95,12 @@ public class CountNoteManager : SfsStoreManagerBase,
//变更盘点计划为完成
var countPlan = await _countPlanRepository.GetAsync(p => p.Number == entity.CountPlanNumber).ConfigureAwait(false);
- if (countPlan.RequestType == CountPlanRequestType.Import)
- {
- countPlan.RequestStatus = EnumRequestStatus.Completed;
- countPlan.EndTime = DateTime.Now;
- await _countPlanRepository.UpdateAsync(countPlan).ConfigureAwait(false);
- }
+ //if (countPlan.RequestType == CountPlanRequestType.Import)
+ //{
+ // countPlan.RequestStatus = EnumRequestStatus.Completed;
+ // countPlan.EndTime = DateTime.Now;
+ // await _countPlanRepository.UpdateAsync(countPlan).ConfigureAwait(false);
+ //}
}
private async Task ThawBalancesAsync(CountNote entity)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlan.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlan.cs
index 186624026..e707eccec 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlan.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlan.cs
@@ -29,11 +29,6 @@ public class CountPlan : SfsStoreRequestAggregateRootBase
///
public int InventoryStage { get; set; }
- ///
- /// 盘点执行形式
- ///
- public CountPlanRequestType RequestType { get; set; }
-
///
/// 盘点方式
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/CountPlans/CountPlanDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/CountPlans/CountPlanDbContextModelCreatingExtensions.cs
index 6df93d090..82e8438c9 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/CountPlans/CountPlanDbContextModelCreatingExtensions.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/CountPlans/CountPlanDbContextModelCreatingExtensions.cs
@@ -21,7 +21,6 @@ public static class CountPlanDbContextModelCreatingExtensions
//Properties
b.Property(q => q.Type).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
b.Property(q => q.Stage).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
- b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
b.Property(q => q.CountMethod).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
b.Property(q => q.InventoryMode).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
b.Property(q => q.RequestStatus).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs
index 85a6bb112..023366466 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs
@@ -45,7 +45,6 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.AutoHandle)
.Ignore(x => x.AutoCompleteJob)
.Ignore(x => x.DirectCreateNote)
- .Ignore(x => x.RequestType)
.Ignore(x => x.ActiveDate)
.Ignore(x => x.BeginTime)
.Ignore(x => x.EndTime)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs
index ab4562f87..a453c0ef9 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs
@@ -37,21 +37,7 @@ public class CountPlanEventHandler
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData)
{
var entity = eventData.Entity;
-
- switch (entity.RequestType)
- {
- case CountPlanRequestType.Import:
- //冻结库存
- await FreezeBalancesAsync(entity).ConfigureAwait(false);
- break;
- case CountPlanRequestType.Manual:
- //冻结库存
- await FreezeBalancesAsync(entity).ConfigureAwait(false);
- break;
- case CountPlanRequestType.None:
- default:
- throw new UserFriendlyException("盘点执行方式错误");
- }
+ await FreezeBalancesAsync(entity).ConfigureAwait(false);
}
///