Browse Source

新增 底盘 kitting组

dev_DY_CC
郑勃旭 1 year ago
parent
commit
066f54b723
  1. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Chassis/IChassisAppService.cs
  2. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/DTOs/ChassisOperationSequenceDTO.cs
  3. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs
  4. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceEditInput.cs
  5. 11
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceImportInput.cs
  6. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteChassisDetailDTO.cs
  7. 50
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDTO.cs
  8. 58
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDependentDetailDTO.cs
  9. 52
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDetailDTO.cs
  10. 27
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteChassisDetailInput.cs
  11. 88
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteCreateRequestInput.cs
  12. 52
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteDetailInput.cs
  13. 74
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteEditInput.cs
  14. 26
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteImportInput.cs
  15. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs
  16. 39
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Chassis/ChassisAppService.cs
  17. 34
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs
  18. 22
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs
  19. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ChassisOperationSequence/ChassisOperationSequence.cs
  20. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNote.cs
  21. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteChassisDetail.cs
  22. 10
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteDetail.cs
  23. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs
  24. 31896
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422030203_Added_KittingPackagingNote.Designer.cs
  25. 958
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422030203_Added_KittingPackagingNote.cs
  26. 32112
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422032715_Added_KittingPackagingNoteV2.Designer.cs
  27. 137
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422032715_Added_KittingPackagingNoteV2.cs
  28. 1979
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs
  29. 30
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/KittingPackagingNotes/KittingPackagingNoteDbContextModelCreatingExtensions.cs
  30. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContext.cs
  31. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs
  32. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs

9
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Chassis/IChassisAppService.cs

@ -1,3 +1,6 @@
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -9,4 +12,10 @@ public interface IChassisAppService
ISfsCheckStatusAppService ISfsCheckStatusAppService
, ISfsUpsertAppService<ChassisEditInput> , ISfsUpsertAppService<ChassisEditInput>
{ {
/// <summary>
/// 平板或手持使用 按照底盘返回排序大于参数中20个的
/// </summary>
/// <returns></returns>
Task<PagedResultDto<ChassisDTO>> GetListWithNextCountAsync(long sortNumber,int count,
CancellationToken cancellationToken = default);
} }

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/DTOs/ChassisOperationSequenceDTO.cs

@ -1,8 +1,8 @@
using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
/// <summary> /// <summary>
/// 底盘执行位置序列 /// 底盘执行位置序列
/// </summary> /// </summary>
@ -10,10 +10,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ChassisOperationSequenceDTO : SfsBasicDTOBase public class ChassisOperationSequenceDTO : SfsBasicDTOBase
{ {
/// <summary> /// <summary>
/// kitting执行序列号 /// Kitting执行底盘序列位置
/// </summary> /// </summary>
[Display(Name = "kitting执行序列号")] [Display(Name = "Kitting执行底盘序列位置")]
public string KittingNumber { get; set; } public long ChassisSortNumber { get; set; }
/// <summary> /// <summary>
/// kitting代码 /// kitting代码

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs

@ -1,3 +1,4 @@
using System.Threading.Tasks;
using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -9,4 +10,11 @@ public interface IChassisOperationSequenceAppService
ISfsCheckStatusAppService ISfsCheckStatusAppService
, ISfsUpsertAppService<ChassisOperationSequenceEditInput> , ISfsUpsertAppService<ChassisOperationSequenceEditInput>
{ {
/// <summary>
/// 修改底盘执行序列位置 根据 KitingCode
/// </summary>
/// <param name="kittingCode"></param>
/// <param name="newChassisSortNumber"></param>
/// <returns></returns>
Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber);
} }

7
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceEditInput.cs

@ -1,4 +1,3 @@
using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -11,10 +10,10 @@ public class ChassisOperationSequenceEditInput
: SfsStoreCreateOrUpdateInputBase : SfsStoreCreateOrUpdateInputBase
{ {
/// <summary> /// <summary>
/// kitting执行序列号 /// Kitting执行底盘序列位置
/// </summary> /// </summary>
[Display(Name = "kitting执行序列号")] [Display(Name = "Kitting执行底盘序列位置")]
public string KittingNumber { get; set; } public long ChassisSortNumber { get; set; }
/// <summary> /// <summary>
/// kitting代码 /// kitting代码

11
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/Inputs/ChassisOperationSequenceImportInput.cs

@ -1,9 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Application.Contracts.ExportAndImport;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -14,10 +9,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ChassisOperationSequenceImportInput : SfsStoreImportInputBase public class ChassisOperationSequenceImportInput : SfsStoreImportInputBase
{ {
/// <summary> /// <summary>
/// kitting执行序列号 /// Kitting执行底盘序列位置
/// </summary> /// </summary>
[Display(Name = "kitting执行序列号")] [Display(Name = "Kitting执行底盘序列位置")]
public string KittingNumber { get; set; } public long ChassisSortNumber { get; set; }
/// <summary> /// <summary>
/// kitting代码 /// kitting代码

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteChassisDetailDTO.cs

@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteChassisDetailDTO : SfsStoreDetailDTOBase
{
/// <summary>
/// 底盘号
/// </summary>
[Display(Name = "底盘号")]
public string ChassisNumber { get; set; }
/// <summary>
/// Kitting代码
/// </summary>
[Display(Name = "Kitting代码")]
public string KittingCode { get; set; }
/// <summary>
/// 底盘号排序序列
/// </summary>
[Display(Name = "底盘号排序序列")]
public long ChassisSortNumber { get; set; }
}

50
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDTO.cs

@ -8,54 +8,16 @@ using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
[Display(Name = "盘点任务")] [Display(Name = "盘点任务")]
public class KittingPackagingNoteDTO : SfsJobDTOBase<KittingPackagingNoteDetailDTO> public class KittingPackagingNoteDTO : SfsStoreDTOBase<KittingPackagingNoteDetailDTO>
{ {
/// <summary>
/// 生产计划号
/// </summary>
[Display(Name = "盘点计划号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string CountPlanNumber { get; set; }
/// <summary>
/// 盘点阶段
/// </summary>
[Display(Name = "盘点阶段")]
public EnumCountStage CountStage { get; set; }
/// <summary>
/// 盘点方式
/// </summary>
[Display(Name = "盘点方式")]
public EnumCountMethod CountMethod { get; set; }
/// <summary>
/// 类型
/// </summary>
[Display(Name = "盘点类型")]
public EnumCountType Type { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string Description { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[Display(Name = "物料代码")]
public string ItemCode { get; set; }
/// <summary> /// <summary>
/// 库位代码 /// kitting代码
/// </summary> /// </summary>
[Display(Name = "库位代码")] [Display(Name = "Kitting代码")]
public string LocationCode { get; set; } public string KittingCode { get; set; }
/// <summary> /// <summary>
/// 任务从表明细(记录每次扫得明细 /// 明细(记录每次扫的位置)
/// </summary> /// </summary>
public List<KittingPackagingNoteDependentDetailDTO> DepDetails { get; set; } public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new();
} }

58
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDependentDetailDTO.cs

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

52
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/DTOs/KittingPackagingNoteDetailDTO.cs

@ -4,55 +4,41 @@ using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteDetailDTO : SfsJobDetailDTOBase, IHasCountResult public class KittingPackagingNoteDetailDTO : SfsStoreDetailDTOBase
{ {
/// <summary>
/// 盘点标签
/// </summary>
[Display(Name = "盘点标签")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string CountLabel { get; set; }
/// <summary>
/// 计量单位
/// </summary>
[Display(Name = "计量单位")]
public string Uom { get; set; }
/// <summary> /// <summary>
/// 库存数量 /// 物品代码
/// </summary> /// </summary>
[Display(Name = "库存数量")] [Display(Name = "物品代码")]
public decimal InventoryQty { get; set; } public string ItemCode { get; set; }
/// <summary> /// <summary>
/// 库存库位 /// 物品名称
/// </summary> /// </summary>
[Display(Name = "库存库位")] [Display(Name = "物品名称")]
public string InventoryLocationCode { get; set; } public string ItemName { get; set; }
/// <summary> /// <summary>
/// 盘点数量 /// 物品描述1
/// </summary> /// </summary>
[Display(Name = "盘点数量")] [Display(Name = "物品描述1")]
public decimal CountQty { get; set; } public string ItemDesc1 { get; set; }
/// <summary> /// <summary>
/// 盘点时间 /// 物品描述2
/// </summary> /// </summary>
[Display(Name = "盘点时间")] [Display(Name = "物品描述2")]
public DateTime? CountTime { get; set; } public string ItemDesc2 { get; set; }
/// <summary> /// <summary>
/// 盘点操作员 /// 数量
/// </summary> /// </summary>
[Display(Name = "盘点操作员")] [Display(Name = "数量")]
public string CountOperator { get; set; } public decimal Qty { get; set; }
/// <summary> /// <summary>
/// 盘点描述 /// Kitting代码
/// </summary> /// </summary>
[Display(Name = "盘点描述")] [Display(Name = "Kitting代码")]
public string CountDescription { get; set; } public string KittingCode { get; set; }
} }

27
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteChassisDetailInput.cs

@ -0,0 +1,27 @@
using System;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteChassisDetailInput : SfsDetailInputBase
{
/// <summary>
/// 底盘号
/// </summary>
[Display(Name = "底盘号")]
public string ChassisNumber { get; set; }
/// <summary>
/// Kitting代码
/// </summary>
[Display(Name = "Kitting代码")]
public string KittingCode { get; set; }
/// <summary>
/// 底盘号排序序列
/// </summary>
[Display(Name = "底盘号排序序列")]
public long ChassisSortNumber { get; set; }
}

88
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteCreateRequestInput.cs

@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@ -11,91 +12,18 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteCreateRequestInput public class KittingPackagingNoteCreateRequestInput
{ {
/// <summary> /// <summary>
/// 盘点方式 /// kitting代码
/// </summary> /// </summary>
[Display(Name = "盘点方式")] [Display(Name = "Kitting代码")]
public EnumCountMethod CountMethod { get; set; } public string KittingCode { get; set; }
/// <summary> /// <summary>
/// 描述 /// 明细(记录打包的明细)
/// </summary> /// </summary>
[Display(Name = "描述")] public List<KittingPackagingNoteDetail> Details { get; set; } = new();
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Description { get; set; }
/// <summary> /// <summary>
/// 盘点执行形式 /// 明细(记录每次扫的位置)
/// </summary> /// </summary>
[Display(Name = "盘点执行形式")] public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new();
public CountPlanRequestType RequestType { get; set; }
/// <summary>
/// 类型
/// </summary>
[Display(Name = "盘点类型")]
public EnumCountType Type { get; set; }
/// <summary>
/// 零件条件集合
/// </summary>
[Display(Name = "零件条件集合")]
public List<string> PartCondition { get; set; } = new();
/// <summary>
/// 库位条件集合
/// </summary>
[Display(Name = "库位条件集合")]
public List<string> LocCondition { get; set; } = new();
/// <summary>
/// 状态
/// </summary>
[Display(Name = "状态")]
public List<EnumInventoryStatus> StatusList { get; set; }
/// <summary>
/// 操作员
/// </summary>
[Display(Name = "操作员")]
//[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Worker { get; set; }
/// <summary>
/// 仓库
/// </summary>
[Display(Name = "仓库")]
//[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string WarehouseCode { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
public string Remark { get; set; }
/// <summary>
/// 盘点阶段
/// </summary>
[Display(Name = "盘点阶段")]
public EnumCountStage CountStage { get; set; } = EnumCountStage.Circulate;
/// <summary>
/// 盘点的零件集合
/// </summary>
[Display(Name = "盘点的零件集合")]
public string JsonItemCodes { get; set; }
/// <summary>
/// 盘点的库位集合
/// </summary>
[Display(Name = "盘点的库位集合")]
public string JsonLocationCodes { get; set; }
/// <summary>
/// 盘点的库存状态集合
/// </summary>
[Display(Name = "盘点的库存状态集合")]
public string JsonInventoryStatus { get; set; }
} }

52
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteDetailInput.cs

@ -4,55 +4,41 @@ using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteDetailInput : SfsJobDetailInputBase, IHasCountResult public class KittingPackagingNoteDetailInput : SfsStoreDetailInputBase
{ {
/// <summary>
/// 盘点标签
/// </summary>
[Display(Name = "盘点标签")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string CountLabel { get; set; }
/// <summary>
/// 计量单位
/// </summary>
[Display(Name = "计量单位")]
public string Uom { get; set; }
/// <summary> /// <summary>
/// 库存数量 /// 物品代码
/// </summary> /// </summary>
[Display(Name = "库存数量")] [Display(Name = "物品代码")]
public decimal InventoryQty { get; set; } public string ItemCode { get; set; }
/// <summary> /// <summary>
/// 库存库位 /// 物品名称
/// </summary> /// </summary>
[Display(Name = "库存库位")] [Display(Name = "物品名称")]
public string InventoryLocationCode { get; set; } public string ItemName { get; set; }
/// <summary> /// <summary>
/// 盘点数量 /// 物品描述1
/// </summary> /// </summary>
[Display(Name = "盘点数量")] [Display(Name = "物品描述1")]
public decimal CountQty { get; set; } public string ItemDesc1 { get; set; }
/// <summary> /// <summary>
/// 盘点时间 /// 物品描述2
/// </summary> /// </summary>
[Display(Name = "盘点时间")] [Display(Name = "物品描述2")]
public DateTime? CountTime { get; set; } public string ItemDesc2 { get; set; }
/// <summary> /// <summary>
/// 盘点操作员 /// 数量
/// </summary> /// </summary>
[Display(Name = "盘点操作员")] [Display(Name = "数量")]
public string CountOperator { get; set; } public decimal Qty { get; set; }
/// <summary> /// <summary>
/// 盘点描述 /// Kitting代码
/// </summary> /// </summary>
[Display(Name = "盘点描述")] [Display(Name = "Kitting代码")]
public string CountDescription { get; set; } public string KittingCode { get; set; }
} }

74
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteEditInput.cs

@ -2,81 +2,25 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput<KittingPackagingNoteDetailInput> public class KittingPackagingNoteEditInput : SfsStoreCreateOrUpdateInputBase
{ {
#region Base
/// <summary> /// <summary>
/// 盘点方式 /// kitting代码
/// </summary> /// </summary>
[Display(Name = "盘点方式")] [Display(Name = "Kitting代码")]
public EnumCountMethod CountMethod { get; set; } public string KittingCode { get; set; }
/// <summary>
/// 类型
/// </summary>
[Display(Name = "盘点类型")]
public EnumCountType Type { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string Description { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[Display(Name = "物料代码")]
public string ItemCode { get; set; }
/// <summary>
/// 库位代码
/// </summary>
[Display(Name = "库位代码")]
public string LocationCode { get; set; }
#endregion
#region Create
/// <summary>
/// 上游任务编号
/// </summary>
[Display(Name = "上游任务编号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string UpStreamJobNumber { get; set; }
/// <summary>
/// 盘点计划号
/// </summary>
[Display(Name = "盘点计划号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string CountPlanNumber { get; set; }
/// <summary>
/// 盘点阶段
/// </summary>
[Display(Name = "盘点阶段")]
public EnumCountStage CountStage { get; set; }
/// <summary>
/// 任务类型
/// </summary>
[Display(Name = "任务类型")]
public EnumJobType JobType { get; set; }
/// <summary> /// <summary>
/// 是否自动完成 /// 明细(记录打包的明细)
/// </summary> /// </summary>
[Display(Name = "是否自动完成")] public List<KittingPackagingNoteDetailInput> Details { get; set; } = new();
public bool IsAutoComplete { get; set; }
/// <summary> /// <summary>
/// 任务明细 /// 明细(记录每次扫的位置)
/// </summary> /// </summary>
[Display(Name = "任务明细")] public List<KittingPackagingNoteChassisDetailInput> DepDetails { get; set; } = new();
public List<KittingPackagingNoteDetailInput> Details { get; set; }
#endregion
} }

26
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/KittingPackagingNotes/Inputs/KittingPackagingNoteImportInput.cs

@ -1,32 +1,24 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class KittingPackagingNoteImportInput : SfsStoreImportInputBase public class KittingPackagingNoteImportInput : SfsStoreImportInputBase
{ {
/// <summary>
/// 盘点任务单号
/// </summary>
[Display(Name = "盘点任务单号")]
public string CountJobNumber { get; set; }
/// <summary> /// <summary>
/// 盘点计划单号 /// kitting代码
/// </summary> /// </summary>
[Display(Name = "盘点计划单号")] [Display(Name = "Kitting代码")]
public string CountPlanNumber { get; set; } public string KittingCode { get; set; }
/// <summary> /// <summary>
/// 调整类型 /// 明细(记录打包的明细)
/// </summary> /// </summary>
[Display(Name = "调整类型")] public List<KittingPackagingNoteDetail> Details { get; set; } = new();
public string Type { get; set; }
/// <summary> /// <summary>
/// 是否已经调整 /// 明细(记录每次扫的位置)
/// </summary> /// </summary>
[Display(Name = "是否已经调整")] public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new();
[Required(ErrorMessage = "{0}是必填项")]
public bool IsAdjusted { get; set; } = false;
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs

@ -98,6 +98,8 @@ public class StorePermissionDefinitionProvider : PermissionDefinitionProvider
storeGroup.AddChassisPermission(); storeGroup.AddChassisPermission();
storeGroup.AddChassisOperationSequencePermission(); storeGroup.AddChassisOperationSequencePermission();
storeGroup.AddKittingPackagingNotePermission();
#region Jobs #region Jobs
storeGroup.AddPurchaseReceiptJobPermission(); storeGroup.AddPurchaseReceiptJobPermission();

39
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Chassis/ChassisAppService.cs

@ -1,25 +1,15 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Castle.Components.DictionaryAdapter;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities; using Win_in.Sfs.Shared.Domain;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Equipments.DTOs;
using Win_in.Sfs.Shared.Application;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Store.Application.Contracts; using Win_in.Sfs.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared; using Win_in.Sfs.Wms.Store.Domain.Shared;
using Win_in.Sfs.Wms.Store.Equipments;
namespace Win_in.Sfs.Wms.Store.Application; namespace Win_in.Sfs.Wms.Store.Application;
@ -45,6 +35,7 @@ public class ChassisAppService
_repository = repository; _repository = repository;
_manager = manager; _manager = manager;
} }
#region 无用 #region 无用
[NonAction] [NonAction]
@ -83,5 +74,31 @@ public class ChassisAppService
throw new NotImplementedException(); throw new NotImplementedException();
} }
/// <summary>
/// 平板或手持使用 按照底盘返回排序大于参数中20个的
/// </summary>
/// <returns></returns>
public async Task<PagedResultDto<ChassisDTO>> GetListWithNextCountAsync(long sortNumber,int count,
CancellationToken cancellationToken = default)
{
var requestInput = new SfsStoreRequestInputBase
{
MaxResultCount = count,
SkipCount = 0,
Sorting = $"{nameof(Chassis.SortNumber)} DESC",
Condition = new Condition
{
Filters = new List<Filter> { new(nameof(Chassis.SortNumber), sortNumber.ToString(), ">=") }
}
};
var expression = requestInput.Condition.Filters?.Count > 0
? requestInput.Condition.Filters.ToLambda<Chassis>()
: p => true;
return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount,
requestInput.Sorting, false, cancellationToken).ConfigureAwait(false);
}
#endregion #endregion
} }

34
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs

@ -1,32 +1,20 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Castle.Components.DictionaryAdapter;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; 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.Equipments.DTOs;
using Win_in.Sfs.Shared.Application;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Store.Application.Contracts; using Win_in.Sfs.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared; using Win_in.Sfs.Wms.Store.Domain.Shared;
using Win_in.Sfs.Wms.Store.Equipments;
namespace Win_in.Sfs.Wms.Store.Application; namespace Win_in.Sfs.Wms.Store.Application;
[Authorize] [Authorize]
[Route($"{StoreConsts.RootPath}ChassisOperationSequence")] [Route($"{StoreConsts.RootPath}ChassisOperationSequence")]
public class ChassisOperationSequenceAppService public class ChassisOperationSequenceAppService
: SfsStoreAppServiceBase<Domain.ChassisOperationSequence, ChassisOperationSequenceDTO, SfsStoreRequestInputBase, ChassisOperationSequenceEditInput, : SfsStoreAppServiceBase<ChassisOperationSequence, ChassisOperationSequenceDTO, SfsStoreRequestInputBase,
ChassisOperationSequenceEditInput,
ExchangeDataImportInput> ExchangeDataImportInput>
, IChassisOperationSequenceAppService , IChassisOperationSequenceAppService
@ -45,6 +33,24 @@ public class ChassisOperationSequenceAppService
_repository = repository; _repository = repository;
_manager = manager; _manager = manager;
} }
/// <summary>
/// 修改底盘执行序列位置 根据 KitingCode
/// </summary>
/// <param name="kittingCode"></param>
/// <param name="newChassisSortNumber"></param>
/// <returns></returns>
[HttpPost("update-chassis-sort-number-by-kitting-code")]
public async Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber)
{
var chassisOperationSequence =
await _repository.FindAsync(p => p.KittingCode == kittingCode).ConfigureAwait(false);
chassisOperationSequence.ChassisSortNumber = newChassisSortNumber;
await _repository.UpdateAsync(chassisOperationSequence).ConfigureAwait(false);
}
#region 无用 #region 无用
[NonAction] [NonAction]

22
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs

@ -1,3 +1,5 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -7,7 +9,7 @@ using Win_in.Sfs.Wms.Store.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application; namespace Win_in.Sfs.Wms.Store.Application;
/// <summary> /// <summary>
/// 盘点接口 /// kitting打包记录
/// </summary> /// </summary>
[Authorize] [Authorize]
[Route($"{StoreConsts.RootPath}KittingPackagingNote")] [Route($"{StoreConsts.RootPath}KittingPackagingNote")]
@ -22,13 +24,21 @@ public class KittingPackagingNoteAppService
SfsStoreRequestInputBase, SfsStoreRequestInputBase,
KittingPackagingNoteImportInput>, IKittingPackagingNoteAppService KittingPackagingNoteImportInput>, IKittingPackagingNoteAppService
{ {
private readonly IKittingPackagingNoteManager _kittingPackagingNoteManager; private readonly IChassisOperationSequenceAppService _chassisOperationSequenceAppService;
public KittingPackagingNoteAppService( public KittingPackagingNoteAppService(
IKittingPackagingNoteRepository repository, IKittingPackagingNoteRepository repository, IChassisOperationSequenceAppService chassisOperationSequenceAppService) : base(repository)
IJisProductReceiptNoteManager KittingPackagingNoteManager,
IKittingPackagingNoteManager kittingPackagingNoteManager) : base(repository)
{ {
_kittingPackagingNoteManager = kittingPackagingNoteManager; _chassisOperationSequenceAppService = chassisOperationSequenceAppService;
}
[HttpPost("")]
public override async Task<KittingPackagingNoteDTO> CreateAsync(KittingPackagingNoteEditInput input)
{
var sortNumber=input.DepDetails.Max(p => p.ChassisSortNumber);
await _chassisOperationSequenceAppService.UpdateChassisSortNumberByKittingCodeAsync(input.KittingCode,sortNumber).ConfigureAwait(false);
return await base.CreateAsync(input).ConfigureAwait(false);
} }
} }

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ChassisOperationSequence/ChassisOperationSequence.cs

@ -10,10 +10,10 @@ namespace Win_in.Sfs.Wms.Store.Domain;
public class ChassisOperationSequence : SfsAggregateRootBase public class ChassisOperationSequence : SfsAggregateRootBase
{ {
/// <summary> /// <summary>
/// kitting执行序列号 /// Kitting执行底盘序列位置
/// </summary> /// </summary>
[Display(Name = "kitting执行序列号")] [Display(Name = "Kitting执行底盘序列位置")]
public string KittingNumber { get; set; } public long ChassisSortNumber { get; set; }
/// <summary> /// <summary>
/// kitting代码 /// kitting代码

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNote.cs

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Entities;
namespace Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Domain;
@ -18,14 +16,12 @@ public class KittingPackagingNote : SfsStoreAggregateRootBase<KittingPackagingNo
public string KittingCode { get; set; } public string KittingCode { get; set; }
/// <summary> /// <summary>
/// 任务明细 /// 明细(记录打包的明细)
/// </summary> /// </summary>
[IgnoreUpdate]
public override List<KittingPackagingNoteDetail> Details { get; set; } = new(); public override List<KittingPackagingNoteDetail> Details { get; set; } = new();
/// <summary> /// <summary>
/// 任务从表明细(记录每次扫得明细 /// 明细(记录每次扫的位置
/// </summary> /// </summary>
[IgnoreUpdate]
public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new(); public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new();
} }

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteChassisDetail.cs

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

10
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/KittingPackagingNotes/KittingPackagingNoteDetail.cs

@ -1,6 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Entities;
namespace Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Domain;
@ -10,8 +8,6 @@ public class KittingPackagingNoteDetail : SfsStoreDetailEntityBase
/// 物品代码 /// 物品代码
/// </summary> /// </summary>
[Display(Name = "物品代码")] [Display(Name = "物品代码")]
[Required(ErrorMessage = "{0}是必填项")]
[IgnoreUpdate]
public string ItemCode { get; set; } public string ItemCode { get; set; }
/// <summary> /// <summary>
@ -37,4 +33,10 @@ public class KittingPackagingNoteDetail : SfsStoreDetailEntityBase
/// </summary> /// </summary>
[Display(Name = "数量")] [Display(Name = "数量")]
public decimal Qty { get; set; } public decimal Qty { get; set; }
/// <summary>
/// Kitting代码
/// </summary>
[Display(Name = "Kitting代码")]
public string KittingCode { get; set; }
} }

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs

@ -65,6 +65,7 @@ public interface IStoreDbContext : IEfCoreDbContext
#endregion #endregion
#region Notes #region Notes
public DbSet<ItemTransformNote> ItemTransformNotes { get; } public DbSet<ItemTransformNote> ItemTransformNotes { get; }
public DbSet<RecycledMaterialReceiptNote> RecycledMaterialReceiptNotes { get; } public DbSet<RecycledMaterialReceiptNote> RecycledMaterialReceiptNotes { get; }
public DbSet<TransferNote> TransferNotes { get; } public DbSet<TransferNote> TransferNotes { get; }
@ -105,6 +106,9 @@ public interface IStoreDbContext : IEfCoreDbContext
public DbSet<ContainerBindNote> ContainerBindNotes { get; } public DbSet<ContainerBindNote> ContainerBindNotes { get; }
public DbSet<NoOkConvertOkNote> NoOkConvertOkNotes { get; } public DbSet<NoOkConvertOkNote> NoOkConvertOkNotes { get; }
public DbSet<WipWarehouseAdjustNote> WipWarehouseAdjustNotes { get; } public DbSet<WipWarehouseAdjustNote> WipWarehouseAdjustNotes { get; }
public DbSet<KittingPackagingNote> KittingPackagingNote { get; }
#endregion #endregion
#region Jobs #region Jobs
@ -137,7 +141,7 @@ public interface IStoreDbContext : IEfCoreDbContext
/// <summary> /// <summary>
/// 底盘信息 /// 底盘信息
/// </summary> /// </summary>
public DbSet<Domain.Chassis> Chassis { get; } public DbSet<Chassis> Chassis { get; }
public DbSet<ExchangeData> ExchangeDatas { get; } public DbSet<ExchangeData> ExchangeDatas { get; }

31896
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422030203_Added_KittingPackagingNote.Designer.cs

File diff suppressed because it is too large

958
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422030203_Added_KittingPackagingNote.cs

@ -0,0 +1,958 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Win_in.Sfs.Wms.Store.Migrations
{
public partial class Added_KittingPackagingNote : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Store_AssembleIssueRequestsDetail");
migrationBuilder.DropTable(
name: "Store_AssembleIssueRequests");
migrationBuilder.DropColumn(
name: "AuditCountDescription",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "AuditCountOperator",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "AuditCountQty",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "AuditCountTime",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "FirstCountDescription",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "FirstCountOperator",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "FirstCountQty",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "FirstCountTime",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "RepeatCountDescription",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "RepeatCountOperator",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "RepeatCountQty",
table: "Store_CountNoteDetail");
migrationBuilder.DropColumn(
name: "RepeatCountTime",
table: "Store_CountNoteDetail");
migrationBuilder.AddColumn<string>(
name: "InventoryMode",
table: "Store_CountPlan",
type: "nvarchar(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<int>(
name: "InventoryStage",
table: "Store_CountPlan",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "CountJobNumber",
table: "Store_CountNote",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CountPlanNumber",
table: "Job_CountJobDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "InventoryStage",
table: "Job_CountJobDetail",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "InventoryStage",
table: "Job_CountJobDependentDetail",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "InventoryMode",
table: "Job_CountJob",
type: "nvarchar(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<int>(
name: "InventoryStage",
table: "Job_CountJob",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "Job_KittingIssueJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RequestType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
KittingRequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
UseOnTheWayLocation = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
JobStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Job_KittingIssueJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Store_AssembleIssueRequest",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
UseOnTheWayLocation = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
AutoSubmit = table.Column<bool>(type: "bit", nullable: false),
AutoAgree = table.Column<bool>(type: "bit", nullable: false),
AutoHandle = table.Column<bool>(type: "bit", nullable: false),
AutoCompleteJob = table.Column<bool>(type: "bit", nullable: false),
DirectCreateNote = table.Column<bool>(type: "bit", nullable: false),
RequestStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_AssembleIssueRequest", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Store_CountNoteDependentDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CountLabel = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
InventoryQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
InventoryLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CountQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CountTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CountOperator = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CountDescription = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Lot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
SupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
PackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
LocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
LocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
LocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
LocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_CountNoteDependentDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_CountNoteDependentDetail_Store_CountNote_MasterID",
column: x => x.MasterID,
principalTable: "Store_CountNote",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Store_KittingIssueNote",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RequestType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
UseOnTheWayLocation = table.Column<bool>(type: "bit", nullable: false),
ConfirmTime = table.Column<DateTime>(type: "datetime2", nullable: true),
Confirmed = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_KittingIssueNote", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Store_KittingIssueRequest",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
UseOnTheWayLocation = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
AutoSubmit = table.Column<bool>(type: "bit", nullable: false),
AutoAgree = table.Column<bool>(type: "bit", nullable: false),
AutoHandle = table.Column<bool>(type: "bit", nullable: false),
AutoCompleteJob = table.Column<bool>(type: "bit", nullable: false),
DirectCreateNote = table.Column<bool>(type: "bit", nullable: false),
RequestStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_KittingIssueRequest", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Job_KittingIssueJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ItemCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RequestLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
OnTheWayLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
RequestQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RecommendFromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendFromProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendFromExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendFromLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RecommendToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendToProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendToExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendToLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TransferLibFromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibFromProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibFromExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibFromLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TransferLibToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibToProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibToExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibToLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
HandledFromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledFromProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledFromExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledFromLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
HandledToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledToProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledToExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledToLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(max)", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Job_KittingIssueJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_Job_KittingIssueJobDetail_Job_KittingIssueJob_MasterID",
column: x => x.MasterID,
principalTable: "Job_KittingIssueJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Store_AssembleIssueRequestDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IssuedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
ReceivedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
BoxQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Qty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_AssembleIssueRequestDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_AssembleIssueRequestDetail_Store_AssembleIssueRequest_MasterID",
column: x => x.MasterID,
principalTable: "Store_AssembleIssueRequest",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Store_KittingIssueNoteDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RequestWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
OnTheWayLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
RequestQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RecommendFromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendFromProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendFromExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendFromLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendFromQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RecommendToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendToProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendToExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendToLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendToQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TransferLibFromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibFromProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibFromExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibFromLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibFromQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TransferLibToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibToProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibToExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
TransferLibToLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToLocationCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TransferLibToQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
HandledFromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromPackingCode = table.Column<string>(type: "nvarchar(450)", nullable: true),
HandledFromSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledFromProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledFromExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledFromLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromLocationCode = table.Column<string>(type: "nvarchar(450)", nullable: true),
HandledFromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledFromQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
HandledToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToSupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledToProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledToExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledToLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToLocationCode = table.Column<string>(type: "nvarchar(450)", nullable: true),
HandledToLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToLocationGroup = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToLocationErpCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToWarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledToQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_KittingIssueNoteDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_KittingIssueNoteDetail_Store_KittingIssueNote_MasterID",
column: x => x.MasterID,
principalTable: "Store_KittingIssueNote",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Store_KittingIssueRequestDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IssuedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
ReceivedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
BoxQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Qty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_KittingIssueRequestDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_KittingIssueRequestDetail_Store_KittingIssueRequest_MasterID",
column: x => x.MasterID,
principalTable: "Store_KittingIssueRequest",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Job_KittingIssueJob_Number",
table: "Job_KittingIssueJob",
column: "Number",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Job_KittingIssueJobDetail_MasterID",
table: "Job_KittingIssueJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleIssueRequest_Number",
table: "Store_AssembleIssueRequest",
column: "Number",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleIssueRequestDetail_ItemCode",
table: "Store_AssembleIssueRequestDetail",
column: "ItemCode");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleIssueRequestDetail_MasterID",
table: "Store_AssembleIssueRequestDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleIssueRequestDetail_Number_ItemCode_ToLocationCode",
table: "Store_AssembleIssueRequestDetail",
columns: new[] { "Number", "ItemCode", "ToLocationCode" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Store_CountNoteDependentDetail_MasterID",
table: "Store_CountNoteDependentDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingIssueNote_Number",
table: "Store_KittingIssueNote",
column: "Number",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Store_KittingIssueNoteDetail_HandledFromPackingCode",
table: "Store_KittingIssueNoteDetail",
column: "HandledFromPackingCode");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingIssueNoteDetail_MasterID",
table: "Store_KittingIssueNoteDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingIssueNoteDetail_Number_HandledFromPackingCode_HandledFromLocationCode_HandledToLocationCode",
table: "Store_KittingIssueNoteDetail",
columns: new[] { "Number", "HandledFromPackingCode", "HandledFromLocationCode", "HandledToLocationCode" },
unique: true,
filter: "[HandledFromPackingCode] IS NOT NULL AND [HandledFromLocationCode] IS NOT NULL AND [HandledToLocationCode] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingIssueRequest_Number",
table: "Store_KittingIssueRequest",
column: "Number",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Store_KittingIssueRequestDetail_ItemCode",
table: "Store_KittingIssueRequestDetail",
column: "ItemCode");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingIssueRequestDetail_MasterID",
table: "Store_KittingIssueRequestDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingIssueRequestDetail_Number_ItemCode_ToLocationCode",
table: "Store_KittingIssueRequestDetail",
columns: new[] { "Number", "ItemCode", "ToLocationCode" },
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Job_KittingIssueJobDetail");
migrationBuilder.DropTable(
name: "Store_AssembleIssueRequestDetail");
migrationBuilder.DropTable(
name: "Store_CountNoteDependentDetail");
migrationBuilder.DropTable(
name: "Store_KittingIssueNoteDetail");
migrationBuilder.DropTable(
name: "Store_KittingIssueRequestDetail");
migrationBuilder.DropTable(
name: "Job_KittingIssueJob");
migrationBuilder.DropTable(
name: "Store_AssembleIssueRequest");
migrationBuilder.DropTable(
name: "Store_KittingIssueNote");
migrationBuilder.DropTable(
name: "Store_KittingIssueRequest");
migrationBuilder.DropColumn(
name: "InventoryMode",
table: "Store_CountPlan");
migrationBuilder.DropColumn(
name: "InventoryStage",
table: "Store_CountPlan");
migrationBuilder.DropColumn(
name: "CountJobNumber",
table: "Store_CountNote");
migrationBuilder.DropColumn(
name: "CountPlanNumber",
table: "Job_CountJobDetail");
migrationBuilder.DropColumn(
name: "InventoryStage",
table: "Job_CountJobDetail");
migrationBuilder.DropColumn(
name: "InventoryStage",
table: "Job_CountJobDependentDetail");
migrationBuilder.DropColumn(
name: "InventoryMode",
table: "Job_CountJob");
migrationBuilder.DropColumn(
name: "InventoryStage",
table: "Job_CountJob");
migrationBuilder.AddColumn<string>(
name: "AuditCountDescription",
table: "Store_CountNoteDetail",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "AuditCountOperator",
table: "Store_CountNoteDetail",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "AuditCountQty",
table: "Store_CountNoteDetail",
type: "decimal(18,6)",
precision: 18,
scale: 6,
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<DateTime>(
name: "AuditCountTime",
table: "Store_CountNoteDetail",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "FirstCountDescription",
table: "Store_CountNoteDetail",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "FirstCountOperator",
table: "Store_CountNoteDetail",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "FirstCountQty",
table: "Store_CountNoteDetail",
type: "decimal(18,6)",
precision: 18,
scale: 6,
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<DateTime>(
name: "FirstCountTime",
table: "Store_CountNoteDetail",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RepeatCountDescription",
table: "Store_CountNoteDetail",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RepeatCountOperator",
table: "Store_CountNoteDetail",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "RepeatCountQty",
table: "Store_CountNoteDetail",
type: "decimal(18,6)",
precision: 18,
scale: 6,
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<DateTime>(
name: "RepeatCountTime",
table: "Store_CountNoteDetail",
type: "datetime2",
nullable: true);
migrationBuilder.CreateTable(
name: "Store_AssembleIssueRequests",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
AutoAgree = table.Column<bool>(type: "bit", nullable: false),
AutoCompleteJob = table.Column<bool>(type: "bit", nullable: false),
AutoHandle = table.Column<bool>(type: "bit", nullable: false),
AutoSubmit = table.Column<bool>(type: "bit", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DirectCreateNote = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
RequestStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
UseOnTheWayLocation = table.Column<bool>(type: "bit", nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_AssembleIssueRequests", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Store_AssembleIssueRequestsDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BoxQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IssuedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Qty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
ReceivedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_AssembleIssueRequestsDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_AssembleIssueRequestsDetail_Store_AssembleIssueRequests_MasterID",
column: x => x.MasterID,
principalTable: "Store_AssembleIssueRequests",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleIssueRequests_Number",
table: "Store_AssembleIssueRequests",
column: "Number",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleIssueRequestsDetail_ItemCode",
table: "Store_AssembleIssueRequestsDetail",
column: "ItemCode");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleIssueRequestsDetail_MasterID",
table: "Store_AssembleIssueRequestsDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleIssueRequestsDetail_Number_ItemCode_ToLocationCode",
table: "Store_AssembleIssueRequestsDetail",
columns: new[] { "Number", "ItemCode", "ToLocationCode" },
unique: true);
}
}
}

32112
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422032715_Added_KittingPackagingNoteV2.Designer.cs

File diff suppressed because it is too large

137
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240422032715_Added_KittingPackagingNoteV2.cs

@ -0,0 +1,137 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Win_in.Sfs.Wms.Store.Migrations
{
public partial class Added_KittingPackagingNoteV2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Store_KittingPackagingNote",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
KittingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(450)", nullable: true),
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_KittingPackagingNote", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Store_KittingPackagingNoteChassisDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ChassisSortNumber = table.Column<long>(type: "bigint", nullable: false),
KittingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(max)", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_KittingPackagingNoteChassisDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_KittingPackagingNoteChassisDetail_Store_KittingPackagingNote_MasterID",
column: x => x.MasterID,
principalTable: "Store_KittingPackagingNote",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Store_KittingPackagingNoteDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Qty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
KittingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(max)", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_KittingPackagingNoteDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_KittingPackagingNoteDetail_Store_KittingPackagingNote_MasterID",
column: x => x.MasterID,
principalTable: "Store_KittingPackagingNote",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Store_KittingPackagingNote_Number",
table: "Store_KittingPackagingNote",
column: "Number",
unique: true,
filter: "[Number] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingPackagingNoteChassisDetail_KittingCode",
table: "Store_KittingPackagingNoteChassisDetail",
column: "KittingCode",
unique: true,
filter: "[KittingCode] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingPackagingNoteChassisDetail_MasterID",
table: "Store_KittingPackagingNoteChassisDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingPackagingNoteDetail_KittingCode",
table: "Store_KittingPackagingNoteDetail",
column: "KittingCode",
unique: true,
filter: "[KittingCode] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_Store_KittingPackagingNoteDetail_MasterID",
table: "Store_KittingPackagingNoteDetail",
column: "MasterID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Store_KittingPackagingNoteChassisDetail");
migrationBuilder.DropTable(
name: "Store_KittingPackagingNoteDetail");
migrationBuilder.DropTable(
name: "Store_KittingPackagingNote");
}
}
}

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

File diff suppressed because it is too large

30
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/KittingPackagingNotes/KittingPackagingNoteDbContextModelCreatingExtensions.cs

@ -13,7 +13,7 @@ public static class KittingPackagingNoteDbContextModelCreatingExtensions
builder.Entity<KittingPackagingNote>(b => builder.Entity<KittingPackagingNote>(b =>
{ {
//Configure table & schema name //Configure table & schema name
b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(KittingPackagingNote), options.Schema); b.ToTable(options.TablePrefix + nameof(KittingPackagingNote), options.Schema);
//Configure ABP properties //Configure ABP properties
b.ConfigureByConvention(); b.ConfigureByConvention();
//Configure Sfs base properties //Configure Sfs base properties
@ -30,7 +30,7 @@ public static class KittingPackagingNoteDbContextModelCreatingExtensions
builder.Entity<KittingPackagingNoteDetail>(b => builder.Entity<KittingPackagingNoteDetail>(b =>
{ {
//Configure table & schema name //Configure table & schema name
b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(KittingPackagingNoteDetail), options.Schema); b.ToTable(options.TablePrefix + nameof(KittingPackagingNoteDetail), options.Schema);
//Configure ABP properties //Configure ABP properties
b.ConfigureByConvention(); b.ConfigureByConvention();
//Configure Sfs base properties //Configure Sfs base properties
@ -38,40 +38,24 @@ public static class KittingPackagingNoteDbContextModelCreatingExtensions
//Configure Job base properties //Configure Job base properties
b.ConfigureSfsStoreDetailBase(); b.ConfigureSfsStoreDetailBase();
//Properties //Properties
//b.Property(q => q.CountLabel).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.KittingCode).HasMaxLength(SfsPropertyConst.CodeLength);
//b.Property(q => q.InventoryLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
//b.Property(q => q.CountOperator).HasMaxLength(SfsPropertyConst.CodeLength);
//b.Property(q => q.CountDescription).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
//None
//Indexes //Indexes
//b.HasIndex(q => new { q.PackingCode }).IsUnique(); b.HasIndex(q => new { q.KittingCode }).IsUnique();
}); });
builder.Entity<KittingPackagingNoteChassisDetail>(b => builder.Entity<KittingPackagingNoteChassisDetail>(b =>
{ {
//Configure table & schema name //Configure table & schema name
b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(KittingPackagingNoteChassisDetail), options.Schema); b.ToTable(options.TablePrefix + nameof(KittingPackagingNoteChassisDetail), options.Schema);
//Configure ABP properties //Configure ABP properties
b.ConfigureByConvention(); b.ConfigureByConvention();
//Configure Sfs base properties //Configure Sfs base properties
b.ConfigureSfsBase(); b.ConfigureSfsBase();
//Configure Job base properties
b.ConfigureJobDetail();
//Properties //Properties
b.Property(q => q.CountLabel).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.KittingCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.InventoryLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CountOperator).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CountDescription).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
//None
//Indexes //Indexes
//b.HasIndex(q => new { q.PackingCode }).IsUnique(); b.HasIndex(q => new { q.KittingCode }).IsUnique();
}); });
} }
} }

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

@ -142,6 +142,8 @@ public class StoreDbContext : AbpDbContext<StoreDbContext>, IStoreDbContext
//底盘序列 //底盘序列
public DbSet<ChassisOperationSequence> ChassisOperationSequence { get; set; } public DbSet<ChassisOperationSequence> ChassisOperationSequence { get; set; }
public DbSet<KittingPackagingNote> KittingPackagingNote { get; set; }
public StoreDbContext(DbContextOptions<StoreDbContext> options) public StoreDbContext(DbContextOptions<StoreDbContext> options)
: base(options) : base(options)
{ {

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs

@ -112,6 +112,7 @@ public static class StoreDbContextModelCreatingExtensions
builder.ConfigureMesRecord(options); builder.ConfigureMesRecord(options);
builder.ConfigureInjectioModelPlan(options); builder.ConfigureInjectioModelPlan(options);
builder.ConfigureCustomerProductionReturnNote(options); builder.ConfigureCustomerProductionReturnNote(options);
builder.ConfigureKittingPackagingNote(options);
#endregion #endregion
#region Jobs #region Jobs

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

@ -162,6 +162,8 @@ public class StoreEntityFrameworkCoreModule : AbpModule
context.Services.AddTransient<IChassisRepository, ChassisEfCoreRepository>(); context.Services.AddTransient<IChassisRepository, ChassisEfCoreRepository>();
context.Services.AddTransient<IChassisOperationSequenceRepository, ChassisOperationSequenceEfCoreRepository>(); context.Services.AddTransient<IChassisOperationSequenceRepository, ChassisOperationSequenceEfCoreRepository>();
context.Services.AddTransient<IKittingPackagingNoteRepository, KittingPackagingNoteEfCoreRepository>();
} }
private void ConfigureEntity() private void ConfigureEntity()
@ -344,6 +346,10 @@ public class StoreEntityFrameworkCoreModule : AbpModule
options.Entity<CustomerProductionReturnNote>(orderOptions => options.Entity<CustomerProductionReturnNote>(orderOptions =>
orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details));
options.Entity<KittingPackagingNote>(orderOptions =>
orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)
.Include(o => o.DepDetails));
#endregion #endregion
#region Jobs #region Jobs

Loading…
Cancel
Save