45 changed files with 67748 additions and 2052 deletions
@ -0,0 +1,204 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text.Json; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Polly.Caching; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
using Win_in.Sfs.Auth.Application.Contracts; |
||||
|
using Win_in.Sfs.Basedata.Application.Contracts; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
using Win_in.Sfs.Shared.Domain.Shared; |
||||
|
using Win_in.Sfs.Wms.Inventory.Application.Contracts; |
||||
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
[ApiController] |
||||
|
[Route($"{PdaHostConst.ROOT_ROUTE}job/third-location")] |
||||
|
public class ThirdLocationJobController : AbpController |
||||
|
{ |
||||
|
private readonly IThirdLocationJobAppService _thirdLocationJobAppService; |
||||
|
|
||||
|
private readonly IUserWorkGroupAppService _userWorkGroupAppService; |
||||
|
|
||||
|
private readonly IDictAppService _dictApp; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="thirdLocationJobAppService"></param>
|
||||
|
/// <param name="userWorkGroupAppService"></param>
|
||||
|
public ThirdLocationJobController( |
||||
|
IThirdLocationJobAppService thirdLocationJobAppService, |
||||
|
IDictAppService dictApp |
||||
|
, IUserWorkGroupAppService userWorkGroupAppService) |
||||
|
{ |
||||
|
_userWorkGroupAppService = userWorkGroupAppService; |
||||
|
_thirdLocationJobAppService = thirdLocationJobAppService; |
||||
|
_dictApp = dictApp; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取任务详情
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("{id}")] |
||||
|
|
||||
|
public virtual async Task<ActionResult<ThirdLocationJobDTO>> GetAsync(Guid id) |
||||
|
{ |
||||
|
var result = await _thirdLocationJobAppService.GetAsync(id).ConfigureAwait(false); |
||||
|
return Ok(result); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取列表 筛选
|
||||
|
/// </summary>
|
||||
|
/// <param name="sfsRequestDTO"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("list")] |
||||
|
public virtual async Task<PagedResultDto<ThirdLocationJobDTO>> GetListAsync(SfsJobRequestInputBase sfsRequestDTO) |
||||
|
{ |
||||
|
var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false); |
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取列表
|
||||
|
/// </summary>
|
||||
|
/// <param name="pageSize"></param>
|
||||
|
/// <param name="pageIndex"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("list")] |
||||
|
public virtual async Task<PagedResultDto<ThirdLocationJobDTO>> GetListAsync(int pageSize, int pageIndex, bool isFinished) |
||||
|
{ |
||||
|
var dtos = await _dictApp.GetByCodeAsync("ContainerSpecificationsType").ConfigureAwait(false); |
||||
|
|
||||
|
var status = new List<int>(); |
||||
|
if (isFinished == true) |
||||
|
{ |
||||
|
status.Add((int)EnumJobStatus.Done); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
status.Add((int)EnumJobStatus.Open); |
||||
|
} |
||||
|
var jsonStatus = JsonSerializer.Serialize(status); |
||||
|
|
||||
|
var request = new SfsJobRequestInputBase |
||||
|
{ |
||||
|
MaxResultCount = pageSize, |
||||
|
SkipCount = (pageIndex - 1) * pageSize, |
||||
|
Sorting = $"{nameof(ThirdLocationJobDTO.CreationTime)} ASC", |
||||
|
Condition = new Condition |
||||
|
{ |
||||
|
Filters = new List<Filter> |
||||
|
{ |
||||
|
new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In") |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); |
||||
|
|
||||
|
|
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据Job Number 获取任务列表
|
||||
|
/// </summary>
|
||||
|
/// <param name="jobNumber"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("by-number/{jobNumber}")] |
||||
|
public virtual async Task<ActionResult<ThirdLocationJobDTO>> GetByNumberAsync(string jobNumber) |
||||
|
{ |
||||
|
var jobDto = await _thirdLocationJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false); |
||||
|
if (jobDto == null) |
||||
|
{ |
||||
|
throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务"); |
||||
|
} |
||||
|
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); |
||||
|
if (!wlgCodes.Contains(jobDto.WorkGroupCode)) |
||||
|
{ |
||||
|
return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); |
||||
|
} |
||||
|
if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id) |
||||
|
{ |
||||
|
return new NotFoundObjectResult($"任务正在被 {jobDto.AcceptUserName} 处理"); |
||||
|
} |
||||
|
return jobDto; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取任务数量
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("count")] |
||||
|
public virtual async Task<ActionResult<long>> CountAsync() |
||||
|
{ |
||||
|
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); |
||||
|
var jsonCodes = JsonSerializer.Serialize(wlgCodes); |
||||
|
|
||||
|
var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; |
||||
|
var jsonStatus = JsonSerializer.Serialize(status); |
||||
|
|
||||
|
var request = new SfsJobRequestInputBase |
||||
|
{ |
||||
|
Sorting = $"{nameof(ThirdLocationJobDTO.Priority)} ASC", |
||||
|
Condition = new Condition |
||||
|
{ |
||||
|
Filters = new List<Filter> |
||||
|
{ |
||||
|
new(nameof(ThirdLocationJobDTO.WorkGroupCode),jsonCodes,"In"), |
||||
|
new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In") |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
var count = await _thirdLocationJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false); |
||||
|
|
||||
|
return Ok(count); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 承接任务
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("take/{id}")] |
||||
|
public virtual async Task TakeAsync(Guid id) |
||||
|
{ |
||||
|
await _thirdLocationJobAppService.AcceptAsync(id).ConfigureAwait(false); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 取消承接任务
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("cancel-take/{id}")] |
||||
|
public virtual async Task CancelTakeAsync(Guid id) |
||||
|
{ |
||||
|
await _thirdLocationJobAppService.CancelAcceptAsync(id).ConfigureAwait(false); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 执行任务
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="dto"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("finish/{id}")] |
||||
|
public virtual async Task FinishAsync(Guid id, [FromBody] ThirdLocationJobDTO dto) |
||||
|
{ |
||||
|
await _thirdLocationJobAppService.CompleteAsync(id, dto).ConfigureAwait(false); |
||||
|
} |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
[ApiController] |
||||
|
[Route($"{PdaHostConst.ROOT_ROUTE}store/third-location-note")] |
||||
|
|
||||
|
public class ThirdLocationNoteController : AbpController |
||||
|
{ |
||||
|
private readonly IThirdLocationNoteAppService _thirdLocationNoteAppService; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="thirdLocationNoteAppService"></param>
|
||||
|
public ThirdLocationNoteController(IThirdLocationNoteAppService thirdLocationNoteAppService) |
||||
|
{ |
||||
|
_thirdLocationNoteAppService = thirdLocationNoteAppService; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 创建器具转移记录
|
||||
|
/// </summary>
|
||||
|
/// <param name="input">CreateInput</param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("")] |
||||
|
public virtual async Task CreateAsync(ThirdLocationNoteEditInput input) |
||||
|
{ |
||||
|
await _thirdLocationNoteAppService.CreateAsync(input).ConfigureAwait(false); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///三方库库移请求
|
||||
|
/// </summary>
|
||||
|
[ApiController] |
||||
|
[Route($"{PdaHostConst.ROOT_ROUTE}store/third-location-request")] |
||||
|
|
||||
|
public class ThirdLocationRequestController : AbpController |
||||
|
{ |
||||
|
private readonly IThirdLocationRequestAppService _thirdLocationRequestAppService; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="ThirdLocationRequestAppService"></param>
|
||||
|
public ThirdLocationRequestController(IThirdLocationRequestAppService ThirdLocationRequestAppService) |
||||
|
{ |
||||
|
_thirdLocationRequestAppService = ThirdLocationRequestAppService; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 三方库库移申请
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("")] |
||||
|
public virtual async Task CreateAsync(ThirdLocationRequestEditInput input) |
||||
|
{ |
||||
|
_ = await _thirdLocationRequestAppService.CreateAsync(input).ConfigureAwait(false); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据number获取三方库库移申请详情
|
||||
|
/// </summary>
|
||||
|
/// <param name="number"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("{number}")] |
||||
|
|
||||
|
public virtual async Task<ActionResult<ThirdLocationRequestDTO>> GetAsync(string number) |
||||
|
{ |
||||
|
var result = await _thirdLocationRequestAppService.GetByNumberAsync(number).ConfigureAwait(false); |
||||
|
return Ok(result); |
||||
|
} |
||||
|
|
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,223 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Win_in.Sfs.Basedata.Migrations |
||||
|
{ |
||||
|
public partial class BaseData_ProductLine_BaseData_ProductLineItem : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropPrimaryKey( |
||||
|
name: "PK_Basedata_ProductionLineItem", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ProductLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLine"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RawLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLine"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Type", |
||||
|
table: "Basedata_ProductionLine"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "WipLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLine"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ItemDesc1", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ItemDesc2", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ItemName", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ProductLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RawLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "WipLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "LocationCode", |
||||
|
table: "Basedata_ProductionLine", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: false, |
||||
|
defaultValue: ""); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "Type", |
||||
|
table: "Basedata_Equipment", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(int), |
||||
|
oldType: "int", |
||||
|
oldMaxLength: 64); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "Model", |
||||
|
table: "Basedata_Equipment", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(int), |
||||
|
oldType: "int", |
||||
|
oldMaxLength: 64); |
||||
|
|
||||
|
migrationBuilder.AddPrimaryKey( |
||||
|
name: "PK_Basedata_ProductionLineItem", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
column: "ProdLineCode"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Basedata_ItemContainer", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
ContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ContainerName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ContainerType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
BasicUom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Qty = table.Column<decimal>(type: "decimal(18,6)", 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_Basedata_ItemContainer", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Basedata_ItemContainer_ItemCode_ContainerCode", |
||||
|
table: "Basedata_ItemContainer", |
||||
|
columns: new[] { "ItemCode", "ContainerCode" }, |
||||
|
unique: true); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Basedata_ItemContainer"); |
||||
|
|
||||
|
migrationBuilder.DropPrimaryKey( |
||||
|
name: "PK_Basedata_ProductionLineItem", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ItemDesc1", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ItemDesc2", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ItemName", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ProductLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RawLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "WipLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "LocationCode", |
||||
|
table: "Basedata_ProductionLine"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ProductLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLine", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RawLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLine", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Type", |
||||
|
table: "Basedata_ProductionLine", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: false, |
||||
|
defaultValue: ""); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "WipLocationCodeListJson", |
||||
|
table: "Basedata_ProductionLine", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<int>( |
||||
|
name: "Type", |
||||
|
table: "Basedata_Equipment", |
||||
|
type: "int", |
||||
|
maxLength: 64, |
||||
|
nullable: false, |
||||
|
defaultValue: 0, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(max)", |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<int>( |
||||
|
name: "Model", |
||||
|
table: "Basedata_Equipment", |
||||
|
type: "int", |
||||
|
maxLength: 64, |
||||
|
nullable: false, |
||||
|
defaultValue: 0, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(64)", |
||||
|
oldMaxLength: 64, |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AddPrimaryKey( |
||||
|
name: "PK_Basedata_ProductionLineItem", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
column: "Id"); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Win_in.Sfs.Shared.Domain.Shared.Enums.Store; |
||||
|
public enum EnumIssueType |
||||
|
{ |
||||
|
None=0, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 按箱 叫料
|
||||
|
/// </summary>
|
||||
|
Box=1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 按数量 叫料
|
||||
|
/// </summary>
|
||||
|
Num=2, |
||||
|
} |
@ -1,16 +1,14 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Domain; |
namespace Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
using Win_in.Sfs.Shared.Domain; |
|
||||
|
|
||||
public interface IInjectionRequestManager : ISfsStoreRequestManager<InjectionRequest, InjectionRequestDetail>, |
public interface IInjectionRequestManager : ISfsStoreRequestManager<InjectionRequest, InjectionRequestDetail>, |
||||
IBulkImportService<InjectionRequest> |
IBulkImportService<InjectionRequest> |
||||
{ |
{ |
||||
|
|
||||
Task UpdateDetailsAsync(InjectionRequest entity); |
Task UpdateDetailsAsync(InjectionRequest entity); |
||||
|
|
||||
Task CompleteAsync(string number); |
Task CompleteAsync(string number); |
||||
|
|
||||
Task<InjectionRequest> CreateBynNumberAsync(InjectionRequest entity); |
Task<InjectionRequest> CreateByNumberAsync(InjectionRequest entity); |
||||
} |
} |
||||
|
File diff suppressed because it is too large
@ -0,0 +1,568 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Migrations |
||||
|
{ |
||||
|
public partial class Update_InjectionRequest : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "FromLocationArea", |
||||
|
table: "Store_InjectionRequestDetail"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PreparationPlanNumber", |
||||
|
table: "Store_InjectionRequest"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Workshop", |
||||
|
table: "Store_InjectionRequest"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "JobNumber", |
||||
|
table: "Store_ProductRecycleNote", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<decimal>( |
||||
|
name: "ExecutedQty", |
||||
|
table: "Job_ProductRecycleJobDetail", |
||||
|
type: "decimal(18,6)", |
||||
|
nullable: false, |
||||
|
defaultValue: 0m); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RequestNumber", |
||||
|
table: "Job_ProductRecycleJob", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Job_AssembleJob", |
||||
|
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), |
||||
|
AssembleRequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Workshop = 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_AssembleJob", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_AssembleNote", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Workshop = 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_AssembleNote", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_AssembleRequest", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ProdLine = 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_AssembleRequest", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_MesNote", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
MesRequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Type = 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(64)", maxLength: 64, nullable: false), |
||||
|
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Store_MesNote", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Job_AssembleJobDetail", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
RequestLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
OnTheWayLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
Operation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
DistributionType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
TruncType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
RoundedQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
PlannedSplitRule = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
PlanBeginTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
DeliveryQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, 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), |
||||
|
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Uom = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
RecommendQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Job_AssembleJobDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Job_AssembleJobDetail_Job_AssembleJob_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Job_AssembleJob", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_AssembleNoteDetail", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
IssueTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
OnTheWayLocationCode = 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), |
||||
|
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), |
||||
|
FromPackingCode = table.Column<string>(type: "nvarchar(450)", nullable: true), |
||||
|
ToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromLot = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ToLot = table.Column<string>(type: "nvarchar(max)", 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), |
||||
|
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Store_AssembleNoteDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Store_AssembleNoteDetail_Store_AssembleNote_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Store_AssembleNote", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_AssembleRequestDetail", |
||||
|
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), |
||||
|
FromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
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), |
||||
|
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_AssembleRequestDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Store_AssembleRequestDetail_Store_AssembleRequest_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Store_AssembleRequest", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_MesNoteDetail", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
ReasonCode = 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), |
||||
|
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), |
||||
|
FromPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromLot = table.Column<string>(type: "nvarchar(450)", nullable: true), |
||||
|
ToLot = table.Column<string>(type: "nvarchar(max)", 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), |
||||
|
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Store_MesNoteDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Store_MesNoteDetail_Store_MesNote_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Store_MesNote", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Job_AssembleJob_Number", |
||||
|
table: "Job_AssembleJob", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Job_AssembleJobDetail_MasterID", |
||||
|
table: "Job_AssembleJobDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_AssembleNote_Number", |
||||
|
table: "Store_AssembleNote", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_AssembleNoteDetail_FromPackingCode", |
||||
|
table: "Store_AssembleNoteDetail", |
||||
|
column: "FromPackingCode"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_AssembleNoteDetail_MasterID", |
||||
|
table: "Store_AssembleNoteDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_AssembleNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", |
||||
|
table: "Store_AssembleNoteDetail", |
||||
|
columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, |
||||
|
unique: true, |
||||
|
filter: "[FromPackingCode] IS NOT NULL"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_AssembleRequest_Number", |
||||
|
table: "Store_AssembleRequest", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_AssembleRequestDetail_ItemCode", |
||||
|
table: "Store_AssembleRequestDetail", |
||||
|
column: "ItemCode"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_AssembleRequestDetail_MasterID", |
||||
|
table: "Store_AssembleRequestDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_AssembleRequestDetail_Number_ItemCode_ToLocationCode", |
||||
|
table: "Store_AssembleRequestDetail", |
||||
|
columns: new[] { "Number", "ItemCode", "ToLocationCode" }, |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_MesNote_Number", |
||||
|
table: "Store_MesNote", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_MesNoteDetail_MasterID", |
||||
|
table: "Store_MesNoteDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_MesNoteDetail_Number_ItemCode_FromPackingCode_FromLocationCode_ToLocationCode_FromLot_FromStatus", |
||||
|
table: "Store_MesNoteDetail", |
||||
|
columns: new[] { "Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus" }, |
||||
|
unique: true, |
||||
|
filter: "[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Job_AssembleJobDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_AssembleNoteDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_AssembleRequestDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_MesNoteDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Job_AssembleJob"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_AssembleNote"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_AssembleRequest"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_MesNote"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "JobNumber", |
||||
|
table: "Store_ProductRecycleNote"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ExecutedQty", |
||||
|
table: "Job_ProductRecycleJobDetail"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RequestNumber", |
||||
|
table: "Job_ProductRecycleJob"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "FromLocationArea", |
||||
|
table: "Store_InjectionRequestDetail", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "PreparationPlanNumber", |
||||
|
table: "Store_InjectionRequest", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Workshop", |
||||
|
table: "Store_InjectionRequest", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,730 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Migrations |
||||
|
{ |
||||
|
public partial class Update_InjectionRequest_2024_04_09 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.AddColumn<decimal>( |
||||
|
name: "BoxQty", |
||||
|
table: "Store_InjectionRequestDetail", |
||||
|
type: "decimal(18,6)", |
||||
|
nullable: false, |
||||
|
defaultValue: 0m); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Job_ThirdLocationJob", |
||||
|
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), |
||||
|
RequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Workshop = 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_ThirdLocationJob", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_CustomerProductionReturnNote", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ProductionReturnRequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ReturnTime = table.Column<DateTime>(type: "datetime2", 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_CustomerProductionReturnNote", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_InjectioModelPlan", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
PlanDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
PlanTime = table.Column<DateTime>(type: "datetime2", 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_InjectioModelPlan", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_MesRecord", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
MesRequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
State = table.Column<int>(type: "int", 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_MesRecord", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_ThirdLocationNote", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Workshop = 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_ThirdLocationNote", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_ThirdLocationRequest", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ProdLine = 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_ThirdLocationRequest", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Job_ThirdLocationJobDetail", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
RequestLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
OnTheWayLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
Operation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
DistributionType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
TruncType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
RoundedQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
PlannedSplitRule = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
PlanBeginTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
DeliveryQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, 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), |
||||
|
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Uom = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
RecommendQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Job_ThirdLocationJobDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Job_ThirdLocationJobDetail_Job_ThirdLocationJob_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Job_ThirdLocationJob", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_CustomerProductionReturnNoteDetail", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", 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), |
||||
|
FromPackingCode = table.Column<string>(type: "nvarchar(450)", nullable: true), |
||||
|
ToPackingCode = table.Column<string>(type: "nvarchar(450)", nullable: true), |
||||
|
FromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromLot = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ToLot = table.Column<string>(type: "nvarchar(max)", 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), |
||||
|
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Store_CustomerProductionReturnNoteDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Store_CustomerProductionReturnNoteDetail_Store_CustomerProductionReturnNote_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Store_CustomerProductionReturnNote", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_InjectioModelPlanDetail", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
PlanQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
Uom = 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) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Store_InjectioModelPlanDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Store_InjectioModelPlanDetail_Store_InjectioModelPlan_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Store_InjectioModelPlan", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_MesRecordDetail", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
ReasonCode = 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), |
||||
|
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), |
||||
|
FromPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromLot = table.Column<string>(type: "nvarchar(450)", nullable: true), |
||||
|
ToLot = table.Column<string>(type: "nvarchar(max)", 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), |
||||
|
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Store_MesRecordDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Store_MesRecordDetail_Store_MesRecord_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Store_MesRecord", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_ThirdLocationNoteDetail", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
IssueTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
OnTheWayLocationCode = 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), |
||||
|
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), |
||||
|
FromPackingCode = table.Column<string>(type: "nvarchar(450)", nullable: true), |
||||
|
ToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
FromLot = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ToLot = table.Column<string>(type: "nvarchar(max)", 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), |
||||
|
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
FromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
FromStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ToStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
RecommendQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
||||
|
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
HandledLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
HandledQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Store_ThirdLocationNoteDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Store_ThirdLocationNoteDetail_Store_ThirdLocationNote_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Store_ThirdLocationNote", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Store_ThirdLocationRequestDetail", |
||||
|
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), |
||||
|
FromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
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), |
||||
|
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_ThirdLocationRequestDetail", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_Store_ThirdLocationRequestDetail_Store_ThirdLocationRequest_MasterID", |
||||
|
column: x => x.MasterID, |
||||
|
principalTable: "Store_ThirdLocationRequest", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Job_ThirdLocationJob_Number", |
||||
|
table: "Job_ThirdLocationJob", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Job_ThirdLocationJobDetail_MasterID", |
||||
|
table: "Job_ThirdLocationJobDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_CustomerProductionReturnNote_Number", |
||||
|
table: "Store_CustomerProductionReturnNote", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_CustomerProductionReturnNoteDetail_MasterID", |
||||
|
table: "Store_CustomerProductionReturnNoteDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_CustomerProductionReturnNoteDetail_Number_ItemCode_FromPackingCode_ToPackingCode_FromLocationCode_ToLocationCode", |
||||
|
table: "Store_CustomerProductionReturnNoteDetail", |
||||
|
columns: new[] { "Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode" }, |
||||
|
unique: true, |
||||
|
filter: "[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_InjectioModelPlan_Number", |
||||
|
table: "Store_InjectioModelPlan", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_InjectioModelPlanDetail_MasterID", |
||||
|
table: "Store_InjectioModelPlanDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_InjectioModelPlanDetail_Number_ItemCode", |
||||
|
table: "Store_InjectioModelPlanDetail", |
||||
|
columns: new[] { "Number", "ItemCode" }, |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_MesRecord_Number", |
||||
|
table: "Store_MesRecord", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_MesRecordDetail_MasterID", |
||||
|
table: "Store_MesRecordDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_MesRecordDetail_Number_ItemCode_FromPackingCode_FromLocationCode_ToLocationCode_FromLot_FromStatus", |
||||
|
table: "Store_MesRecordDetail", |
||||
|
columns: new[] { "Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus" }, |
||||
|
unique: true, |
||||
|
filter: "[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_ThirdLocationNote_Number", |
||||
|
table: "Store_ThirdLocationNote", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_ThirdLocationNoteDetail_FromPackingCode", |
||||
|
table: "Store_ThirdLocationNoteDetail", |
||||
|
column: "FromPackingCode"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_ThirdLocationNoteDetail_MasterID", |
||||
|
table: "Store_ThirdLocationNoteDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
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"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_ThirdLocationRequest_Number", |
||||
|
table: "Store_ThirdLocationRequest", |
||||
|
column: "Number", |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_ThirdLocationRequestDetail_ItemCode", |
||||
|
table: "Store_ThirdLocationRequestDetail", |
||||
|
column: "ItemCode"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_ThirdLocationRequestDetail_MasterID", |
||||
|
table: "Store_ThirdLocationRequestDetail", |
||||
|
column: "MasterID"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Store_ThirdLocationRequestDetail_Number_ItemCode_ToLocationCode", |
||||
|
table: "Store_ThirdLocationRequestDetail", |
||||
|
columns: new[] { "Number", "ItemCode", "ToLocationCode" }, |
||||
|
unique: true); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Job_ThirdLocationJobDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_CustomerProductionReturnNoteDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_InjectioModelPlanDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_MesRecordDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_ThirdLocationNoteDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_ThirdLocationRequestDetail"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Job_ThirdLocationJob"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_CustomerProductionReturnNote"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_InjectioModelPlan"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_MesRecord"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_ThirdLocationNote"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Store_ThirdLocationRequest"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "BoxQty", |
||||
|
table: "Store_InjectionRequestDetail"); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
Loading…
Reference in new issue