24 changed files with 31338 additions and 116 deletions
@ -0,0 +1,48 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
/// <summary>
|
|||
/// 底盘信息
|
|||
/// </summary>
|
|||
[Display(Name = "底盘信息")] |
|||
public class ChassisDTO : SfsBasicDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// Wms编号
|
|||
/// </summary>
|
|||
[Display(Name = "Wms编号")] |
|||
public string Number { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 底盘号
|
|||
/// </summary>
|
|||
[Display(Name = "底盘号")] |
|||
public string ChassisNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 描述
|
|||
/// </summary>
|
|||
[Display(Name = "描述")] |
|||
public string Description { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 底盘生产时间
|
|||
/// </summary>
|
|||
[Display(Name = "底盘生产时间")] |
|||
public DateTime ProduceDateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 接收接口时间
|
|||
/// </summary>
|
|||
[Display(Name = "接收接口时间")] |
|||
public DateTime ReceiveInterfaceDateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 执行位置排序列
|
|||
/// </summary>
|
|||
[Display(Name = "执行位置排序列")] |
|||
public long SortNumber { get; set; } |
|||
} |
@ -0,0 +1,20 @@ |
|||
using Volo.Abp.Authorization.Permissions; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public static class ChassisPermissions |
|||
{ |
|||
public const string Default = StorePermissions.GroupName + "." + nameof(Chassis); |
|||
public const string Create = Default + "." + StorePermissions.CreateStr; |
|||
public const string Update = Default + "." + StorePermissions.UpdateStr; |
|||
public const string Delete = Default + "." + StorePermissions.DeleteStr; |
|||
|
|||
public static void AddChassisPermission(this PermissionGroupDefinition permissionGroup) |
|||
{ |
|||
var purchaseOrderPermission = |
|||
permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(Chassis))); |
|||
purchaseOrderPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); |
|||
purchaseOrderPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); |
|||
purchaseOrderPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public interface IChassisAppService |
|||
: |
|||
ISfsStoreMasterAppServiceBase<ChassisDTO, SfsStoreRequestInputBase, ChassisEditInput, ChassisDTO, |
|||
SfsStoreRequestInputBase>, |
|||
ISfsCheckStatusAppService |
|||
, ISfsUpsertAppService<ChassisEditInput> |
|||
{ |
|||
} |
@ -0,0 +1,48 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
/// <summary>
|
|||
/// 底盘信息
|
|||
/// </summary>
|
|||
[Display(Name = "底盘信息")] |
|||
public class ChassisEditInput |
|||
: SfsStoreCreateOrUpdateInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// Wms编号
|
|||
/// </summary>
|
|||
[Display(Name = "Wms编号")] |
|||
public string Number { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 底盘号
|
|||
/// </summary>
|
|||
[Display(Name = "底盘号")] |
|||
public string ChassisNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 描述
|
|||
/// </summary>
|
|||
[Display(Name = "描述")] |
|||
public string Description { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 底盘生产时间
|
|||
/// </summary>
|
|||
[Display(Name = "底盘生产时间")] |
|||
public DateTime ProduceDateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 接收接口时间
|
|||
/// </summary>
|
|||
[Display(Name = "接收接口时间")] |
|||
public DateTime ReceiveInterfaceDateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 执行位置排序列
|
|||
/// </summary>
|
|||
[Display(Name = "执行位置排序列")] |
|||
public long SortNumber { get; set; } |
|||
} |
@ -0,0 +1,51 @@ |
|||
using System; |
|||
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; |
|||
|
|||
/// <summary>
|
|||
/// 底盘信息
|
|||
/// </summary>
|
|||
[Display(Name = "底盘信息")] |
|||
public class ChassisImportInput : SfsStoreImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// Wms编号
|
|||
/// </summary>
|
|||
[Display(Name = "Wms编号")] |
|||
public string Number { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 底盘号
|
|||
/// </summary>
|
|||
[Display(Name = "底盘号")] |
|||
public string ChassisNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 描述
|
|||
/// </summary>
|
|||
[Display(Name = "描述")] |
|||
public string Description { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 底盘生产时间
|
|||
/// </summary>
|
|||
[Display(Name = "底盘生产时间")] |
|||
public DateTime ProduceDateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 接收接口时间
|
|||
/// </summary>
|
|||
[Display(Name = "接收接口时间")] |
|||
public DateTime ReceiveInterfaceDateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 执行位置排序列
|
|||
/// </summary>
|
|||
[Display(Name = "执行位置排序列")] |
|||
public long SortNumber { get; set; } |
|||
} |
@ -0,0 +1,80 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Castle.Components.DictionaryAdapter; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp; |
|||
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.Wms.Store.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
using Win_in.Sfs.Wms.Store.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Store.Equipments; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application; |
|||
|
|||
[Authorize] |
|||
[Route($"{StoreConsts.RootPath}Chassis")] |
|||
public class ChassisAppService |
|||
: SfsStoreAppServiceBase<Domain.Chassis, ChassisDTO, SfsStoreRequestInputBase, ChassisEditInput, |
|||
ExchangeDataImportInput> |
|||
, IChassisAppService |
|||
|
|||
{ |
|||
private readonly IChassisManager _manager; |
|||
|
|||
public ChassisAppService( |
|||
IChassisRepository repository, IChassisManager manager |
|||
):base(repository) |
|||
{ |
|||
base.CreatePolicyName = ChassisPermissions.Create; |
|||
base.UpdatePolicyName = ChassisPermissions.Update; |
|||
base.DeletePolicyName = ChassisPermissions.Delete; |
|||
|
|||
_manager = manager; |
|||
} |
|||
|
|||
[NonAction] |
|||
public Task<ChassisDTO> GetDetailAsync(Guid id, Guid detailId) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
|
|||
[NonAction] |
|||
public Task<List<ChassisDTO>> GetDetailListAsync(Guid id, SfsStoreRequestInputBase requestInput) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
|
|||
[NonAction] |
|||
public Task AddDetailListAsync(Guid id, List<ChassisDTO> list) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
|
|||
[NonAction] |
|||
public Task UpdateDetailAsync(Guid id, Guid detailId, ChassisDTO updateDTO) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
|
|||
[NonAction] |
|||
public Task CheckStatusAsync(string number) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
|
|||
[NonAction] |
|||
public Task UpsertAsync(ChassisEditInput input) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
using Win_in.Sfs.Store.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
using Win_in.Sfs.Wms.Store.Equipments; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application; |
|||
|
|||
public partial class StoreApplicationAutoMapperProfile : Profile |
|||
{ |
|||
private void ChassisAutoMapperProfile() |
|||
{ |
|||
CreateMap<Domain.Chassis, ChassisDTO>() |
|||
.ReverseMap(); |
|||
// CreateMap<ExchangeDataCreateInput, ExchangeData>()
|
|||
// .IgnoreAuditedObjectProperties()
|
|||
// .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id)
|
|||
// ;
|
|||
// CreateMap<ExchangeDataUpdateInput, ExchangeData>()
|
|||
// .IgnoreAuditedObjectProperties()
|
|||
// .Ignore(x => x.Id) ;
|
|||
// ;
|
|||
|
|||
// CreateMap<ExchangeDataImportInput, ExchangeData>()
|
|||
// .IgnoreAuditedObjectProperties()
|
|||
// .Ignore(x => x.TenantId)
|
|||
// //.Ignore(x => x.Remark)
|
|||
// .Ignore(x => x.ExtraProperties)
|
|||
// .Ignore(x => x.ConcurrencyStamp)
|
|||
// ;
|
|||
|
|||
// CreateMap<ExchangeData, ExchangeDataImportInput>()
|
|||
// .Ignore(x => x.ReportStatus)
|
|||
// .Ignore(x => x.ReportReason)
|
|||
// ;
|
|||
|
|||
// CreateMap<ExchangeData, ExchangeDataExportDTO>()
|
|||
//;
|
|||
} |
|||
} |
@ -0,0 +1,49 @@ |
|||
using System; |
|||
using System.ComponentModel; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
/// <summary>
|
|||
/// 底盘信息
|
|||
/// </summary>
|
|||
[Display(Name = "底盘信息")] |
|||
public class Chassis : SfsAggregateRootBase |
|||
{ |
|||
/// <summary>
|
|||
/// Wms编号
|
|||
/// </summary>
|
|||
[Display(Name = "Wms编号")] |
|||
public string Number { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 底盘号
|
|||
/// </summary>
|
|||
[Display(Name = "底盘号")] |
|||
public string ChassisNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 描述
|
|||
/// </summary>
|
|||
[Display(Name = "描述")] |
|||
public string Description { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 底盘生产时间
|
|||
/// </summary>
|
|||
[Display(Name = "底盘生产时间")] |
|||
public DateTime ProduceDateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 接收接口时间
|
|||
/// </summary>
|
|||
[Display(Name = "接收接口时间")] |
|||
public DateTime ReceiveInterfaceDateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 执行位置排序列
|
|||
/// </summary>
|
|||
[Display(Name = "执行位置排序列")] |
|||
public long SortNumber { get; set; } |
|||
} |
@ -0,0 +1,13 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Chassis; |
|||
public class ChassisDetail: SfsStoreDetailEntityBase |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Services; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public class ChassisManager : DomainService, IChassisManager |
|||
{ |
|||
private readonly IChassisRepository _repository; |
|||
|
|||
public ChassisManager( |
|||
IChassisRepository repository |
|||
) |
|||
{ |
|||
_repository = repository; |
|||
} |
|||
|
|||
public Task ImportDataAsync(List<Chassis> entities, List<Chassis> deleteEntities = null) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Basedata.Equipments.DTOs; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Wms.Store.Equipments; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public interface IChassisManager : IBulkImportService<Chassis> |
|||
{ |
|||
} |
@ -0,0 +1,10 @@ |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Wms.Store.Equipments; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public interface IChassisRepository : ISfsStoreRepositoryBase<Chassis>, ISfsBulkRepositoryBase<Chassis> |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.Modeling; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
using Win_in.Sfs.Wms.Store.Equipments; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; |
|||
|
|||
public static class ChassisDbContextModelCreatingExtensions |
|||
{ |
|||
public static void ConfigureChassis(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) |
|||
{ |
|||
builder.Entity<Domain.Chassis>(b => |
|||
{ |
|||
//Configure table & schema name
|
|||
b.ToTable(options.TablePrefix + nameof(Chassis), options.Schema); |
|||
//Configure ABP properties
|
|||
b.ConfigureByConvention(); |
|||
//Configure Sfs base properties
|
|||
b.ConfigureSfsStoreBase(); |
|||
|
|||
b.Property(q => q.SortNumber).IsRequired(); |
|||
b.Property(q => q.ChassisNumber).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength).IsRequired(); |
|||
b.Property(q => q.Number).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength).IsRequired(); |
|||
|
|||
b.HasIndex(q => q.ChassisNumber).IsUnique(); |
|||
b.HasIndex(q => q.SortNumber).IsUnique(); |
|||
b.HasIndex(q => q.Number).IsUnique(); |
|||
}); |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
using Win_in.Sfs.Wms.Store.Equipments; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; |
|||
|
|||
public class ChassisEfCoreRepository : SfsStoreEfCoreRepositoryBase<StoreDbContext, Domain.Chassis>, IChassisRepository, ISfsBulkRepositoryBase<Domain.Chassis> |
|||
{ |
|||
public ChassisEfCoreRepository(IDbContextProvider<StoreDbContext> dbContextProvider) : base(dbContextProvider) |
|||
{ |
|||
} |
|||
|
|||
|
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,251 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Migrations |
|||
{ |
|||
public partial class Added_Chassis : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "ExpiredTime", |
|||
table: "Store_CoatingMaterialRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "FromLocationArea", |
|||
table: "Store_CoatingMaterialRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "WorkStation", |
|||
table: "Store_CoatingMaterialRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PreparationPlanNumber", |
|||
table: "Store_CoatingMaterialRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProdLine", |
|||
table: "Store_CoatingMaterialRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Workshop", |
|||
table: "Store_CoatingMaterialRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ExpiredTime", |
|||
table: "Store_AssembleRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "FromLocationArea", |
|||
table: "Store_AssembleRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "WorkStation", |
|||
table: "Store_AssembleRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProdLine", |
|||
table: "Store_AssembleRequest"); |
|||
|
|||
migrationBuilder.AddColumn<decimal>( |
|||
name: "BoxQty", |
|||
table: "Store_CoatingMaterialRequestDetail", |
|||
type: "decimal(18,6)", |
|||
nullable: false, |
|||
defaultValue: 0m); |
|||
|
|||
migrationBuilder.AddColumn<decimal>( |
|||
name: "BoxQty", |
|||
table: "Store_AssembleRequestDetail", |
|||
type: "decimal(18,6)", |
|||
nullable: false, |
|||
defaultValue: 0m); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Job_CountJobDependentDetail", |
|||
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), |
|||
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), |
|||
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
|||
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
ContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
PackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Lot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
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), |
|||
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) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_Job_CountJobDependentDetail", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_Job_CountJobDependentDetail_Job_CountJob_MasterID", |
|||
column: x => x.MasterID, |
|||
principalTable: "Job_CountJob", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Store_Chassis", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
ChassisNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ProduceDateTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ReceiveInterfaceDateTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
SortNumber = table.Column<long>(type: "bigint", 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) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_Store_Chassis", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Job_CountJobDependentDetail_MasterID", |
|||
table: "Job_CountJobDependentDetail", |
|||
column: "MasterID"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_Chassis_ChassisNumber", |
|||
table: "Store_Chassis", |
|||
column: "ChassisNumber", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_Chassis_Number", |
|||
table: "Store_Chassis", |
|||
column: "Number", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_Chassis_SortNumber", |
|||
table: "Store_Chassis", |
|||
column: "SortNumber", |
|||
unique: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Job_CountJobDependentDetail"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "Store_Chassis"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "BoxQty", |
|||
table: "Store_CoatingMaterialRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "BoxQty", |
|||
table: "Store_AssembleRequestDetail"); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "ExpiredTime", |
|||
table: "Store_CoatingMaterialRequestDetail", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "FromLocationArea", |
|||
table: "Store_CoatingMaterialRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "WorkStation", |
|||
table: "Store_CoatingMaterialRequestDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PreparationPlanNumber", |
|||
table: "Store_CoatingMaterialRequest", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ProdLine", |
|||
table: "Store_CoatingMaterialRequest", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Workshop", |
|||
table: "Store_CoatingMaterialRequest", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "ExpiredTime", |
|||
table: "Store_AssembleRequestDetail", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "FromLocationArea", |
|||
table: "Store_AssembleRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "WorkStation", |
|||
table: "Store_AssembleRequestDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ProdLine", |
|||
table: "Store_AssembleRequest", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue