49 changed files with 29418 additions and 375 deletions
@ -0,0 +1,33 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "位置码")] |
|||
|
|||
public class PositionCodeDTO : SfsBaseDataDTOBase, IHasCode |
|||
{ |
|||
/// <summary>
|
|||
/// 代码
|
|||
/// </summary>
|
|||
[Display(Name = "代码")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 物料号
|
|||
/// </summary>
|
|||
[Display(Name = "物料号")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string PartCode { get; set; } |
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量")] |
|||
public decimal StdPackQty { get; set; } |
|||
/// <summary>
|
|||
/// 库位
|
|||
/// </summary>
|
|||
[Display(Name = "库位")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string LocationCode { get; set; } |
|||
} |
@ -0,0 +1,9 @@ |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IPositionCodeService |
|||
: ISfsBaseDataAppServiceBase<PositionCodeDTO, SfsBaseDataRequestInputBase, PositionCodeEditInput> |
|||
, ISfsGetByCodeAppService<PositionCodeDTO> |
|||
{ |
|||
} |
@ -0,0 +1,39 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Serializable] |
|||
public class PositionCodeEditInput : SfsBaseDataCreateOrUpdateInputBase |
|||
{ |
|||
#region Base
|
|||
/// <summary>
|
|||
/// 物料号
|
|||
/// </summary>
|
|||
[Display(Name = "物料号")] |
|||
public string PartCode { get; set; } |
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量")] |
|||
public decimal StdPackQty { get; set; } |
|||
/// <summary>
|
|||
/// 库位
|
|||
/// </summary>
|
|||
[Display(Name = "库位")] |
|||
public string LocationCode { get; set; } |
|||
|
|||
|
|||
#endregion
|
|||
|
|||
#region Create
|
|||
/// <summary>
|
|||
/// 代码
|
|||
/// </summary>
|
|||
[Display(Name = "代码")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string Code { get; set; } |
|||
#endregion
|
|||
} |
@ -0,0 +1,37 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
[Display(Name = "位置码")] |
|||
public class PositionCodeImportInput : SfsBaseDataImportInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 代码
|
|||
/// </summary>
|
|||
[Key] |
|||
[Display(Name = "代码")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string Code { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料号
|
|||
/// </summary>
|
|||
[Display(Name = "物料号")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string PartCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量")] |
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal StdPackQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 库位
|
|||
/// </summary>
|
|||
[Display(Name = "库位")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string LocationCode { get; set; } |
|||
} |
@ -0,0 +1,21 @@ |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public static class PositionCodePermissions |
|||
{ |
|||
|
|||
public const string Default = BasedataPermissions.GroupName + "." + nameof(PositionCode); |
|||
public const string Create = Default + "." + BasedataPermissions.CreateStr; |
|||
public const string Update = Default + "." + BasedataPermissions.UpdateStr; |
|||
public const string Delete = Default + "." + BasedataPermissions.DeleteStr; |
|||
|
|||
public static void AddPositionCodePermission(this PermissionGroupDefinition permissionGroup) |
|||
{ |
|||
var positionCodePermission = permissionGroup.AddPermission(Default, BasedataPermissionDefinitionProvider.L(nameof(PositionCode))); |
|||
positionCodePermission.AddChild(Create, BasedataPermissionDefinitionProvider.L(BasedataPermissions.CreateStr)); |
|||
positionCodePermission.AddChild(Update, BasedataPermissionDefinitionProvider.L(BasedataPermissions.UpdateStr)); |
|||
positionCodePermission.AddChild(Delete, BasedataPermissionDefinitionProvider.L(BasedataPermissions.DeleteStr)); |
|||
} |
|||
} |
@ -1,6 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application.Contracts; |
|||
|
|||
public interface IPurchasePriceSheetAppService : ISfsBaseDataAppServiceBase<PurchasePriceSheetDTO, SfsBaseDataRequestInputBase, PurchasePriceSheetEditInput> |
|||
{ |
|||
|
|||
Task<PurchasePriceSheetDTO> GetByItemCodeAsync(string itemCode); |
|||
} |
|||
|
@ -0,0 +1,49 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Caching; |
|||
using Volo.Abp.Uow; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
using Win_in.Sfs.Basedata.Domain.Shared; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application; |
|||
|
|||
[Authorize] |
|||
[Route($"{BasedataConsts.RootPath}position-code")] |
|||
|
|||
public class PositionCodeAppService |
|||
: SfsBaseDataWithCodeAppServiceBase<PositionCode, PositionCodeDTO, SfsBaseDataRequestInputBase, PositionCodeEditInput, PositionCodeImportInput> |
|||
, IPositionCodeService |
|||
{ |
|||
private readonly IPositionCodeManager _manager; |
|||
|
|||
public PositionCodeAppService(IPositionCodeRepository repository, IDistributedCache<PositionCodeDTO> cache, IPositionCodeManager manager) : base(repository, cache) |
|||
{ |
|||
base.CreatePolicyName = CategoryPermissions.Create; |
|||
base.UpdatePolicyName = CategoryPermissions.Update; |
|||
base.DeletePolicyName = CategoryPermissions.Delete; |
|||
_manager = manager; |
|||
} |
|||
|
|||
|
|||
[HttpPost("")] |
|||
[UnitOfWork] |
|||
public override async Task<PositionCodeDTO> CreateAsync(PositionCodeEditInput input) |
|||
{ |
|||
var existEntity = await GetByCodeAsync(input.Code).ConfigureAwait(false); |
|||
if (existEntity != null) |
|||
{ |
|||
throw new UserFriendlyException($"{input.Code} 已存在"); |
|||
} |
|||
|
|||
var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false); |
|||
Check.NotNull(itemBasic, "物品代码", $"物品 {input.PartCode} 不存在"); |
|||
|
|||
var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false); |
|||
Check.NotNull(location, "库位代码", $"库位 {input.LocationCode} 不存在"); |
|||
|
|||
return await base.CreateAsync(input).ConfigureAwait(false); |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Application; |
|||
|
|||
public partial class BasedataApplicationAutoMapperProfile : Profile |
|||
{ |
|||
private void PositionCodeAutoMapperProfile() |
|||
{ |
|||
CreateMap<PositionCode, PositionCodeDTO>() |
|||
.ReverseMap(); |
|||
|
|||
CreateMap<PositionCodeImportInput, PositionCode>() |
|||
.IgnoreAuditedObjectProperties() |
|||
.Ignore(x => x.TenantId) |
|||
.Ignore(x => x.Remark) |
|||
.Ignore(x => x.ExtraProperties) |
|||
.Ignore(x => x.ConcurrencyStamp) |
|||
; |
|||
|
|||
CreateMap<PositionCode, PositionCodeImportInput>() |
|||
.Ignore(x => x.ReportStatus) |
|||
.Ignore(x => x.ReportReason); |
|||
|
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
using Volo.Abp.Domain.Services; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Domain; |
|||
|
|||
public interface IPositionCodeManager : IDomainService, IBulkImportService<PositionCode> |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,8 @@ |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Domain; |
|||
|
|||
public interface IPositionCodeRepository : ISfsBaseDataRepositoryBase<PositionCode>, ISfsBulkRepositoryBase<PositionCode> |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Entities; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Domain; |
|||
|
|||
/// <summary>
|
|||
/// 位置码
|
|||
/// </summary>
|
|||
public class PositionCode : SfsBaseDataAggregateRootBase, IHasCode |
|||
{ |
|||
/// <summary>
|
|||
/// 位置代码
|
|||
/// </summary>
|
|||
[Display(Name = "位置代码")] |
|||
[IgnoreUpdate] |
|||
public string Code { get; set; } |
|||
/// <summary>
|
|||
/// 物料号
|
|||
/// </summary>
|
|||
[Display(Name = "物料号")] |
|||
public string PartCode { get; set; } |
|||
/// <summary>
|
|||
/// 标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "标包数量")] |
|||
public decimal StdPackQty { get; set; } |
|||
/// <summary>
|
|||
/// 库位
|
|||
/// </summary>
|
|||
[Display(Name = "库位")] |
|||
public string LocationCode { get; set; } |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Services; |
|||
|
|||
namespace Win_in.Sfs.Basedata.Domain; |
|||
|
|||
public class PositionCodeManager : DomainService, IPositionCodeManager |
|||
{ |
|||
private readonly IPositionCodeRepository _repository; |
|||
|
|||
public PositionCodeManager(IPositionCodeRepository repository) |
|||
{ |
|||
_repository = repository; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 执行导入
|
|||
/// </summary>
|
|||
public virtual async Task ImportDataAsync(List<PositionCode> mergeEntities, List<PositionCode> deleteEntities = null) |
|||
{ |
|||
if (deleteEntities != null && deleteEntities.Count > 0) |
|||
{ |
|||
await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); |
|||
} |
|||
|
|||
await _repository.BulkMergeAsync(mergeEntities).ConfigureAwait(false); |
|||
} |
|||
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,35 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.Modeling; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
using Win_in.Sfs.Shared.Domain.Shared; |
|||
using Win_in.Sfs.Shared.EntityFrameworkCore; |
|||
|
|||
namespace Win_in.Sfs.Basedata.EntityFrameworkCore; |
|||
|
|||
public static class PositionCodeDbContextModelCreatingExtensions |
|||
{ |
|||
public static void ConfigurePositionCode(this ModelBuilder builder, BasedataModelBuilderConfigurationOptions options) |
|||
{ |
|||
builder.Entity<PositionCode>(b => |
|||
{ |
|||
//Configure table & schema name
|
|||
b.ToTable(options.TablePrefix + nameof(PositionCode), options.Schema); |
|||
//Configure ABP properties
|
|||
b.ConfigureByConvention(); |
|||
//Configure Sfs base properties
|
|||
b.ConfigureSfsBase(); |
|||
|
|||
//Properties
|
|||
b.Property(q => q.Code).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); |
|||
|
|||
b.Property(q => q.LocationCode).HasMaxLength(SfsPropertyConst.CodeLength); |
|||
b.Property(q => q.PartCode).HasMaxLength(SfsPropertyConst.CodeLength); |
|||
|
|||
//Relations
|
|||
//None
|
|||
|
|||
//Indexes
|
|||
b.HasIndex(q => new { q.Code,q.PartCode,q.LocationCode }).IsUnique(); |
|||
}); |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
|
|||
namespace Win_in.Sfs.Basedata.EntityFrameworkCore; |
|||
|
|||
public class PositionCodeEfCoreRepository : SfsBaseDataEfCoreRepositoryBase<BasedataDbContext, PositionCode>, IPositionCodeRepository, ISfsBulkRepositoryBase<PositionCode> |
|||
{ |
|||
public PositionCodeEfCoreRepository(IDbContextProvider<BasedataDbContext> dbContextProvider) : base(dbContextProvider) |
|||
{ |
|||
} |
|||
} |
@ -0,0 +1,159 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Label.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Store.Domain.Shared.SplitPackings; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.SplitPackings; |
|||
public class SplitPackingRecDTO : SfsBaseDataDTOBase |
|||
{ |
|||
/// <summary>
|
|||
/// 操作类型
|
|||
/// </summary>
|
|||
[Display(Name = "操作类型")] |
|||
public OprTypeEnum OprType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源箱码
|
|||
/// </summary>
|
|||
[Display(Name = "源箱码")] |
|||
public string FromPackingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源顶级箱码
|
|||
/// </summary>
|
|||
[Display(Name = "源顶级箱码")] |
|||
public string FromTopPackingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "源标包数量")] |
|||
public decimal FromStdPackQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源计量单位
|
|||
/// </summary>
|
|||
[Display(Name = "源计量单位")] |
|||
public string FromUom { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源数量
|
|||
/// </summary>
|
|||
[Display(Name = "源数量")] |
|||
public decimal FromQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标箱码
|
|||
/// </summary>
|
|||
[Display(Name = "目标箱码")] |
|||
public string ToPackingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标顶级箱码
|
|||
/// </summary>
|
|||
[Display(Name = "目标顶级箱码")] |
|||
public string ToTopPackingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标标包数量
|
|||
/// </summary>
|
|||
[Display(Name = "目标标包数量")] |
|||
public decimal ToStdPackQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标计量单位
|
|||
/// </summary>
|
|||
[Display(Name = "目标计量单位")] |
|||
public string ToUom { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标数量
|
|||
/// </summary>
|
|||
[Display(Name = "目标数量")] |
|||
public decimal ToQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料号
|
|||
/// </summary>
|
|||
[Display(Name = "物料号")] |
|||
public string ItemCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料名称
|
|||
/// </summary>
|
|||
[Display(Name = "物料名称")] |
|||
public string ItemName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料描述1
|
|||
/// </summary>
|
|||
[Display(Name = "物料描述1")] |
|||
public string ItemDesc1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料描述2
|
|||
/// </summary>
|
|||
[Display(Name = "物料描述2")] |
|||
public string ItemDesc2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源批次
|
|||
/// </summary>
|
|||
[Display(Name = "源批次")] |
|||
public string FromLot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标批次
|
|||
/// </summary>
|
|||
[Display(Name = "目标批次")] |
|||
public string ToLot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购订单
|
|||
/// </summary>
|
|||
[Display(Name = "采购订单")] |
|||
public string PurchaseInfo_PoNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商发货单
|
|||
/// </summary>
|
|||
[Display(Name = "供应商发货单")] |
|||
public string PurchaseInfo_AsnNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 到货通知
|
|||
/// </summary>
|
|||
[Display(Name = "到货通知")] |
|||
public string ArrivalNoticNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 任务单
|
|||
/// </summary>
|
|||
[Display(Name = "任务单")] |
|||
public string TaskOrderNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货记录单
|
|||
/// </summary>
|
|||
[Display(Name = "收货记录单")] |
|||
public string ReceiptRecNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 上架单
|
|||
/// </summary>
|
|||
[Display(Name = "上架单")] |
|||
public string PutOnShelfNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标签类型
|
|||
/// </summary>
|
|||
[Display(Name = "标签类型")] |
|||
public EnumLabelType LabelType { get; set; } |
|||
|
|||
} |
|||
|
@ -0,0 +1,17 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Shared.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.SplitPackings; |
|||
|
|||
public interface ISplitPackingRecAppService |
|||
: ISfsStoreAppServiceBase<SplitPackingRecDTO, SfsBaseDataRequestInputBase, SplitPackingRecEditInput> |
|||
{ |
|||
Task<bool> BatchInsertAsync(List<SplitPackingRecEditInput> inputs); |
|||
|
|||
} |
@ -0,0 +1,161 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Label.Domain.Shared; |
|||
using Win_in.Sfs.Shared.Domain; |
|||
using Win_in.Sfs.Wms.Store.Domain.Shared.SplitPackings; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.SplitPackings; |
|||
|
|||
public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase |
|||
{ |
|||
/// <summary>
|
|||
/// 操作类型
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public OprTypeEnum OprType { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源箱码
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string FromPackingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源顶级箱码
|
|||
/// </summary>
|
|||
//public string FromTopPackingCode { get; set; }
|
|||
|
|||
/// <summary>
|
|||
/// 源标包数量
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal FromStdPackQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源计量单位
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string FromUom { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源数量
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal FromQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标箱码
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ToPackingCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标顶级箱码
|
|||
/// </summary>
|
|||
//public string ToTopPackingCode { get; set; }
|
|||
|
|||
/// <summary>
|
|||
/// 目标标包数量
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal ToStdPackQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标计量单位
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ToUom { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标数量
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
public decimal ToQty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料号
|
|||
/// </summary>
|
|||
[Required(ErrorMessage = "{0}是必填项")] |
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ItemCode { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料名称
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ItemName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料描述1
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ItemDesc1 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 物料描述2
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ItemDesc2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 源批次
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string FromLot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 目标批次
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ToLot { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购订单
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string PurchaseInfo_PoNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 供应商发货单
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string PurchaseInfo_AsnNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 到货通知
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ArrivalNoticNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 任务单
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string TaskOrderNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货记录单
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string ReceiptRecNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 上架单
|
|||
/// </summary>
|
|||
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] |
|||
public string PutOnShelfNumber { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标签类型
|
|||
/// </summary>
|
|||
public EnumLabelType LabelType { get; set; } |
|||
} |
@ -0,0 +1,14 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.SplitPackings.Inputs; |
|||
|
|||
[Display(Name = "拆箱记录")] |
|||
public class SplitPackingRecImportInput : SfsStoreImportInputBase |
|||
{ |
|||
} |
@ -0,0 +1,42 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Components; |
|||
using Win_in.Sfs.Wms.Store.Application; |
|||
using Win_in.Sfs.Wms.Store.Application.Contracts; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
using Win_in.Sfs.Wms.Store.Domain.Shared; |
|||
using Win_in.Sfs.Wms.Store.SplitPackings.Inputs; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.SplitPackings; |
|||
|
|||
/// <summary>
|
|||
/// 拆箱记录
|
|||
/// </summary>
|
|||
//[Authorize]
|
|||
//[Route($"{StoreConsts.RootPath}split-packing-rec")]
|
|||
public class SplitPackingRecAppService : |
|||
SfsStoreAppServiceBase<SplitPackingRec, SplitPackingRecDTO, SfsStoreRequestInputBase, SplitPackingRecEditInput |
|||
, SplitPackingRecImportInput> |
|||
//, ISplitPackingRecAppService
|
|||
{ |
|||
private readonly ISplitPackingRecManager _splitPackingRecManager; |
|||
|
|||
public SplitPackingRecAppService( |
|||
ISplitPackingRecRepository repository, |
|||
ISplitPackingRecManager splitPackingRecManager |
|||
) : base(repository) |
|||
{ |
|||
_splitPackingRecManager = splitPackingRecManager; |
|||
} |
|||
|
|||
public async Task<bool> BatchInsertAsync(List<SplitPackingRecEditInput> inputs) |
|||
{ |
|||
List<SplitPackingRec> lst = ObjectMapper.Map<List<SplitPackingRecEditInput>, List<SplitPackingRec>>(inputs); |
|||
bool ret = await _splitPackingRecManager.BatchInsertAsync(lst).ConfigureAwait(false); |
|||
return ret; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
using Win_in.Sfs.Basedata.Application.Contracts; |
|||
using Win_in.Sfs.Basedata.Domain; |
|||
using Win_in.Sfs.Wms.Store.Domain; |
|||
using Win_in.Sfs.Wms.Store.SplitPackings; |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Application; |
|||
|
|||
public partial class StoreApplicationAutoMapperProfile : Profile |
|||
{ |
|||
private void SplitPackingRecAutoMapperProfile() |
|||
{ |
|||
CreateMap<SplitPackingRec, SplitPackingRecDTO>(); |
|||
CreateMap<SplitPackingRecEditInput, SplitPackingRec>(); |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,644 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Win_in.Sfs.Wms.Store.Migrations |
|||
{ |
|||
public partial class Mig_Store_Init : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CaseCode", |
|||
table: "Store_UnplannedReceiptRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Explain", |
|||
table: "Store_UnplannedReceiptRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OnceBusiCode", |
|||
table: "Store_UnplannedReceiptRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ProjCapacityCode", |
|||
table: "Store_UnplannedReceiptRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ReasonCode", |
|||
table: "Store_UnplannedReceiptRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OANumber", |
|||
table: "Store_UnplannedReceiptRequest", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "UnplannedReceiptType", |
|||
table: "Store_UnplannedReceiptRequest", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CaseCode", |
|||
table: "Store_UnplannedReceiptNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Explain", |
|||
table: "Store_UnplannedReceiptNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OnceBusiCode", |
|||
table: "Store_UnplannedReceiptNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ProjCapacityCode", |
|||
table: "Store_UnplannedReceiptNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OANumber", |
|||
table: "Store_UnplannedReceiptNote", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "UnplannedReceiptType", |
|||
table: "Store_UnplannedReceiptNote", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CaseCode", |
|||
table: "Store_UnplannedIssueRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Explain", |
|||
table: "Store_UnplannedIssueRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OnceBusiCode", |
|||
table: "Store_UnplannedIssueRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ProjCapacityCode", |
|||
table: "Store_UnplannedIssueRequestDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OANumber", |
|||
table: "Store_UnplannedIssueRequest", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "UnplannedIssueType", |
|||
table: "Store_UnplannedIssueRequest", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CaseCode", |
|||
table: "Store_UnplannedIssueNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Explain", |
|||
table: "Store_UnplannedIssueNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OnceBusiCode", |
|||
table: "Store_UnplannedIssueNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ProjCapacityCode", |
|||
table: "Store_UnplannedIssueNoteDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OANumber", |
|||
table: "Store_UnplannedIssueNote", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "UnplannedIssueType", |
|||
table: "Store_UnplannedIssueNote", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Type", |
|||
table: "Store_ProductReceiptRequest", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: false, |
|||
defaultValue: "", |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(64)", |
|||
oldMaxLength: 64, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "InspectDate", |
|||
table: "Store_InspectNoteDetail", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "TyrpNumber", |
|||
table: "Store_ExchangeData", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CaseCode", |
|||
table: "Job_UnplannedReceiptJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Explain", |
|||
table: "Job_UnplannedReceiptJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OnceBusiCode", |
|||
table: "Job_UnplannedReceiptJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ProjCapacityCode", |
|||
table: "Job_UnplannedReceiptJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OANumber", |
|||
table: "Job_UnplannedReceiptJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "UnplannedReceiptType", |
|||
table: "Job_UnplannedReceiptJob", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CaseCode", |
|||
table: "Job_UnplannedIssueJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Explain", |
|||
table: "Job_UnplannedIssueJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OnceBusiCode", |
|||
table: "Job_UnplannedIssueJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ProjCapacityCode", |
|||
table: "Job_UnplannedIssueJobDetail", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "OANumber", |
|||
table: "Job_UnplannedIssueJob", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "UnplannedIssueType", |
|||
table: "Job_UnplannedIssueJob", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Store_WipWarehouseAdjustNote", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
RequestNumber = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
Confirmed = table.Column<bool>(type: "bit", nullable: false), |
|||
ConfirmTime = table.Column<DateTime>(type: "datetime2", 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_WipWarehouseAdjustNote", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Store_WipWarehouseAdjustRequest", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
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), |
|||
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_WipWarehouseAdjustRequest", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Store_WipWarehouseAdjustNoteDetail", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Reason = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
ReasonCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, 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(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) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_Store_WipWarehouseAdjustNoteDetail", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_Store_WipWarehouseAdjustNoteDetail_Store_WipWarehouseAdjustNote_MasterID", |
|||
column: x => x.MasterID, |
|||
principalTable: "Store_WipWarehouseAdjustNote", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Store_WipWarehouseAdjustRequestDetail", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Reason = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|||
ReasonCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, 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(max)", 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) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_Store_WipWarehouseAdjustRequestDetail", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_Store_WipWarehouseAdjustRequestDetail_Store_WipWarehouseAdjustRequest_MasterID", |
|||
column: x => x.MasterID, |
|||
principalTable: "Store_WipWarehouseAdjustRequest", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_WipWarehouseAdjustNote_Number", |
|||
table: "Store_WipWarehouseAdjustNote", |
|||
column: "Number", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_WipWarehouseAdjustNoteDetail_MasterID", |
|||
table: "Store_WipWarehouseAdjustNoteDetail", |
|||
column: "MasterID"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_WipWarehouseAdjustNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode_FromStatus_ToStatus", |
|||
table: "Store_WipWarehouseAdjustNoteDetail", |
|||
columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus" }, |
|||
unique: true, |
|||
filter: "[FromPackingCode] IS NOT NULL"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_WipWarehouseAdjustRequest_Number", |
|||
table: "Store_WipWarehouseAdjustRequest", |
|||
column: "Number", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Store_WipWarehouseAdjustRequestDetail_MasterID", |
|||
table: "Store_WipWarehouseAdjustRequestDetail", |
|||
column: "MasterID"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Store_WipWarehouseAdjustNoteDetail"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "Store_WipWarehouseAdjustRequestDetail"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "Store_WipWarehouseAdjustNote"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "Store_WipWarehouseAdjustRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CaseCode", |
|||
table: "Store_UnplannedReceiptRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Explain", |
|||
table: "Store_UnplannedReceiptRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OnceBusiCode", |
|||
table: "Store_UnplannedReceiptRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProjCapacityCode", |
|||
table: "Store_UnplannedReceiptRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ReasonCode", |
|||
table: "Store_UnplannedReceiptRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OANumber", |
|||
table: "Store_UnplannedReceiptRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "UnplannedReceiptType", |
|||
table: "Store_UnplannedReceiptRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CaseCode", |
|||
table: "Store_UnplannedReceiptNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Explain", |
|||
table: "Store_UnplannedReceiptNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OnceBusiCode", |
|||
table: "Store_UnplannedReceiptNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProjCapacityCode", |
|||
table: "Store_UnplannedReceiptNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OANumber", |
|||
table: "Store_UnplannedReceiptNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "UnplannedReceiptType", |
|||
table: "Store_UnplannedReceiptNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CaseCode", |
|||
table: "Store_UnplannedIssueRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Explain", |
|||
table: "Store_UnplannedIssueRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OnceBusiCode", |
|||
table: "Store_UnplannedIssueRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProjCapacityCode", |
|||
table: "Store_UnplannedIssueRequestDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OANumber", |
|||
table: "Store_UnplannedIssueRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "UnplannedIssueType", |
|||
table: "Store_UnplannedIssueRequest"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CaseCode", |
|||
table: "Store_UnplannedIssueNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Explain", |
|||
table: "Store_UnplannedIssueNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OnceBusiCode", |
|||
table: "Store_UnplannedIssueNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProjCapacityCode", |
|||
table: "Store_UnplannedIssueNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OANumber", |
|||
table: "Store_UnplannedIssueNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "UnplannedIssueType", |
|||
table: "Store_UnplannedIssueNote"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "InspectDate", |
|||
table: "Store_InspectNoteDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "TyrpNumber", |
|||
table: "Store_ExchangeData"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CaseCode", |
|||
table: "Job_UnplannedReceiptJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Explain", |
|||
table: "Job_UnplannedReceiptJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OnceBusiCode", |
|||
table: "Job_UnplannedReceiptJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProjCapacityCode", |
|||
table: "Job_UnplannedReceiptJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OANumber", |
|||
table: "Job_UnplannedReceiptJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "UnplannedReceiptType", |
|||
table: "Job_UnplannedReceiptJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CaseCode", |
|||
table: "Job_UnplannedIssueJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Explain", |
|||
table: "Job_UnplannedIssueJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OnceBusiCode", |
|||
table: "Job_UnplannedIssueJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProjCapacityCode", |
|||
table: "Job_UnplannedIssueJobDetail"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "OANumber", |
|||
table: "Job_UnplannedIssueJob"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "UnplannedIssueType", |
|||
table: "Job_UnplannedIssueJob"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Type", |
|||
table: "Store_ProductReceiptRequest", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(64)", |
|||
oldMaxLength: 64); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
Loading…
Reference in new issue