64 changed files with 67765 additions and 370 deletions
@ -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; } |
|||
} |
@ -0,0 +1,23 @@ |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Entities; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
[Display(Name = "盘点任务")] |
|||
public class KittingPackagingNoteDTO : SfsStoreDTOBase<KittingPackagingNoteDetailDTO> |
|||
{ |
|||
/// <summary>
|
|||
/// kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录每次扫的位置)
|
|||
/// </summary>
|
|||
public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new(); |
|||
} |
@ -0,0 +1,44 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class KittingPackagingNoteDetailDTO : SfsStoreDetailDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 物品代码
|
|||
/// </summary>
|
|||
[Display(Name = "物品代码")] |
|||
public string ItemCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品名称
|
|||
/// </summary>
|
|||
[Display(Name = "物品名称")] |
|||
public string ItemName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品描述1
|
|||
/// </summary>
|
|||
[Display(Name = "物品描述1")] |
|||
public string ItemDesc1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品描述2
|
|||
/// </summary>
|
|||
[Display(Name = "物品描述2")] |
|||
public string ItemDesc2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
} |
@ -0,0 +1,10 @@ |
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public interface IKittingPackagingNoteAppService : |
|||
ISfsStoreMasterReadOnlyAppServiceBase< |
|||
KittingPackagingNoteDTO, |
|||
SfsStoreRequestInputBase, |
|||
KittingPackagingNoteDetailDTO, |
|||
SfsStoreRequestInputBase> |
|||
{ |
|||
} |
@ -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; } |
|||
} |
@ -0,0 +1,6 @@ |
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class KittingPackagingNoteCheckInput : SfsJobCheckInputBase |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
/// <summary>
|
|||
/// 查询条件 DTO
|
|||
/// </summary>
|
|||
public class KittingPackagingNoteCreateRequestInput |
|||
{ |
|||
/// <summary>
|
|||
/// kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录打包的明细)
|
|||
/// </summary>
|
|||
public List<KittingPackagingNoteDetail> Details { get; set; } = new(); |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录每次扫的位置)
|
|||
/// </summary>
|
|||
public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new(); |
|||
} |
@ -0,0 +1,44 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class KittingPackagingNoteDetailInput : SfsStoreDetailInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 物品代码
|
|||
/// </summary>
|
|||
[Display(Name = "物品代码")] |
|||
public string ItemCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品名称
|
|||
/// </summary>
|
|||
[Display(Name = "物品名称")] |
|||
public string ItemName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品描述1
|
|||
/// </summary>
|
|||
[Display(Name = "物品描述1")] |
|||
public string ItemDesc1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品描述2
|
|||
/// </summary>
|
|||
[Display(Name = "物品描述2")] |
|||
public string ItemDesc2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
} |
@ -0,0 +1,26 @@ |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class KittingPackagingNoteEditInput : SfsStoreCreateOrUpdateInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录打包的明细)
|
|||
/// </summary>
|
|||
public List<KittingPackagingNoteDetailInput> Details { get; set; } = new(); |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录每次扫的位置)
|
|||
/// </summary>
|
|||
public List<KittingPackagingNoteChassisDetailInput> DepDetails { get; set; } = new(); |
|||
} |
@ -0,0 +1,24 @@ |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class KittingPackagingNoteImportInput : SfsStoreImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录打包的明细)
|
|||
/// </summary>
|
|||
public List<KittingPackagingNoteDetail> Details { get; set; } = new(); |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录每次扫的位置)
|
|||
/// </summary>
|
|||
public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new(); |
|||
} |
@ -0,0 +1,21 @@ |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public static class KittingPackagingNotePermissions |
|||
{ |
|||
|
|||
public const string Default = StorePermissions.GroupName + "." + nameof(KittingPackagingNote); |
|||
public const string Create = Default + "." + StorePermissions.CreateStr; |
|||
public const string Update = Default + "." + StorePermissions.UpdateStr; |
|||
public const string Delete = Default + "." + StorePermissions.DeleteStr; |
|||
|
|||
public static void AddKittingPackagingNotePermission(this PermissionGroupDefinition permissionGroup) |
|||
{ |
|||
var countJobPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(KittingPackagingNote))); |
|||
countJobPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); |
|||
countJobPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); |
|||
countJobPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
using Win_in.Sfs.Wms.Store.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application; |
|||
|
|||
/// <summary>
|
|||
/// kitting打包记录
|
|||
/// </summary>
|
|||
[Authorize] |
|||
[Route($"{StoreConsts.RootPath}KittingPackagingNote")] |
|||
public class KittingPackagingNoteAppService |
|||
: SfsStoreWithDetailsAppServiceBase< |
|||
KittingPackagingNote, |
|||
KittingPackagingNoteDTO, |
|||
SfsStoreRequestInputBase, |
|||
KittingPackagingNoteEditInput, |
|||
KittingPackagingNoteDetail, |
|||
KittingPackagingNoteDetailDTO, |
|||
SfsStoreRequestInputBase, |
|||
KittingPackagingNoteImportInput>, IKittingPackagingNoteAppService |
|||
{ |
|||
private readonly IChassisOperationSequenceAppService _chassisOperationSequenceAppService; |
|||
|
|||
public KittingPackagingNoteAppService( |
|||
IKittingPackagingNoteRepository repository, IChassisOperationSequenceAppService chassisOperationSequenceAppService) : base(repository) |
|||
{ |
|||
_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); |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application; |
|||
|
|||
public partial class StoreApplicationAutoMapperProfile : Profile |
|||
{ |
|||
private void KittingPackagingNoteAutoMapperProfile() |
|||
{ |
|||
CreateMap<KittingPackagingNote, KittingPackagingNoteDTO>() |
|||
.ReverseMap(); |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq.Expressions; |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public interface IKittingPackagingNoteManager : ISfsStoreManager<KittingPackagingNote, KittingPackagingNoteDetail> |
|||
{ |
|||
} |
@ -0,0 +1,6 @@ |
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public interface IKittingPackagingNoteRepository : ISfsStoreRepositoryBase<KittingPackagingNote> |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
/// <summary>
|
|||
/// kitting打包记录
|
|||
/// </summary>
|
|||
[Display(Name = "kitting打包记录")] |
|||
public class KittingPackagingNote : SfsStoreAggregateRootBase<KittingPackagingNoteDetail> |
|||
{ |
|||
/// <summary>
|
|||
/// kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录打包的明细)
|
|||
/// </summary>
|
|||
public override List<KittingPackagingNoteDetail> Details { get; set; } = new(); |
|||
|
|||
/// <summary>
|
|||
/// 明细(记录每次扫的位置)
|
|||
/// </summary>
|
|||
public List<KittingPackagingNoteChassisDetail> DepDetails { get; set; } = new(); |
|||
} |
@ -0,0 +1,19 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public class KittingPackagingNoteChassisDetail : SfsDetailEntityBase |
|||
{ |
|||
/// <summary>
|
|||
/// 底盘号
|
|||
/// </summary>
|
|||
[Display(Name = "底盘号")] |
|||
public long ChassisNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
} |
@ -0,0 +1,42 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public class KittingPackagingNoteDetail : SfsStoreDetailEntityBase |
|||
{ |
|||
/// <summary>
|
|||
/// 物品代码
|
|||
/// </summary>
|
|||
[Display(Name = "物品代码")] |
|||
public string ItemCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品名称
|
|||
/// </summary>
|
|||
[Display(Name = "物品名称")] |
|||
public string ItemName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品描述1
|
|||
/// </summary>
|
|||
[Display(Name = "物品描述1")] |
|||
public string ItemDesc1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物品描述2
|
|||
/// </summary>
|
|||
[Display(Name = "物品描述2")] |
|||
public string ItemDesc2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[Display(Name = "数量")] |
|||
public decimal Qty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Kitting代码
|
|||
/// </summary>
|
|||
[Display(Name = "Kitting代码")] |
|||
public string KittingCode { get; set; } |
|||
} |
@ -0,0 +1,26 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Linq.Expressions; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Users; |
|||
using Volo.Abp.Validation; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Inventory.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public class KittingPackagingNoteManager : SfsStoreManagerBase<KittingPackagingNote, KittingPackagingNoteDetail>, |
|||
IKittingPackagingNoteManager |
|||
{ |
|||
public KittingPackagingNoteManager( |
|||
IKittingPackagingNoteRepository repository |
|||
) : base(repository) |
|||
|
|||
{ |
|||
|
|||
} |
|||
} |
File diff suppressed because it is too large
@ -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); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -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"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,61 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.Modeling; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Shared.EntityFrameworkCore; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; |
|||
|
|||
public static class KittingPackagingNoteDbContextModelCreatingExtensions |
|||
{ |
|||
public static void ConfigureKittingPackagingNote(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) |
|||
{ |
|||
builder.Entity<KittingPackagingNote>(b => |
|||
{ |
|||
//Configure table & schema name
|
|||
b.ToTable(options.TablePrefix + nameof(KittingPackagingNote), options.Schema); |
|||
//Configure ABP properties
|
|||
b.ConfigureByConvention(); |
|||
//Configure Sfs base properties
|
|||
b.ConfigureSfsBase(); |
|||
//Properties
|
|||
b.Property(q => q.KittingCode).HasMaxLength(SfsPropertyConst.CodeLength); |
|||
//Relations
|
|||
b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); |
|||
b.HasMany(q => q.DepDetails).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); |
|||
//Indexes
|
|||
b.HasIndex(q => new { q.Number }).IsUnique(); |
|||
}); |
|||
|
|||
builder.Entity<KittingPackagingNoteDetail>(b => |
|||
{ |
|||
//Configure table & schema name
|
|||
b.ToTable(options.TablePrefix + nameof(KittingPackagingNoteDetail), options.Schema); |
|||
//Configure ABP properties
|
|||
b.ConfigureByConvention(); |
|||
//Configure Sfs base properties
|
|||
b.ConfigureSfsBase(); |
|||
//Configure Job base properties
|
|||
b.ConfigureSfsStoreDetailBase(); |
|||
//Properties
|
|||
b.Property(q => q.KittingCode).HasMaxLength(SfsPropertyConst.CodeLength); |
|||
//Indexes
|
|||
b.HasIndex(q => new { q.KittingCode }).IsUnique(); |
|||
}); |
|||
|
|||
|
|||
builder.Entity<KittingPackagingNoteChassisDetail>(b => |
|||
{ |
|||
//Configure table & schema name
|
|||
b.ToTable(options.TablePrefix + nameof(KittingPackagingNoteChassisDetail), options.Schema); |
|||
//Configure ABP properties
|
|||
b.ConfigureByConvention(); |
|||
//Configure Sfs base properties
|
|||
b.ConfigureSfsBase(); |
|||
//Properties
|
|||
b.Property(q => q.KittingCode).HasMaxLength(SfsPropertyConst.CodeLength); |
|||
//Indexes
|
|||
b.HasIndex(q => new { q.KittingCode }).IsUnique(); |
|||
}); |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; |
|||
|
|||
public class KittingPackagingNoteEfCoreRepository : SfsJobEfCoreRepositoryBase<StoreDbContext, KittingPackagingNote>, IKittingPackagingNoteRepository |
|||
{ |
|||
public KittingPackagingNoteEfCoreRepository(IDbContextProvider<StoreDbContext> dbContextProvider) : base(dbContextProvider) |
|||
{ |
|||
} |
|||
} |
Loading…
Reference in new issue