36 changed files with 35936 additions and 2319 deletions
@ -1,55 +1,56 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class ThirdLocationNoteDTO : SfsStoreDTOBase<ThirdLocationNoteDetailDTO>, IHasJobNumber, IHasRequestNumber |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 任务ID
|
|||
/// 发出时间
|
|||
/// </summary>
|
|||
[Display(Name = "任务ID")] |
|||
public string JobNumber { get; set; } |
|||
|
|||
public DateTime IssueTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 车间
|
|||
/// 接收时间
|
|||
/// </summary>
|
|||
[Display(Name = "车间")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string Workshop { get; set; } |
|||
public DateTime ReceiptTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 请求代码
|
|||
/// 请求单号
|
|||
/// </summary>
|
|||
[Display(Name = "请求代码")] |
|||
[Display(Name = "请求单号")] |
|||
public string RequestNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 叫料请求类型
|
|||
/// 任务单号
|
|||
/// </summary>
|
|||
[Display(Name = "叫料请求类型")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string RequestType { get; set; } |
|||
[Display(Name = "任务单号")] |
|||
public string JobNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 使用在途库
|
|||
/// 已承接
|
|||
/// </summary>
|
|||
[Display(Name = "使用在途库")] |
|||
public bool UseOnTheWayLocation { get; set; } |
|||
/// <returns></returns>
|
|||
[Display(Name = "是否已承接")] |
|||
public bool IsClaims { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 已确认
|
|||
/// 承接人ID
|
|||
/// </summary>
|
|||
[Display(Name = "已确认")] |
|||
public bool Confirmed { get; set; } |
|||
/// <returns></returns>
|
|||
[Display(Name = "承接人ID")] |
|||
public string ClaimsUserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 确认时间
|
|||
/// 承接人
|
|||
/// </summary>
|
|||
[Display(Name = "确认时间")] |
|||
public DateTime? ConfirmTime { get; set; } |
|||
/// <returns></returns>
|
|||
[Display(Name = "承接人")] |
|||
public string ClaimsUserName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 三方库申请类型
|
|||
/// </summary>
|
|||
[Display(Name = "三方库申请类型")] |
|||
public string Type { get; set; } |
|||
} |
|||
|
@ -1,27 +1,15 @@ |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Entities; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
public class ThirdLocationRequestDTO : SfsStoreRequestDTOBase<ThirdLocationRequestDetailDTO>, IHasNumber |
|||
{ |
|||
/// <summary>
|
|||
/// 类型
|
|||
/// 三方库申请类型
|
|||
/// </summary>
|
|||
[Display(Name = "类型")] |
|||
[Display(Name = "三方库申请类型")] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 申请单件码
|
|||
/// </summary>
|
|||
[IgnoreUpdate] |
|||
public string SingleCodeRequest { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否使用在途库
|
|||
/// </summary>
|
|||
[Display(Name = "是否使用在途库")] |
|||
public bool IsUseOnTheWayLocation { get; set; } |
|||
|
|||
|
|||
} |
|||
|
@ -1,78 +1,65 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp; |
|||
using Win_in.Sfs.Shared.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
/// <summary>
|
|||
/// 三方库库移记录
|
|||
/// 三方库库移记录
|
|||
/// </summary>
|
|||
public class ThirdLocationNote : SfsStoreAggregateRootBase<ThirdLocationNoteDetail>, IHasJobNumber, IHasRequestNumber |
|||
{ |
|||
/// <summary>
|
|||
/// 任务ID
|
|||
/// 发出时间
|
|||
/// </summary>
|
|||
[IgnoreUpdate] |
|||
public string JobNumber { get; set; } |
|||
|
|||
public DateTime IssueTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 车间
|
|||
/// 接收时间
|
|||
/// </summary>
|
|||
[IgnoreUpdate] |
|||
public string Workshop { get; set; } |
|||
public DateTime ReceiptTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 明细列表
|
|||
/// 请求单号
|
|||
/// </summary>
|
|||
[IgnoreUpdate] |
|||
public override List<ThirdLocationNoteDetail> Details { get; set; } = new List<ThirdLocationNoteDetail>(); |
|||
|
|||
[IgnoreUpdate] |
|||
[Display(Name = "请求单号")] |
|||
public string RequestNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 叫料请求类型
|
|||
/// 任务单号
|
|||
/// </summary>
|
|||
[IgnoreUpdate] |
|||
public string RequestType { get; set; } |
|||
[Display(Name = "任务单号")] |
|||
public string JobNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 使用在途库
|
|||
/// 已承接
|
|||
/// </summary>
|
|||
[IgnoreUpdate] |
|||
public bool UseOnTheWayLocation { get; set; } |
|||
/// <returns></returns>
|
|||
[Display(Name = "是否已承接")] |
|||
public bool IsClaims { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 确认时间
|
|||
/// 承接人ID
|
|||
/// </summary>
|
|||
[Display(Name = "确认时间")] |
|||
[IgnoreUpdate] |
|||
public DateTime? ConfirmTime { get; set; } |
|||
/// <returns></returns>
|
|||
[Display(Name = "承接人ID")] |
|||
public string ClaimsUserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 已确认
|
|||
/// 承接人
|
|||
/// </summary>
|
|||
[Display(Name = "已确认")] |
|||
public bool Confirmed { get; set; } |
|||
|
|||
public void Confirm(DateTime confirmTime) |
|||
{ |
|||
|
|||
CheckStatus(Confirmed); |
|||
Confirmed = true; |
|||
ConfirmTime = confirmTime; |
|||
} |
|||
/// <returns></returns>
|
|||
[Display(Name = "承接人")] |
|||
public string ClaimsUserName { get; set; } |
|||
|
|||
private static void CheckStatus(bool confirmed) |
|||
{ |
|||
if (confirmed) |
|||
{ |
|||
throw new UserFriendlyException($"当前状态为 【已确认】 ,无法再次确认!"); |
|||
} |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 三方库申请类型
|
|||
/// </summary>
|
|||
[Display(Name = "三方库申请类型")] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 明细列表
|
|||
/// </summary>
|
|||
public override List<ThirdLocationNoteDetail> Details { get; set; } = new(); |
|||
} |
|||
|
@ -1,43 +1,116 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
public class ThirdLocationNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase |
|||
{ |
|||
#region 目标库位
|
|||
|
|||
/// <summary>
|
|||
/// 发出时间
|
|||
/// 到库位
|
|||
/// </summary>
|
|||
public DateTime IssueTime { get; set; } |
|||
public string ToLocationCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 过期时间
|
|||
/// 到库区
|
|||
/// </summary>
|
|||
public DateTime ExpiredTime { get; set; } |
|||
public string ToLocationArea { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货单件码
|
|||
/// 到库位组
|
|||
/// </summary>
|
|||
public string SingleCodeJob { get; set; } |
|||
public string ToLocationGroup { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 申请单件码
|
|||
/// 到ERP库位
|
|||
/// </summary>
|
|||
public string SingleCodeRequest { get; set; } |
|||
public string ToLocationErpCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 到仓库
|
|||
/// </summary>
|
|||
public string ToWarehouseCode { get; set; } |
|||
|
|||
#endregion
|
|||
|
|||
#region 来源库位
|
|||
|
|||
/// <summary>
|
|||
/// 到库位
|
|||
/// </summary>
|
|||
public string FromLocationCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 在途库库位
|
|||
/// 到库区
|
|||
/// </summary>
|
|||
public string FromLocationArea { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 到库位组
|
|||
/// </summary>
|
|||
public string FromLocationGroup { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 到ERP库位
|
|||
/// </summary>
|
|||
public string FromLocationErpCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 到仓库
|
|||
/// </summary>
|
|||
public string FromWarehouseCode { get; set; } |
|||
|
|||
#endregion
|
|||
|
|||
#region 在途库位
|
|||
|
|||
/// <summary>
|
|||
/// 在途库库位
|
|||
/// </summary>
|
|||
public string OnTheWayLocationCode { get; set; } |
|||
|
|||
#endregion
|
|||
|
|||
/// <summary>
|
|||
/// 申请单件码
|
|||
/// </summary>
|
|||
public string SingleCodeRequest { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 已发数量
|
|||
/// </summary>
|
|||
public decimal IssuedQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 已收数量
|
|||
/// </summary>
|
|||
public decimal ReceivedQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 箱码
|
|||
/// </summary>
|
|||
public string PackingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 批次
|
|||
/// </summary>
|
|||
public string Lot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 过期时间
|
|||
/// </summary>
|
|||
public DateTime ExpiredTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 位置码
|
|||
/// 库位状态
|
|||
/// </summary>
|
|||
public string PositionCode { get; set; } |
|||
public EnumInventoryStatus EnumInventoryStatus { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 推荐类型
|
|||
/// 请求未收
|
|||
/// </summary>
|
|||
public EnumRecommendType RecommendType { get; set; } |
|||
[NotMapped] |
|||
public decimal NotFinishQty => IssuedQty - ReceivedQty; |
|||
} |
|||
|
@ -1,35 +1,16 @@ |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Domain; |
|||
|
|||
/// <summary>
|
|||
/// 三方库移库申请
|
|||
/// 三方库移库申请
|
|||
/// </summary>
|
|||
public class ThirdLocationRequest : SfsStoreRequestAggregateRootBase<ThirdLocationRequestDetail> |
|||
{ |
|||
/// <summary>
|
|||
/// 叫料类型
|
|||
/// 三方库申请类型
|
|||
/// </summary>
|
|||
[Display(Name = "叫料类型")] |
|||
[IgnoreUpdate] |
|||
[Display(Name = "三方库申请类型")] |
|||
public string Type { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 申请单件码
|
|||
/// </summary>
|
|||
[IgnoreUpdate] |
|||
public string SingleCodeRequest { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 使用在途库
|
|||
/// </summary>
|
|||
public bool UseOnTheWayLocation { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 明细列表
|
|||
/// </summary>
|
|||
[IgnoreUpdate] |
|||
public override List<ThirdLocationRequestDetail> Details { get; set; } = new List<ThirdLocationRequestDetail>(); |
|||
} |
|||
|
File diff suppressed because it is too large
@ -0,0 +1,835 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Migrations |
|||
{ |
|||
public partial class Added_ThirdLocation : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Store_ThirdLocationNoteDetail_FromPackingCode", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Store_ThirdLocationNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PositionCode", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RecommendType", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "WorkStation", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SingleCodeRequest", |
|||
table: "Store_ThirdLocationRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "UseOnTheWayLocation", |
|||
table: "Store_ThirdLocationRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IssueTime", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PositionCode", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RecommendType", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SingleCodeJob", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ConfirmTime", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Confirmed", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RequestType", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Workshop", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "DistributionType", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Operation", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PlannedSplitRule", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PositionCode", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RecommendType", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SingleCodeJob", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "TruncType", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RequestType", |
|||
table: "Job_ThirdLocationJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SingleCodeJob", |
|||
table: "Job_ThirdLocationJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Workshop", |
|||
table: "Job_ThirdLocationJob"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "UseOnTheWayLocation", |
|||
table: "Store_ThirdLocationNote", |
|||
newName: "IsClaims"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "RoundedQty", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
newName: "ReceivedQty"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "PlanBeginTime", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
newName: "IssueTime"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "DeliveryQty", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
newName: "IssuedQty"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "UseOnTheWayLocation", |
|||
table: "Job_ThirdLocationJob", |
|||
newName: "IsClaims"); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "EnumInventoryStatus", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "FromLocationErpCode", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "FromLocationGroup", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "FromWarehouseCode", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Lot", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PackingCode", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "FromPackingCode", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(450)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "EnumInventoryStatus", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<decimal>( |
|||
name: "IssuedQty", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "decimal(18,6)", |
|||
nullable: false, |
|||
defaultValue: 0m); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Lot", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PackingCode", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<decimal>( |
|||
name: "ReceivedQty", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "decimal(18,6)", |
|||
nullable: false, |
|||
defaultValue: 0m); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserId", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserName", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "IssueTime", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "ReceiptTime", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Type", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "ChassisNumber", |
|||
table: "Store_KittingPackagingNoteChassisDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true, |
|||
oldClrType: typeof(long), |
|||
oldType: "bigint"); |
|||
|
|||
migrationBuilder.AddColumn<long>( |
|||
name: "ChassisSortNumber", |
|||
table: "Store_KittingPackagingNoteChassisDetail", |
|||
type: "bigint", |
|||
nullable: false, |
|||
defaultValue: 0L); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Configuration", |
|||
table: "Store_Chassis", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "EnumInventoryStatus", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "FromLocationErpCode", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "FromLocationGroup", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "FromWarehouseCode", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsOnTheWayLocationCode", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Lot", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PackingCode", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserId", |
|||
table: "Job_ThirdLocationJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserName", |
|||
table: "Job_ThirdLocationJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Type", |
|||
table: "Job_ThirdLocationJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserId", |
|||
table: "Job_SparePartIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserName", |
|||
table: "Job_SparePartIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsClaims", |
|||
table: "Job_SparePartIssueJob", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserId", |
|||
table: "Job_KittingIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserName", |
|||
table: "Job_KittingIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsClaims", |
|||
table: "Job_KittingIssueJob", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserId", |
|||
table: "Job_InjectionIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserName", |
|||
table: "Job_InjectionIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsClaims", |
|||
table: "Job_InjectionIssueJob", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserId", |
|||
table: "Job_CoatingIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserName", |
|||
table: "Job_CoatingIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsClaims", |
|||
table: "Job_CoatingIssueJob", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserId", |
|||
table: "Job_AssembleIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClaimsUserName", |
|||
table: "Job_AssembleIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsClaims", |
|||
table: "Job_AssembleIssueJob", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_ThirdLocationNoteDetail_Number", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
column: "Number"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Store_ThirdLocationNoteDetail_Number", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "EnumInventoryStatus", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "FromLocationErpCode", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "FromLocationGroup", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "FromWarehouseCode", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Lot", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PackingCode", |
|||
table: "Store_ThirdLocationRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "EnumInventoryStatus", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IssuedQty", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Lot", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PackingCode", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ReceivedQty", |
|||
table: "Store_ThirdLocationNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserId", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserName", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IssueTime", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ReceiptTime", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Type", |
|||
table: "Store_ThirdLocationNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ChassisSortNumber", |
|||
table: "Store_KittingPackagingNoteChassisDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Configuration", |
|||
table: "Store_Chassis"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "EnumInventoryStatus", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "FromLocationErpCode", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "FromLocationGroup", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "FromWarehouseCode", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsOnTheWayLocationCode", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Lot", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PackingCode", |
|||
table: "Job_ThirdLocationJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserId", |
|||
table: "Job_ThirdLocationJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserName", |
|||
table: "Job_ThirdLocationJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Type", |
|||
table: "Job_ThirdLocationJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserId", |
|||
table: "Job_SparePartIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserName", |
|||
table: "Job_SparePartIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsClaims", |
|||
table: "Job_SparePartIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserId", |
|||
table: "Job_KittingIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserName", |
|||
table: "Job_KittingIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsClaims", |
|||
table: "Job_KittingIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserId", |
|||
table: "Job_InjectionIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserName", |
|||
table: "Job_InjectionIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsClaims", |
|||
table: "Job_InjectionIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserId", |
|||
table: "Job_CoatingIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserName", |
|||
table: "Job_CoatingIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsClaims", |
|||
table: "Job_CoatingIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserId", |
|||
table: "Job_AssembleIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClaimsUserName", |
|||
table: "Job_AssembleIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsClaims", |
|||
table: "Job_AssembleIssueJob"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "IsClaims", |
|||
table: "Store_ThirdLocationNote", |
|||
newName: "UseOnTheWayLocation"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "ReceivedQty", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
newName: "RoundedQty"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "IssuedQty", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
newName: "DeliveryQty"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "IssueTime", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
newName: "PlanBeginTime"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "IsClaims", |
|||
table: "Job_ThirdLocationJob", |
|||
newName: "UseOnTheWayLocation"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PositionCode", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RecommendType", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: false, |
|||
defaultValue: ""); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "WorkStation", |
|||
table: "Store_ThirdLocationRequestDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "SingleCodeRequest", |
|||
table: "Store_ThirdLocationRequest", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "UseOnTheWayLocation", |
|||
table: "Store_ThirdLocationRequest", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "FromPackingCode", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "nvarchar(450)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "IssueTime", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PositionCode", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RecommendType", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: false, |
|||
defaultValue: ""); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "SingleCodeJob", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "ConfirmTime", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "datetime2", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "Confirmed", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RequestType", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Workshop", |
|||
table: "Store_ThirdLocationNote", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<long>( |
|||
name: "ChassisNumber", |
|||
table: "Store_KittingPackagingNoteChassisDetail", |
|||
type: "bigint", |
|||
nullable: false, |
|||
defaultValue: 0L, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(64)", |
|||
oldMaxLength: 64, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "DistributionType", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: false, |
|||
defaultValue: ""); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Operation", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PlannedSplitRule", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: false, |
|||
defaultValue: ""); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PositionCode", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RecommendType", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: false, |
|||
defaultValue: ""); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "SingleCodeJob", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "TruncType", |
|||
table: "Job_ThirdLocationJobDetail", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: false, |
|||
defaultValue: ""); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RequestType", |
|||
table: "Job_ThirdLocationJob", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "SingleCodeJob", |
|||
table: "Job_ThirdLocationJob", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Workshop", |
|||
table: "Job_ThirdLocationJob", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_ThirdLocationNoteDetail_FromPackingCode", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
column: "FromPackingCode"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_ThirdLocationNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", |
|||
table: "Store_ThirdLocationNoteDetail", |
|||
columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, |
|||
unique: true, |
|||
filter: "[FromPackingCode] IS NOT NULL"); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue