diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtl.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtl.cs new file mode 100644 index 000000000..7b9b122ee --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtl.cs @@ -0,0 +1,39 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Domain.Entities; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; +public class CallMtl : Entity +{ + /// + /// 序号 + /// + [Key] + public string mesout_callmtl_id { get; set; } + /// + /// 物料 + /// + public string mesout_callmtl_erpno { get; set; } + /// + /// 库位 + /// + public string mesout_callmtl_loc { get; set; } + /// + /// 数量 + /// + public decimal mesout_callmtl_num { get; set; } + /// + /// 时间 + /// + public string mesout_callmtl_wt { get; set; } + + /// + /// 是否读取(0,1) + /// + public long Yl1 { get; set; } + + public override object[] GetKeys() + { + return new object[] { mesout_callmtl_id }; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtlManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtlManager.cs new file mode 100644 index 000000000..d48c9e68e --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/CallMtlManager.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; +public class CallMtlManager : DomainService, ICallMtlManager +{ + private readonly ICallMtlRepository _repository; + + public CallMtlManager(ICallMtlRepository repository) + { + _repository = repository; + } + public virtual async Task> GetToBeProcessedListAsync() + { + var plans = await _repository.GetListAsync(p => p.Yl1 == 0).ConfigureAwait(false); + return plans; + } + public virtual async Task UpdateProcesseErrordListAsync(List entities) + { + var ids = entities.Select(p => p.mesout_callmtl_id); + var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_callmtl_id)).ConfigureAwait(false); + plans.ForEach(p => + { + p.Yl1 = 2; + // p.WmsDate = Clock.Now; + }); + await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + } + public virtual async Task UpdateProcessedListAsync(List entities) + { + var ids = entities.Select(p => p.mesout_callmtl_id); + var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_callmtl_id)).ConfigureAwait(false); + plans.ForEach(p => + { + p.Yl1 = 1; + + // p.WmsDate = Clock.Now; + }); + await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlManager.cs new file mode 100644 index 000000000..7a8ffab76 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlManager.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; +public interface ICallMtlManager +{ + Task> GetToBeProcessedListAsync(); + Task UpdateProcessedListAsync(List entities); + Task UpdateProcesseErrordListAsync(List entities); +} \ No newline at end of file diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlRepository.cs new file mode 100644 index 000000000..7ea7c5a79 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/CallMtl/ICallMtlRepository.cs @@ -0,0 +1,7 @@ +using Volo.Abp.Domain.Repositories; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; +public interface ICallMtlRepository : IRepository +{ + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/Delivery.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/Delivery.cs new file mode 100644 index 000000000..85f87fca3 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/Delivery.cs @@ -0,0 +1,66 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Domain.Entities; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; +public class Delivery : Entity +{ + /// + /// 序号 + /// + [Key] + public string mesout_delivery_id { get; set; } + /// + /// 类型 + /// + public string mesout_delivery_type { get; set; } + /// + /// 物料 + /// + public string mesout_delivery_part { get; set; } + /// + /// 底盘号 + /// + public string mesout_delivery_identity_no { get; set; } + /// + /// 发红储位 + /// + public string mesout_delivery_loc { get; set; } + /// + /// 数量 + /// + public decimal mesout_delivery_num { get; set; } + /// + /// 客户代码 + /// + public string mesout_delivery_customer { get; set; } + + /// + /// 车牌号 + /// + public string mesout_delivery_carno { get; set; } + /// + /// 写入时间 + /// + public string mesout_delivery_wt { get; set; } + /// + /// 发货单号 + /// + public string mesout_delivery_no { get; set; } + /// + /// 器具号 + /// + public string mesout_delivery_container { get; set; } + /// + /// 发货计划号 + /// + public string mesout_delivery_plan { get; set; } + /// + /// 是否读取(0,1) + /// + public long Yl1 { get; set; } + + public override object[] GetKeys() + { + return new object[] { mesout_delivery_id }; + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/DeliveryManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/DeliveryManager.cs new file mode 100644 index 000000000..c5788df2c --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/DeliveryManager.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; +public class DeliveryManager : DomainService, IDeliveryManager +{ + private readonly IDeliveryRepository _repository; + + public DeliveryManager(IDeliveryRepository repository) + { + _repository = repository; + } + public virtual async Task> GetToBeProcessedListAsync() + { + var plans = await _repository.GetListAsync(p => p.Yl1 == 0).ConfigureAwait(false); + return plans; + + } + public virtual async Task UpdateProcesseErrordListAsync(List entities) + { + var ids = entities.Select(p => p.mesout_delivery_id); + var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_delivery_id)).ConfigureAwait(false); + plans.ForEach(p => + { + p.Yl1 = 2; + // p.WmsDate = Clock.Now; + }); + await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + } + public virtual async Task UpdateProcessedListAsync(List entities) + { + var ids = entities.Select(p => p.mesout_delivery_id); + var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_delivery_id)).ConfigureAwait(false); + plans.ForEach(p => + { + p.Yl1 = 1; + + // p.WmsDate = Clock.Now; + }); + await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryManager.cs new file mode 100644 index 000000000..222614bc1 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryManager.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; +public interface IDeliveryManager +{ + Task> GetToBeProcessedListAsync(); + Task UpdateProcessedListAsync(List entities); + Task UpdateProcesseErrordListAsync(List entities); +} \ No newline at end of file diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryRepository.cs new file mode 100644 index 000000000..77310f439 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Delivery/IDeliveryRepository.cs @@ -0,0 +1,8 @@ +using Volo.Abp.Domain.Repositories; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; + +public interface IDeliveryRepository : IRepository +{ + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/Frozen.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/Frozen.cs new file mode 100644 index 000000000..9ae130400 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/Frozen.cs @@ -0,0 +1,49 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Domain.Entities; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; +public class Frozen : Entity +{ + /// + /// 序号 + /// + [Key] + public string mesout_frozen_id { get; set; } + /// + /// 类型 + /// + public string mesout_frozen_type { get; set; } + /// + /// 物料 + /// + public string mesout_frozen_part { get; set; } + /// + /// 日期 + /// + public string mesout_frozen_date { get; set; } + /// + /// 来源库位 + /// + public string mesout_frozen_loc { get; set; } + /// + /// 冻结原因 + /// + public string mesout_frozen_reason { get; set; } + /// + /// 数量 + /// + public decimal mesout_frozen_num { get; set; } + /// + /// 冻结用户 + /// + public string mesout_frozen_user { get; set; } + /// + /// 是否读取(0,1) + /// + public long Yl1 { get; set; } + + public override object[] GetKeys() + { + return new object[] { mesout_frozen_id }; + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/FrozenManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/FrozenManager.cs new file mode 100644 index 000000000..e0f15b29c --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/FrozenManager.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; +public class FrozenManager : DomainService, IFrozenManager +{ + private readonly IFrozenRepository _repository; + + public FrozenManager(IFrozenRepository repository) + { + _repository = repository; + } + public virtual async Task> GetToBeProcessedListAsync() + { + var plans = await _repository.GetListAsync(p => p.Yl1 == 0).ConfigureAwait(false); + return plans; + + } + public virtual async Task UpdateProcesseErrordListAsync(List entities) + { + var ids = entities.Select(p => p.mesout_frozen_id); + var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_frozen_id)).ConfigureAwait(false); + plans.ForEach(p => + { + p.Yl1 = 2; + // p.WmsDate = Clock.Now; + }); + await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + } + public virtual async Task UpdateProcessedListAsync(List entities) + { + var ids = entities.Select(p => p.mesout_frozen_id); + var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_frozen_id)).ConfigureAwait(false); + plans.ForEach(p => + { + p.Yl1 = 1; + + // p.WmsDate = Clock.Now; + }); + await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenManager.cs new file mode 100644 index 000000000..ce90eb038 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenManager.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; +public interface IFrozenManager +{ + Task> GetToBeProcessedListAsync(); + Task UpdateProcessedListAsync(List entities); + Task UpdateProcesseErrordListAsync(List entities); +} \ No newline at end of file diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenRepository.cs new file mode 100644 index 000000000..0cde2a7a6 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Frozen/IFrozenRepository.cs @@ -0,0 +1,7 @@ +using Volo.Abp.Domain.Repositories; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; +public interface IFrozenRepository : IRepository +{ + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/MesOut/MesOut.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/MesOut/MesOut.cs index 34a5aee52..de58a3987 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/MesOut/MesOut.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/MesOut/MesOut.cs @@ -11,6 +11,10 @@ public class MesOut : Entity [Key] public string Mesout_ref_nbr { get; set; } /// + /// 条码号(20240430添加) + /// + public string Mesout_barcode { get; set; } + /// /// 调出储位 /// public string Mesout_id { get; set; } @@ -19,6 +23,10 @@ public class MesOut : Entity /// public string Mesout_part { get; set; } /// + /// 质量补标识(20240430添加) + /// + public string Mesout_quality { get; set; } + /// /// 日期 /// public string Mesout_date { get; set; } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeManager.cs new file mode 100644 index 000000000..474e56296 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeManager.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; +public interface IQtyrfeManager : IDomainService +{ + Task> GetToBeProcessedListAsync(); + Task UpdateProcessedListAsync(List entities); + Task UpdateProcesseErrordListAsync(List entities); +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeRepository.cs new file mode 100644 index 000000000..8535022a2 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/IQtyrfeRepository.cs @@ -0,0 +1,7 @@ +using Volo.Abp.Domain.Repositories; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; +public interface IQtyrfeRepository : IRepository +{ + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs new file mode 100644 index 000000000..b2110b82f --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs @@ -0,0 +1,50 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Domain.Entities; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; +public class Qtyrfe : Entity +{ + /// + /// 序号 + /// + [Key] + public string mesout_qtyrfe_id { get; set; } + /// + /// 物料 + /// + public string mesout_qtyrfe_part { get; set; } + /// + /// 调出储位 + /// + public string mesout_qtyrfe_loc_from { get; set; } + /// + /// 调入储位 + /// + public string mesout_qtyrfe_loc_to { get; set; } + /// + /// 数量 + /// + public decimal mesout_qtyrfe_num { get; set; } + /// + /// 调拨用户 + /// + public string mesout_qtyrfe_user { get; set; } + /// + /// 写入时间 + /// + public string mesout_qtyrfe_wt { get; set; } + /// + /// 类型(1为质量补) + /// + public string mesout_qtyrfe_type { get; set; } + + public override object[] GetKeys() + { + return new object[] { mesout_qtyrfe_id }; + } + + /// + /// 是否读取(0,1) + /// + public long Yl1 { get; set; } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs new file mode 100644 index 000000000..9b1147dcb --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; +public class QtyrfeManager : DomainService, IQtyrfeManager +{ + private readonly IQtyrfeRepository _repository; + + public QtyrfeManager(IQtyrfeRepository repository) + { + _repository = repository; + } + public virtual async Task> GetToBeProcessedListAsync() + { + var plans = await _repository.GetListAsync(p => p.Yl1 == 0).ConfigureAwait(false); + return plans; + + } + public virtual async Task UpdateProcesseErrordListAsync(List entities) + { + var ids = entities.Select(p => p.mesout_qtyrfe_id); + var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_qtyrfe_id)).ConfigureAwait(false); + plans.ForEach(p => + { + p.Yl1 = 2; + // p.WmsDate = Clock.Now; + }); + await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + } + public virtual async Task UpdateProcessedListAsync(List entities) + { + var ids = entities.Select(p => p.mesout_qtyrfe_id); + var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_qtyrfe_id)).ConfigureAwait(false); + plans.ForEach(p => + { + p.Yl1 = 1; + + // p.WmsDate = Clock.Now; + }); + await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..9a28e7a47 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlDbContextModelCreatingExtensions.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; + +namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; +public static class CallMtlDbContextModelCreatingExtensions +{ + public static void ConfigureCallMtl(this ModelBuilder builder, MesModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema Name + b.ToTable(options.TablePrefix + "mesout_callmtl", options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.mesout_callmtl_id).HasMaxLength(20); + b.Property(q => q.mesout_callmtl_erpno).HasMaxLength(20); + b.Property(q => q.mesout_callmtl_loc).HasMaxLength(10); + b.Property(q => q.mesout_callmtl_num).HasPrecision(10, 2); + b.Property(q => q.mesout_callmtl_wt).HasMaxLength(20); + b.Property(q => q.Yl1); + }); + + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlEfCoreRepository.cs new file mode 100644 index 000000000..945973e60 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/CallMtl/CallMtlEfCoreRepository.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; + +namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; +public class CallMtlEfCoreRepository : EfCoreRepository, ICallMtlRepository +{ + public CallMtlEfCoreRepository(IDbContextProvider dbContextProvider) + : base(dbContextProvider) + { + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeDbContextModelCreatingExtensions.cs index 3d5d56d79..85ed867b5 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeDbContextModelCreatingExtensions.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeDbContextModelCreatingExtensions.cs @@ -27,5 +27,9 @@ public static class DataExchangeDbContextModelCreatingExtensions builder.ConfigureScrap(options); builder.ConfigurePck(options); builder.ConfigureBackflu(options); + builder.ConfigureQtyrfe(options); + builder.ConfigureFrozen(options); + builder.ConfigureDelivery(options); + builder.ConfigureCallMtl(options); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeEntityFrameworkCoreFawtygModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeEntityFrameworkCoreFawtygModule.cs index ea5d271be..192205bbc 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeEntityFrameworkCoreFawtygModule.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/DataExchangeEntityFrameworkCoreFawtygModule.cs @@ -3,9 +3,13 @@ using Volo.Abp.BackgroundJobs.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.MySQL; using Volo.Abp.Modularity; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.MesOut; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.PullTask; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; @@ -32,5 +36,9 @@ public class DataExchangeEntityFrameworkCoreFawtygModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); + context.Services.AddTransient(); + context.Services.AddTransient(); + context.Services.AddTransient(); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..4ae9db369 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryDbContextModelCreatingExtensions.cs @@ -0,0 +1,35 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; + +namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; + +public static class DeliveryDbContextModelCreatingExtensions +{ + public static void ConfigureDelivery(this ModelBuilder builder, MesModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema Name + b.ToTable(options.TablePrefix + "mesout_delivery", options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.mesout_delivery_id).HasMaxLength(20); + b.Property(q => q.mesout_delivery_type).HasMaxLength(1); + b.Property(q => q.mesout_delivery_part).HasMaxLength(20); + b.Property(q => q.mesout_delivery_identity_no).HasMaxLength(20); + b.Property(q => q.mesout_delivery_loc).HasMaxLength(10); + b.Property(q => q.mesout_delivery_num).HasPrecision(10, 2); + b.Property(q => q.mesout_delivery_customer).HasMaxLength(10); + b.Property(q => q.mesout_delivery_carno).HasMaxLength(10); + b.Property(q => q.mesout_delivery_wt).HasMaxLength(20); + b.Property(q => q.mesout_delivery_no).HasMaxLength(20); + b.Property(q => q.mesout_delivery_container).HasMaxLength(20); + b.Property(q => q.mesout_delivery_plan).HasMaxLength(20); + b.Property(q => q.Yl1); + }); + + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryEfCoreRepository.cs new file mode 100644 index 000000000..ef2c6e155 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Delivery/DeliveryEfCoreRepository.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; + +namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; + +public class DeliveryEfCoreRepository : EfCoreRepository,IDeliveryRepository +{ + public DeliveryEfCoreRepository(IDbContextProvider dbContextProvider) + : base(dbContextProvider) + { + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..35103288d --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenDbContextModelCreatingExtensions.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; + +namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; +public static class FrozenDbContextModelCreatingExtensions +{ + public static void ConfigureFrozen(this ModelBuilder builder, MesModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema Name + b.ToTable(options.TablePrefix + "mesout_frozen", options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.mesout_frozen_id).HasMaxLength(20); + b.Property(q => q.mesout_frozen_type).HasMaxLength(1); + b.Property(q => q.mesout_frozen_part).HasMaxLength(20); + b.Property(q => q.mesout_frozen_date).HasMaxLength(20); + b.Property(q => q.mesout_frozen_loc).HasMaxLength(10); + b.Property(q => q.mesout_frozen_reason).HasMaxLength(500); + b.Property(q => q.mesout_frozen_num).HasPrecision(10, 2); + b.Property(q => q.mesout_frozen_user).HasMaxLength(20); + b.Property(q => q.Yl1); + }); + + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenEfCoreRepository.cs new file mode 100644 index 000000000..e9dc87935 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Frozen/FrozenEfCoreRepository.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; + +namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; +public class FrozenEfCoreRepository : EfCoreRepository, IFrozenRepository +{ + public FrozenEfCoreRepository(IDbContextProvider dbContextProvider) + : base(dbContextProvider) + { + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/IMesDbContext.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/IMesDbContext.cs index 60810373f..a93053241 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/IMesDbContext.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/IMesDbContext.cs @@ -1,9 +1,13 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.MesOut; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.PullTask; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; @@ -20,4 +24,11 @@ public interface IMesDbContext : IEfCoreDbContext DbSet MesOuts { get; } DbSet PullTasks { get; } DbSet Backflu { get; } + + DbSet Qtyrfe { get; } + + DbSet Frozen { get; } + + DbSet Delivery { get; } + DbSet CallMtl { get; } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesDbContext.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesDbContext.cs index 775047674..c4efc833b 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesDbContext.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesDbContext.cs @@ -1,9 +1,13 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.MesOut; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.PullTask; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; @@ -22,6 +26,13 @@ public class MesDbContext : public virtual DbSet Issue { get; } public virtual DbSet Backflu { get; } + public virtual DbSet Qtyrfe { get; } + + public virtual DbSet Frozen { get; } + + public virtual DbSet Delivery { get; } + + public virtual DbSet CallMtl { get; } public MesDbContext(DbContextOptions options) : base(options) { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesOut/MesOutDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesOut/MesOutDbContextModelCreatingExtensions.cs index 61d77b269..0b8bdd2ff 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesOut/MesOutDbContextModelCreatingExtensions.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/MesOut/MesOutDbContextModelCreatingExtensions.cs @@ -17,8 +17,10 @@ public static class MesOutDbContextModelCreatingExtensions //Properties b.Property(q => q.Mesout_ref_nbr).HasMaxLength(36); + b.Property(q => q.Mesout_barcode).HasMaxLength(20); b.Property(q => q.Mesout_id).HasMaxLength(1); b.Property(q => q.Mesout_part).HasMaxLength(20); + b.Property(q => q.Mesout_quality).HasMaxLength(20); b.Property(q => q.Mesout_date).HasMaxLength(8); b.Property(q => q.Mesout_move).HasPrecision(18, 2); b.Property(q => q.Mesout_unable).HasPrecision(18, 2); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..1950bfa30 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; + +namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; +public static class QtyrfeDbContextModelCreatingExtensions +{ + public static void ConfigureQtyrfe(this ModelBuilder builder, MesModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema Name + b.ToTable(options.TablePrefix + "mesout_qtyrfe", options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.mesout_qtyrfe_id).HasMaxLength(20); + b.Property(q => q.mesout_qtyrfe_part).HasMaxLength(20); + b.Property(q => q.mesout_qtyrfe_loc_from).HasMaxLength(10); + b.Property(q => q.mesout_qtyrfe_loc_to).HasMaxLength(10); + b.Property(q => q.mesout_qtyrfe_num).HasPrecision(10, 2); + b.Property(q => q.mesout_qtyrfe_user).HasMaxLength(20); + b.Property(q => q.mesout_qtyrfe_wt).HasMaxLength(20); + b.Property(q => q.mesout_qtyrfe_type).HasMaxLength(2); + b.Property(q => q.Yl1); + }); + + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeEfCoreRepository.cs new file mode 100644 index 000000000..81886dcaa --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeEfCoreRepository.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; + +namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes; + +public class QtyrfeEfCoreRepository : EfCoreRepository, IQtyrfeRepository +{ + public QtyrfeEfCoreRepository(IDbContextProvider dbContextProvider) + : base(dbContextProvider) + { + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes.csproj b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes.csproj index 89ae346ea..4f26ffa5b 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes.csproj +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes.csproj @@ -1,4 +1,4 @@ - + net6.0 diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs index a29d697f6..efbb754bb 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs @@ -20,6 +20,8 @@ using System.Text.Json.Serialization; using System.IdentityModel.Tokens.Jwt; using Volo.Abp; using System.Net.NetworkInformation; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming; public class InjectionMoldingRequestReader : IReader { @@ -121,7 +123,7 @@ public class InjectionMoldingRequestReader : IReader InjectionIssueRequestEditInput input = new InjectionIssueRequestEditInput(); input.Worker = "Vision"; - input.Type = "Vision"; + input.IssueRequestType = EnumIssueRequestType.Vision; input.AutoSubmit = true; input.ActiveDate = DateTime.Now; input.UseOnTheWayLocation = false; @@ -135,7 +137,7 @@ public class InjectionMoldingRequestReader : IReader ToLocationCode = inject.AreaID.ToString(), PositionCode=inject.CargoID, Qty = 1, - RecommendType = EnumRecommendType.W, + RecommendType = EnumRecommendType.RAW, IssuedQty = 0, ReceivedQty = 0, Status = EnumStatus.Open, diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs index 0f32b55f7..7f5cc4065 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs @@ -3,10 +3,15 @@ using Volo.Abp.AutoMapper; using Win_in.Sfs.Shared.Application; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.WMS.BackFlushNote; +using Win_in.Sfs.Wms.DataExchange.WMS.DeliverNote; +using Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest; +using Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest; using Win_in.Sfs.Wms.DataExchange.WMS.MaterialRequest; +using Win_in.Sfs.Wms.DataExchange.WMS.MesNote; using Win_in.Sfs.Wms.DataExchange.WMS.PCK; using Win_in.Sfs.Wms.DataExchange.WMS.ProductReceiptNote; using Win_in.Sfs.Wms.DataExchange.WMS.ScrapNote; +using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent; @@ -148,16 +153,14 @@ public class FawtygAutoMapperProfile : Profile .IgnoreIHasRecommendAndHandledFrom(); CreateMap() - .Ignore(x => x.Detail) - ; + .Ignore(x => x.Detail); CreateMap(); CreateMap() .Ignore(x => x.Details) .Ignore(x => x.ExtraProperties) .Ignore(x => x.Number) - .Ignore(x => x.JobNumber) - ; + .Ignore(x => x.JobNumber); CreateMap() .Ignore(x => x.ItemName) .Ignore(x => x.ItemDesc1) @@ -174,8 +177,122 @@ public class FawtygAutoMapperProfile : Profile .Ignore(x => x.ExpireDate) .Ignore(x => x.ToWarehouseCode) .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.Uom) + .Ignore(x => x.StdPackQty); + + CreateMap() + .Ignore(x => x.Details) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.RequestNumber) + .Ignore(x => x.JobNumber) + .Ignore(x => x.CallRequestNumber) + .Ignore(x => x.CallJobNumber) + .Ignore(x => x.CallBusinessType) + .Ignore(x => x.CallServerName) + .Ignore(x => x.UseOnTheWayLocation) + .Ignore(x => x.Confirmed) + .Ignore(x => x.ConfirmTime) + .Ignore(x => x.Details) + .Ignore(x => x.ExtraProperties); + CreateMap() + .Ignore(x => x.ItemName) + .Ignore(x => x.ItemDesc1) + .Ignore(x => x.ItemDesc2) + .Ignore(x => x.FromLocationCode) + .Ignore(x => x.FromLocationArea) + .Ignore(x => x.FromLocationGroup) + .Ignore(x => x.FromContainerCode) + .Ignore(x => x.FromWarehouseCode) + .Ignore(x => x.FromLot) + .Ignore(x => x.FromPackingCode) + .Ignore(x => x.ToPackingCode) + .Ignore(x => x.ToContainerCode) + .Ignore(x => x.ToLocationCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.ToLot) + .Ignore(x => x.SupplierBatch) + .Ignore(x => x.ArriveDate) + .Ignore(x => x.ProduceDate) + .Ignore(x => x.ExpireDate) + .Ignore(x => x.Uom) + .Ignore(x => x.StdPackQty); + + CreateMap() + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.JobNumber) + .Ignore(x => x.Details) + .Ignore(x => x.ExtraProperties); + CreateMap() + .ForMember(x => x.FromLocationCode, y => y.MapFrom(t => t.FromLocationErpCode)) + .ForMember(x => x.ToLocationCode, y => y.MapFrom(t => t.ToLocationErpCode)) + .Ignore(x => x.ItemName) + .Ignore(x => x.ItemDesc1) + .Ignore(x => x.ItemDesc2) + .Ignore(x => x.FromLocationArea) + .Ignore(x => x.FromLocationGroup) + .Ignore(x => x.FromContainerCode) + .Ignore(x => x.FromWarehouseCode) + .Ignore(x => x.FromLot) + .Ignore(x => x.FromPackingCode) + .Ignore(x => x.ToPackingCode) + .Ignore(x => x.ToContainerCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.ToLot) + .Ignore(x => x.SupplierBatch) + .Ignore(x => x.ArriveDate) + .Ignore(x => x.ProduceDate) + .Ignore(x => x.ExpireDate) + .Ignore(x => x.Uom) + .Ignore(x => x.StdPackQty); + + CreateMap() + .Ignore(x => x.DeliverPlanNumber) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.Details) + .Ignore(x => x.CustomerAddressCode) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.AutoSubmit) + .Ignore(x => x.AutoAgree) + .Ignore(x => x.AutoHandle) + .Ignore(x => x.AutoCompleteJob) + .Ignore(x => x.DirectCreateNote); + CreateMap() .Ignore(x => x.Uom) .Ignore(x => x.StdPackQty) - ; + .Ignore(x => x.Remark) + .Ignore(x => x.ItemName) + .Ignore(x => x.ItemDesc1) + .Ignore(x => x.ItemDesc2); + + CreateMap() + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.Details) + .Ignore(x => x.AutoSubmit) + .Ignore(x => x.AutoAgree) + .Ignore(x => x.AutoHandle) + .Ignore(x => x.AutoCompleteJob) + .Ignore(x => x.DirectCreateNote) + .Ignore(x => x.UseOnTheWayLocation); + CreateMap() + .Ignore(x => x.Uom) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.Remark) + .Ignore(x => x.ItemName) + .Ignore(x => x.ItemDesc1) + .Ignore(x => x.ItemDesc2) + .Ignore(x => x.ProdLine) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.RequestStatus) + .Ignore(x => x.IssuedQty) + .Ignore(x => x.ReceivedQty) + .Ignore(x => x.Status) + .Ignore(x => x.PositionCode); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlConverter.cs new file mode 100644 index 000000000..a3b56ccb0 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlConverter.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Wms.DataExchange.Domain; +using Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; +public class CallMtlConverter : IIncomingConverter +{ + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + private readonly IIncomingToWmsManager _incomingToWmsManager; + private readonly IObjectMapper _objectMapper; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly ILocationAppService _locationAppService; + private readonly ILogger _logger; + + public CallMtlConverter( + IIncomingToWmsManager incomingToWmsManager + , IObjectMapper objectMapper + , IItemBasicAppService itemBasicAppService + , ILogger logger, + ILocationAppService locationAppService, + IIncomingFromExternalManager incomingFromExternalManager) + { + _incomingToWmsManager = incomingToWmsManager; + _objectMapper = objectMapper; + _itemBasicAppService = itemBasicAppService; + _logger = logger; + _locationAppService = locationAppService; + _incomingFromExternalManager = incomingFromExternalManager; + } + + public virtual async Task ConvertAsync(List incomingFromExternalList) + { + if (!incomingFromExternalList.Any()) + { + _logger.LogInformation("no CallMtls"); + return; + } + + //按Number合并InjectionIssue单据 + var transferNoteList = await BuildIncomingToWmsOfInjectionIssueAsync(incomingFromExternalList).ConfigureAwait(false); + await _incomingToWmsManager.CreateManyAsync(transferNoteList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); + } + + private async Task> BuildIncomingToWmsOfInjectionIssueAsync(List incomingDataList) + { + var incomingToWmsList = new List(); + foreach (var incomingData in incomingDataList) + { + var incomingToWms = new IncomingToWms() + { + DataType = incomingData.DataType, + DataAction = incomingData.DataAction, + SourceSystem = incomingData.SourceSystem, + DataIdentityCode = incomingData.SourceDataGroupCode, + }; + incomingToWms.SetEffectiveDate(incomingData.EffectiveDate); + var exchangeInjectionIssue = JsonSerializer.Deserialize(incomingData.DestinationDataContent); + var wmsInjectionIssueDetail = _objectMapper.Map(exchangeInjectionIssue.Detail); + var wmsInjectionIssue = _objectMapper.Map(exchangeInjectionIssue); + wmsInjectionIssue.Details = new List(); + var item = await _itemBasicAppService.GetByCodeAsync(wmsInjectionIssueDetail.ItemCode).ConfigureAwait(false); + try + { + + if (item != null) + { + wmsInjectionIssueDetail.ItemName = item.Name; + wmsInjectionIssueDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : ""; + wmsInjectionIssueDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : ""; + wmsInjectionIssueDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : ""; + wmsInjectionIssueDetail.StdPackQty = item.StdPackQty; + } + } + catch (Exception) + { + wmsInjectionIssueDetail.ItemName = ""; + wmsInjectionIssueDetail.ItemDesc1 = ""; + wmsInjectionIssueDetail.ItemDesc2 = ""; + wmsInjectionIssueDetail.Uom = ""; + } + + wmsInjectionIssue.Details.Add(wmsInjectionIssueDetail); + + incomingToWms.DataContent = JsonSerializer.Serialize(wmsInjectionIssue); + incomingToWmsList.Add(incomingToWms); + } + return incomingToWmsList; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlReader.cs new file mode 100644 index 000000000..7bc6dd95a --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/CallMtlReader.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Win_in.Sfs.Wms.DataExchange.Domain.Shared; +using Win_in.Sfs.Wms.DataExchange.Domain; +using System.Text.Json; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.CallMtl; +using Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; +public class CallMtlReader : IReader +{ + private readonly ICallMtlManager _CallMtlManager; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + private readonly ILogger _logger; + private readonly ILocationAppService _locationAppService; + + public CallMtlReader( + ICallMtlManager pillTaskManager + , IIncomingFromExternalManager incomingFromExternalManager + , ILogger logger + , ILocationAppService locationAppService + ) + { + _CallMtlManager = pillTaskManager; + _incomingFromExternalManager = incomingFromExternalManager; + _logger = logger; + _locationAppService = locationAppService; + } + + public virtual async Task> ReadAsync() + + { + //从MES读取待处理CallMtl + var toBeProcessedPillTasks = await _CallMtlManager.GetToBeProcessedListAsync().ConfigureAwait(false); + if (!toBeProcessedPillTasks.Any()) + { + _logger.LogInformation("no CallMtls"); + return new List(); + } + //CallMtl逐一转换为MaterialRequest + var holdLocation = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.HOLD).ConfigureAwait(false); + var incomingDataList = BuildIncomingFromExternalFromPillTaskAsync(toBeProcessedPillTasks, holdLocation == null ? "" : holdLocation.Code); + await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false); + //更新MES数据状态 + await _CallMtlManager.UpdateProcessedListAsync(toBeProcessedPillTasks).ConfigureAwait(false); + + return incomingDataList; + } + + private static List BuildIncomingFromExternalFromPillTaskAsync(List toBeProcessedCallMtls, string holdLocationCode) + { + var incomingDataList = new List(); + foreach (var CallMtl in toBeProcessedCallMtls) + { + var incomingData = BuildIncomingFromExternal(CallMtl); + + incomingData.SetEffectiveDate(DateTime.Now); + incomingData.SetSuccess(); + try + { + var MaterialRequest = BuildMesNoteCreateInput(CallMtl, holdLocationCode); + incomingData.DestinationDataContent = JsonSerializer.Serialize(MaterialRequest); + } + catch (Exception ex) + { + incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); + } + + incomingDataList.Add(incomingData); + + } + + return incomingDataList; + } + + private static IncomingFromExternal BuildIncomingFromExternal(CallMtl CallMtl) + { + var incomingData = new IncomingFromExternal() + { + DataType = EnumIncomingDataType.CallMtl.ToString(), + DataAction = EnumExchangeDataAction.Add, + SourceSystem = EnumSystemType.MES.ToString(), + SourceDataId = CallMtl.mesout_callmtl_id.ToString(), + SourceDataGroupCode = CallMtl.mesout_callmtl_id, + SourceDataDetailCode = CallMtl.mesout_callmtl_erpno, + SourceDataContent = JsonSerializer.Serialize(CallMtl), + WriteTime = DateTime.Now, + Writer = nameof(MesIncomingBackgroundWorker), + + DestinationSystem = EnumSystemType.WMS.ToString(), + }; + return incomingData; + } + + private static InjectionIssueRequestExchangeDto BuildMesNoteCreateInput(CallMtl CallMtl, string holdLocationCode) + { + var request = new InjectionIssueRequestExchangeDto() + { + IssueRequestType = EnumIssueRequestType.Mes, + Worker = "MesZDJL", + ActiveDate = DateTime.TryParse(CallMtl.mesout_callmtl_wt, out DateTime dateTime) ? dateTime : DateTime.Now + }; + var detail = new InjectionIssueRequestDetailExchangeDto() + { + ItemCode = CallMtl.mesout_callmtl_erpno, + Qty = CallMtl.mesout_callmtl_num, + BoxQty = CallMtl.mesout_callmtl_num, + ToLocationCode = CallMtl.mesout_callmtl_loc, + RecommendType = EnumRecommendType.RAW, + }; + request.Detail = detail; + return request; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryConverter.cs new file mode 100644 index 000000000..2f321ce47 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryConverter.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Wms.DataExchange.Domain; +using Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; +public class DeliveryConverter : IIncomingConverter +{ + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + private readonly IIncomingToWmsManager _incomingToWmsManager; + private readonly IObjectMapper _objectMapper; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly ICustomerAppService _customerAppService; + private readonly ILogger _logger; + + public DeliveryConverter( + IIncomingToWmsManager incomingToWmsManager + , IObjectMapper objectMapper + , IItemBasicAppService itemBasicAppService + , ILogger logger, + ICustomerAppService customerAppService, + IIncomingFromExternalManager incomingFromExternalManager) + { + _incomingToWmsManager = incomingToWmsManager; + _objectMapper = objectMapper; + _itemBasicAppService = itemBasicAppService; + _logger = logger; + _customerAppService = customerAppService; + _incomingFromExternalManager = incomingFromExternalManager; + } + + public virtual async Task ConvertAsync(List incomingFromExternalList) + { + if (!incomingFromExternalList.Any()) + { + _logger.LogInformation("no Deliverys"); + return; + } + + //按Number合并DeliveryRequest单据 + var transferRequestList = await BuildIncomingToWmsOfDeliveryRequestAsync(incomingFromExternalList).ConfigureAwait(false); + await _incomingToWmsManager.CreateManyAsync(transferRequestList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); + } + + private async Task> BuildIncomingToWmsOfDeliveryRequestAsync(List incomingDataList) + { + var incomingToWmsList = new List(); + var groups = incomingDataList.GroupBy(p => new { p.SourceDataGroupCode ,p.SourceDataDetailCode}); + foreach (var group in groups) + { + var first = group.First(); + var incomingToWms = new IncomingToWms() + { + DataType = first.DataType, + DataAction = first.DataAction, + SourceSystem = first.SourceSystem, + DataIdentityCode = first.SourceDataGroupCode, + }; + incomingToWms.SetEffectiveDate(first.EffectiveDate); + var exchangeDeliveryRequest = JsonSerializer.Deserialize(first.DestinationDataContent); + var wmsDeliveryRequest = _objectMapper.Map(exchangeDeliveryRequest); + wmsDeliveryRequest.Details = new List(); + var cust= await _customerAppService.GetByCodeAsync(wmsDeliveryRequest.CustomerCode).ConfigureAwait(false); + wmsDeliveryRequest.CustomerAddressCode = String.IsNullOrEmpty( cust?.Address)?"无": cust.Address; + foreach (var incomingFromExternal in group.ToList()) + { + var transferRequest = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent); + var wmsDeliveryRequestDetail = _objectMapper.Map(transferRequest.Detail); + var item = await _itemBasicAppService.GetByCodeAsync(wmsDeliveryRequestDetail.ItemCode).ConfigureAwait(false); + try + { + if (item != null) + { + wmsDeliveryRequestDetail.ItemName = item.Name; + wmsDeliveryRequestDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : ""; + wmsDeliveryRequestDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : ""; + wmsDeliveryRequestDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : ""; + wmsDeliveryRequestDetail.StdPackQty = item.StdPackQty; + } + } + catch (Exception) + { + wmsDeliveryRequestDetail.ItemName = ""; + wmsDeliveryRequestDetail.ItemDesc1 = ""; + wmsDeliveryRequestDetail.ItemDesc2 = ""; + wmsDeliveryRequestDetail.Uom = ""; + } + + wmsDeliveryRequest.Details.Add(wmsDeliveryRequestDetail); + } + incomingToWms.DataContent = JsonSerializer.Serialize(wmsDeliveryRequest); + incomingToWmsList.Add(incomingToWms); + } + return incomingToWmsList; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs new file mode 100644 index 000000000..6a5238413 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Delivery; +using Win_in.Sfs.Wms.DataExchange.Domain.Shared; +using Win_in.Sfs.Wms.DataExchange.Domain; +using System.Text.Json; +using Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; + +public class DeliveryReader : IReader +{ + private readonly IDeliveryManager _DeliveryManager; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + private readonly ILogger _logger; + + public DeliveryReader( + IDeliveryManager pillTaskManager + , IIncomingFromExternalManager incomingFromExternalManager + , ILogger logger + ) + { + _DeliveryManager = pillTaskManager; + _incomingFromExternalManager = incomingFromExternalManager; + _logger = logger; + } + + public virtual async Task> ReadAsync() + + { + //从MES读取待处理Delivery + var toBeProcessedPillTasks = await _DeliveryManager.GetToBeProcessedListAsync().ConfigureAwait(false); + if (!toBeProcessedPillTasks.Any()) + { + _logger.LogInformation("no Deliverys"); + return new List(); + } + //Delivery逐一转换为MaterialRequest + var incomingDataList = BuildIncomingFromExternalFromPillTaskAsync(toBeProcessedPillTasks); + await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false); + //更新MES数据状态 + await _DeliveryManager.UpdateProcessedListAsync(toBeProcessedPillTasks).ConfigureAwait(false); + + return incomingDataList; + } + + private static List BuildIncomingFromExternalFromPillTaskAsync(List toBeProcessedDeliverys) + { + var incomingDataList = new List(); + foreach (var Delivery in toBeProcessedDeliverys) + { + var incomingData = BuildIncomingFromExternal(Delivery); + + incomingData.SetEffectiveDate(DateTime.Now); + incomingData.SetSuccess(); + try + { + var DetilveryRequest = BuildDeliverRequestCreateInput(Delivery); + incomingData.DestinationDataContent = JsonSerializer.Serialize(DetilveryRequest); + } + catch (Exception ex) + { + incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); + } + + incomingDataList.Add(incomingData); + + } + + return incomingDataList; + } + + private static IncomingFromExternal BuildIncomingFromExternal(Delivery Delivery) + { + var incomingData = new IncomingFromExternal() + { + DataType = EnumIncomingDataType.Delivery.ToString(), + DataAction = EnumExchangeDataAction.Add, + SourceSystem = EnumSystemType.MES.ToString(), + SourceDataId = Delivery.mesout_delivery_id.ToString(), + SourceDataGroupCode =Delivery.mesout_delivery_type=="0"? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan, + SourceDataDetailCode = Delivery.mesout_delivery_customer, + SourceDataContent = JsonSerializer.Serialize(Delivery), + WriteTime = DateTime.Now, + Writer = nameof(MesIncomingBackgroundWorker), + + DestinationSystem = EnumSystemType.WMS.ToString(), + }; + return incomingData; + } + + private static DeliverRequestExchangeDto BuildDeliverRequestCreateInput(Delivery Delivery) + { + var mesRequest = new DeliverRequestExchangeDto() + { + DeliverRequestType = Delivery.mesout_delivery_type == "0" ? EnumDeliverRequestType.FIS : EnumDeliverRequestType.Normal, + CustomerCode = Delivery.mesout_delivery_customer, + Number = Delivery.mesout_delivery_no, + Worker = "MESFY", + ActiveDate = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime) ? dateTime : DateTime.Now, + DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now + }; + var mesRequestDetail = new DeliverRequestDetailExchangeDto() + { + ItemCode = Delivery.mesout_delivery_part, + Qty = Delivery.mesout_delivery_num, + AreaCode = Delivery.mesout_delivery_loc, + MesDeliveryNo=Delivery.mesout_delivery_no, + MesDeliveryPlan = Delivery.mesout_delivery_plan, + IdentityNo =Delivery.mesout_delivery_identity_no + }; + mesRequest.Detail = mesRequestDetail; + return mesRequest; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenConverter.cs new file mode 100644 index 000000000..378067647 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenConverter.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.DataExchange.Domain; +using Win_in.Sfs.Wms.DataExchange.WMS.MesNote; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Wms.DataExchange.WMS.MesNote; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; + +public class FrozenConverter : IIncomingConverter +{ + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + private readonly IIncomingToWmsManager _incomingToWmsManager; + private readonly IObjectMapper _objectMapper; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly ILocationAppService _locationAppService; + private readonly ILogger _logger; + + public FrozenConverter( + IIncomingToWmsManager incomingToWmsManager + , IObjectMapper objectMapper + , IItemBasicAppService itemBasicAppService + , ILogger logger, + ILocationAppService locationAppService, + IIncomingFromExternalManager incomingFromExternalManager) + { + _incomingToWmsManager = incomingToWmsManager; + _objectMapper = objectMapper; + _itemBasicAppService = itemBasicAppService; + _logger = logger; + _locationAppService = locationAppService; + _incomingFromExternalManager = incomingFromExternalManager; + } + + public virtual async Task ConvertAsync(List incomingFromExternalList) + { + if (!incomingFromExternalList.Any()) + { + _logger.LogInformation("no Frozens"); + return; + } + + //按Number合并MesNote单据 + var transferNoteList = await BuildIncomingToWmsOfMesNoteAsync(incomingFromExternalList).ConfigureAwait(false); + await _incomingToWmsManager.CreateManyAsync(transferNoteList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); + } + + private async Task> BuildIncomingToWmsOfMesNoteAsync(List incomingDataList) + { + var incomingToWmsList = new List(); + foreach (var incomingData in incomingDataList) + { + var incomingToWms = new IncomingToWms() + { + DataType = incomingData.DataType, + DataAction = incomingData.DataAction, + SourceSystem = incomingData.SourceSystem, + DataIdentityCode = incomingData.SourceDataGroupCode, + }; + incomingToWms.SetEffectiveDate(incomingData.EffectiveDate); + var exchangeMesNote = JsonSerializer.Deserialize(incomingData.DestinationDataContent); + var wmsMesNoteDetail = _objectMapper.Map(exchangeMesNote.Detail); + var wmsMesNote = _objectMapper.Map(exchangeMesNote); + wmsMesNote.Details = new List(); + var item = await _itemBasicAppService.GetByCodeAsync(wmsMesNoteDetail.ItemCode).ConfigureAwait(false); + try + { + wmsMesNoteDetail.FromPackingCode = ""; + wmsMesNoteDetail.ToPackingCode = ""; + wmsMesNoteDetail.FromLot = ""; + wmsMesNoteDetail.ToLot = ""; + wmsMesNoteDetail.FromWarehouseCode = ""; + wmsMesNoteDetail.ToWarehouseCode = ""; + //if (transferNote.Remark.Contains("质量补移库"))//质量补 + //{ + // wmsMesNoteDetail.FromPackingCode = "RFE"; //质量补排序批次 + // wmsMesNoteDetail.FromLot = "RFE";//质量补箱标签 + // wmsMesNoteDetail.ToPackingCode = "RFE"; //质量补排序批次 + // wmsMesNoteDetail.ToLot = "RFE";//质量补箱标签 + //} + if (item != null) + { + wmsMesNoteDetail.ItemName = item.Name; + wmsMesNoteDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : ""; + wmsMesNoteDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : ""; + wmsMesNoteDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : ""; + wmsMesNoteDetail.StdPackQty = item.StdPackQty; + } + //if (tolocation != null) + //{ + // wmsMesNoteDetail.ToLocationCode = tolocation.Code; + // wmsMesNoteDetail.ToLocationArea = tolocation.AreaCode; + // wmsMesNoteDetail.ToLocationGroup = tolocation.LocationGroupCode; + // wmsMesNoteDetail.ToWarehouseCode = tolocation.WarehouseCode; + // if (tolocation.Type == EnumLocationType.CUST) + // { + // wmsMesNote.Type = EnumTransSubType.Mes_Customer.ToString();//客户储位调拨 + // } + //} + //if (fromlocation != null) + //{ + // wmsMesNoteDetail.FromLocationCode = fromlocation.Code; + // wmsMesNoteDetail.FromLocationArea = fromlocation.AreaCode; + // wmsMesNoteDetail.FromLocationGroup = fromlocation.LocationGroupCode; + // wmsMesNoteDetail.FromWarehouseCode = fromlocation.WarehouseCode; + //} + } + catch (Exception) + { + wmsMesNoteDetail.ItemName = ""; + wmsMesNoteDetail.ItemDesc1 = ""; + wmsMesNoteDetail.ItemDesc2 = ""; + wmsMesNoteDetail.Uom = ""; + } + + wmsMesNote.Details.Add(wmsMesNoteDetail); + + incomingToWms.DataContent = JsonSerializer.Serialize(wmsMesNote); + incomingToWmsList.Add(incomingToWms); + } + return incomingToWmsList; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenReader.cs new file mode 100644 index 000000000..75b4f9ba5 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/FrozenReader.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Frozen; +using Win_in.Sfs.Wms.DataExchange.Domain.Shared; +using Win_in.Sfs.Wms.DataExchange.Domain; +using System.Text.Json; +using Win_in.Sfs.Wms.DataExchange.WMS.MesNote; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; +public class FrozenReader : IReader +{ + private readonly IFrozenManager _FrozenManager; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + private readonly ILogger _logger; + private readonly ILocationAppService _locationAppService; + + public FrozenReader( + IFrozenManager pillTaskManager + , IIncomingFromExternalManager incomingFromExternalManager + , ILogger logger + , ILocationAppService locationAppService + ) + { + _FrozenManager = pillTaskManager; + _incomingFromExternalManager = incomingFromExternalManager; + _logger = logger; + _locationAppService = locationAppService; + } + + public virtual async Task> ReadAsync() + + { + //从MES读取待处理Frozen + var toBeProcessedPillTasks = await _FrozenManager.GetToBeProcessedListAsync().ConfigureAwait(false); + if (!toBeProcessedPillTasks.Any()) + { + _logger.LogInformation("no Frozens"); + return new List(); + } + //Frozen逐一转换为MaterialRequest + var holdLocation = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.HOLD).ConfigureAwait(false); + var incomingDataList = BuildIncomingFromExternalFromPillTaskAsync(toBeProcessedPillTasks, holdLocation==null?"": holdLocation.Code); + await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false); + //更新MES数据状态 + await _FrozenManager.UpdateProcessedListAsync(toBeProcessedPillTasks).ConfigureAwait(false); + + return incomingDataList; + } + + private static List BuildIncomingFromExternalFromPillTaskAsync(List toBeProcessedFrozens,string holdLocationCode) + { + var incomingDataList = new List(); + foreach (var Frozen in toBeProcessedFrozens) + { + var incomingData = BuildIncomingFromExternal(Frozen); + + incomingData.SetEffectiveDate(DateTime.Now); + incomingData.SetSuccess(); + try + { + var MaterialRequest = BuildMesNoteCreateInput(Frozen, holdLocationCode); + incomingData.DestinationDataContent = JsonSerializer.Serialize(MaterialRequest); + } + catch (Exception ex) + { + incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); + } + + incomingDataList.Add(incomingData); + + } + + return incomingDataList; + } + + private static IncomingFromExternal BuildIncomingFromExternal(Frozen Frozen) + { + var incomingData = new IncomingFromExternal() + { + DataType = EnumIncomingDataType.MesNote.ToString(), + DataAction = EnumExchangeDataAction.Add, + SourceSystem = EnumSystemType.MES.ToString(), + SourceDataId = Frozen.mesout_frozen_id.ToString(), + SourceDataGroupCode = Frozen.mesout_frozen_id, + SourceDataDetailCode = Frozen.mesout_frozen_part, + SourceDataContent = JsonSerializer.Serialize(Frozen), + WriteTime = DateTime.Now, + Writer = nameof(MesIncomingBackgroundWorker), + + DestinationSystem = EnumSystemType.WMS.ToString(), + }; + return incomingData; + } + + private static MesNoteExchangeDto BuildMesNoteCreateInput(Frozen Frozen, string holdLocationCode) + { + var mesNote = new MesNoteExchangeDto() + { + MesRequestNumber=Frozen.mesout_frozen_id, + Worker = Frozen.mesout_frozen_user, + Remark = Frozen.mesout_frozen_reason, + Type = Frozen.mesout_frozen_type == "0" ? EnumTransType.MesFreezed.ToString() : EnumTransType.MesUnFreezed.ToString(), + ActiveDate = DateTime.TryParse(Frozen.mesout_frozen_date, out DateTime dateTime) ? dateTime : DateTime.Now + }; + var mesNoteDetail = new MesNoteDetailExchangeDto() + { + ItemCode = Frozen.mesout_frozen_part, + Qty = Frozen.mesout_frozen_num, + ToLocationErpCode = Frozen.mesout_frozen_type == "0"? holdLocationCode : Frozen.mesout_frozen_loc, + FromLocationErpCode = Frozen.mesout_frozen_type != "0"? holdLocationCode:Frozen.mesout_frozen_loc, + ToStatus= Frozen.mesout_frozen_type == "0"? EnumInventoryStatus.HOLD: EnumInventoryStatus.OK, + FromStatus = Frozen.mesout_frozen_type != "0" ? EnumInventoryStatus.HOLD : EnumInventoryStatus.OK, + }; + mesNote.Detail = mesNoteDetail; + return mesNote; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs index 87b487f78..950c015b9 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -6,6 +7,7 @@ using Microsoft.Extensions.Options; using Volo.Abp.BackgroundWorkers; using Volo.Abp.Threading; using Volo.Abp.Uow; +using Win_in.Sfs.Wms.DataExchange.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent; @@ -46,10 +48,18 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase Logger.LogInformation($"Read MesOut");//缴库 var mesOutReader = workerContext.ServiceProvider.GetRequiredService(); var mesOutConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存MesOut + var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取mes缴库 var mesOutsFromExternalList = await mesOutReader.ReadAsync().ConfigureAwait(false); - //转换MesOut - await mesOutConverter.ConvertAsync(mesOutsFromExternalList).ConfigureAwait(false); + var mesOutsFromExternalList_ProductReceipt = mesOutsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.ProductReceipt.ToString()).ToList(); + var mesOutsFromExternalList_TransferNote = mesOutsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.TransferNote.ToString()).ToList(); + //转换缴库数据(如果有质量补得数据直接生产移库数据移到客户库位) + await mesOutConverter.ConvertAsync(mesOutsFromExternalList_ProductReceipt).ConfigureAwait(false); + if (mesOutsFromExternalList_TransferNote.Count > 0)//如果有质量补则生产储位调拨任务 + { + await TransferNoteConverter.ConvertAsync(mesOutsFromExternalList_TransferNote).ConfigureAwait(false); + } + //上海和安徽无此接口 //Logger.LogInformation($"Read PullTask");//拉动任务 @@ -59,7 +69,7 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase //var pullTaskFromExternalList = await pullTaskReader.ReadAsync().ConfigureAwait(false); ////转换PullTask //await pullTaskConverter.ConvertAsync(pullTaskFromExternalList).ConfigureAwait(false); - Logger.LogInformation($"Read Scrap"); + Logger.LogInformation($"Read Scrap");//报废 var scrapReader = workerContext.ServiceProvider.GetRequiredService(); var scrapConverter = workerContext.ServiceProvider.GetRequiredService(); @@ -84,6 +94,42 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false); //转换BackFlush await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false); + + + Logger.LogInformation($"Read TransferNote");//储位调拨 + var TransferNoteReader = workerContext.ServiceProvider.GetRequiredService(); + // var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存TransferNote + var transferNoteFromExternalList = await TransferNoteReader.ReadAsync().ConfigureAwait(false); + //转换TransferNote + await TransferNoteConverter.ConvertAsync(transferNoteFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read Frozen");//冻结解冻 + var FrozenReader = workerContext.ServiceProvider.GetRequiredService(); + var FrozenConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Frozen + var mesNoteFromExternalList = await FrozenReader.ReadAsync().ConfigureAwait(false); + //转换Frozen + await FrozenConverter.ConvertAsync(mesNoteFromExternalList).ConfigureAwait(false); + + + Logger.LogInformation($"Read Delivery");//成品发运 + var DeliveryReader = workerContext.ServiceProvider.GetRequiredService(); + var DeliveryConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Delivery + var deliveryNoteFromExternalList = await DeliveryReader.ReadAsync().ConfigureAwait(false); + //转换Delivery + await DeliveryConverter.ConvertAsync(deliveryNoteFromExternalList).ConfigureAwait(false); + + + + Logger.LogInformation($"Read CallMtl");//自动叫料 + var CallMtlReader = workerContext.ServiceProvider.GetRequiredService(); + var CallMtlConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Delivery + var callMtlFromExternalList = await CallMtlReader.ReadAsync().ConfigureAwait(false); + //转换Delivery + await CallMtlConverter.ConvertAsync(callMtlFromExternalList).ConfigureAwait(false); Logger.LogInformation($"Completed: Handling {Incoming}"); } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs index 941cc6cb4..5ede235e6 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs @@ -89,7 +89,7 @@ public class MesOutConverter : IIncomingConverter var productReceiptNote = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent); var wmsProductReceiptNoteDetail = _objectMapper.Map(productReceiptNote.Detail); - var oldNoteDetail = wmsProductReceiptNote.Details.FirstOrDefault(r => r.ItemCode == wmsProductReceiptNoteDetail.ItemCode && r.LocationErpCode == wmsProductReceiptNoteDetail.LocationErpCode && (first.TableType != EnumExchangeTableType.MainTable ? true : r.ReturnQty != 0)); + var oldNoteDetail = wmsProductReceiptNote.Details.FirstOrDefault(r =>r.MesQuality== wmsProductReceiptNoteDetail.MesQuality&& r.ItemCode == wmsProductReceiptNoteDetail.ItemCode && r.LocationErpCode == wmsProductReceiptNoteDetail.LocationErpCode && (first.TableType != EnumExchangeTableType.MainTable ? true : r.ReturnQty != 0)); sumdetail.itemCode = wmsProductReceiptNoteDetail.ItemCode; sumdetail.locationCode = wmsProductReceiptNoteDetail.LocationErpCode; @@ -111,6 +111,11 @@ public class MesOutConverter : IIncomingConverter wmsProductReceiptNoteDetail.WarehouseCode = "T8"; wmsProductReceiptNoteDetail.LocationArea = ""; wmsProductReceiptNoteDetail.LocationGroup = ""; + if (wmsProductReceiptNoteDetail.MesQuality=="1")//质量补 + { + wmsProductReceiptNoteDetail.Lot = "RFE"; //质量补排序批次 + wmsProductReceiptNoteDetail.PackingCode = "RFE";//质量补箱标签 + } var loc = await _locationAppService.GetListByTypesAndErpCodeAsync(types, wmsProductReceiptNoteDetail.LocationErpCode, wmsProductReceiptNoteDetail.LocationErpCode).ConfigureAwait(false); if (loc != null) { @@ -123,13 +128,16 @@ public class MesOutConverter : IIncomingConverter wmsProductReceiptNoteDetail.HandledToLocationArea = loc[0].AreaCode; wmsProductReceiptNoteDetail.HandledToLocationGroup = loc[0].LocationGroupCode; wmsProductReceiptNoteDetail.HandledToLocationErpCode = loc[0].ErpLocationCode; + wmsProductReceiptNoteDetail.HandledPackingCode = wmsProductReceiptNoteDetail.PackingCode; + wmsProductReceiptNoteDetail.HandledLot = wmsProductReceiptNoteDetail.Lot; wmsProductReceiptNoteDetail.RecommendToLocationCode = loc[0].Code; wmsProductReceiptNoteDetail.RecommendToLocationArea = loc[0].AreaCode; wmsProductReceiptNoteDetail.RecommendToLocationGroup = loc[0].LocationGroupCode; wmsProductReceiptNoteDetail.RecommendToLocationErpCode = loc[0].ErpLocationCode; + wmsProductReceiptNoteDetail.RecommendPackingCode = wmsProductReceiptNoteDetail.PackingCode; + wmsProductReceiptNoteDetail.RecommendLot = wmsProductReceiptNoteDetail.Lot; } - var item = await _itemBasicAppService.GetByCodeAsync(wmsProductReceiptNoteDetail.ItemCode).ConfigureAwait(false); if (item != null) { @@ -137,7 +145,7 @@ public class MesOutConverter : IIncomingConverter wmsProductReceiptNoteDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : ""; wmsProductReceiptNoteDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : ""; wmsProductReceiptNoteDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : ""; - + wmsProductReceiptNoteDetail.StdPackQty = item.StdPackQty; wmsProductReceiptNoteDetail.ProduceDate = incomingFromExternal.EffectiveDate; wmsProductReceiptNoteDetail.ArriveDate = incomingFromExternal.EffectiveDate; wmsProductReceiptNoteDetail.ExpireDate = wmsProductReceiptNoteDetail.ProduceDate.AddDays(item.GetValidateDays()); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutReader.cs index f0171be9c..958d8eeba 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutReader.cs @@ -8,8 +8,10 @@ using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.MesOut; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; using Win_in.Sfs.Wms.DataExchange.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.WMS.ProductReceiptNote; +using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote; namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent; @@ -19,17 +21,20 @@ public class MesOutReader : IReader private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly ILogger _logger; private readonly ILocationAppService _locationAppService; + private readonly ICustomerItemAppService _customerItemAppService; public MesOutReader( IMesOutManager mesOutManager , IIncomingFromExternalManager incomingFromExternalManager , ILogger logger , ILocationAppService locationAppService + , ICustomerItemAppService customerItemAppService ) { _mesOutManager = mesOutManager; _incomingFromExternalManager = incomingFromExternalManager; _logger = logger; _locationAppService = locationAppService; + _customerItemAppService = customerItemAppService; } public virtual async Task> ReadAsync() @@ -51,7 +56,7 @@ public class MesOutReader : IReader await _mesOutManager.UpdateProcesseErrordListAsync(toBeProcessedEroMwsOuts).ConfigureAwait(false); } //MesOut逐一转换为ProductReceiptNote - var incomingDataList = BuildIncomingFromExternalFromShipAsync(toBeProcessedMwsOuts); + var incomingDataList =await BuildIncomingFromExternalFromShipAsync(toBeProcessedMwsOuts).ConfigureAwait(false); await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false); //更新MES数据状态 await _mesOutManager.UpdateProcessedListAsync(toBeProcessedMwsOuts).ConfigureAwait(false); @@ -59,13 +64,12 @@ public class MesOutReader : IReader return incomingDataList; } - private static List BuildIncomingFromExternalFromShipAsync(List toBeProcessedMesOuts) + private async Task> BuildIncomingFromExternalFromShipAsync(List toBeProcessedMesOuts) { var incomingDataList = new List(); foreach (var mesOut in toBeProcessedMesOuts) { var incomingData = BuildIncomingFromExternal(mesOut); - incomingData.SetEffectiveDate(DateTime.ParseExact(mesOut.Mesout_date, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture)); incomingData.SetSuccess(); try @@ -79,7 +83,29 @@ public class MesOutReader : IReader } incomingDataList.Add(incomingData); + if (mesOut.Mesout_quality == "1") + { + //查询零件对应的客户库位 + string locationCode = await _customerItemAppService.GetFirstLocationCodeByItemCode(mesOut.Mesout_part).ConfigureAwait(false); + if (!string.IsNullOrEmpty(locationCode)) + { + var incomingData_TransferNote = BuildIncomingFromExternal_TransferNote(mesOut); + incomingData_TransferNote.SetEffectiveDate(DateTime.ParseExact(mesOut.Mesout_date, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture)); + incomingData_TransferNote.SetSuccess(); + try + { + + var transferNote = BuildTransferNoteCreateInput(mesOut, locationCode); + incomingData_TransferNote.DestinationDataContent = JsonSerializer.Serialize(transferNote); + } + catch (Exception ex) + { + incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); + } + incomingDataList.Add(incomingData_TransferNote); + } + } } return incomingDataList; @@ -126,7 +152,6 @@ public class MesOutReader : IReader } return incomingData; } - private static ProductReceiptNoteExchangeDto BuildProductReceiptNoteCreateInput(MesOut mesOut) { var productReceiptNote = new ProductReceiptNoteExchangeDto() @@ -141,10 +166,53 @@ public class MesOutReader : IReader Qty = mesOut.Mesout_move, LocationErpCode = mesOut.Mesout_loc, Remark = mesOut.memo, - ReturnQty = mesOut.Mesout_bad + ReturnQty = mesOut.Mesout_bad, + MesBarCode = mesOut.Mesout_barcode, + MesQuality = mesOut.Mesout_quality + }; productReceiptNote.Detail = productReceiptNoteDetail; return productReceiptNote; } + private static IncomingFromExternal BuildIncomingFromExternal_TransferNote(MesOut mesOut) + { + var incomingData = new IncomingFromExternal() + { + DataType = EnumIncomingDataType.TransferNote.ToString(), + DataAction = EnumExchangeDataAction.Add, + SourceSystem = EnumSystemType.MES.ToString(), + SourceDataId = mesOut.Mesout_ref_nbr.ToString(), + SourceDataGroupCode = mesOut.Mesout_ref_nbr, + SourceDataDetailCode = mesOut.Mesout_part, + SourceDataContent = JsonSerializer.Serialize(mesOut), + WriteTime = DateTime.Now, + Writer = nameof(MesIncomingBackgroundWorker), + + DestinationSystem = EnumSystemType.WMS.ToString(), + }; + return incomingData; + } + + private static TransferNoteExchangeDto BuildTransferNoteCreateInput(MesOut mesOut,string toLocationCode) + { + var transferNote = new TransferNoteExchangeDto() + { + Worker = "MesJK", + Remark="质量补移库" + }; + var transferNoteDetail = new TransferNoteDetailExchangeDto() + { + ItemCode = mesOut.Mesout_part, + Qty = mesOut.Mesout_move, + ToLocationErpCode = toLocationCode, + FromLocationErpCode = mesOut.Mesout_loc, + PackingCode="RFE", + Lot = "RFE", + }; + transferNote.Detail = transferNoteDetail; + return transferNote; + } + + } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeConverter.cs new file mode 100644 index 000000000..91f9e3f6c --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeConverter.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.DataExchange.Domain; +using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; +public class QtyrfeConverter : IIncomingConverter +{ + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + private readonly IIncomingToWmsManager _incomingToWmsManager; + private readonly IObjectMapper _objectMapper; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly ILocationAppService _locationAppService; + private readonly ILogger _logger; + + public QtyrfeConverter( + IIncomingToWmsManager incomingToWmsManager + , IObjectMapper objectMapper + , IItemBasicAppService itemBasicAppService + , ILogger logger, + ILocationAppService locationAppService, + IIncomingFromExternalManager incomingFromExternalManager) + { + _incomingToWmsManager = incomingToWmsManager; + _objectMapper = objectMapper; + _itemBasicAppService = itemBasicAppService; + _logger = logger; + _locationAppService = locationAppService; + _incomingFromExternalManager = incomingFromExternalManager; + } + + public virtual async Task ConvertAsync(List incomingFromExternalList) + { + if (!incomingFromExternalList.Any()) + { + _logger.LogInformation("no Qtyrfes"); + return; + } + + //按Number合并TransferNote单据 + var transferNoteList = await BuildIncomingToWmsOfTransferNoteAsync(incomingFromExternalList).ConfigureAwait(false); + await _incomingToWmsManager.CreateManyAsync(transferNoteList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); + } + + private async Task> BuildIncomingToWmsOfTransferNoteAsync(List incomingDataList) + { + var incomingToWmsList = new List(); + var groups = incomingDataList.GroupBy(p => p.SourceDataGroupCode); + foreach (var group in groups) + { + var first = group.First(); + var incomingToWms = new IncomingToWms() + { + DataType = first.DataType, + DataAction = first.DataAction, + SourceSystem = first.SourceSystem, + DataIdentityCode = first.SourceDataGroupCode, + }; + incomingToWms.SetEffectiveDate(first.EffectiveDate); + var exchangeTransferNote = JsonSerializer.Deserialize(first.DestinationDataContent); + var wmsTransferNote = _objectMapper.Map(exchangeTransferNote); + wmsTransferNote.Type = EnumTransSubType.Transfer_Area.ToString();//客户储位调拨 + wmsTransferNote.Details = new List(); + foreach (var incomingFromExternal in group.ToList()) + { + var transferNote = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent); + var wmsTransferNoteDetail = _objectMapper.Map(transferNote.Detail); + var item = await _itemBasicAppService.GetByCodeAsync(wmsTransferNoteDetail.ItemCode).ConfigureAwait(false); + var tolocation=await _locationAppService.GetByCodeAsync(wmsTransferNoteDetail.ToLocationErpCode).ConfigureAwait(false); + var fromlocation = await _locationAppService.GetByCodeAsync(wmsTransferNoteDetail.FromLocationErpCode).ConfigureAwait(false); + try + { + wmsTransferNoteDetail.FromPackingCode = ""; + wmsTransferNoteDetail.ToPackingCode = ""; + wmsTransferNoteDetail.FromLot = ""; + wmsTransferNoteDetail.ToLot = ""; + wmsTransferNoteDetail.FromStatus = EnumInventoryStatus.OK; + wmsTransferNoteDetail.ToStatus = EnumInventoryStatus.OK; + if (transferNote.Remark.Contains("质量补移库"))//质量补 + { + wmsTransferNoteDetail.FromPackingCode = "RFE"; //质量补排序批次 + wmsTransferNoteDetail.FromLot = "RFE";//质量补箱标签 + wmsTransferNoteDetail.ToPackingCode = "RFE"; //质量补排序批次 + wmsTransferNoteDetail.ToLot = "RFE";//质量补箱标签 + } + if (item != null) + { + wmsTransferNoteDetail.ItemName = item.Name; + wmsTransferNoteDetail.ItemDesc1 = !string.IsNullOrEmpty(item.Desc1) ? item.Desc1 : ""; + wmsTransferNoteDetail.ItemDesc2 = !string.IsNullOrEmpty(item.Desc2) ? item.Desc2 : ""; + wmsTransferNoteDetail.Uom = !string.IsNullOrEmpty(item.BasicUom) ? item.BasicUom : ""; + wmsTransferNoteDetail.StdPackQty = item.StdPackQty; + } + if (tolocation != null) + { + wmsTransferNoteDetail.ToLocationCode = tolocation.Code; + wmsTransferNoteDetail.ToLocationArea = tolocation.AreaCode; + wmsTransferNoteDetail.ToLocationGroup = tolocation.LocationGroupCode; + wmsTransferNoteDetail.ToWarehouseCode = tolocation.WarehouseCode; + if (tolocation.Type== EnumLocationType.CUST) + { + wmsTransferNote.Type = EnumTransSubType.Transfer_Customer.ToString();//客户储位调拨 + } + } + if (fromlocation!=null) + { + wmsTransferNoteDetail.FromLocationCode = fromlocation.Code; + wmsTransferNoteDetail.FromLocationArea = fromlocation.AreaCode; + wmsTransferNoteDetail.FromLocationGroup = fromlocation.LocationGroupCode; + wmsTransferNoteDetail.FromWarehouseCode = fromlocation.WarehouseCode; + } + } + catch (Exception) + { + wmsTransferNoteDetail.ItemName = ""; + wmsTransferNoteDetail.ItemDesc1 = ""; + wmsTransferNoteDetail.ItemDesc2 = ""; + wmsTransferNoteDetail.Uom = ""; + } + + wmsTransferNote.Details.Add(wmsTransferNoteDetail); + } + incomingToWms.DataContent = JsonSerializer.Serialize(wmsTransferNote); + incomingToWmsList.Add(incomingToWms); + } + return incomingToWmsList; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs new file mode 100644 index 000000000..a2e2e22d9 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Qtyrfe; +using Win_in.Sfs.Wms.DataExchange.Domain.Shared; +using Win_in.Sfs.Wms.DataExchange.Domain; +using Win_in.Sfs.Wms.DataExchange.WMS.MaterialRequest; +using Win_in.Sfs.Wms.DataExchange.WMS.TransferNote; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; +public class QtyrfeReader : IReader +{ + private readonly IQtyrfeManager _QtyrfeManager; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + private readonly ILogger _logger; + + public QtyrfeReader( + IQtyrfeManager pillTaskManager + , IIncomingFromExternalManager incomingFromExternalManager + , ILogger logger + ) + { + _QtyrfeManager = pillTaskManager; + _incomingFromExternalManager = incomingFromExternalManager; + _logger = logger; + } + + public virtual async Task> ReadAsync() + + { + //从MES读取待处理Qtyrfe + var toBeProcessedPillTasks = await _QtyrfeManager.GetToBeProcessedListAsync().ConfigureAwait(false); + if (!toBeProcessedPillTasks.Any()) + { + _logger.LogInformation("no Qtyrfes"); + return new List(); + } + //Qtyrfe逐一转换为MaterialRequest + var incomingDataList = BuildIncomingFromExternalFromPillTaskAsync(toBeProcessedPillTasks); + await _incomingFromExternalManager.CreateManyAsync(incomingDataList).ConfigureAwait(false); + //更新MES数据状态 + await _QtyrfeManager.UpdateProcessedListAsync(toBeProcessedPillTasks).ConfigureAwait(false); + + return incomingDataList; + } + + private static List BuildIncomingFromExternalFromPillTaskAsync(List toBeProcessedQtyrfes) + { + var incomingDataList = new List(); + foreach (var Qtyrfe in toBeProcessedQtyrfes) + { + var incomingData = BuildIncomingFromExternal(Qtyrfe); + + incomingData.SetEffectiveDate(DateTime.Now); + incomingData.SetSuccess(); + try + { + var MaterialRequest = BuildTransferNoteCreateInput(Qtyrfe); + incomingData.DestinationDataContent = JsonSerializer.Serialize(MaterialRequest); + } + catch (Exception ex) + { + incomingData.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); + } + + incomingDataList.Add(incomingData); + + } + + return incomingDataList; + } + + private static IncomingFromExternal BuildIncomingFromExternal(Qtyrfe Qtyrfe) + { + var incomingData = new IncomingFromExternal() + { + DataType = EnumIncomingDataType.TransferNote.ToString(), + DataAction = EnumExchangeDataAction.Add, + SourceSystem = EnumSystemType.MES.ToString(), + SourceDataId = Qtyrfe.mesout_qtyrfe_id.ToString(), + SourceDataGroupCode = Qtyrfe.mesout_qtyrfe_id, + SourceDataDetailCode = Qtyrfe.mesout_qtyrfe_part, + SourceDataContent = JsonSerializer.Serialize(Qtyrfe), + WriteTime = DateTime.Now, + Writer = nameof(MesIncomingBackgroundWorker), + + DestinationSystem = EnumSystemType.WMS.ToString(), + }; + return incomingData; + } + + private static TransferNoteExchangeDto BuildTransferNoteCreateInput(Qtyrfe Qtyrfe) + { + var transferNote = new TransferNoteExchangeDto() + { + Worker = Qtyrfe.mesout_qtyrfe_user, + Remark = "" + }; + if (Qtyrfe.mesout_qtyrfe_type == "1") + { + transferNote.Remark = "质量补移库"; + } + var transferNoteDetail = new TransferNoteDetailExchangeDto() + { + ItemCode = Qtyrfe.mesout_qtyrfe_part, + Qty =Qtyrfe.mesout_qtyrfe_num, + ToLocationErpCode = Qtyrfe.mesout_qtyrfe_loc_to, + FromLocationErpCode = Qtyrfe.mesout_qtyrfe_loc_from, + }; + transferNote.Detail = transferNoteDetail; + return transferNote; + } + +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json index a5a6cb1d9..b3b640492 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json @@ -1,12 +1,12 @@ { "ConnectionStrings": { - "Default": "Server=10.164.113.32,1818\\SHDB;Database=Wms_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false", - "DataExchange": "Server=10.164.113.32,1818\\SHDB;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false", - "MES": "Server=10.164.113.32,1818\\SHDB;Database=MES_SH;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false" + "Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false", + "DataExchange": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false", + "MES": "Server=dev.ccwin-in.com,13319;Database=MES_SH;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false" }, "AuthServer": { - "Authority": "http://10.164.113.31:60083/", + "Authority": "http://dev.ccwin-in.com:60083/", "RequireHttpsMetadata": "false", "SwaggerClientId": "admin", "SwaggerClientSecret": "1q2w3E*", @@ -24,13 +24,13 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://10.164.113.31:60084/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Store": { - "BaseUrl": "http://10.164.113.31:60085/" + "BaseUrl": "http://dev.ccwin-in.com:60085/" }, "Label": { - "BaseUrl": "http://10.164.113.31:60082/" + "BaseUrl": "http://dev.ccwin-in.com:60082/" } }, diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/AssembleIssueNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/AssembleIssueNoteConverter.cs new file mode 100644 index 000000000..375faace0 --- /dev/null +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/AssembleIssueNoteConverter.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Threading.Tasks; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Wms.DataExchange.Domain; +using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; +using Win_in.Sfs.Wms.DataExchange.Domain.Shared; +using Win_in.Sfs.Wms.DataExchange.WMS.PCK; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Outgoing; + +public class AssembleIssueNoteConverter : IOutgoingConverter +{ + private readonly string billtype = "4026"; + private readonly IOutgoingFromWmsManager _outgoingFromWmsManager; + private readonly IOutgoingToExternalManager _outgoingToExternalManager; + private readonly IObjectMapper _objectMapper; + + public AssembleIssueNoteConverter( + IOutgoingFromWmsManager outgoingFromWmsManager + , IOutgoingToExternalManager outgoingToExternalManager + , IObjectMapper objectMapper + ) + { + _outgoingFromWmsManager = outgoingFromWmsManager; + _outgoingToExternalManager = outgoingToExternalManager; + _objectMapper = objectMapper; + } + + public virtual async Task> ConvertAsync() + { + var outgoingToExternalList = new List(); + //获取要同步得数据 + var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.AssembleIssue, EnumSystemType.ERP).ConfigureAwait(false); + foreach (var outgoingFromWms in outgoingFromWmsList) + { + string tyrpNumber = outgoingFromWms.TyrpNumber; + #region 主表 + var wmsReceipt = JsonSerializer.Deserialize(outgoingFromWms.DataContent); + var exchangeReceipt = _objectMapper.Map(wmsReceipt); + var putawayNote = BuildDataInterface(exchangeReceipt); + var outgoingToExternal = new OutgoingToExternal() + { + DataType = EnumOutgoingDataType.Issue.ToString(), + TableType = EnumExchangeTableType.MainTable, + DataAction = outgoingFromWms.DataAction, + SerialNumber = tyrpNumber, + SourceSystem = EnumSystemType.WMS.ToString(), + SourceDataId = wmsReceipt.Id.ToString(), + SourceDataGroupCode = wmsReceipt.Number, + SourceDataDetailCode = wmsReceipt.Number, + Writer = nameof(TyrpOutgoingBackgroundWorker), + DestinationSystem = EnumSystemType.ERP.ToString(), + DestinationDataId = "", + }; + outgoingToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate); + outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceipt); + outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNote); + outgoingToExternalList.Add(outgoingToExternal); + #endregion + var sumDetails = wmsReceipt.Details.GroupBy(r => new { r.ItemCode, r.HandledFromLocationErpCode, r.HandledToLocationErpCode }).Select(p => new AssembleIssueNoteDetailDTO { ItemCode = p.Key.ItemCode, HandledFromLocationErpCode = p.Key.HandledFromLocationErpCode, HandledToLocationErpCode = p.Key.HandledToLocationErpCode, HandledToQty = p.Sum(x => x.HandledToQty) }).ToList(); + #region 明细 + foreach (var detail in sumDetails) + { + var outgoingDetailToExternal = new OutgoingToExternal() + { + DataType = EnumOutgoingDataType.Issue.ToString(), + TableType = EnumExchangeTableType.DetailTable, + DataAction = outgoingFromWms.DataAction, + SerialNumber = tyrpNumber, + SourceSystem = EnumSystemType.WMS.ToString(), + SourceDataId = detail.Id.ToString(), + SourceDataGroupCode = wmsReceipt.Number, + SourceDataDetailCode = detail.ItemCode, + Writer = nameof(TyrpOutgoingBackgroundWorker), + DestinationSystem = EnumSystemType.ERP.ToString(), + DestinationDataId = "", + }; + outgoingDetailToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate); + var exchangeReceiptDetail = _objectMapper.Map(detail); + outgoingDetailToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceiptDetail); + var putawayNoteDetail = BuildDataInterfaceDetail(exchangeReceipt, exchangeReceiptDetail, putawayNote.scontrol_dt_w); + outgoingDetailToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNoteDetail); + outgoingToExternalList.Add(outgoingDetailToExternal); + } + #endregion + } + //插入到中间表OutgoingToExternal + await _outgoingToExternalManager.CreateManyAsync(outgoingToExternalList).ConfigureAwait(false); + //将outgoingFromWms数据归档 + await _outgoingFromWmsManager.ArchiveManyAsync(outgoingFromWmsList).ConfigureAwait(false); + + return outgoingToExternalList; + } + /// + /// 构建主表 + /// + /// + /// + private Scontrol BuildDataInterface(AssembleIssueNoteExchangeDto exchangeOrder) + { + var ret = new Scontrol() + { + scontrol_nbr = exchangeOrder.Number, + scontrol_dt_w = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"), + scontrol_stat = "Y", + scontrol_dt_k = "", + scontrol_type = billtype, + scontrol_id = 0,//明细中最大scmsend_id + }; + return ret; + } + /// + /// 构建明细 + /// + /// + /// + /// + private Scmsend BuildDataInterfaceDetail(AssembleIssueNoteExchangeDto exchangeOrder, AssembleIssueNoteDetailExchangeDto exchangeDetailOrder, string dt_w) + { + var ret = new Scmsend() + { + scmsend_type = billtype, + scmsend_dt_w = dt_w, + scmsend_nbr = exchangeOrder.Number, + scmsend_stat1 = "1", + scmsend_part = exchangeDetailOrder.ItemCode, + scmsend_delv_date = "", + scmsend_orderno = "", + scmsend_loc = exchangeDetailOrder.FromLocationErpCode, + //scmsend_date = exchangeOrder.ActiveDate.ToString("yyyyMMdd"), + scmsend_date = DateTime.Now.ToString("yyyyMMdd"), + scmsend_qty = exchangeDetailOrder.Qty, + scmsend_wipd_loc = exchangeDetailOrder.ToLocationErpCode, + scmsend_userid = "WMS" + }; + return ret; + } +} diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CountAdjustNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CountAdjustNoteConverter.cs index a5990abd1..0463e5d8a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CountAdjustNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CountAdjustNoteConverter.cs @@ -75,7 +75,7 @@ public class CountAdjustNoteConverter : IOutgoingConverter DestinationDataId = "", }; outgoingToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate); - var exchangeIssue = await BuildPurchaseReceiptExchangeDtoAsync(wmsCountAdjust, detail).ConfigureAwait(false); + var exchangeIssue = BuildPurchaseReceiptExchangeDtoAsync(wmsCountAdjust, detail); outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeIssue); var arrive = BuildWip(exchangeIssue, departmentCode); outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive); @@ -103,7 +103,7 @@ public class CountAdjustNoteConverter : IOutgoingConverter DestinationDataId = "", }; outgoingToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate); - var exchangeIssue = await BuildPurchaseReceiptExchangeDtoAsync(wmsCountAdjust, detail).ConfigureAwait(false); + var exchangeIssue = BuildPurchaseReceiptExchangeDtoAsync(wmsCountAdjust, detail); outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeIssue); var arrive = BuildIssue(exchangeIssue, departmentCode); outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive); @@ -159,7 +159,7 @@ public class CountAdjustNoteConverter : IOutgoingConverter }; return counta; } - private async Task BuildPurchaseReceiptExchangeDtoAsync( + private CountAdjustNoteExchangeDto BuildPurchaseReceiptExchangeDtoAsync( CountAdjustNoteDTO wmsCountAdjust, CountAdjustNoteDetailExchangeDto wmsCountAdjustDetail) { var exchangeCountAdjust = _objectMapper.Map(wmsCountAdjust); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedIssueNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedIssueNoteConverter.cs index 05a75e3d7..05b6beeee 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedIssueNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedIssueNoteConverter.cs @@ -22,19 +22,22 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter private readonly IDepartmentAppService _departmentAppService; private readonly IObjectMapper _objectMapper; private readonly ISfsUserAppService _sfsUserAppService; + private readonly IUnplannedIssueRequestAppService _unplannedIssueRequestAppService; public UnplannedIssueNoteConverter( IOutgoingFromWmsManager outgoingFromWmsManager , IOutgoingToExternalManager outgoingToExternalManager , IDepartmentAppService departmentAppService , IObjectMapper objectMapper - , ISfsUserAppService sfsUserAppService) + , ISfsUserAppService sfsUserAppService, +IUnplannedIssueRequestAppService unplannedIssueRequestAppService) { _outgoingFromWmsManager = outgoingFromWmsManager; _outgoingToExternalManager = outgoingToExternalManager; _departmentAppService = departmentAppService; _objectMapper = objectMapper; _sfsUserAppService = sfsUserAppService; + _unplannedIssueRequestAppService = unplannedIssueRequestAppService; } /// @@ -54,6 +57,12 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter var exchangeReceipt = _objectMapper.Map(wmsReceipt); var department = await _departmentAppService.GetByUsernameAsync(exchangeReceipt.Worker).ConfigureAwait(false); var departmentCode = department == null ? "" : department.Code; + var requset = await _unplannedIssueRequestAppService.GetByNumberAsync(exchangeReceipt.UnplannedIssueRequestNumber).ConfigureAwait(false); + string worker = requset?.Worker; + if (!string.IsNullOrEmpty(worker)) + { + worker = await _sfsUserAppService.GetUserNameByUserAsync(requset.Worker).ConfigureAwait(false); + } //if (Guid.TryParse(exchangeReceipt.CreatorId.ToString(), out Guid guid)) //{ // var username = await _sfsUserAppService.GetUserNameById(guid).ConfigureAwait(false); @@ -63,7 +72,7 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter // } //} - var purchaseOrder = BuildDataInterface(exchangeReceipt, tyrpNumber, departmentCode); + var purchaseOrder = BuildDataInterface(exchangeReceipt, tyrpNumber, departmentCode, worker); var outgoingToExternal = new OutgoingToExternal() { DataType = EnumOutgoingDataType.UnplannedIssue.ToString(), @@ -123,7 +132,7 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter /// /// /// - private Wmsoutm BuildDataInterface(UnplannedIssueNoteExchangeDto exchangeOrder,string tyrpNumber,string departmentCode) + private Wmsoutm BuildDataInterface(UnplannedIssueNoteExchangeDto exchangeOrder,string tyrpNumber,string departmentCode,string worker) { string billtype = "4013"; if (exchangeOrder.UnplannedIssueType== EnumUnplannedIssueType.Wip) @@ -137,7 +146,7 @@ public class UnplannedIssueNoteConverter : IOutgoingConverter wmsoutm_dt_w = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"), wmsoutm_stat = "Y", wmsoutm_tyrp_dt = "", - wmsoutm_user = exchangeOrder.Worker.Length >= 6 ? exchangeOrder.Worker.Substring(exchangeOrder.Worker.Length- 6) : exchangeOrder.Worker, + wmsoutm_user = worker.Length >= 6 ? worker.Substring(worker.Length- 6) : worker, wmsoutm_dept = departmentCode,//根据Worker从UserDepartment中获取 // wmsoutm_date = exchangeOrder.ActiveDate.ToString("yyyyMMdd"), wmsoutm_date = DateTime.Now.ToString("yyyyMMdd"), diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedReceiptNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedReceiptNoteConverter.cs index 1a5cb0d4d..e6cf534ed 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedReceiptNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/UnplannedReceiptNoteConverter.cs @@ -23,6 +23,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter private readonly IDepartmentAppService _departmentAppService; private readonly IObjectMapper _objectMapper; private readonly ISfsUserAppService _sfsUserAppService; + private readonly IUnplannedReceiptRequestAppService _unplannedReceiptRequestAppService; public UnplannedReceiptNoteConverter( IOutgoingFromWmsManager outgoingFromWmsManager @@ -30,6 +31,9 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter , IDepartmentAppService departmentAppService , IObjectMapper objectMapper , ISfsUserAppService sfsUserAppService +, +IUnplannedReceiptRequestAppService unplannedReceiptRequestAppService + ) { _outgoingFromWmsManager = outgoingFromWmsManager; @@ -37,6 +41,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter _departmentAppService = departmentAppService; _objectMapper = objectMapper; _sfsUserAppService = sfsUserAppService; + _unplannedReceiptRequestAppService = unplannedReceiptRequestAppService; } /// @@ -56,6 +61,12 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter var exchangeReceipt = _objectMapper.Map(wmsReceipt); var department = await _departmentAppService.GetByUsernameAsync(exchangeReceipt.Worker).ConfigureAwait(false); var departmentCode = department == null ? "" : department.Code; + var requset = await _unplannedReceiptRequestAppService.GetByNumberAsync(exchangeReceipt.UnplannedReceiptRequestNumber).ConfigureAwait(false); + string worker = requset?.Worker; + if (!string.IsNullOrEmpty(worker)) + { + worker = await _sfsUserAppService.GetUserNameByUserAsync(requset.Worker).ConfigureAwait(false); + } //if (Guid.TryParse(exchangeReceipt.CreatorId.ToString(), out Guid guid)) //{ // var username = await _sfsUserAppService.GetUserNameById(guid).ConfigureAwait(false); @@ -64,7 +75,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter // exchangeReceipt.Worker = username; // } //} - var purchaseOrder = BuildDataInterface(exchangeReceipt, tyrpNumber, departmentCode); + var purchaseOrder = BuildDataInterface(exchangeReceipt, tyrpNumber, departmentCode, worker); var outgoingToExternal = new OutgoingToExternal() { DataType = EnumOutgoingDataType.UnplannedReceipt.ToString(), @@ -124,7 +135,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter /// /// /// - private Wmsoutm BuildDataInterface(UnplannedReceiptNoteExchangeDto exchangeOrder, string tyrpNumber,string departmentCode) + private Wmsoutm BuildDataInterface(UnplannedReceiptNoteExchangeDto exchangeOrder, string tyrpNumber,string departmentCode,string worker) { string billtype = "4014"; if (exchangeOrder.UnplannedReceiptType == EnumUnplannedReceiptType.Wip) @@ -138,7 +149,7 @@ public class UnplannedReceiptNoteConverter : IOutgoingConverter wmsoutm_dt_w = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"), wmsoutm_stat = "Y", wmsoutm_tyrp_dt = "", - wmsoutm_user = exchangeOrder.Worker.Length>=6? exchangeOrder.Worker.Substring(exchangeOrder.Worker.Length-6) : exchangeOrder.Worker, + wmsoutm_user = worker.Length>=6? worker.Substring(worker.Length-6) : worker, wmsoutm_dept = departmentCode,//根据Worker从UserDepartment中获取 //wmsoutm_date = exchangeOrder.ActiveDate.ToString("yyyyMMdd"), wmsoutm_date = DateTime.Now.ToString("yyyyMMdd"), diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs index 3b181f817..6c7ca0d7a 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs @@ -171,10 +171,15 @@ public static class IncomingToWmsExtensions public static async Task HandleProductReceiptsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) { - var productReceipt = JsonSerializer.Deserialize(incomingConverted.DataContent); - var productReceiptAppService = workerContext.ServiceProvider.GetRequiredService(); - - await productReceiptAppService.CreateAsync(productReceipt).ConfigureAwait(false); + //var productReceipt = JsonSerializer.Deserialize(incomingConverted.DataContent); + //var productReceiptAppService = workerContext.ServiceProvider.GetRequiredService(); + + //await productReceiptAppService.CreateAsync(productReceipt).ConfigureAwait(false); + var productReceipt = JsonSerializer.Deserialize(incomingConverted.DataContent); + var productReceiptAppService = workerContext.ServiceProvider.GetRequiredService(); + List list = new List(); + list.Add(productReceipt); + await productReceiptAppService.CreateManyAsync(list).ConfigureAwait(false); } public static async Task HandleMaterialRequestsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) @@ -183,7 +188,30 @@ public static class IncomingToWmsExtensions var materialRequestAppService = workerContext.ServiceProvider.GetRequiredService(); await materialRequestAppService.CreateAndHandleByAPIAsync(materialRequest).ConfigureAwait(false); } - + public static async Task HandleTransferNoteAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) + { + var transferNote = JsonSerializer.Deserialize(incomingConverted.DataContent); + var transferNoteAppService = workerContext.ServiceProvider.GetRequiredService(); + await transferNoteAppService.CreateAsync(transferNote).ConfigureAwait(false); + } + public static async Task HandleMesNoteAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) + { + var mesNote = JsonSerializer.Deserialize(incomingConverted.DataContent); + var mesNoteAppService = workerContext.ServiceProvider.GetRequiredService(); + await mesNoteAppService.CreateAsync(mesNote).ConfigureAwait(false); + } + public static async Task HandleDeliveryRequestAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) + { + var deliverRequest = JsonSerializer.Deserialize(incomingConverted.DataContent); + var deliverRequestAppService = workerContext.ServiceProvider.GetRequiredService(); + await deliverRequestAppService.CreateAsync(deliverRequest).ConfigureAwait(false); + } + public static async Task HandleInjectionIssueRequestAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) + { + var injectionIssueRequest = JsonSerializer.Deserialize(incomingConverted.DataContent); + var injectionIssueRequestAppService = workerContext.ServiceProvider.GetRequiredService(); + await injectionIssueRequestAppService.CreateAsync(injectionIssueRequest).ConfigureAwait(false); + } public static async Task HandleScrapsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) { var scrap = JsonSerializer.Deserialize(incomingConverted.DataContent); diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs index 4120b94f6..8d93ccf90 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs @@ -68,7 +68,7 @@ public class IncomingToWmsWorker : AsyncPeriodicBackgroundWorkerBase //Do the work var incomingToWmsList = await incomingToWmsManager.GetToBeProcessedListAsync().ConfigureAwait(false); - foreach (var incomingToWms in incomingToWmsList) + foreach (var incomingToWms in incomingToWmsList.OrderBy(r=>r.CreationTime)) { try { @@ -169,7 +169,7 @@ public class IncomingToWmsWorker : AsyncPeriodicBackgroundWorkerBase await incomingToWms.HandleAsnsAsync(workerContext).ConfigureAwait(false); break; case EnumIncomingDataType.ProductReceipt: - await SendProductReceipt(workerContext, incomingToWms).ConfigureAwait(false); + await incomingToWms.HandleProductReceiptsAsync(workerContext).ConfigureAwait(false); break; case EnumIncomingDataType.MaterialRequest: await incomingToWms.HandleMaterialRequestsAsync(workerContext).ConfigureAwait(false); @@ -184,8 +184,20 @@ public class IncomingToWmsWorker : AsyncPeriodicBackgroundWorkerBase await incomingToWms.HandleInventoryLabelsAsync(workerContext).ConfigureAwait(false); break; case EnumIncomingDataType.BackFlush: - // await incomingToWms.HandleBackFlushsAsync(workerContext).ConfigureAwait(false); - await SendBackFlush(workerContext, incomingToWms).ConfigureAwait(false); + await incomingToWms.HandleBackFlushsAsync(workerContext).ConfigureAwait(false); + // await SendBackFlush(workerContext, incomingToWms).ConfigureAwait(false); + break; + case EnumIncomingDataType.TransferNote: + await incomingToWms.HandleTransferNoteAsync(workerContext).ConfigureAwait(false); + break; + case EnumIncomingDataType.MesNote: + await incomingToWms.HandleMesNoteAsync(workerContext).ConfigureAwait(false); + break; + case EnumIncomingDataType.Delivery: + await incomingToWms.HandleDeliveryRequestAsync(workerContext).ConfigureAwait(false); + break; + case EnumIncomingDataType.CallMtl: + await incomingToWms.HandleInjectionIssueRequestAsync(workerContext).ConfigureAwait(false); break; case EnumIncomingDataType.None: default: diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json index 156e965e2..7b848b1b8 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json @@ -1,13 +1,13 @@ { "ConnectionStrings": { - "Default": "Server=10.164.113.32,1818\\SHDB;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True", - "DataExchange": "Server=10.164.113.32,1818\\SHDB;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True" + "Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", + "DataExchange": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True" }, "AuthServer": { - "Authority": "http://10.164.113.31:60083/", + "Authority": "http://dev.ccwin-in.com:60083/", "RequireHttpsMetadata": "false", "SwaggerClientId": "admin", "SwaggerClientSecret": "1q2w3E*", @@ -26,16 +26,16 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://10.164.113.31:60084/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Store": { - "BaseUrl": "http://10.164.113.31:60085/" + "BaseUrl": "http://localhost:59095/" }, "Label": { - "BaseUrl": "http://10.164.113.31:60082/" + "BaseUrl": "http://dev.ccwin-in.com:60082/" }, "Auth": { - "BaseUrl": "http://10.164.113.31:60083/" + "BaseUrl": "http://dev.ccwin-in.com:60083/" } }, "DataExchangeOptions": { @@ -44,7 +44,7 @@ "PeriodSeconds": 10, "RetryTimes": 1, "BatchSize": 100, - "apiUrl": "http://10.164.113.31:60085/" + "apiUrl": "http://dev.ccwin-in.com:60085/" }, "OutgoingOptions": { "Active": false, diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs index 306172f7e..e0b3bb7d6 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs @@ -26,4 +26,19 @@ public class DeliverNoteDetailExchangeDto /// [Display(Name = "数量")] public decimal Qty { get; set; } + /// + /// Mes发货单号 + /// + [Display(Name = "Mes发货单号")] + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + [Display(Name = "Mes发货计划号")] + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + [Display(Name = "底盘号")] + public string IdentityNo { get; set; } } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs new file mode 100644 index 000000000..f46e0d787 --- /dev/null +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs @@ -0,0 +1,43 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest; +public class DeliverRequestDetailExchangeDto +{ + /// + /// 单据号 + /// + [Display(Name = "单据号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Number { get; set; } + /// + /// 物品代码 + /// + [Display(Name = "物品代码")] + public string ItemCode { get; set; } + /// + /// 来源库区 + /// + [Display(Name = "来源库区")] + public string AreaCode { get; set; } + /// + /// 数量 + /// + [Display(Name = "数量")] + public decimal Qty { get; set; } + /// + /// Mes发货单号 + /// + [Display(Name = "Mes发货单号")] + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + [Display(Name = "Mes发货计划号")] + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + [Display(Name = "底盘号")] + public string IdentityNo { get; set; } +} diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs new file mode 100644 index 000000000..7273c7ce0 --- /dev/null +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs @@ -0,0 +1,43 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest; +public class DeliverRequestExchangeDto +{ + /// + /// 单据号 + /// + public string Number { get; set; } + /// + /// 操作员 + /// + public string Worker { get; set; } + + /// + /// 生效日期 + /// + public DateTime ActiveDate { get; set; } = DateTime.Now.Date; + /// + /// 发货时间 + /// + public DateTime DeliverTime { get; set; } = DateTime.Now.Date; + /// + /// 发货类型 + /// + public EnumDeliverRequestType DeliverRequestType { get; set; } + + /// + /// 客户 + /// + [Display(Name = "客户")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string CustomerCode { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public DeliverRequestDetailExchangeDto Detail { get; set; } = new(); +} diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestDetailExchangeDto.cs new file mode 100644 index 000000000..273fcf2f5 --- /dev/null +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestDetailExchangeDto.cs @@ -0,0 +1,34 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest; +public class InjectionIssueRequestDetailExchangeDto +{ + /// + /// 目标ERP储位 + /// + [Display(Name = "目标储位")] + public string ToLocationCode { get; set; } + /// + /// 数量 + /// + [Display(Name = "数量")] + public decimal Qty { get; set; } + + /// + /// 需求箱数量 + /// + [Display(Name = "需求箱数量")] + public decimal BoxQty { get; set; } + + /// + /// 物品代码 + /// + [Display(Name = "物品代码")] + public string ItemCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestExchangeDto.cs new file mode 100644 index 000000000..123972c0e --- /dev/null +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/InjectionIssueRequest/InjectionIssueRequestExchangeDto.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; +using Win_in.Sfs.Wms.DataExchange.WMS.MesNote; +using Win_in.Sfs.Wms.DataExchange.WMS.PurchaseOrder; + +namespace Win_in.Sfs.Wms.DataExchange.WMS.InjectionIssueRequest; +public class InjectionIssueRequestExchangeDto +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } + /// + /// 操作员 + /// + [Display(Name = "操作员")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Worker { get; set; } + + /// + /// 生效日期 + /// + [Display(Name = "生效日期")] + public DateTime ActiveDate { get; set; } = DateTime.Now.Date; + + /// + /// 明细 + /// + [Display(Name = "明细")] + public InjectionIssueRequestDetailExchangeDto Detail { get; set; } = new(); +} diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteDetailExchangeDto.cs new file mode 100644 index 000000000..c58436b83 --- /dev/null +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteDetailExchangeDto.cs @@ -0,0 +1,36 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.DataExchange.WMS.PCK; + +public class AssembleIssueNoteDetailExchangeDto + +{ + + /// + /// 目标ERP库位 + /// + [Display(Name = "目标ERP库位")] + public string ToLocationErpCode { get; set; } + + public string FromPackingCode { get; set; } + /// + /// 来源ERP库位 + /// + public string FromLocationErpCode { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + public decimal Qty { get; set; } + + /// + /// 物品代码 + /// + [Display(Name = "物品代码")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + [Required(ErrorMessage = "{0}是必填项")] + public string ItemCode { get; set; } + +} diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteExchangeDto.cs new file mode 100644 index 000000000..22ff4899e --- /dev/null +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/IssueNote/AssembleIssueNote/AssembleIssueNoteExchangeDto.cs @@ -0,0 +1,29 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.DataExchange.WMS.PCK; + +public class AssembleIssueNoteExchangeDto +{ + /// + /// 发料记录号 + /// + [Display(Name = "发料记录号")] + public string Number { get; set; } + /// + /// 生效日期 + /// + [Display(Name = "生效日期")] + public DateTime ActiveDate { get; set; } = DateTime.Now.Date; + + /// + /// 操作员 + /// + [Display(Name = "操作员")] + public string Worker { get; set; } + /// + /// 明细 + /// + [Display(Name = "明细")] + public AssembleIssueNoteDetailExchangeDto Detail { get; set; } = new(); +} diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteDetailExchangeDto.cs new file mode 100644 index 000000000..4283d490f --- /dev/null +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteDetailExchangeDto.cs @@ -0,0 +1,48 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.DataExchange.WMS.MesNote; + +public class MesNoteDetailExchangeDto +{ + /// + /// 上架单号 + /// + [Display(Name = "移库单号")] + public string Number { get; set; } + /// + /// 物品代码 + /// + [Display(Name = "物品代码")] + public string ItemCode { get; set; } + + /// + /// 目标ERP库位 + /// + [Display(Name = "目标ERP库位")] + public string ToLocationErpCode { get; set; } + + /// + /// 来源ERP库位 + /// + [Display(Name = "来源ERP库位")] + public string FromLocationErpCode { get; set; } + + /// + /// 目标ERP库位 + /// + [Display(Name = "来源库位状态")] + public EnumInventoryStatus FromStatus { get; set; } + + /// + /// 来源ERP库位 + /// + [Display(Name = "目标库位状态")] + public EnumInventoryStatus ToStatus { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + public decimal Qty { get; set; } +} diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteExchangeDto.cs new file mode 100644 index 000000000..3aa64c617 --- /dev/null +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/MesNote/MesNoteExchangeDto.cs @@ -0,0 +1,47 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.DataExchange.WMS.MesNote; +public class MesNoteExchangeDto +{ + /// + /// 上架单号 + /// + [Display(Name = "移库单号")] + public string Number { get; set; } + /// + /// MES请求单号 + /// + [Display(Name = "MES请求单号")] + public string MesRequestNumber { get; set; } + + + /// + /// 生效日期 + /// + [Display(Name = "生效日期")] + public DateTime ActiveDate { get; set; } = DateTime.Now.Date; + + /// + /// 操作员 + /// + [Display(Name = "操作员")] + public string Worker { get; set; } + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + public string Type { get; set; } + + /// + /// 备注 + /// + [Display(Name = "备注")] + public string Remark { get; set; } + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public MesNoteDetailExchangeDto Detail { get; set; } = new(); +} diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ProductReceiptNote/ProductReceiptNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ProductReceiptNote/ProductReceiptNoteDetailExchangeDto.cs index 1ee7279d5..fe2722182 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ProductReceiptNote/ProductReceiptNoteDetailExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ProductReceiptNote/ProductReceiptNoteDetailExchangeDto.cs @@ -61,4 +61,15 @@ public class ProductReceiptNoteDetailExchangeDto /// 仓库 /// public string WarehouseCode { get; set; } + + /// + /// Mes条码号 + /// + [Display(Name = "Mes条码号")] + public string MesBarCode { get; set; } + /// + /// Mes质量补标识 + /// + [Display(Name = "Mes质量补标识")] + public string MesQuality { get; set; } } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteDetailExchangeDto.cs index 1ea1ca327..b50be31b2 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteDetailExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteDetailExchangeDto.cs @@ -32,4 +32,17 @@ public class TransferNoteDetailExchangeDto /// [Display(Name = "数量")] public decimal Qty { get; set; } + + + /// + /// 批次 + /// + [Display(Name = "批次")] + public string Lot { get; set; } = ""; + + /// + /// 箱码 + /// + [Display(Name = "箱码")] + public string PackingCode { get; set; } = ""; } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteExchangeDto.cs index 2b84dcc42..65c93c570 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/TransferNote/TransferNoteExchangeDto.cs @@ -29,4 +29,14 @@ public class TransferNoteExchangeDto [Display(Name = "调拨类型")] public string Type { get; set; } + /// + /// 备注 + /// + [Display(Name = "备注")] + public string Remark { get; set; } + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public TransferNoteDetailExchangeDto Detail { get; set; } = new(); } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedIssueNote/UnplannedIssueNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedIssueNote/UnplannedIssueNoteExchangeDto.cs index b27945058..8ce513ce2 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedIssueNote/UnplannedIssueNoteExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedIssueNote/UnplannedIssueNoteExchangeDto.cs @@ -1,4 +1,8 @@ using System; +using IdentityServer4.Models; +using System.ComponentModel.DataAnnotations; +using System.Xml.Linq; +using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.DataExchange.WMS.UnplannedIssueNote; @@ -27,4 +31,9 @@ public class UnplannedIssueNoteExchangeDto /// 领料类别 /// public EnumUnplannedIssueType UnplannedIssueType { get; set; } + + /// + /// 计划外出库请求单号 + /// + public string UnplannedIssueRequestNumber { get; set; } } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedReceiptNote/UnplannedReceiptNoteExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedReceiptNote/UnplannedReceiptNoteExchangeDto.cs index abae086af..e21240614 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedReceiptNote/UnplannedReceiptNoteExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/UnplannedReceiptNote/UnplannedReceiptNoteExchangeDto.cs @@ -1,4 +1,8 @@ using System; +using IdentityServer4.Models; +using System.ComponentModel.DataAnnotations; +using System.Xml.Linq; +using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.DataExchange.WMS.UnplannedReceiptNote; @@ -28,5 +32,9 @@ public class UnplannedReceiptNoteExchangeDto /// 退料类别 /// public EnumUnplannedReceiptType UnplannedReceiptType { get; set; } + /// + /// 计划外入库请求单号 + /// + public string UnplannedReceiptRequestNumber { get; set; } } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml index c979bbb94..c1943c344 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml @@ -531,6 +531,21 @@ 数量 + + + Mes发货单号 + + + + + Mes发货计划号 + + + + + 底盘号 + + 单据号 @@ -551,6 +566,76 @@ 客户 + + + 单据号 + + + + + 物品代码 + + + + + 来源库区 + + + + + 数量 + + + + + Mes发货单号 + + + + + Mes发货计划号 + + + + + 底盘号 + + + + + 单据号 + + + + + 操作员 + + + + + 生效日期 + + + + + 发货时间 + + + + + 发货类型 + + + + + 客户 + + + + + 明细列表 + + 代码 @@ -631,6 +716,51 @@ 仓库代码 + + + 目标ERP储位 + + + + + 数量 + + + + + 需求箱数量 + + + + + 物品代码 + + + + + 推荐类型 + + + + + 叫料类型 + + + + + 操作员 + + + + + 生效日期 + + + + + 明细 + + 是否可用 @@ -771,6 +901,76 @@ 明细列表 + + + 上架单号 + + + + + 物品代码 + + + + + 目标ERP库位 + + + + + 来源ERP库位 + + + + + 目标ERP库位 + + + + + 来源ERP库位 + + + + + 数量 + + + + + 上架单号 + + + + + MES请求单号 + + + + + 生效日期 + + + + + 操作员 + + + + + 调拨类型 + + + + + 备注 + + + + + 明细列表 + + 上架单号 @@ -861,6 +1061,16 @@ 仓库 + + + Mes条码号 + + + + + Mes质量补标识 + + 完工时间 @@ -1721,6 +1931,16 @@ 数量 + + + 批次 + + + + + 箱码 + + 上架单号 @@ -1741,6 +1961,16 @@ 调拨类型 + + + 备注 + + + + + 明细列表 + + 单据号 @@ -1801,6 +2031,11 @@ 领料类别 + + + 计划外出库请求单号 + + 单据号 @@ -1861,6 +2096,11 @@ 退料类别 + + + 计划外入库请求单号 + + 用户号码 diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumIncomingDataType.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumIncomingDataType.cs index 4042cb1de..824808a90 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumIncomingDataType.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumIncomingDataType.cs @@ -114,4 +114,20 @@ public enum EnumIncomingDataType /// Erp库位零件(开账) /// ErpLocationItem = 27, + /// + /// 储位调拨 + /// + TransferNote=28, + /// + /// 储位调拨 + /// + MesNote = 29, + /// + /// 发货单 + /// + Delivery=30, + /// + /// 自动叫料 + /// + CallMtl=31, } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumOutgoingDataType.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumOutgoingDataType.cs index 985dfb465..a2fdb0412 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumOutgoingDataType.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumOutgoingDataType.cs @@ -32,7 +32,20 @@ public enum EnumOutgoingDataType ProductRecycle = 24, Item_Transform = 25,//线边仓调整单 WIPAdjust = 26,//回收料调整单 - SemiPutaway=27//半成品上架 + SemiPutaway=27,//半成品上架 + /// + /// 注塑发料 + /// + InjectionIssue = 30, + /// + /// 涂装发料 + /// + CoatingIssue = 31, + /// + /// 装配发料 + /// + AssembleIssue = 32, + } public enum EnumExchangeTableType { diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemContainerController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemContainerController.cs new file mode 100644 index 000000000..ac9c15b66 --- /dev/null +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemContainerController.cs @@ -0,0 +1,33 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Win_in.Sfs.Basedata.Application.Contracts; + +namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; + +/// +/// +[ApiController] +[Route($"{PdaHostConst.ROOT_ROUTE}item-container")] +public class ItemContainerController : AbpController +{ + private readonly IItemContainerAppService _itemContainerAppService; + + public ItemContainerController(IItemContainerAppService itemContainerAppService) + { + _itemContainerAppService = itemContainerAppService; + } + + /// + /// 根据名称获取物品 + /// + /// + /// + [HttpGet("by-item")] + public virtual async Task GetListByItemNameAsync(string itemCode) + { + var dto = await _itemContainerAppService.GetByItemCodeAsync(itemCode).ConfigureAwait(false); + + return dto; + } +} diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs new file mode 100644 index 000000000..85558bfe0 --- /dev/null +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; +using Win_in.Sfs.Auth.Application.Contracts; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs.IssueJobs; + +/// +/// +[ApiController] +[Route($"{PdaHostConst.ROOT_ROUTE}job/kitting-issue")] +public class KittingIssueJobsController : AbpController +{ + private readonly IKittingIssueJobAppService _kittingIssueJobAppService; + + private readonly IUserWorkGroupAppService _userWorkGroupAppService; + + public KittingIssueJobsController(IKittingIssueJobAppService kittingIssueJobAppService, IUserWorkGroupAppService userWorkGroupAppService) + { + _kittingIssueJobAppService = kittingIssueJobAppService; + _userWorkGroupAppService = userWorkGroupAppService; + } + + /// + /// 获取列表 + /// + /// + /// + /// + /// + [HttpPost("list")] + public virtual async Task> GetListAsync(int pageSize, int pageIndex, + bool isFinished) + { + var status = new List(); + if (isFinished) + { + status.Add((int)EnumJobStatus.Done); + } + else + { + status.Add((int)EnumJobStatus.Open); + status.Add((int)EnumJobStatus.Wait); + status.Add((int)EnumJobStatus.Doing); + status.Add((int)EnumJobStatus.Partial); + } + + var jsonStatus = JsonSerializer.Serialize(status); + + var request = new SfsJobRequestInputBase + { + MaxResultCount = pageSize, + SkipCount = (pageIndex - 1) * pageSize, + Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC", + Condition = new Condition + { + Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") } + } + }; + + var list = await _kittingIssueJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); + + return list; + } + + /// + /// 承接任务 + /// + /// + /// + [HttpPost("take/{id}")] + public virtual async Task TakeAsync(Guid id) + { + await _kittingIssueJobAppService.AcceptAsync(id).ConfigureAwait(false); + } + + /// + /// 取消承接任务 + /// + /// + /// + [HttpPost("cancel-take/{id}")] + public virtual async Task CancelTakeAsync(Guid id) + { + await _kittingIssueJobAppService.CancelAcceptAsync(id).ConfigureAwait(false); + } + + /// + /// 执行任务明细 + /// + /// + [HttpPost("ExecuteDetail/{masterId}")] + public async Task ExecuteDetailAsync(Guid masterId, Guid detailId, KittingIssueJobDetailDTO issueJobDetailDto) + { + await _kittingIssueJobAppService.ExecuteDetailAsync(masterId,detailId,issueJobDetailDto).ConfigureAwait(false); + } + + /// + /// 获取任务数量 + /// + /// + [HttpGet("count")] + public virtual async Task> CountAsync() + { + var status = new List + { + (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial, (int)EnumJobStatus.Wait + }; + var jsonStatus = JsonSerializer.Serialize(status); + + var request = new SfsJobRequestInputBase + { + Sorting = $"{nameof(InspectJobDTO.Priority)} ASC", + Condition = new Condition + { + Filters = new List + { + //new(nameof(InspectJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(InspectJobDTO.JobStatus), jsonStatus, "In") + } + } + }; + + var count = await _kittingIssueJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false); + + return Ok(count); + } + + /// + /// 获取任务详情 + /// + /// + /// + [HttpGet("{id}")] + public virtual async Task> GetAsync(Guid id) + { + var result = await _kittingIssueJobAppService.GetAsync(id).ConfigureAwait(false); + return Ok(result); + } + + /// + /// 根据Job Number 获取盘点任务列表 + /// + /// + /// + [HttpGet("by-number/{jobNumber}")] + public virtual async Task> GetByNumberAsync(string jobNumber) + { + var jobDto = await _kittingIssueJobAppService.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; + } +} diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs similarity index 99% rename from be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibJobController.cs rename to be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs index c8084e7d7..5caf96652 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs @@ -31,7 +31,7 @@ public class TransferLibJobController : AbpController } /// - /// 获取盘点任务详情 + /// /// /// /// diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/KittingRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/KittingRequestController.cs new file mode 100644 index 000000000..c24e85e69 --- /dev/null +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/KittingRequestController.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; +using Win_in.Sfs.Auth.Application.Contracts; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; + +/// +/// Kitting叫料请求 +/// +[ApiController] +[Route($"{PdaHostConst.ROOT_ROUTE}store/kitting-request")] +public class KittingRequestController : AbpController +{ + private readonly IKittingIssueRequestAppService _kittingIssueRequestAppService; + + private readonly IUserWorkGroupAppService _userWorkGroupAppService; + + /// + /// + /// + public KittingRequestController(IKittingIssueRequestAppService kittingIssueRequestAppService, + IUserWorkGroupAppService userWorkGroupAppService) + { + _kittingIssueRequestAppService = kittingIssueRequestAppService; + _userWorkGroupAppService = userWorkGroupAppService; + } + + /// + /// Kitting叫料申请 + /// + /// + /// + [HttpPost("")] + public virtual async Task CreateAsync(KittingIssueRequestEditInput input) + { + await _kittingIssueRequestAppService.CreateAndHandleAsync(input).ConfigureAwait(false); + } + + /// + /// + /// + /// + /// + /// + [HttpPost("list")] + public virtual async Task> GetListAsync(int pageSize, int pageIndex, + bool isFinished) + { + var status = new List(); + if (isFinished) + { + status.Add((int)EnumRequestStatus.Completed); + } + else + { + status.Add((int)EnumRequestStatus.Partial); + status.Add((int)EnumRequestStatus.Handling); + status.Add((int)EnumRequestStatus.New); + } + + var jsonStatus = JsonSerializer.Serialize(status); + + var request = new SfsStoreRequestInputBase + { + MaxResultCount = pageSize, + SkipCount = (pageIndex - 1) * pageSize, + Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC", + Condition = new Condition + { + Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") } + } + }; + + var list = await _kittingIssueRequestAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); + + return list; + } + + /// + /// + /// + [HttpPost("handle/{id}")] + public virtual async Task HandleAsync(Guid id) + { + await _kittingIssueRequestAppService.HandleAsync(id).ConfigureAwait(false); + } + + /// + /// 根据Job Number 获取盘点任务列表 + /// + /// + /// + [HttpGet("by-number/{requestNumber}")] + public virtual async Task> GetByNumberAsync(string requestNumber) + { + var jobDto = await _kittingIssueRequestAppService.GetByNumberAsync(requestNumber).ConfigureAwait(false); + if (jobDto == null) + { + throw new UserFriendlyException($"未找到编号为 {requestNumber} 的请求"); + } + + return jobDto; + } + + /// + /// 获取任务详情 + /// + /// + /// + [HttpGet("{id}")] + public virtual async Task> GetAsync(Guid id) + { + var result = await _kittingIssueRequestAppService.GetAsync(id).ConfigureAwait(false); + return Ok(result); + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/DTOs/CustomerItemDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/DTOs/CustomerItemDTO.cs index 946e15d81..a9b783f32 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/DTOs/CustomerItemDTO.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/DTOs/CustomerItemDTO.cs @@ -61,4 +61,11 @@ public class CustomerItemDTO : SfsBaseDataDTOBase [Display(Name = "结束时间")] public DateTime? EndTime { get; set; } + /// + /// 客户零件库位 + /// + [Display(Name = "客户零件库位")] + public string LocationCode { get; set; } + + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs index ef35579a0..8e721681c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/ICustomerItemAppService.cs @@ -10,5 +10,6 @@ public interface ICustomerItemAppService , ISfsUpsertAppService { + Task GetFirstLocationCodeByItemCode(string itemCode); Task> GetListByPartsAsync(List inputs); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemEditInput.cs index 8ed4c0988..f6719dd70 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemEditInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemEditInput.cs @@ -45,6 +45,13 @@ public class CustomerItemEditInput : SfsBaseDataCreateOrUpdateInputBase /// [Display(Name = "结束时间")] public DateTime? EndTime { get; set; } + + /// + /// 客户零件库位 + /// + [Display(Name = "客户零件库位")] + public string LocationCode { get; set; } + #endregion #region Create diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs index 4b0880904..bb1f2b228 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs @@ -56,6 +56,14 @@ public class CustomerItemImportInput : SfsBaseDataImportInputBase [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string Version { get; set; } + /// + /// 客户零件库位 + /// + [Display(Name = "客户零件库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string LocationCode { get; set; } + + /// /// 开始时间 /// @@ -80,4 +88,6 @@ public class CustomerItemImportInput : SfsBaseDataImportInputBase [Display(Name = "备注")] [StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")] public string Remark { get; set; } + + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/IItemBasicAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/IItemBasicAppService.cs index da616e239..59739fcba 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/IItemBasicAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/IItemBasicAppService.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Win_in.Sfs.Basedata.tests; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; @@ -26,4 +27,5 @@ public interface IItemBasicAppService Task UpsertAsyncByInterface(ItemBasicEditInput input); Task UpsertStdPackQtyAsync(string itemCode, decimal stdpackqty); + Task GetErpCodeByMesBarCode(string BarCode); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/IItemContainerAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/IItemContainerAppService.cs index 783e1ab02..4acdf4457 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/IItemContainerAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemContainers/IItemContainerAppService.cs @@ -8,4 +8,5 @@ public interface IItemContainerAppService : ISfsBaseDataAppServiceBase> GetListByItemCodeAsync(string itemCode); Task UpsertAndItemBasicUomAsync(string itemCode,decimal stdPackQty); + Task GetByItemCodeAsync(string itemCode); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/IItemStoreRelationAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/IItemStoreRelationAppService.cs index 7d4113c45..34bbb5c8c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/IItemStoreRelationAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/IItemStoreRelationAppService.cs @@ -21,4 +21,5 @@ public interface IItemStoreRelationAppService : ISfsBaseDataAppServiceBase GetFirstAsync(ItemAndLocationRequestInput itemAndLocations); Task GetFirstAsync(string itemCode, string locationCode); + Task GetByItemAndLocationAsync(string itemCode, string value, EnumStoreRelationType storeRelationType); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/ErpCodeRequest.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/ErpCodeRequest.cs new file mode 100644 index 000000000..ebd3c4da9 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/tests/ErpCodeRequest.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Basedata.tests; +[Serializable] +public class ErpCodeRequest +{ + public string ErpCode { set; get; } + public string ProductType { set; get; } + + + public string ProductColor { set; get; } + + public string ProductState { set; get; } + + public string ProductProperty { set; get; } + + public string From { set; get; } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Bases/SfsBaseDataAppServiceBase.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Bases/SfsBaseDataAppServiceBase.cs index e7183a1a2..89812ac99 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Bases/SfsBaseDataAppServiceBase.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Bases/SfsBaseDataAppServiceBase.cs @@ -178,7 +178,14 @@ public abstract class SfsBaseDataAppServiceBase validationRresult) + { + var item = await LocationAppService.GetByCodeAsync(defaultLocationCode).ConfigureAwait(false); + if (item == null&& item.Type != type) + { + validationRresult.Add(new ValidationResult($"库位代码{defaultLocationCode}库位类型{type.ToString()}不存在", new string[] { "默认库位代码" })); + } + } protected async Task CheckLocationGroupCodeAsync(string locationGroupCode, List validationRresult) { var item = await LocationGroupAppService.GetByCodeAsync(locationGroupCode).ConfigureAwait(false); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs index ce6566077..3f1400a4e 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAppService.cs @@ -10,6 +10,8 @@ using Volo.Abp.Caching; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Basedata.tests; +using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Basedata.Application; @@ -49,6 +51,10 @@ public class CustomerItemAppService : SfsBaseDataAppServiceBase> GetListByPartsAsync(List inputs) @@ -56,6 +62,17 @@ public class CustomerItemAppService : SfsBaseDataAppServiceBase inputs.Contains(p.ItemCode)).ToListAsync().ConfigureAwait(false); } + [HttpPost("get-first-location-code-by-item-code")] + public virtual async Task GetFirstLocationCodeByItemCode(string itemCode) + { + string code = ""; + var customerItems = await _repository.GetListAsync(p => p.ItemCode == itemCode).ConfigureAwait(false); + if (customerItems.Count > 0) + { + code = customerItems.First(r=>!string.IsNullOrEmpty(r.LocationCode)).LocationCode; + } + return code; + } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs index 4c21b2851..0c77e19ed 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemContainers/ItemContainerAppService.cs @@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.Caching; using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; using Volo.Abp.Uow; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Domain; @@ -81,7 +82,6 @@ public class ItemContainerAppService return dtos; } - protected override async Task ValidateImportModelAsync(ItemContainerImportInput importInput, List validationRresult) { await base.CheckItemBasicPackUomAsync(importInput.ItemCode, importInput.BasicUom, validationRresult).ConfigureAwait(false); @@ -97,4 +97,11 @@ public class ItemContainerAppService await _repository.UpsertAsync(entity).ConfigureAwait(false); await ItemBasicAppService.UpsertStdPackQtyAsync(itemCode, stdPackQty).ConfigureAwait(false); } + + [HttpPut("get-by-item")] + public async Task GetByItemCodeAsync(string itemCode) + { + var entity = await _repository.FindAsync(p => p.ItemCode == itemCode).ConfigureAwait(false); + return ObjectMapper.Map(entity); + } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAppService.cs index f7da4b279..204a4638e 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAppService.cs @@ -99,6 +99,20 @@ public class ItemStoreRelationAppService : SfsBaseDataAppServiceBase GetByItemAndLocationAsync(string itemCode,string value, EnumStoreRelationType storeRelationType) + { + var entitie= await _repository.FirstOrDefaultAsync(p => p.ItemCode == itemCode&&p.StoreValue== value && p.Enabled == true && p.StoreRelationType == storeRelationType).ConfigureAwait(false); + if (entitie != null) + { + var dtos = ObjectMapper.Map(entitie); + return dtos; + } + else + { + return null; + } + } /// /// 当前库位 允许的 零件关系 /// diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAppService.cs index fc7d9b96d..b5a28e7d7 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAppService.cs @@ -14,6 +14,7 @@ using Volo.Abp.Validation; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Basedata.tests; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; @@ -231,4 +232,19 @@ public class ItemBasicAppService } #endregion + [HttpPost("get-erp-code-by-mes-barcode")] + public virtual async Task GetErpCodeByMesBarCode(string BarCode) + { + var itemBasic = await _repository.GetAsync(p => p.Code == BarCode).ConfigureAwait(false); + + ErpCodeRequest rest = new ErpCodeRequest(); + rest.ErpCode = itemBasic.Code; + rest.ProductType = itemBasic.Type; + rest.ProductColor = itemBasic.Color; + rest.ProductState = itemBasic.Status.ToString(); + rest.ProductProperty = "油漆件"; + rest.From = "WIPT"; + return rest; + } + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs index 5431a0142..c70f4caf8 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs @@ -68,7 +68,7 @@ public class PositionCodeAppService var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false); Check.NotNull(itemBasic, "物品代码", $"物品 {input.PartCode} 不存在"); //如果类型选择为原料,校验物料号类型必须为原料,器具、KItting 的不用加校验 - if (input.Type == EnumRecommendType.W && itemBasic.CanBuy != true) + if (input.Type == EnumRecommendType.RAW && itemBasic.CanBuy != true) { throw new UserFriendlyException($"{input.PartCode} 物料号类型必须为采购件"); } @@ -80,7 +80,7 @@ public class PositionCodeAppService var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false); Check.NotNull(location, "库位代码", $"库位 {input.LocationCode} 不存在"); //如果类型选择为原料,库位的类型必须为原料库位 - if (input.Type == EnumRecommendType.W && location.Type != EnumLocationType.RAW) + if (input.Type == EnumRecommendType.RAW && location.Type != EnumLocationType.RAW) { throw new UserFriendlyException($"{input.LocationCode} 库位的类型必须为原料库位"); } @@ -120,7 +120,7 @@ public class PositionCodeAppService var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false); Check.NotNull(itemBasic, "物品代码", $"物品 {input.PartCode} 不存在"); //如果类型选择为原料,校验物料号类型必须为原料,器具、KItting 的不用加校验 - if (input.Type == EnumRecommendType.W && itemBasic.Type != "10C02") + if (input.Type == EnumRecommendType.RAW && itemBasic.Type != "10C02") { throw new UserFriendlyException($"{input.PartCode} 物料号类型必须为原料"); } @@ -132,7 +132,7 @@ public class PositionCodeAppService var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false); Check.NotNull(location, "库位代码", $"库位 {input.LocationCode} 不存在"); //如果类型选择为原料,库位的类型必须为原料库位 - if (input.Type == EnumRecommendType.W && location.Type!= EnumLocationType.RAW) + if (input.Type == EnumRecommendType.RAW && location.Type!= EnumLocationType.RAW) { throw new UserFriendlyException($"{input.LocationCode} 库位的类型必须为原料库位"); } @@ -180,13 +180,13 @@ public class PositionCodeAppService } var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false); //如果类型选择为原料,校验物料号类型必须为原料,器具、KItting 的不用加校验 - if (input.Type == EnumRecommendType.W && itemBasic.Type != "10C02") + if (input.Type == EnumRecommendType.RAW && itemBasic.Type != "10C02") { validationRresult.Add(new ValidationResult($"物品代码{input.PartCode} 物料号类型必须为原料", new string[] { "物料号类型" })); } var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false); //如果类型选择为原料,库位的类型必须为原料库位 - if (input.Type==EnumRecommendType.W && location.Type != EnumLocationType.RAW) + if (input.Type==EnumRecommendType.RAW && location.Type != EnumLocationType.RAW) { validationRresult.Add(new ValidationResult($"库位代码{input.LocationCode} 库位的类型必须为原料库位", new string[] { "库位类型" })); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs index 88e1ba22e..3b126dc7a 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs @@ -16,17 +16,10 @@ public class ProductionLineItemAppService : SfsBaseDataAppServiceBase, IProductionLineItemAppService { - private new readonly IProductionLineItemRepository _repository; - public ProductionLineItemAppService( - IProductionLineItemRepository repository - , IDistributedCache cache - , IProductionLineItemManager manager - , IProductionLineAppService prodLineAppService + IProductionLineItemRepository repository, IDistributedCache cache ) : base(repository, cache) { - _repository = repository; - base.CreatePolicyName = ProductionLineItemPermissions.Create; base.UpdatePolicyName = ProductionLineItemPermissions.Update; base.DeletePolicyName = ProductionLineItemPermissions.Delete; @@ -36,7 +29,7 @@ public class ProductionLineItemAppService : public virtual async Task UpsertAsync(ProductionLineItemEditInput input) { var entity = ObjectMapper.Map(input); - await _repository.UpsertAsync(entity).ConfigureAwait(false); + await _repository.UpdateAsync(entity).ConfigureAwait(false); } protected override async Task ValidateImportModelAsync(ProductionLineItemImportInput importInput, diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs index 1859b5324..ade4d7ddb 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs @@ -28,4 +28,13 @@ public sealed class CommonHelper return DateTime.Now; } } + + public static string CurTimeStr + { + get + { + return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + } + } + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs index 57f0475b5..e98b75340 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Linq.Expressions; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query.SqlExpressions; using NetTopologySuite.Geometries; using Omu.ValueInjecter; using Volo.Abp; @@ -382,10 +383,15 @@ public class BomManager : DomainService, IBomManager public virtual async Task> GetAllItemByCode(string productCode,Guid id) { List boms = new List(); - var lst = await _repository.GetListAsync(p => p.Product == productCode).ConfigureAwait(false); + var lst = await + (await _repository.GetDbSetAsync().ConfigureAwait(false)) + .Where(p => p.Product == productCode) + .AsNoTracking() + .ToListAsync().ConfigureAwait(false); foreach (var bom in lst) { bom.Remark = id.ToString(); + bom.SetId(GuidGenerator.Create()); boms.Add(bom); var results= await GetAllItemByCode(bom.Component,bom.Id).ConfigureAwait(false); boms.AddRange(results); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/CustomerItems/CustomerItem.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/CustomerItems/CustomerItem.cs index f8fd1657e..d4745c9fb 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/CustomerItems/CustomerItem.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/CustomerItems/CustomerItem.cs @@ -56,6 +56,12 @@ public class CustomerItem : SfsBaseDataAggregateRootBase, IHasTimeRange /// 结束时间 /// public DateTime? EndTime { get; set; } + + /// + /// 客户零件库位 + /// + public string LocationCode { get; set; } + } ///// ///// 客户零件 diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLineItems/ProductionLineItem.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLineItems/ProductionLineItem.cs index c319c0d17..649f0a8c1 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLineItems/ProductionLineItem.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLineItems/ProductionLineItem.cs @@ -14,7 +14,6 @@ public class ProductionLineItem : SfsBaseDataAggregateRootBase /// /// 生产线代码 /// - [Key] [Display(Name = "生产线代码")] [Required(ErrorMessage = "{0}是必填项")] [IgnoreUpdate] diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/CustomerItems/CustomerItemDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/CustomerItems/CustomerItemDbContextModelCreatingExtensions.cs index acc82761a..39e474079 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/CustomerItems/CustomerItemDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/CustomerItems/CustomerItemDbContextModelCreatingExtensions.cs @@ -25,7 +25,7 @@ public static class CustomerItemDbContextModelCreatingExtensions b.Property(q => q.ItemCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerItemCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Version).HasMaxLength(SfsPropertyConst.DescLength); - + b.Property(q => q.LocationCode).HasMaxLength(SfsPropertyConst.CodeLength); //Relations //None diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLineItems/ProductionLineItemDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLineItems/ProductionLineItemDbContextModelCreatingExtensions.cs index 6da2af05f..7eb8a17de 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLineItems/ProductionLineItemDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLineItems/ProductionLineItemDbContextModelCreatingExtensions.cs @@ -17,21 +17,8 @@ public static class ProductionLineItemDbContextModelCreatingExtensions b.ConfigureByConvention(); //Configure Sfs base properties b.ConfigureSfsBase(); - - //Properties - //b.Property(x => x.ProdLineId).IsRequired(); - //b.Property(x => x.ItemId).IsRequired(); - //b.Property(x => x.BomId).IsRequired(); - //b.Property(x => x.RoutingId).IsRequired(); - b.Property(x => x.ProdLineCode).IsRequired(); b.Property(x => x.ItemCode).IsRequired(); - - //Relations - //None - - //Indexes - b.HasIndex(q => new { q.ProdLineCode, q.ItemCode }).IsUnique(); }); } } diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs index 31ae65e93..e5361fa7d 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs @@ -24,23 +24,27 @@ public interface IExpectOutAppService EnumInventoryStatus enumInventoryStatus, string lot); - Task RemoveListByItemCodeAndStatusAndPackingCodeAsync( - string itemCode, - string locationCode, - string packingCode, - EnumInventoryStatus enumInventoryStatus, - string lot); - /// - /// 保存拆箱时涉及的明细修改 + /// 保存拆箱时涉及的明细修改 /// /// Task> SaveDetail_SplitPackingAsync(SplitPacking_UpdateDetailInput input); /// - /// 根据任务号、箱码、数量、库位取预计出列表 + /// 根据任务号、箱码、数量、库位取预计出列表 /// /// Task> GetListByJobNumberAsync(SplitPacking_UpdateDetailInput input); + + Task RemoveByNumberAndInventoryAsync( + string jobNumber, + string itemCode, + string locationCode, + string packingCode, + EnumInventoryStatus enumInventoryStatus, + string lot, + decimal qty); + + Task RemoveByNumberAsync(string number); } diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs index 3a8a08cfe..fcbccf703 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs @@ -604,8 +604,9 @@ public class BalanceAppService [HttpGet("usable-list")] public virtual async Task> GetUsableListAsync(RecommendBalanceRequestInput input) { + var inventoryBalances = await _balanceManager - .GetUsableListAsync(input.ItemCode, input.Locations, input.Statuses, true).ConfigureAwait(false); + .GetUsableListAsync(input.ItemCode, input.Locations, input.Statuses, input.IsPackingCode).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(inventoryBalances); diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs index fb64edbd3..1f93d1907 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs @@ -43,6 +43,48 @@ public class ExpectOutAppService await _expectOutManager.RemoveAsync(jobNumber).ConfigureAwait(false); } + [HttpPost("remove/job-number-and-inventory-balance")] + public virtual async Task RemoveByNumberAndInventoryAsync( + string jobNumber, + string itemCode, + string locationCode, + string packingCode, + EnumInventoryStatus enumInventoryStatus, + string lot, + decimal qty) + { + var expectOut= await _repository.FindAsync(p => + p.ItemCode == itemCode && + p.Status == enumInventoryStatus && + p.PackingCode == packingCode && + p.Lot == lot&& + p.JobNumber==jobNumber + ).ConfigureAwait(false); + + if (expectOut != null) + { + expectOut.Qty -= qty; + if (expectOut.Qty == 0) + { + await _repository.DeleteAsync(expectOut).ConfigureAwait(false); + } + else + { + await _repository.UpdateAsync(expectOut).ConfigureAwait(false); + } + } + } + + [HttpPost("remove/job-number")] + public virtual async Task RemoveByNumberAsync(string number) + { + var expectOut = await _repository.GetListAsync(p => p.JobNumber == number).ConfigureAwait(false); + if (expectOut != null && expectOut.Any()) + { + await _repository.DeleteManyAsync(expectOut).ConfigureAwait(false); + } + } + [HttpPost("remove/{id}")] public virtual async Task RemoveAsync(Guid id) { diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs index 4ecd07b1e..8891a9be3 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs @@ -867,6 +867,7 @@ public class BalanceManager : DomainService, IBalanceManager .FilterLocationEnablePickAsync(locations) //排序库存余额 最终可用的余额集合 .SortByFifo(); + usableBalances = usableBalances.Where(p => p.Qty != 0).ToList(); return usableBalances; } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs index 4bb67435f..7e147f8c7 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumLocationType.cs @@ -83,4 +83,9 @@ public enum EnumLocationType /// Kitting线边 /// [Display(Name = "Kitting线边")] KittingWip = 15, + + /// + /// 立体库 + /// + [Display(Name = "立体库")] DimensionalStorehouse = 16, } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs index 55fbcf988..4c9ebc563 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Basedata/EnumProductionLineType.cs @@ -19,5 +19,10 @@ public enum EnumProductionLineType /// /// 装配 /// - [Display(Name = "装配")] Assemble = 3 + [Display(Name = "装配")] Assemble = 3, + + /// + /// Kitting + /// + [Display(Name = "Kitting")] Kitting = 4 } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType - 复制.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType - 复制.cs new file mode 100644 index 000000000..416d6706b --- /dev/null +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType - 复制.cs @@ -0,0 +1,18 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + +public enum EnumIssueSendType +{ + None = 0, + + /// + /// 按数量 + /// + [Display(Name = "按数量")] QtyType = 1, + + /// + /// 按箱数 + /// + [Display(Name = "按箱数")] BoxQtyType = 2 +} diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs new file mode 100644 index 000000000..2ca84955e --- /dev/null +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Shared.Domain.Shared.Enums.Store; +public enum EnumIssueRequestType +{ + None = 0, + + /// + /// 视觉 + /// + [Display(Name = "视觉发起")] + Vision =1, + + /// + /// Mes + /// + [Display(Name = "Mes发起")] + Mes =2, + + /// + /// 立体库 + /// + [Display(Name = "立体库发起")] + DimensionalStorehouse=3, + + /// + /// 位置码 + /// + [Display(Name = "位置码")] + PositionCode =4, +} diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs deleted file mode 100644 index fb4faedca..000000000 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueType.cs +++ /dev/null @@ -1,29 +0,0 @@ -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, - - /// - /// 按箱 叫料 - /// - BoxQty=1, - - /// - /// 按数量 叫料 - /// - Qty=2, - - - /// - /// 按视觉 叫料 - /// - Vision = 3, - - -} diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumRecommendType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumRecommendType.cs index 08e1bc6a2..5ff6d6616 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumRecommendType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumRecommendType.cs @@ -16,17 +16,17 @@ public enum EnumRecommendType /// 原料 /// [Display(Name = "原料")] - W = 1, + RAW = 1, /// /// 半成品 /// [Display(Name = "半成品")] - B = 2, + SEMI = 2, /// /// kitting区 /// [Display(Name = "Kitting区")] - K = 3 + KITTING = 3 } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs index d6a0546ee..0454175f1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ChassisOperationSequence/IChassisOperationSequenceAppService.cs @@ -15,6 +15,7 @@ public interface IChassisOperationSequenceAppService /// /// /// + /// /// - Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber); + Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber,string chassisNumber); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultDTO.cs new file mode 100644 index 000000000..dce8b9274 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultDTO.cs @@ -0,0 +1,34 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 库存转移记录-实体DTO //??TransferLib实体 +/// +public class GaoTongResultDTO : EntityDto +{ + /// + /// + /// + [Display(Name = "")] + public string Code { get; set; } + + /// + /// + /// + [Display(Name = "")] + public string Message { get; set; } + + /// + /// + /// + [Display(Name = "")] + public string OperateTime { get; set; } +} +/* +{"code":"1","message":"接收成功", +"operateTime":"2020-01-0513:50:01"} + +*/ diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultStatus.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultStatus.cs new file mode 100644 index 000000000..306df7ca1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/DTOs/GaoTongResultStatus.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public sealed class GaoTongResultStatus +{ + /// + /// 成功 + /// + public const string Success = "1"; + + /// + /// 失败 + /// + public const string Failure = "-1"; +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/GaoTongPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/GaoTongPermissions.cs new file mode 100644 index 000000000..e5fc16d51 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/GaoTongPermissions.cs @@ -0,0 +1,8 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class GaoTongPermissions +{ +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs new file mode 100644 index 000000000..b7daebf3c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/IGaoTongAppService.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 立库接口 +/// +public interface IGaoTongAppService : IApplicationService +{ + /// + /// 组盘信息反馈到东阳WMS(喷涂完工转储) + /// + /// 组盘接口输入参数 + /// 立库接口通用输出参数 + Task FeedbackZuPanAsync(ZuPanEditInput input); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/ZuPanEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/ZuPanEditInput.cs new file mode 100644 index 000000000..743546879 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/GaoTongs/Inputs/ZuPanEditInput.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 新增和更新基础DTO //??TransferLib实体 +/// +public class ZuPanEditInput : EntityDto +{ + [Display(Name = "产品编号:映射ERP料号")] + public string ItemCode { get; set; } + + [Display(Name = "器具号")] + public string ContainerCode { get; set; } + + [Display(Name = "数量")] + public string Qty { get; set; } + + [Display(Name = "固定值,在立库中配置。用于多立库时区分哪个立库")] + public string ToLocationCode { get; set; } + + [Display(Name = "由1.2接口中获取富维东阳MES提供的来源位置")] + public string FromLocationCode { get; set; } + +} +/* +{ + "ItemCode": "ERPCODE0001", + "Qty": 122, + "ContainerCode": "C111123", + "ToLocationCode": "W1", + "FromLocationCode": "WIPT" +} +*/ diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs index 5b4288f53..e8c35f78b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDependentDetailDTO.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Domain; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -59,4 +60,11 @@ public class CountJobDependentDetailDTO : SfsJobDetailDTOBase, IHasCountResult /// [Display(Name = "盘点描述")] public string CountDescription { get; set; } + + /// + /// 是否删除 + /// + [Display(Name = "是否删除")] + + public bool IsDelete { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDetailDTO.cs index 6af1900f5..3e38e5911 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/DTOs/CountJobDetailDTO.cs @@ -6,6 +6,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class CountJobDetailDTO : SfsJobDetailDTOBase, IHasCountResult { + /// + /// 盘点计划单号 + /// + public string CountPlanNumber { get; set; } /// /// 盘点次数 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs index d1e4744c5..1699a4705 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobCreateRequestInput.cs @@ -23,12 +23,6 @@ public class CountJobCreateRequestInput [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string Description { get; set; } - /// - /// 盘点执行形式 - /// - [Display(Name = "盘点执行形式")] - public CountPlanRequestType RequestType { get; set; } - /// /// 类型 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobDetailInput.cs index ecb2add71..f87de249d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobDetailInput.cs @@ -6,6 +6,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class CountJobDetailInput : SfsJobDetailInputBase, IHasCountResult { + /// + /// 盘点计划单号 + /// + public string CountPlanNumber { get; set; } /// /// 盘点次数 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobImportInput.cs new file mode 100644 index 000000000..75b1e526a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/CountJobs/Inputs/CountJobImportInput.cs @@ -0,0 +1,54 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; +[Display(Name = "盘点任务")] +public class CountJobImportInput : SfsStoreImportInputBase +{ + /// + /// 盘点任务单号 + /// + [Display(Name = "盘点任务单号")] + [Key] + [Required] + public string CountJobNumber { get; set; } + + /// + /// 物品代码 + /// + [Display(Name = "物料号")] + [Required(ErrorMessage = "{0}是必填项")] + public string ItemCode { get; set; } + + /// + /// 物品名称 + /// + [Display(Name = "物品名称")] + public string ItemName { get; set; } + + /// + /// 箱码 + /// + [Display(Name = "箱码")] + public string PackingCode { get; set; } = ""; + + /// + /// 库存状态 + /// + [Display(Name = "库存状态")] + [Required(ErrorMessage = "{0}是必填项", AllowEmptyStrings = true)] + public EnumInventoryStatus Status { get; set; } + + /// + /// 批次 + /// + [Display(Name = "批次")] + public string Lot { get; set; } = ""; + + /// + /// 盘点数量 + /// + [Display(Name = "盘点数量")] + [Required(ErrorMessage = "{0}是必填项")] + public decimal CountQty { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/DTOs/AssembleIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/DTOs/AssembleIssueJobDTO.cs index ad35d8655..791161af2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/DTOs/AssembleIssueJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/DTOs/AssembleIssueJobDTO.cs @@ -1,5 +1,6 @@ using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -10,11 +11,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class AssembleIssueJobDTO : SfsJobDTOBase { /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 生产线 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/Inputs/AssembleIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/Inputs/AssembleIssueJobEditInput.cs index 0130ce68d..92f6458ff 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/Inputs/AssembleIssueJobEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/Inputs/AssembleIssueJobEditInput.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -25,11 +26,10 @@ public class AssembleIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCre public string AssembleRequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 任务类型 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs similarity index 94% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs index 563285a34..f8932caf1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDTO.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; @@ -12,11 +13,10 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; public class CoatingIssueJobDTO : SfsJobDTOBase { /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 生产线 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDetailDTO.cs similarity index 100% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailDTO.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/DTOs/CoatingIssueJobDetailDTO.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobCheckInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobCheckInput.cs similarity index 100% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobCheckInput.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobCheckInput.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobDetailInput.cs similarity index 100% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailInput.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobDetailInput.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobEditInput.cs similarity index 90% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobEditInput.cs index 45f024128..64622363b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/Inputs/CoatingIssueJobEditInput.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; @@ -26,11 +27,10 @@ public class CoatingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCrea public string MaterialRequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 任务类型 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs index a1d432a34..6601669a4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDTO.cs @@ -1,5 +1,6 @@ using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -10,11 +11,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionIssueJobDTO : SfsJobDTOBase { /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 生产线 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs index b045edec5..af14fc381 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionIssueJobDetailDTO.cs @@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs index ce12a5905..49e3e43d9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobDetailInput.cs @@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs index 744659c31..a64b8e588 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionIssueJobEditInput.cs @@ -9,16 +9,15 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput { - #region Create /// - /// 上游任务编号 + /// 上游任务编号 /// [Display(Name = "上游任务编号")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string UpStreamJobNumber { get; set; } /// - /// 要货单号 + /// 要货单号 /// [Display(Name = "要货单号")] [Required(ErrorMessage = "{0}是必填项")] @@ -26,44 +25,42 @@ public class InjectionIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCr public string InjectionIssueRequestNumber { get; set; } /// - /// 叫料请求类型 - /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } - - /// - /// 任务类型 + /// 任务类型 /// [Display(Name = "任务类型")] [Required(ErrorMessage = "{0}是必填项")] public EnumJobType JobType { get; set; } /// - /// 是否自动完成 + /// 是否自动完成 /// [Display(Name = "是否自动完成")] [Required(ErrorMessage = "{0}是必填项")] public bool IsAutoComplete { get; set; } /// - /// 过期时间 + /// 过期时间 /// [Display(Name = "过期时间")] [Required(ErrorMessage = "{0}是必填项")] public DateTime ExpiredTime { get; set; } /// - /// 任务明细 + /// 任务明细 /// [Display(Name = "任务明细")] [Required(ErrorMessage = "{0}是必填项")] public List Details { get; set; } = new(); /// - /// 使用在途库 + /// 使用在途库 /// [Display(Name = "使用在途库")] public bool UseOnTheWayLocation { get; set; } - #endregion + + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/DTOs/KittingIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/DTOs/KittingIssueJobDTO.cs index edfc95b19..2141ce1d8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/DTOs/KittingIssueJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/DTOs/KittingIssueJobDTO.cs @@ -1,5 +1,7 @@ using System.ComponentModel.DataAnnotations; +using Microsoft.EntityFrameworkCore; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -10,12 +12,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class KittingIssueJobDTO : SfsJobDTOBase { /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } - + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 生产线 /// @@ -35,4 +35,6 @@ public class KittingIssueJobDTO : SfsJobDTOBase /// [Display(Name = "使用在途库")] public bool UseOnTheWayLocation { get; set; } + + public EnumIssueSendType EnumIssueSendType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs index 318b19bd7..549de9dac 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -11,4 +12,10 @@ public interface IKittingIssueJobAppService Task CancelByMaterialRequestAsync(string requestNumber); Task> GetByRequestNumberAsync(string requestNumber); + + /// + /// 执行任务明细 + /// + /// + Task ExecuteDetailAsync(Guid masterId,Guid detailId, KittingIssueJobDetailDTO issueJobDetailDto); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/Inputs/KittingIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/Inputs/KittingIssueJobEditInput.cs index 8fae44e90..d22be4f4d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/Inputs/KittingIssueJobEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/Inputs/KittingIssueJobEditInput.cs @@ -26,11 +26,10 @@ public class KittingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCrea public string KittingRequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 任务类型 @@ -65,5 +64,7 @@ public class KittingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCrea /// [Display(Name = "使用在途库")] public bool UseOnTheWayLocation { get; set; } + + public EnumIssueSendType EnumIssueSendType { get; set; } #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs index 1f473504a..480978f89 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDetailDTO.cs @@ -10,4 +10,19 @@ public class DeliverNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToDTOBase /// [Display(Name = "扩展属性")] public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary(); + /// + /// Mes发货单号 + /// + [Display(Name = "Mes发货单号")] + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + [Display(Name = "Mes发货计划号")] + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + [Display(Name = "底盘号")] + public string IdentityNo { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs index fb12f3ecf..e7957adc4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteDetailInput.cs @@ -10,4 +10,19 @@ public class DeliverNoteDetailInput : SfsStoreRecommendFromDetailWithFromToInput /// [Display(Name = "扩展属性")] public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary(); + /// + /// Mes发货单号 + /// + [Display(Name = "Mes发货单号")] + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + [Display(Name = "Mes发货计划号")] + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + [Display(Name = "底盘号")] + public string IdentityNo { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/DTOs/AssembleIssueNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/DTOs/AssembleIssueNoteDTO.cs index 073f187c6..5662ecd0b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/DTOs/AssembleIssueNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/DTOs/AssembleIssueNoteDTO.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -20,11 +21,10 @@ public class AssembleIssueNoteDTO : SfsStoreDTOBase, public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/IAssembleIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/IAssembleIssueNoteAppService.cs index 83f8e6bbc..9e08af906 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/IAssembleIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/IAssembleIssueNoteAppService.cs @@ -12,10 +12,5 @@ public interface IAssembleIssueNoteAppService : ISfsStoreMasterReadOnlyAppServic Task ConfirmAsync(Guid id); - Task ConfirmAsync(string number); - - Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string requestType, bool includeDetails = false, CancellationToken cancellationToken = default); - - Task> GetListUnConfirmedByTypeAsync(string requestType); + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteEditInput.cs index 731359c29..ac5e63b64 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteEditInput.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -41,11 +42,10 @@ public class AssembleIssueNoteEditInput : SfsStoreCreateOrUpdateInputBase public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteImportInput.cs index 1a1487de5..6c43288f4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleIssueNotes/Inputs/AssembleIssueNoteImportInput.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -19,10 +20,10 @@ public class AssembleIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNumb public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDTO.cs similarity index 82% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDTO.cs index dfadc255f..df2738704 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDTO.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; @@ -18,13 +19,11 @@ public class CoatingIssueNoteDTO : SfsStoreDTOBase, I /// [Display(Name = "请求代码")] public string RequestNumber { get; set; } - /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDetailDTO.cs similarity index 100% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailDTO.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/DTOs/CoatingIssueNoteDetailDTO.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs index 79fbe99cc..20bb6f3c5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs @@ -13,10 +13,5 @@ public interface ICoatingIssueNoteAppService : ISfsStoreMasterReadOnlyAppService Task ConfirmAsync(Guid id); - Task ConfirmAsync(string number); - - Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string requestType, bool includeDetails = false, CancellationToken cancellationToken = default); - - Task> GetListUnConfirmedByTypeAsync(string requestType); + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/Inputs/CoatingIssueNoteDetailInput.cs similarity index 100% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailInput.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/Inputs/CoatingIssueNoteDetailInput.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/Inputs/CoatingIssueNoteEditInput.cs similarity index 85% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteEditInput.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/Inputs/CoatingIssueNoteEditInput.cs index 210a1db12..a306ad9d6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/Inputs/CoatingIssueNoteEditInput.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; @@ -42,11 +43,10 @@ public class CoatingIssueNoteEditInput : SfsStoreCreateOrUpdateInputBase public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/Inputs/CoatingIssueNoteImportInput.cs similarity index 81% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteImportInput.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/Inputs/CoatingIssueNoteImportInput.cs index 5d180cb21..7c40b7379 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/Inputs/CoatingIssueNoteImportInput.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; @@ -20,10 +21,10 @@ public class CoatingIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNumbe public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDTO.cs index bd4ec40ee..fa7ffbc0f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDTO.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -20,11 +21,10 @@ public class InjectionIssueNoteDTO : SfsStoreDTOBase - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDetailDTO.cs index 7d9411de5..5aa659fb8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/DTOs/InjectionIssueNoteDetailDTO.cs @@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/IInjectionIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/IInjectionIssueNoteAppService.cs index f2d341edd..1c1b06e64 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/IInjectionIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/IInjectionIssueNoteAppService.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; -public interface IInjectionIssueNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase +public interface IInjectionIssueNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase { Task CreateAsync(InjectionIssueNoteEditInput input); @@ -14,8 +16,9 @@ public interface IInjectionIssueNoteAppService : ISfsStoreMasterReadOnlyAppServi Task ConfirmAsync(string number); - Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string requestType, bool includeDetails = false, CancellationToken cancellationToken = default); + Task> GetListUnConfirmedByTypeAsync(EnumIssueRequestType issueRequestType); - Task> GetListUnConfirmedByTypeAsync(string requestType); + Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, + EnumIssueRequestType issueRequestType, bool includeDetails = false, + CancellationToken cancellationToken = default); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteDetailInput.cs index f05f28827..8cee7d2f5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteDetailInput.cs @@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteEditInput.cs index ac52e49e9..369d92783 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteEditInput.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -41,11 +42,10 @@ public class InjectionIssueNoteEditInput : SfsStoreCreateOrUpdateInputBase public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteImportInput.cs index 8e79cfec6..2fe3b17ba 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionIssueNotes/Inputs/InjectionIssueNoteImportInput.cs @@ -1,17 +1,18 @@ using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNumber, IHasRequestNumber { /// - /// 任务ID + /// 任务ID /// [Display(Name = "任务ID")] public string JobNumber { get; set; } /// - /// 车间 + /// 车间 /// [Display(Name = "车间")] public string Workshop { get; set; } @@ -19,13 +20,13 @@ public class InjectionIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNum public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// - /// 使用在途库 + /// 使用在途库 /// [Display(Name = "使用在途库")] [Required(ErrorMessage = "{0}是必填项")] diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/DTOs/KittingIssueNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/DTOs/KittingIssueNoteDTO.cs index f9a2f2dba..e0019e8a6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/DTOs/KittingIssueNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/DTOs/KittingIssueNoteDTO.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -20,11 +21,10 @@ public class KittingIssueNoteDTO : SfsStoreDTOBase, I public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 @@ -44,4 +44,5 @@ public class KittingIssueNoteDTO : SfsStoreDTOBase, I [Display(Name = "确认时间")] public DateTime? ConfirmTime { get; set; } + public EnumIssueSendType EnumIssueSendType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/IKittingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/IKittingIssueNoteAppService.cs index 105094c18..db775120e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/IKittingIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/IKittingIssueNoteAppService.cs @@ -12,10 +12,5 @@ public interface IKittingIssueNoteAppService : ISfsStoreMasterReadOnlyAppService Task ConfirmAsync(Guid id); - Task ConfirmAsync(string number); - - Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string requestType, bool includeDetails = false, CancellationToken cancellationToken = default); - - Task> GetListUnConfirmedByTypeAsync(string requestType); + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/Inputs/KittingIssueNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/Inputs/KittingIssueNoteEditInput.cs index b7969e323..18afb29d3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/Inputs/KittingIssueNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/Inputs/KittingIssueNoteEditInput.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -41,16 +42,17 @@ public class KittingIssueNoteEditInput : SfsStoreCreateOrUpdateInputBase public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 /// [Display(Name = "使用在途库")] public bool UseOnTheWayLocation { get; set; } + + public EnumIssueSendType EnumIssueSendType { get; set; } #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/Inputs/KittingIssueNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/Inputs/KittingIssueNoteImportInput.cs index 52fa8e4a5..a829a65c0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/Inputs/KittingIssueNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/KittingIssueNotes/Inputs/KittingIssueNoteImportInput.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -19,10 +20,10 @@ public class KittingIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNumbe public string RequestNumber { get; set; } /// - /// 叫料请求类型 + /// 叫料类型 /// - [Display(Name = "叫料请求类型")] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 @@ -30,4 +31,6 @@ public class KittingIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNumbe [Display(Name = "使用在途库")] [Required(ErrorMessage = "{0}是必填项")] public bool UseOnTheWayLocation { get; set; } + + public EnumIssueSendType EnumIssueSendType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ProductReceiptNotes/DTOs/ProductReceiptNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ProductReceiptNotes/DTOs/ProductReceiptNoteDetailDTO.cs index 9003ca7c8..361859c3f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ProductReceiptNotes/DTOs/ProductReceiptNoteDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ProductReceiptNotes/DTOs/ProductReceiptNoteDetailDTO.cs @@ -39,5 +39,14 @@ public class ProductReceiptNoteDetailDTO : SfsStoreRecommendToDetailWithLotPacki /// [Display(Name = "返线数量")] public decimal ReturnQty { get; set; } - + /// + /// Mes条码号 + /// + [Display(Name = "Mes条码号")] + public string MesBarCode { get; set; } + /// + /// Mes质量补标识 + /// + [Display(Name = "Mes质量补标识")] + public string MesQuality { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ProductReceiptNotes/Inputs/ProductReceiptNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ProductReceiptNotes/Inputs/ProductReceiptNoteDetailInput.cs index 3077c723f..292379dfc 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ProductReceiptNotes/Inputs/ProductReceiptNoteDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ProductReceiptNotes/Inputs/ProductReceiptNoteDetailInput.cs @@ -45,4 +45,14 @@ public class ProductReceiptNoteDetailInput : SfsStoreRecommendToDetailWithLotPac /// [Display(Name = "返线数量")] public decimal ReturnQty { get; set; } + /// + /// Mes条码号 + /// + [Display(Name = "Mes条码号")] + public string MesBarCode { get; set; } + /// + /// Mes质量补标识 + /// + [Display(Name = "Mes质量补标识")] + public string MesQuality { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanDTO.cs index 94786e527..9e398755b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanDTO.cs @@ -88,9 +88,5 @@ public class CountPlanDTO : SfsStoreRequestDTOBase [Display(Name = "盘点的库存状态集合")] public string JsonInventoryStatus { get; set; } - /// - /// 盘点的库存状态集合 - /// - [Display(Name = "盘点的库存状态集合")] - public CountPlanRequestType RequestType { get; set; } + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanForNoteExportDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanForNoteExportDTO.cs index ff01cb52e..5299f9435 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanForNoteExportDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/DTOs/CountPlanForNoteExportDTO.cs @@ -87,11 +87,6 @@ public class CountPlanForNoteExportDTO [Display(Name = "盘点数量")] public decimal FirstCountQty { get; set; } - /// - /// 盘点方式 - /// - [Display(Name = "盘点方式")] - public CountPlanRequestType RequestType { get; set; } /// /// 库存状态 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanCreateRequestInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanCreateRequestInput.cs index 7e9cab750..a681599cd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanCreateRequestInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanCreateRequestInput.cs @@ -48,13 +48,6 @@ public class CountPlanCreateRequestInput : SfsStoreRequestCreateOrUpdateInputBas [Display(Name = "计划时间")] public DateTime PlanTime { get; set; } - /// - /// 盘点方式 - /// - [Display(Name = "盘点方式")] - public CountPlanRequestType RequestType { get; set; } - - /// /// 盘点次数 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanEditInput.cs index 8a09a9185..7b809e0dc 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Plans/CountPlans/Inputs/CountPlanEditInput.cs @@ -76,11 +76,6 @@ public class CountPlanEditInput : SfsStoreRequestCreateOrUpdateInputBase, IHasNu [Display(Name = "类型")] public EnumCountType Type { get; set; } - /// - /// 盘点方式 - /// - [Display(Name = "盘点方式")] - public CountPlanRequestType RequestType { get; set; } /// /// 盘点的零件集合 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs index 68b9e9482..48c2eb45f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDetailDTO.cs @@ -17,4 +17,20 @@ public class DeliverRequestDetailDTO : SfsStoreDetailWithQtyDTOBase, IHasExtraPr [Display(Name = "扩展属性")] public ExtraPropertyDictionary ExtraProperties { set; get; } = new ExtraPropertyDictionary(); + + /// + /// Mes发货单号 + /// + [Display(Name = "Mes发货单号")] + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + [Display(Name = "Mes发货计划号")] + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + [Display(Name = "底盘号")] + public string IdentityNo { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs index ab103e943..c472abe02 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestDetailInput.cs @@ -16,4 +16,19 @@ public class DeliverRequestDetailInput : SfsStoreDetailWithQtyInputBase, IHasExt /// [Display(Name = "扩展属性")] public ExtraPropertyDictionary ExtraProperties { set; get; } + /// + /// Mes发货单号 + /// + [Display(Name = "Mes发货单号")] + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + [Display(Name = "Mes发货计划号")] + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + [Display(Name = "底盘号")] + public string IdentityNo { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs index 977870195..f70191045 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs @@ -40,6 +40,22 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase [Display(Name = "发货库区")] [Required] public string AreaCode { get; set; } + + /// + /// Mes发货单号 + /// + [Display(Name = "Mes发货单号")] + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + [Display(Name = "Mes发货计划号")] + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + [Display(Name = "底盘号")] + public string IdentityNo { get; set; } } [Display(Name = "FIS发货申请")] diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDTO.cs index fd24d8341..f4bdf0723 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDTO.cs @@ -1,14 +1,16 @@ using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionIssueRequestDTO : SfsStoreRequestDTOBase, IHasNumber { /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 是否使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs index e4607976b..5a3c8a39f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/InjectionIssueRequestDetailDTO.cs @@ -8,55 +8,92 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionIssueRequestDetailDTO : SfsStoreDetailWithQtyDTOBase { + #region 目标库位信息 + + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationCode { get; set; } + + /// + /// 目标库区 + /// + [Display(Name = "目标库区")] + public string ToLocationArea { get; set; } + + /// + /// 目标库位组 + /// + [Display(Name = "目标库位组")] + public string ToLocationGroup { get; set; } + + /// + /// 目标ERP储位 + /// + [Display(Name = "目标ERP储位")] + public string ToLocationErpCode { get; set; } + /// - /// 已发数量 + /// 目标仓库 + /// + [Display(Name = "目标仓库")] + public string ToWarehouseCode { get; set; } + + #endregion + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 已发数量 /// - [Display(Name = "已发数量")] public decimal IssuedQty { get; set; } /// - /// 已收数量 + /// 已收数量 /// - [Display(Name = "已收数量")] public decimal ReceivedQty { get; set; } /// - /// 明细状态 + /// 明细状态 /// - [Display(Name = "明细状态")] public EnumStatus Status { get; set; } /// - /// 请求未发 + /// 请求未发 还未发送的数量 /// - [Display(Name = "请求未发")] [NotMapped] public decimal ToBeIssuedQty => Qty - IssuedQty; /// - /// 已发未收 + /// 已发未收 /// - [Display(Name = "已发未收")] [NotMapped] public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; /// - /// 请求未收 + /// 请求未收 /// - [Display(Name = "请求未收")] [NotMapped] public decimal NotFinishQty => Qty - ReceivedQty; /// - /// 需求箱数量 + /// 位置码 /// - [Display(Name = "需求箱数量")] - public decimal BoxQty { get; set; } -} -public class UnCompletedRequestDto -{ - public string ItemCode { get; set; } - public string LocCode { get; set; } public string PositionCode { get; set; } + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + + /// + /// 需求箱数量 + /// + [Display(Name = "需求箱数量")] + public decimal BoxQty { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/UnCompletedRequestDto.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/UnCompletedRequestDto.cs new file mode 100644 index 000000000..fbf8d2754 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/DTOs/UnCompletedRequestDto.cs @@ -0,0 +1,8 @@ +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class UnCompletedRequestDto +{ + public string ItemCode { get; set; } + public string LocCode { get; set; } + public string PositionCode { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs index dca017df7..a90672c54 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/IInjectionIssueRequestAppService.cs @@ -10,14 +10,6 @@ public interface IInjectionIssueRequestAppService : ISfsStoreRequestMasterAppServiceBase { - Task CreateAndHandleAsync(InjectionIssueRequestEditInput input); - - /// - /// 获取已完成的叫料单数量 - /// - /// - Task GetCountAsync(); - /// /// 获取物品类别列表 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestEditInput.cs index 850f3ee63..791f34047 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestEditInput.cs @@ -1,33 +1,26 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionIssueRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase { - #region Base - /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// - /// 使用在途库 + /// 使用在途库 /// [Display(Name = "使用在途库")] - public bool UseOnTheWayLocation { get; set; } + public bool UseOnTheWayLocation { get; set; } /// - /// 明细列表 + /// 明细列表 /// [Display(Name = "明细列表")] - public List Details { get; set; } = new List(); - #endregion - - #region Create - - #endregion + public List Details { get; set; } = new(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestImportInput.cs index cca7cf5eb..f1b773911 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/InjectionIssueRequests/Inputs/InjectionIssueRequestImportInput.cs @@ -1,6 +1,5 @@ using System.ComponentModel.DataAnnotations; -using Win_in.Sfs.Shared.Application.Contracts; -using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -8,45 +7,41 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionIssueRequestImportInput : SfsStoreImportInputBase { /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - [Required(ErrorMessage = "{0}是必填项")] - [ImporterHeader(Name = "叫料类型")] - [ExporterHeader(DisplayName = "叫料类型")] - [ValueMapping("人工拉动", EnumMaterialRequestType.Issue_Manual)] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// - /// 物品代码 + /// 物品代码 /// [Display(Name = "物品代码")] [Required] public string ItemCode { get; set; } /// - /// 目标库位 + /// 目标库位 /// [Display(Name = "目标库位")] [Required] public string ToLocationCode { get; set; } /// - /// 来源库区 + /// 来源库区 /// [Display(Name = "调出库区")] [Required] public string FromLocationArea { get; set; } /// - /// 数量 + /// 数量 /// [Display(Name = "数量")] [Required(ErrorMessage = "{0}是必填项")] public decimal Qty { get; set; } /// - /// 备注 + /// 备注 /// [Display(Name = "备注")] public string Remark { get; set; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/DTOs/KittingIssueRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/DTOs/KittingIssueRequestDTO.cs index 6cfdb6a79..2728d810e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/DTOs/KittingIssueRequestDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/DTOs/KittingIssueRequestDTO.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -8,8 +9,7 @@ public class KittingIssueRequestDTO : SfsStoreRequestDTOBase [Display(Name = "叫料类型")] - public string Type { get; set; } - + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 是否使用在途库 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/DTOs/KittingIssueRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/DTOs/KittingIssueRequestDetailDTO.cs index 6981f306d..61f0df54f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/DTOs/KittingIssueRequestDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/DTOs/KittingIssueRequestDetailDTO.cs @@ -8,47 +8,91 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class KittingIssueRequestDetailDTO : SfsStoreDetailWithQtyDTOBase { + #region 目标库位信息 + + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationCode { get; set; } + + /// + /// 目标库区 + /// + [Display(Name = "目标库区")] + public string ToLocationArea { get; set; } + + /// + /// 目标库位组 + /// + [Display(Name = "目标库位组")] + public string ToLocationGroup { get; set; } + + /// + /// 目标ERP储位 + /// + [Display(Name = "目标ERP储位")] + public string ToLocationErpCode { get; set; } + /// - /// 已发数量 + /// 目标仓库 + /// + [Display(Name = "目标仓库")] + public string ToWarehouseCode { get; set; } + + #endregion + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 已发数量 /// - [Display(Name = "已发数量")] public decimal IssuedQty { get; set; } /// - /// 已收数量 + /// 已收数量 /// - [Display(Name = "已收数量")] public decimal ReceivedQty { get; set; } /// - /// 明细状态 + /// 明细状态 /// - [Display(Name = "明细状态")] public EnumStatus Status { get; set; } /// - /// 请求未发 + /// 请求未发 还未发送的数量 /// - [Display(Name = "请求未发")] [NotMapped] public decimal ToBeIssuedQty => Qty - IssuedQty; /// - /// 已发未收 + /// 已发未收 /// - [Display(Name = "已发未收")] [NotMapped] public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; /// - /// 请求未收 + /// 请求未收 /// - [Display(Name = "请求未收")] [NotMapped] public decimal NotFinishQty => Qty - ReceivedQty; /// - /// 需求箱数量 + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + + /// + /// 需求箱数量 /// [Display(Name = "需求箱数量")] public decimal BoxQty { get; set; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs index 4dded00d6..f7d630cc0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -10,4 +11,5 @@ public interface IKittingIssueRequestAppService { Task CreateAndHandleAsync(KittingIssueRequestEditInput input); + Task UpdateStatusCompletedAsync(string number); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/Inputs/KittingIssueRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/Inputs/KittingIssueRequestEditInput.cs index 06db7ba73..f7373855a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/Inputs/KittingIssueRequestEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/Inputs/KittingIssueRequestEditInput.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -9,10 +10,10 @@ public class KittingIssueRequestEditInput : SfsStoreRequestCreateOrUpdateInputBa #region Base /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/Inputs/KittingIssueRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/Inputs/KittingIssueRequestImportInput.cs index 8a0d5f78b..7e65fd510 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/Inputs/KittingIssueRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/Inputs/KittingIssueRequestImportInput.cs @@ -1,6 +1,7 @@ using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -8,14 +9,10 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class KittingIssueRequestImportInput : SfsStoreImportInputBase { /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - [Required(ErrorMessage = "{0}是必填项")] - [ImporterHeader(Name = "叫料类型")] - [ExporterHeader(DisplayName = "叫料类型")] - [ValueMapping("人工拉动", EnumMaterialRequestType.Issue_Manual)] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 物品代码 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs index 289f78092..ef2bcadd0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ChassisOperationSequence/ChassisOperationSequenceAppService.cs @@ -41,7 +41,7 @@ public class ChassisOperationSequenceAppService /// /// [HttpPost("update-chassis-sort-number-by-kitting-code")] - public async Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber) + public async Task UpdateChassisSortNumberByKittingCodeAsync(string kittingCode, long newChassisSortNumber, string chassisNumber) { var chassisOperationSequence = await _repository.FindAsync(p => p.KittingCode == kittingCode).ConfigureAwait(false); @@ -50,7 +50,7 @@ public class ChassisOperationSequenceAppService { var input= new ChassisOperationSequenceEditInput(); input.KittingCode=kittingCode; - input.ChassisNumber = string.Empty; + input.ChassisNumber = chassisNumber; input.ChassisSortNumber = newChassisSortNumber; await CreateAsync(input).ConfigureAwait(false); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs new file mode 100644 index 000000000..f898c8741 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Services; +using Volo.Abp.Users; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application; + +/// +/// 立库接口 +/// +//[Authorize] +[AllowAnonymous] +[Route($"{StoreConsts.RootPath}gao-tong")] +public class GaoTongAppService : ApplicationService, IGaoTongAppService +{ + private readonly IBalanceAppService _balanceAppService; + private readonly ITransferNoteAppService _transferNoteAppService; + private readonly CurrentUser _currentUser; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly ILocationAppService _locationAppService; + + public GaoTongAppService( + IBalanceAppService balanceAppService + , ITransferNoteAppService transferNoteAppService + , CurrentUser currentUser + , IItemBasicAppService itemBasicAppService + ,ILocationAppService locationAppService) + { + _balanceAppService = balanceAppService; + _transferNoteAppService = transferNoteAppService; + _currentUser = currentUser; + _itemBasicAppService = itemBasicAppService; + _locationAppService = locationAppService; + } + /// + /// 组盘信息反馈到东阳WMS + /// + /// + /// + [HttpPost("feedback-zu-pan")] + public async Task FeedbackZuPanAsync(ZuPanEditInput input) + { + GaoTongResultDTO ret = new GaoTongResultDTO(); + try + { + ItemBasicDTO itemBasicObj = await _itemBasicAppService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); + if (itemBasicObj == null) + { + throw new UserFriendlyException($"{input.ItemCode}在Item表不存在!"); + } + + TransferNoteEditInput transferNoteEditInput = new TransferNoteEditInput(); + transferNoteEditInput.TenantId = null; + transferNoteEditInput.Remark = String.Empty; + transferNoteEditInput.Worker = _currentUser.UserName; + transferNoteEditInput.ActiveDate = CommonHelper.CurTime; + transferNoteEditInput.Type = EnumTransSubType.Transfer_Coating.ToString(); //喷涂完工转储 + transferNoteEditInput.UseOnTheWayLocation = false; + //transferNoteEditInput.number + //transferNoteEditInput.CallServerName + //transferNoteEditInput.Confirmed = true; + //transferNoteEditInput.ConfirmTime = CommonHelper.CurTime; + if (transferNoteEditInput.Details == null) + { + transferNoteEditInput.Details = new List(); + } + TransferNoteDetailInput detailObj = new TransferNoteDetailInput(); + transferNoteEditInput.Details.Add(detailObj); + detailObj.Remark = ""; + detailObj.ItemCode = input.ItemCode; + detailObj.ItemName = itemBasicObj.Name; + detailObj.ItemDesc1 = itemBasicObj.Desc1; + detailObj.ItemDesc2 = itemBasicObj.Desc2; + detailObj.Uom = itemBasicObj.BasicUom; + detailObj.Qty = input.Qty.TryToDecimalZero(); + detailObj.StdPackQty = itemBasicObj.StdPackQty; + + #region 去箱、去批、去托 + detailObj.FromPackingCode = String.Empty; + detailObj.ToPackingCode = String.Empty; + detailObj.FromContainerCode = String.Empty; + detailObj.ToContainerCode = String.Empty; + detailObj.FromLot = String.Empty; + detailObj.ToLot = String.Empty; + #endregion + + detailObj.SupplierBatch = String.Empty; + detailObj.ArriveDate = CommonHelper.CurTime; + detailObj.ProduceDate = CommonHelper.CurTime; + detailObj.ExpireDate = DateTime.MaxValue; + var fromLocationObj = await _locationAppService.GetByCodeAsync(input.FromLocationCode).ConfigureAwait(false); + if (fromLocationObj == null) + { + throw new UserFriendlyException($"{input.FromLocationCode}在Location表不存在!"); + } + detailObj.FromLocationCode = input.FromLocationCode; + detailObj.FromLocationArea = fromLocationObj.AreaCode; + detailObj.FromLocationGroup = fromLocationObj.LocationGroupCode; + detailObj.FromLocationErpCode = fromLocationObj.ErpLocationCode; + detailObj.FromWarehouseCode = fromLocationObj.WarehouseCode; + var toLocationObj = await _locationAppService.GetByCodeAsync(input.ToLocationCode).ConfigureAwait(false); + if (toLocationObj == null) + { + throw new UserFriendlyException($"{input.ToLocationCode}在Location表不存在!"); + } + detailObj.ToLocationCode = input.ToLocationCode; + detailObj.ToLocationArea = toLocationObj.AreaCode; + detailObj.ToLocationGroup = toLocationObj.LocationGroupCode; + detailObj.ToLocationErpCode = toLocationObj.ErpLocationCode; + detailObj.ToWarehouseCode = toLocationObj.WarehouseCode; + detailObj.FromStatus = EnumInventoryStatus.OK; + detailObj.ToStatus = EnumInventoryStatus.OK; + detailObj.OnTheWayLocationCode = String.Empty; + detailObj.Reason = ""; + var temp = await _transferNoteAppService.CreateAsync(transferNoteEditInput).ConfigureAwait(false); + ret.Code = GaoTongResultStatus.Success; + ret.Message = "接收成功"; + ret.OperateTime = CommonHelper.CurTimeStr; + return ret; + } + catch (Exception ex) + { + ret.Code = GaoTongResultStatus.Failure; + ret.Message = "FeedbackZuPanAsync执行失败:" + ex.Message; + ret.OperateTime = CommonHelper.CurTimeStr; + return ret; + } + } +} + diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAutoMapperProfile.cs new file mode 100644 index 000000000..5de41e865 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAutoMapperProfile.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using AutoMapper; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void GaoTongAutoMapperProfile() + { + } +} + diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAppService.cs index 22d302bc3..754c7856b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAppService.cs @@ -1,12 +1,21 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; +using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; using Volo.Abp; +using Volo.Abp.Domain.Repositories; using Volo.Abp.Validation; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.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; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -24,17 +33,206 @@ public class CountJobAppService ICountJobAppService { private readonly ICountJobManager _countJobManager; - + private readonly IItemBasicAppService _itemBasicAppService; + private readonly IItemStoreRelationAppService _itemStoreRelationAppService; + private readonly IBalanceAppService _balanceAppService; //private readonly ILocationCapacityAppService _locationCapacityAppService; public CountJobAppService( ICountJobRepository repository , ICountJobManager countJobManager + , IItemBasicAppService itemBasicAppService + , IItemStoreRelationAppService itemStoreRelationAppService + , IBalanceAppService balanceAppService ) : base(repository, countJobManager) { + _itemBasicAppService = itemBasicAppService; _countJobManager = countJobManager; + _itemStoreRelationAppService = itemStoreRelationAppService; + _balanceAppService= balanceAppService; } + #region 导入 + /// + /// 导入数据具体实现,可重写 + /// + protected override async Task ImportInternalAsync(SfsImportRequestInput requestInput, byte[] inputFileBytes) + { + IList modelList = null; + var modelDict = new Dictionary>(); + var entityDict = new Dictionary(); + try + { + var hasDetails = typeof(CountJob).GetInterfaces().Any(o => o.IsGenericType && o.GetGenericTypeDefinition() == typeof(IMasterEntity<>)); + modelDict = ExportImportService.ImportHaveValidationResult(inputFileBytes); + foreach (var modelDictItem in modelDict) + { + // DataAnnotations 静态验证 + var validationRresults = modelDictItem.Value; + var model = modelDictItem.Key; + Validator.TryValidateObject(model, new ValidationContext(model, null, null), validationRresults); + } + modelList = modelDict.Keys.ToList(); + List depDetails = new List(); + // 如果没有验证错误或允许部分导入 + var jobnumber = modelDict.First().Key.CountJobNumber; + var job = await _repository.FindAsync(r => r.Number == jobnumber).ConfigureAwait(false); + if (!modelDict.SelectMany(o => o.Value).Any() || requestInput.IsAllowPartImport) + { + + foreach (var item in modelDict) + { + var model = item.Key; + var validationRresults = item.Value; + var depDetail = ObjectMapper.Map(model); + await ValidateImportModelAsync(model, validationRresults, job, depDetail).ConfigureAwait(false); + depDetails.Add(depDetail); + } + } + if (!modelDict.SelectMany(o => o.Value).Any()) + { + if (depDetails.Any()) + { + await _countJobManager.ImportAsync(job,depDetails, CurrentUser).ConfigureAwait(false); + } + } + + // 创建导入报告 + var reportFile = ExportImportService.GetImportReport(inputFileBytes, modelDict); + // 创建返回值 + return new SfsImportResult + { + TotalNum = modelList.Count, + ErrorNum = modelDict.Count(o => o.Value.Any()), + FileName = reportFile.FileDownloadName, + FileContents = reportFile.FileContents + }; + } + catch (Exception ex) + { + Console.WriteLine("---------------------------------"); + Console.WriteLine($"####导入验证错误:"); + Console.WriteLine($"{ex.Message}"); + Console.WriteLine("---------------------------------"); + Logger.LogException(ex); + if (modelList != null) + { + try + { + foreach (var item in modelDict) + { + var model = item.Key; + var validationRresults = item.Value; + validationRresults.Add(new ValidationResult($"无法添加,{ex.Message}", new string[] { "异常" })); + } + // 创建导入报告 + var reportFile = ExportImportService.GetImportReport(inputFileBytes, modelDict); + return new SfsImportResult + { + TotalNum = modelList.Count, + ErrorNum = modelDict.Count(o => o.Value.Any()), + FileName = reportFile.FileDownloadName, + FileContents = reportFile.FileContents + }; + } + catch (Exception) + { + return new SfsImportResult() + { + ExceptionMessage = ex.Message, + FileContents = Encoding.Default.GetBytes(ex.Message) + }; + } + } + else + { + return new SfsImportResult() + { + ExceptionMessage = ex.Message, + FileContents = Encoding.Default.GetBytes(ex.Message) + }; + } + } + } + /// + /// 导入验证 + /// + /// + /// + /// + /// + /// + protected async Task ValidateImportModelAsync(CountJobImportInput model, + List validationRresult, CountJob job, CountJobDependentDetail depDetail) + { + _ = new Dictionary(); + CheckJobNumberAsync(model, validationRresult, job.Number); + _ = await CheckItemBasicAsync(model, validationRresult, depDetail).ConfigureAwait(false); + _ = await CheckItemStoreRelationAsync(model, validationRresult,job.LocationCode).ConfigureAwait(false); + _ = await CheckPackingCodeAsync(model, validationRresult, job.LocationCode).ConfigureAwait(false); + } + protected async Task CheckItemBasicAsync(CountJobImportInput importInput, + List validationRresult, CountJobDependentDetail depDetail) + { + var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); + if (item == null) + { + validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" })); + } + else if (item.StdPackQty == 0) + { + validationRresult.Add( + new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" })); + } + else + { + depDetail.ItemName = item.Name; + depDetail.ItemDesc1 = item.Desc1; + depDetail.ItemDesc2 = item.Desc2; + depDetail.StdPackQty = item.StdPackQty; + depDetail.Uom = item.BasicUom; + } + return item; + } + + protected async Task CheckItemStoreRelationAsync(CountJobImportInput importInput,List validationRresult,string locationCode) + { + var item = await _itemStoreRelationAppService.GetByItemAndLocationAsync(importInput.ItemCode,locationCode,EnumStoreRelationType.Location).ConfigureAwait(false); + if (item == null) + { + validationRresult.Add(new ValidationResult($"零件与库位{locationCode}对应关系不存在", new[] { "物品代码" })); + } + return item; + } + protected async Task CheckPackingCodeAsync(CountJobImportInput importInput, List validationRresult, string locationCode) + { + if (!string.IsNullOrEmpty(importInput.PackingCode)) + { + var item = await _balanceAppService.GetByPackingCodeAsync(importInput.PackingCode).ConfigureAwait(false); + if (item != null) + { + if (item.LocationCode != locationCode) + { + validationRresult.Add(new ValidationResult($"箱码已经在库位{item.LocationCode}存在不能盘点", new[] { "箱码" })); + } + if (item.Lot != importInput.Lot) + { + validationRresult.Add(new ValidationResult($"批次与库存中批次{item.Lot}不匹配不能盘点", new[] { "批次" })); + } + } + return item; + } + + return null; + } + protected void CheckJobNumberAsync(CountJobImportInput importInput, List validationRresult,string jobNumber) + { + if (importInput.CountJobNumber != jobNumber) + { + validationRresult.Add(new ValidationResult($"盘点任务单号{importInput.CountJobNumber}与其它有冲突,只允许导入一个任务单号数据", new[] { "盘点任务单号" })); + } + } + #endregion /// /// 根据条件新增job接口 /// @@ -86,6 +284,7 @@ public class CountJobAppService } var entity = ObjectMapper.Map(dto); entity.Number = checkEntity.Number; + await _countJobManager.CompleteAsync(entity, CurrentUser).ConfigureAwait(false); return dto; } @@ -115,8 +314,8 @@ public class CountJobAppService [HttpPost("get-countjob-dependent-detail-by-plannumber")] public virtual async Task> GetCountJobDependentDetailByPlanNumber(string countPlanNumber, int inventoryStage) { - var entities = await _repository.GetListAsync(p => p.JobStatus == EnumJobStatus.Done && p.CountPlanNumber == countPlanNumber && p.InventoryStage == inventoryStage, true).ConfigureAwait(false); - + // var entities = await _repository.GetListAsync(p => p.JobStatus == EnumJobStatus.Doing && p.CountPlanNumber == countPlanNumber && p.InventoryStage == inventoryStage, true).ConfigureAwait(false); + var entities = await (await _repository.WithDetailsAsync().ConfigureAwait(false)).Where(p => p.JobStatus == EnumJobStatus.Doing && p.CountPlanNumber == countPlanNumber && p.InventoryStage == inventoryStage).AsNoTracking().ToListAsync().ConfigureAwait(false); for (int i = entities.Count - 1; i >= 0; i--) { var entitie = entities[i]; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAutoMapperProfile.cs index 8becdf0d2..400b8612b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAutoMapperProfile.cs @@ -1,5 +1,8 @@ +using System.Collections.Generic; using AutoMapper; +using AutoMapper.Internal.Mappers; using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; @@ -88,5 +91,12 @@ public partial class StoreApplicationAutoMapperProfile : Profile ; CreateMap() .ReverseMap(); + CreateMap< CountJobImportInput, CountJobDependentDetail>() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs index 5d025c921..b28529921 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs @@ -72,7 +72,7 @@ public class AssembleIssueJobAppService var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) .ConfigureAwait(false); - if (loctionDto.RowCode != 1) + if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode != 1) { input.JobStatus = EnumJobStatus.Wait; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs index 3222c1ddd..50b06facf 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs @@ -87,7 +87,7 @@ public class CoatingIssueJobAppService var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) .ConfigureAwait(false); - if (loctionDto.RowCode != 1) + if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode != 1) { input.JobStatus = EnumJobStatus.Wait; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs index 416005a4a..9e6acbc3c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs @@ -74,8 +74,8 @@ public class InjectionIssueJobAppService var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) .ConfigureAwait(false); - - if (loctionDto.RowCode != 1) + + if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode != 1) { input.JobStatus = EnumJobStatus.Wait; @@ -184,11 +184,4 @@ public class InjectionIssueJobAppService return; } - - [HttpPost("test")] - public virtual async Task Test() - { - Console.WriteLine("FuAZCZXVZXVXZVZ"); - await Task.CompletedTask; - } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs index fe92ae472..3a40b641d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs @@ -1,19 +1,14 @@ using System; using System.Collections.Generic; -using System.Data; using System.Linq; -using System.Linq.Expressions; -using System.Threading; using System.Threading.Tasks; -using Castle.Components.DictionaryAdapter; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp; -using Volo.Abp.Application.Dtos; using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Basedata.Domain.Shared; -using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -31,14 +26,23 @@ public class KittingIssueJobAppService private readonly IKittingIssueJobManager _kittingIssueJobManager; private readonly ILocationAppService _locationAppService; private readonly ITransferLibJobAppService _transferLibJobAppService; + private readonly IKittingIssueNoteAppService _kittingIssueNoteAppService; + private readonly IExpectOutAppService _expectOutAppService; + + protected IKittingIssueRequestAppService KittingIssueRequestAppService => + LazyServiceProvider.LazyGetRequiredService(); public KittingIssueJobAppService( IKittingIssueJobRepository repository, IKittingIssueJobManager kittingIssueJobManager, - ILocationAppService locationAppService, ITransferLibJobAppService transferLibJobAppService) : base(repository, kittingIssueJobManager) + ILocationAppService locationAppService, ITransferLibJobAppService transferLibJobAppService, + IKittingIssueNoteAppService kittingIssueNoteAppService, IExpectOutAppService expectOutAppService) : base( + repository, kittingIssueJobManager) { _kittingIssueJobManager = kittingIssueJobManager; _locationAppService = locationAppService; _transferLibJobAppService = transferLibJobAppService; + _kittingIssueNoteAppService = kittingIssueNoteAppService; + _expectOutAppService = expectOutAppService; } [HttpPost("add-many")] @@ -47,6 +51,7 @@ public class KittingIssueJobAppService foreach (var input in inputs) { await CheckMinRowAndSetStatusAsync(input).ConfigureAwait(false); + await CheckDimensionalStorehouseAsync(input).ConfigureAwait(false); } return await base.CreateManyAsync(inputs).ConfigureAwait(false); @@ -56,10 +61,139 @@ public class KittingIssueJobAppService public override async Task CreateAsync(KittingIssueJobEditInput input) { await CheckMinRowAndSetStatusAsync(input).ConfigureAwait(false); + await CheckDimensionalStorehouseAsync(input).ConfigureAwait(false); return await base.CreateAsync(input).ConfigureAwait(false); } + [HttpPost("invalid")] + public override async Task CancelAsync(Guid id) + { + var injectionJob = await _repository.GetAsync(id).ConfigureAwait(false); + if (injectionJob == null) + { + throw new UserFriendlyException($"未找到ID为 {id} 的任务"); + } + + await _kittingIssueJobManager.CancelAsync(injectionJob).ConfigureAwait(false); + } + + + [HttpPost("cancel-by-request/{injectionNumber}")] + public virtual async Task CancelByMaterialRequestAsync(string injectionNumber) + { + var entities = await _repository.GetListAsync(p => p.KittingRequestNumber == injectionNumber) + .ConfigureAwait(false); + foreach (var entity in entities) + { + await _kittingIssueJobManager.CancelAsync(entity).ConfigureAwait(false); + } + } + + [HttpPost("by-request-number/{requestNumber}")] + public virtual async Task> GetByRequestNumberAsync(string requestNumber) + { + var entitys = await _repository.GetListAsync(p => p.KittingRequestNumber == requestNumber) + .ConfigureAwait(false); + return ObjectMapper.Map, List>(entitys); + } + + /// + /// 库移回调 + /// + /// + /// + [HttpPost("Do-Call-Back")] + public async Task DoTransferLibCallbackAsync(TransferLibJobDTO dto) + { + var job = await _repository.FindAsync(p => p.Number == dto.CallJobNumber).ConfigureAwait(false); + + var transferLibJobDto = await _transferLibJobAppService.GetByNumberAsync(dto.Number).ConfigureAwait(false); + + var transferLibNoteDetail = dto.Details.First(); + + var jobDetail = job.Details.First(); + job.JobStatus = EnumJobStatus.Open; + + jobDetail.TransferLibFromArriveDate = transferLibNoteDetail.HandledFromArriveDate; + jobDetail.TransferLibFromContainerCode = transferLibNoteDetail.HandledFromContainerCode; + jobDetail.TransferLibFromExpireDate = transferLibNoteDetail.HandledFromExpireDate; + jobDetail.TransferLibFromLocationArea = transferLibNoteDetail.HandledFromLocationArea; + jobDetail.TransferLibFromLocationCode = transferLibNoteDetail.HandledFromLocationCode; + jobDetail.TransferLibFromLocationErpCode = transferLibNoteDetail.HandledFromLocationErpCode; + jobDetail.TransferLibFromLocationGroup = transferLibNoteDetail.HandledFromLocationGroup; + jobDetail.TransferLibFromLot = transferLibNoteDetail.HandledFromLot; + jobDetail.TransferLibFromPackingCode = transferLibNoteDetail.HandledFromPackingCode; + jobDetail.TransferLibFromProduceDate = transferLibNoteDetail.HandledFromProduceDate; + jobDetail.TransferLibFromQty = transferLibNoteDetail.HandledFromQty; + jobDetail.TransferLibFromSupplierBatch = transferLibNoteDetail.HandledFromSupplierBatch; + jobDetail.TransferLibFromWarehouseCode = transferLibNoteDetail.HandledFromWarehouseCode; + + jobDetail.TransferLibToArriveDate = transferLibNoteDetail.HandledToArriveDate; + jobDetail.TransferLibToContainerCode = transferLibNoteDetail.HandledToContainerCode; + jobDetail.TransferLibToExpireDate = transferLibNoteDetail.HandledToExpireDate; + jobDetail.TransferLibToLocationArea = transferLibNoteDetail.HandledToLocationArea; + jobDetail.TransferLibToLocationCode = transferLibNoteDetail.HandledToLocationCode; + jobDetail.TransferLibToLocationErpCode = transferLibNoteDetail.HandledToLocationErpCode; + jobDetail.TransferLibToLocationGroup = transferLibNoteDetail.HandledToLocationGroup; + jobDetail.TransferLibToLot = transferLibNoteDetail.HandledToLot; + jobDetail.TransferLibToPackingCode = transferLibNoteDetail.HandledToPackingCode; + jobDetail.TransferLibToProduceDate = transferLibNoteDetail.HandledToProduceDate; + jobDetail.TransferLibToQty = transferLibNoteDetail.HandledToQty; + jobDetail.TransferLibToSupplierBatch = transferLibNoteDetail.HandledToSupplierBatch; + jobDetail.TransferLibToWarehouseCode = transferLibNoteDetail.HandledToWarehouseCode; + + await _repository.UpdateAsync(job).ConfigureAwait(false); + } + + /// + /// 执行任务明细 + /// + /// + [HttpPost("ExecuteDetail/{masterId}")] + public async Task ExecuteDetailAsync(Guid masterId, Guid detailId, KittingIssueJobDetailDTO issueJobDetailDto) + { + var kittingIssueJob = await _repository.GetAsync(masterId).ConfigureAwait(false); + + var kittingIssueJobDto = ObjectMapper.Map(kittingIssueJob); + kittingIssueJobDto.Details = new List { issueJobDetailDto }; + var kittingIssueNoteEditInput = await BuildKittingIssueNoteAsync(kittingIssueJobDto).ConfigureAwait(false); + await _kittingIssueNoteAppService.CreateAsync(kittingIssueNoteEditInput).ConfigureAwait(false); + + kittingIssueJobDto = ObjectMapper.Map(kittingIssueJob); + + if (kittingIssueJob.EnumIssueSendType == EnumIssueSendType.QtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 + { + await UpdateJobStatusDoneAsync(kittingIssueJob, issueJobDetailDto).ConfigureAwait(false); + } + else + { + var detail = kittingIssueJob.Details.First(p => p.Id == issueJobDetailDto.Id); + if (issueJobDetailDto.HandledToQty >= detail.RequestQty) + { + await UpdateJobStatusDoneAsync(kittingIssueJob, issueJobDetailDto).ConfigureAwait(false); + } + } + } + + #region 私有 + + /// + /// 创建补料记录实体 + /// + /// + /// + private async Task BuildKittingIssueNoteAsync(KittingIssueJobDTO kittingIssueJobDto) + { + var kittingIssueNoteCreateInput = + ObjectMapper.Map(kittingIssueJobDto); + kittingIssueNoteCreateInput.JobNumber = kittingIssueJobDto.Number; + + await Task.CompletedTask.ConfigureAwait(false); + + return kittingIssueNoteCreateInput; + } + /// /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 /// @@ -71,11 +205,13 @@ public class KittingIssueJobAppService var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) .ConfigureAwait(false); - - if (loctionDto.RowCode != 1) + + if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode != 1) { input.JobStatus = EnumJobStatus.Wait; - + } + else if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode == 1) + { jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate; jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode; jobDetailInputdetail.TransferLibFromExpireDate = jobDetailInputdetail.RecommendFromExpireDate; @@ -106,86 +242,51 @@ public class KittingIssueJobAppService } } - [HttpPost("cancel-by-request/{requestNumber}")] - public virtual async Task CancelByMaterialRequestAsync(string requestNumber) + /// + /// 判断是不是在立体库 + /// + /// + /// + private async Task CheckDimensionalStorehouseAsync(KittingIssueJobEditInput input) { - var entities = await _repository.GetListAsync(p => p.KittingRequestNumber == requestNumber) + var jobDetailInputdetail = input.Details.FirstOrDefault(); + + var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode) .ConfigureAwait(false); - foreach (var entity in entities) + + if (loctionDto.Type == EnumLocationType.DimensionalStorehouse) { - await _kittingIssueJobManager.CancelAsync(entity).ConfigureAwait(false); + input.JobStatus = EnumJobStatus.Wait; + + //todo 调用立库接口 } } - [HttpPost("invalid")] - public override async Task CancelAsync(Guid id) + private async Task UpdateJobStatusDoneAsync(KittingIssueJob kittingIssueJob, + KittingIssueJobDetailDTO kittingIssueJobDetailDto) { - var kittingIssueJob = await _repository.GetAsync(id).ConfigureAwait(false); - if (kittingIssueJob == null) + if (kittingIssueJob.JobStatus is EnumJobStatus.Closed or EnumJobStatus.Cancelled or EnumJobStatus.None + or EnumJobStatus.Done) //需要考虑下 多次提交的问题 所以不判断 进行中 { - throw new UserFriendlyException($"未找到ID为 {id} 的任务"); + throw new UserFriendlyException( + $"任务状态错误:编号为【{kittingIssueJob.Number}】的任务已经【{kittingIssueJob.JobStatus.GetDisplayName()}】"); } - await _kittingIssueJobManager.CancelAsync(kittingIssueJob).ConfigureAwait(false); - } + kittingIssueJob.JobStatus = EnumJobStatus.Done; - [HttpPost("by-request-number/{requestNumber}")] - public virtual async Task> GetByRequestNumberAsync(string requestNumber) - { - var entitys = await _repository.GetListAsync(p => p.KittingRequestNumber == requestNumber) - .ConfigureAwait(false); - return ObjectMapper.Map, List>(entitys); - } - - [HttpPost("Do-Call-Back")] - public async Task DoTransferLibCallbackAsync(TransferLibJobDTO dto) - { - var job = await _repository.FindAsync(p => p.Number == dto.CallJobNumber).ConfigureAwait(false); - - var transferLibJobDto= await _transferLibJobAppService.GetByNumberAsync(dto.Number).ConfigureAwait(false); - - var transferLibNoteDetail= dto.Details.First(); + await _expectOutAppService.RemoveByNumberAndInventoryAsync(kittingIssueJob.Number, + kittingIssueJobDetailDto.ItemCode, + kittingIssueJobDetailDto.HandledToLocationCode, kittingIssueJobDetailDto.HandledToPackingCode, + kittingIssueJobDetailDto.Status, kittingIssueJobDetailDto.HandledToLot, + kittingIssueJobDetailDto.HandledToQty).ConfigureAwait(false); - var jobDetail = job.Details.First(); - job.JobStatus = EnumJobStatus.Open; + await _expectOutAppService.RemoveByNumberAsync(kittingIssueJob.Number).ConfigureAwait(false); - jobDetail.TransferLibFromArriveDate = transferLibNoteDetail.HandledFromArriveDate; - jobDetail.TransferLibFromContainerCode=transferLibNoteDetail.HandledFromContainerCode; - jobDetail.TransferLibFromExpireDate=transferLibNoteDetail.HandledFromExpireDate; - jobDetail.TransferLibFromLocationArea=transferLibNoteDetail.HandledFromLocationArea; - jobDetail.TransferLibFromLocationCode=transferLibNoteDetail.HandledFromLocationCode; - jobDetail.TransferLibFromLocationErpCode = transferLibNoteDetail.HandledFromLocationErpCode; - jobDetail.TransferLibFromLocationGroup=transferLibNoteDetail.HandledFromLocationGroup; - jobDetail.TransferLibFromLot=transferLibNoteDetail.HandledFromLot; - jobDetail.TransferLibFromPackingCode = transferLibNoteDetail.HandledFromPackingCode; - jobDetail.TransferLibFromProduceDate = transferLibNoteDetail.HandledFromProduceDate; - jobDetail.TransferLibFromQty=transferLibNoteDetail.HandledFromQty; - jobDetail.TransferLibFromSupplierBatch=transferLibNoteDetail.HandledFromSupplierBatch; - jobDetail.TransferLibFromWarehouseCode = transferLibNoteDetail.HandledFromWarehouseCode; - - jobDetail.TransferLibToArriveDate = transferLibNoteDetail.HandledToArriveDate; - jobDetail.TransferLibToContainerCode = transferLibNoteDetail.HandledToContainerCode; - jobDetail.TransferLibToExpireDate = transferLibNoteDetail.HandledToExpireDate; - jobDetail.TransferLibToLocationArea = transferLibNoteDetail.HandledToLocationArea; - jobDetail.TransferLibToLocationCode = transferLibNoteDetail.HandledToLocationCode; - jobDetail.TransferLibToLocationErpCode = transferLibNoteDetail.HandledToLocationErpCode; - jobDetail.TransferLibToLocationGroup = transferLibNoteDetail.HandledToLocationGroup; - jobDetail.TransferLibToLot = transferLibNoteDetail.HandledToLot; - jobDetail.TransferLibToPackingCode = transferLibNoteDetail.HandledToPackingCode; - jobDetail.TransferLibToProduceDate = transferLibNoteDetail.HandledToProduceDate; - jobDetail.TransferLibToQty = transferLibNoteDetail.HandledToQty; - jobDetail.TransferLibToSupplierBatch = transferLibNoteDetail.HandledToSupplierBatch; - jobDetail.TransferLibToWarehouseCode = transferLibNoteDetail.HandledToWarehouseCode; - - await _repository.UpdateAsync(job).ConfigureAwait(false); + await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber) + .ConfigureAwait(false); - return; + await Task.CompletedTask.ConfigureAwait(false); } - [HttpPost("test")] - public virtual async Task Test() - { - Console.WriteLine("FuAZCZXVZXVXZVZ"); - await Task.CompletedTask; - } + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs index d6a62e406..e14b1c846 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs @@ -131,10 +131,10 @@ public class CountNoteAppService : private static void CheckCountPlanRequestType(CountPlanDTO countPlanDto) { - if (countPlanDto.RequestType != CountPlanRequestType.Import) - { - throw new UserFriendlyException("非Excel盘点执行方式不能使用导入"); - } + //if (countPlanDto.RequestType != CountPlanRequestType.Import) + //{ + // throw new UserFriendlyException("非Excel盘点执行方式不能使用导入"); + //} } private static void CheckCountPlanNumber(CountPlanDTO countPlanDto, string countPlanNumber) @@ -196,10 +196,10 @@ public class CountNoteAppService : if (countplan != null) { - if (countplan.RequestType != CountPlanRequestType.Import) - { - throw new UserFriendlyException("非Excel盘点执行方式不能使用导入"); - } + //if (countplan.RequestType != CountPlanRequestType.Import) + //{ + // throw new UserFriendlyException("非Excel盘点执行方式不能使用导入"); + //} } else { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs index cfa6a3cc2..36ce2a342 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteAppService.cs @@ -58,51 +58,4 @@ public class AssembleIssueNoteAppService : await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(assembleNote), false).ConfigureAwait(false); return ObjectMapper.Map(assembleNote); } - - [HttpPost("confirm-by-number/{number}")] - public virtual async Task ConfirmAsync(string number) - { - var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false); - Check.NotNull(entity, nameof(AssembleIssueNote)); - var result = await _assembleNoteManager.ConfirmAsync(entity.Id).ConfigureAwait(false); - var dto = ObjectMapper.Map(result); - return dto; - } - /// - /// 根据叫料请求类型获取发料记录 - /// - /// - /// - /// 叫料请求类型: - /// 人工拉动:Issue_Manual; - /// 线边拉动:Issue_WIP; - /// - /// - /// - /// - [HttpPost("by-type/{requestType}")] - public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) - { - Expression> expression = p => p.RequestType == requestType; - if (requestInput.Condition.Filters?.Count > 0) - { - expression = expression.And(requestInput.Condition.Filters.ToLambda()); - } - - return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, - requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); - } - - [HttpGet("list/un-confirmed/{requestType}")] - public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType) - { - var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType) - .ConfigureAwait(false); - - var dtos = ObjectMapper.Map, List>(entities); - - return dtos; - } - } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs index 8480c6c88..9259126d2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs @@ -60,50 +60,6 @@ public class CoatingIssueNoteAppService : return ObjectMapper.Map(coatingIssueNote); } - [HttpPost("confirm-by-number/{number}")] - public virtual async Task ConfirmAsync(string number) - { - var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false); - Check.NotNull(entity, nameof(CoatingIssueNote)); - var result = await _coatingIssueNoteManager.ConfirmAsync(entity.Id).ConfigureAwait(false); - var dto = ObjectMapper.Map(result); - return dto; - } - /// - /// 根据叫料请求类型获取发料记录 - /// - /// - /// - /// 叫料请求类型: - /// 人工拉动:Issue_Manual; - /// 线边拉动:Issue_WIP; - /// - /// - /// - /// - [HttpPost("by-type/{requestType}")] - public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) - { - Expression> expression = p => p.RequestType == requestType; - if (requestInput.Condition.Filters?.Count > 0) - { - expression = expression.And(requestInput.Condition.Filters.ToLambda()); - } - - return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, - requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); - } - - [HttpGet("list/un-confirmed/{requestType}")] - public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType) - { - var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType) - .ConfigureAwait(false); - - var dtos = ObjectMapper.Map, List>(entities); - - return dtos; - } + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs index 5bddd6b32..148f6439d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteAppService.cs @@ -10,6 +10,7 @@ using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; @@ -85,9 +86,9 @@ public class InjectionIssueNoteAppService : /// [HttpPost("by-type/{requestType}")] public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) + EnumIssueRequestType issueRequestType, bool includeDetails = false, CancellationToken cancellationToken = default) { - Expression> expression = p => p.RequestType == requestType; + Expression> expression = p => p.IssueRequestType == issueRequestType; if (requestInput.Condition.Filters?.Count > 0) { expression = expression.And(requestInput.Condition.Filters.ToLambda()); @@ -97,10 +98,10 @@ public class InjectionIssueNoteAppService : requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); } - [HttpGet("list/un-confirmed/{requestType}")] - public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType) + [HttpPost("list-by-type-and-un-confirmed")] + public virtual async Task> GetListUnConfirmedByTypeAsync(EnumIssueRequestType issueRequestType) { - var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType) + var entities = await _repository.GetListAsync(c => !c.Confirmed && c.IssueRequestType == issueRequestType) .ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entities); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs index ccbc71b2b..d5b2ce396 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteAppService.cs @@ -59,50 +59,4 @@ public class KittingIssueNoteAppService : return ObjectMapper.Map(kittingIssueNote); } - [HttpPost("confirm-by-number/{number}")] - public virtual async Task ConfirmAsync(string number) - { - var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false); - Check.NotNull(entity, nameof(KittingIssueNote)); - var result = await _kittingIssueNoteManager.ConfirmAsync(entity.Id).ConfigureAwait(false); - var dto = ObjectMapper.Map(result); - return dto; - } - /// - /// 根据叫料请求类型获取发料记录 - /// - /// - /// - /// 叫料请求类型: - /// 人工拉动:Issue_Manual; - /// 线边拉动:Issue_WIP; - /// - /// - /// - /// - [HttpPost("by-type/{requestType}")] - public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) - { - Expression> expression = p => p.RequestType == requestType; - if (requestInput.Condition.Filters?.Count > 0) - { - expression = expression.And(requestInput.Condition.Filters.ToLambda()); - } - - return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, - requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); - } - - [HttpGet("list/un-confirmed/{requestType}")] - public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType) - { - var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType) - .ConfigureAwait(false); - - var dtos = ObjectMapper.Map, List>(entities); - - return dtos; - } - } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs index e493af73d..e4a232f71 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAppService.cs @@ -3,13 +3,18 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Castle.Components.DictionaryAdapter; +using DocumentFormat.OpenXml.Spreadsheet; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp; +using Volo.Abp.Guids; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Boms.DTOs; using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Shared.Application; +using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -35,20 +40,25 @@ public class KittingPackagingNoteAppService private readonly IChassisOperationSequenceAppService _chassisOperationSequenceAppService; private readonly IBomAppService _bomAppService; private readonly IKittingAppService _kittingAppService; + private readonly IKittingPackagingNoteManager _kittingPackagingNoteManager; public KittingPackagingNoteAppService( - IKittingPackagingNoteRepository repository, IChassisOperationSequenceAppService chassisOperationSequenceAppService, IBomAppService bomAppService, IKittingAppService kittingAppService) : base(repository) + IKittingPackagingNoteRepository repository, IChassisOperationSequenceAppService chassisOperationSequenceAppService, IBomAppService bomAppService, IKittingAppService kittingAppService, IKittingPackagingNoteManager kittingPackagingNoteManager) : base(repository) { _chassisOperationSequenceAppService = chassisOperationSequenceAppService; _bomAppService = bomAppService; _kittingAppService = kittingAppService; + _kittingPackagingNoteManager = kittingPackagingNoteManager; } [HttpPost("")] public override async Task CreateAsync(KittingPackagingNoteEditInput input) { var sortNumber=input.DepDetails.Max(p => p.ChassisSortNumber); - await _chassisOperationSequenceAppService.UpdateChassisSortNumberByKittingCodeAsync(input.KittingCode,sortNumber).ConfigureAwait(false); + var maxChassisDetailInputs = input.DepDetails.First(p => p.ChassisSortNumber== sortNumber); + input.Details = new EditableList(); + + await _chassisOperationSequenceAppService.UpdateChassisSortNumberByKittingCodeAsync(input.KittingCode,sortNumber, maxChassisDetailInputs.ChassisNumber).ConfigureAwait(false); //所有底盘转换为总成的零件号 var chassisItemCode = new List(); var listItemCode=input.DepDetails.Select(p => p.ItemCode); @@ -91,6 +101,12 @@ public class KittingPackagingNoteAppService } input.DepDetails.ForEach(p=>p.KittingCode=input.KittingCode); - return await base.CreateAsync(input).ConfigureAwait(false); + var entity = input.ToObject(); + entity.SetIdAndNumberWithDetails(GuidGenerator, await GenerateNumberAsync(typeof(KittingPackagingNote).Name, entity.ActiveDate).ConfigureAwait(false)); + entity.DepDetails.ForEach(p=>p.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number)); + + var result=await _repository.InsertAsync(entity).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData(result), false).ConfigureAwait(false); + return ObjectMapper.Map(result); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAutoMapperProfile.cs index c7b01d559..6498aa767 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/KittingPackagingNotes/KittingPackagingNoteAutoMapperProfile.cs @@ -11,5 +11,17 @@ public partial class StoreApplicationAutoMapperProfile : Profile { CreateMap() .ReverseMap(); + + CreateMap() + .ReverseMap(); + + CreateMap() + .ReverseMap(); + + CreateMap(); + + CreateMap(); + + CreateMap(); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs index ab918a9ec..7da94b615 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs @@ -63,7 +63,6 @@ public class MesNoteAppService : { var fromLocation=await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false); var toLocation =await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - var itemBasicDto =await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); if (fromLocation == null) { throw new UserFriendlyException($"来源库位为空"); @@ -81,9 +80,6 @@ public class MesNoteAppService : detail.ToLocationErpCode = toLocation.ErpLocationCode; detail.ToLocationGroup = toLocation.LocationGroupCode; detail.ToWarehouseCode = toLocation.WarehouseCode; - detail.ToStatus = detail.FromStatus; - detail.Uom = itemBasicDto.BasicUom; - detail.StdPackQty = itemBasicDto.StdPackQty; #region 添加校验 @@ -91,7 +87,7 @@ public class MesNoteAppService : rInput.ItemCode = detail.ItemCode; rInput.Locations = new List() { detail.FromLocationCode }; rInput.Qty = detail.Qty; - rInput.Statuses = new List { EnumInventoryStatus.OK }; + rInput.Statuses = new List { detail.FromStatus }; var balanceLst = await _balanceAppService.GetRecommendBalancesByLocationsAsync(rInput).ConfigureAwait(false); var first = balanceLst.FirstOrDefault(); if (first != null) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index 0e2505fc9..9451fe2e9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -360,7 +360,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase /// [HttpPost("")] public override async Task CreateAsync(TransferNoteEditInput input) - { + { var entity = ObjectMapper.Map(input); entity=await _transferNoteManager.CreateAsync(entity).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs index 2f2f67939..2abff99a5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs @@ -65,36 +65,42 @@ public class CountPlanAppService : var entity = ObjectMapper.Map(input); entity.Worker = CurrentUser.GetUserName(); - - TransactionTypeDTO tranTypeDto = null; - switch (input.RequestType) + TransactionTypeDTO tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan, + EnumTransSubType.None).ConfigureAwait(false); + if (tranTypeDto == null) { - case CountPlanRequestType.Manual: - tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan, - EnumTransSubType.ArtificialCountPlan).ConfigureAwait(false); - if (tranTypeDto == null) - { - throw new UserFriendlyException( - $"盘点方式 {input.RequestType} 没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," + - $"子事务类型{EnumTransSubType.ArtificialCountPlan}"); - } - - break; - case CountPlanRequestType.Import: - tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan, - EnumTransSubType.ExcelInCountPlan).ConfigureAwait(false); - if (tranTypeDto == null) - { - throw new UserFriendlyException( - $"盘点方式 {input.RequestType} 没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," + - $"子事务类型{EnumTransSubType.ExcelInCountPlan}"); - } - - break; - case CountPlanRequestType.None: - default: - throw new UserFriendlyException($"{input.RequestType}盘点方式设置错误"); + throw new UserFriendlyException( + $"没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," + + $"子事务类型{EnumTransSubType.None}"); } + //switch (input.RequestType) + //{ + // case CountPlanRequestType.Manual: + // tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan, + // EnumTransSubType.ArtificialCountPlan).ConfigureAwait(false); + // if (tranTypeDto == null) + // { + // throw new UserFriendlyException( + // $"盘点方式 {input.RequestType} 没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," + + // $"子事务类型{EnumTransSubType.ArtificialCountPlan}"); + // } + + // break; + // case CountPlanRequestType.Import: + // tranTypeDto = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.CountPlan, + // EnumTransSubType.ExcelInCountPlan).ConfigureAwait(false); + // if (tranTypeDto == null) + // { + // throw new UserFriendlyException( + // $"盘点方式 {input.RequestType} 没有设置库存事务类型。主事务类型{EnumTransType.CountPlan}," + + // $"子事务类型{EnumTransSubType.ExcelInCountPlan}"); + // } + + // break; + // case CountPlanRequestType.None: + // default: + // throw new UserFriendlyException($"{input.RequestType}盘点方式设置错误"); + //} entity.AutoCompleteJob = tranTypeDto.AutoCompleteJob; entity.AutoSubmit = tranTypeDto.AutoSubmitRequest; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs index 1ecfa8ea9..ff890095c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs @@ -10,6 +10,8 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; @@ -32,7 +34,6 @@ public class DeliverRequestAppService : private readonly IAreaAppService _areaApp; private readonly ICustomerAppService _customerApp; private readonly ICustomerAddressAppService _customerAddressApp; - public DeliverRequestAppService( IDeliverRequestRepository repository , IDeliverRequestManager deliverRequestManager @@ -46,7 +47,25 @@ public class DeliverRequestAppService : _customerApp = customerApp; _customerAddressApp = customerAddressApp; } + /// + /// 处理请求 + /// + /// + /// + [HttpPost("handle-list")] + public virtual async Task> HandleListAsync(List ids) + { + var entitys = await _repository.GetListAsync(r=> ids.Contains(r.Id)).ConfigureAwait(false); + if (entitys.Select(r => r.CustomerCode).Distinct().Count()>1) + { + throw new UserFriendlyException($"所选申请涉及多个客户不能创建为一个发货单,请重新选择!"); + } + Check.NotNull(entitys, typeof(DeliverRequest).Name); + var result = await _deliverRequestManager.HandleListAsync(entitys).ConfigureAwait(false); + var dtos = ObjectMapper.Map, List>(entitys); + return dtos; + } [HttpPost("list")] public override Task> GetPagedListByFilterAsync( SfsStoreRequestInputBase sfsRequestInput, @@ -75,7 +94,30 @@ public class DeliverRequestAppService : var dto = ObjectMapper.Map(entity); return dto; } + private async Task SetRequestAutoPropertiesAsync(DeliverRequest entity) + { + //普通件 + var transType = EnumTransSubType.Deliver_Standard; + //jis件 + if (entity.DeliverRequestType == EnumDeliverRequestType.FIS) + { + transType = EnumTransSubType.Deliver_FIS; + } + else if (entity.DeliverRequestType == EnumDeliverRequestType.RAW) + { + transType = EnumTransSubType.Deliver_RAW; + } + var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Deliver, transType).ConfigureAwait(false); + + Check.NotNull(tranType, "事务类型", "事务类型不存在"); + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; + entity.DeliverRequestType = entity.DeliverRequestType; + } #region import protected virtual async Task CheckImportInputBusinessAsync( DeliverRequestImportInput importInput @@ -246,30 +288,7 @@ public class DeliverRequestAppService : await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false); } - private async Task SetRequestAutoPropertiesAsync(DeliverRequest entity) - { - //普通件 - var transType = EnumTransSubType.Deliver_Standard; - //jis件 - if (entity.DeliverRequestType == EnumDeliverRequestType.FIS) - { - transType = EnumTransSubType.Deliver_FIS; - } - else if (entity.DeliverRequestType == EnumDeliverRequestType.RAW) - { - transType = EnumTransSubType.Deliver_RAW; - } - var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Deliver, transType).ConfigureAwait(false); - Check.NotNull(tranType, "事务类型", "事务类型不存在"); - - entity.AutoCompleteJob = tranType.AutoCompleteJob; - entity.AutoSubmit = tranType.AutoSubmitRequest; - entity.AutoAgree = tranType.AutoAgreeRequest; - entity.AutoHandle = tranType.AutoHandleRequest; - entity.DirectCreateNote = tranType.DirectCreateNote; - entity.DeliverRequestType = entity.DeliverRequestType; - } private static void CheckTransactionType(TransactionTypeDTO transactionType, ItemBasicDTO item) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs index b88d2249a..6b40d01c6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs @@ -93,6 +93,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.Id) .Ignore(x => x.ExtraProperties) .Ignore(x => x.Remark) + .Ignore(x => x.IdentityNo) + .Ignore(x => x.MesDeliveryNo) + .Ignore(x => x.MesDeliveryPlan) .AfterMap((x, y) => y.SetProperty(nameof(x.FromVinCode), x.FromVinCode)) //.AfterMap((x, y) => y.SetProperty(nameof(x.ToVinCode), x.ToVinCode)) ; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs index 9e25e6475..2c872d3b5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs @@ -171,7 +171,7 @@ public class DeliverRequestFisAppService : CancellationToken cancellationToken = default) { sfsRequestInput.Condition.Filters.Add( - new Filter(nameof(DeliverRequest.DeliverRequestType), "FIS")); + new Filter(nameof(DeliverRequest.DeliverRequestType), "Normal")); return base.GetPagedListByFilterAsync(sfsRequestInput, includeDetails, cancellationToken); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs index a1a23d5a5..e673737eb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs @@ -1,25 +1,10 @@ using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Linq.Expressions; -using System.Threading; using System.Threading.Tasks; -using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main; -using IdentityModel; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; using Volo.Abp; -using Volo.Abp.Application.Dtos; -using Volo.Abp.Domain.Entities; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.ObjectMapping; -using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; -using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -27,12 +12,14 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; /// -/// 装配叫料 +/// 装配叫料 /// [Authorize] [Route($"{StoreConsts.RootPath}assemble-request")] -public class AssembleIssueRequestAppService : SfsStoreRequestAppServiceBase, IAssembleIssueRequestAppService { @@ -41,7 +28,7 @@ public class AssembleIssueRequestAppService : SfsStoreRequestAppServiceBase HandleAsync(Guid id) { await Task.CompletedTask.ConfigureAwait(false); @@ -123,13 +108,14 @@ public class AssembleIssueRequestAppService : SfsStoreRequestAppServiceBase - /// 赋值Request业务属性 + /// 赋值Request业务属性 /// /// /// private async Task SetRequestAutoPropertiesAsync(AssembleIssueRequestEditInput entity) { - var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); + var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None) + .ConfigureAwait(false); Check.NotNull(tranType, "事务类型", "事务类型不存在"); entity.AutoSubmit = tranType.AutoSubmitRequest; entity.AutoAgree = tranType.AutoAgreeRequest; @@ -148,113 +134,9 @@ public class AssembleIssueRequestAppService : SfsStoreRequestAppServiceBase - /// 用来重写 导入数据时可以加工数据 - /// - /// - /// - protected override async Task> ImportProcessingEntityAsync( - Dictionary dictionary) - { - var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); - - foreach (var assembleRequest in addList) - { - assembleRequest.Worker = CurrentUser.GetUserName(); - assembleRequest.CreatorId = CurrentUser.Id; - if (assembleRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) - { - assembleRequest.Type = EnumTransSubType.Issue_Manual.ToString(); - } - - foreach (var detail in assembleRequest.Details) - { - var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - CheckLocation(locationDto, detail.ToLocationCode); - - var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); - CheckItemBasic(itemBasicDto, detail.ItemCode); - - detail.ToLocationArea = locationDto.AreaCode; - detail.ToLocationErpCode = locationDto.ErpLocationCode; - detail.ToLocationGroup = locationDto.LocationGroupCode; - detail.ToWarehouseCode = locationDto.WarehouseCode; - detail.ItemDesc1 = itemBasicDto.Desc1; - detail.ItemDesc2 = itemBasicDto.Desc2; - detail.ItemName = itemBasicDto.Name; - detail.Uom = itemBasicDto.BasicUom; - detail.StdPackQty = itemBasicDto.StdPackQty; - } - } - - return dictionary; - } - - /// - /// 导入验证 - /// - /// - /// - /// - protected override async Task ValidateImportModelAsync(AssembleIssueRequestImportInput model, - List validationRresult) - { - _ = new Dictionary(); - _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); - _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); - await CheckAreaAsync(model, validationRresult).ConfigureAwait(false); - await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false); - } - - #endregion #region 校验 - protected override async Task ValidateImportEntities(Dictionary dict) - { - foreach (var entity in dict.Keys) - { - var tranType = await TransactionTypeAclService - .GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); - - Check.NotNull(tranType, "事务类型", "事务类型不存在"); - - entity.AutoCompleteJob = tranType.AutoCompleteJob; - entity.AutoSubmit = tranType.AutoSubmitRequest; - entity.AutoAgree = tranType.AutoAgreeRequest; - entity.AutoHandle = tranType.AutoHandleRequest; - entity.DirectCreateNote = tranType.DirectCreateNote; - } - - return await base.ValidateImportEntities(dict).ConfigureAwait(false); - } - - protected async Task CheckAreaAsync(AssembleIssueRequestImportInput importInput, - List validationRresult) - { - var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false); - if (area == null) - { - validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" })); - } - } - - protected async Task CheckStoreRelationAsync(AssembleIssueRequestImportInput importInput, - List validationRresult) - { - var itemStoreRelation = await _itemStoreRelationApp - .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false); - if (itemStoreRelation == null) - { - validationRresult.Add(new ValidationResult( - $"物品代码{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" })); - } - } - private void CheckItemBasic(ItemBasicDTO itemBasicDto, string itemCode) { if (itemBasicDto == null) @@ -276,34 +158,5 @@ public class AssembleIssueRequestAppService : SfsStoreRequestAppServiceBase CheckItemBasicAsync(AssembleIssueRequestImportInput importInput, - List validationRresult) - { - var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); - if (item == null) - { - validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" })); - } - else if (item.StdPackQty == 0) - { - validationRresult.Add( - new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" })); - } - - return item; - } - - protected async Task CheckLocationAsync(AssembleIssueRequestImportInput importInput, - List validationRresult) - { - var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false); - if (location == null) - { - validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" })); - } - - return location; - } - #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAutoMapperProfile.cs index 5393620f0..ac0ce512d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAutoMapperProfile.cs @@ -25,7 +25,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() - .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString())) .Ignore(x => x.UseOnTheWayLocation) .Ignore(x => x.Details) .Ignore(x => x.Remark) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs index 5e852df32..bef19ed95 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs @@ -67,9 +67,6 @@ public class CoatingIssueRequestAppService : SfsStoreRequestAppServiceBase HandleAsync(Guid id) { await Task.CompletedTask.ConfigureAwait(false); @@ -150,113 +147,8 @@ public class CoatingIssueRequestAppService : SfsStoreRequestAppServiceBase - /// 用来重写 导入数据时可以加工数据 - /// - /// - /// - protected override async Task> ImportProcessingEntityAsync( - Dictionary dictionary) - { - var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); - - foreach (var coatingMaterialRequest in addList) - { - coatingMaterialRequest.Worker = CurrentUser.GetUserName(); - coatingMaterialRequest.CreatorId = CurrentUser.Id; - if (coatingMaterialRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) - { - coatingMaterialRequest.Type = EnumTransSubType.Issue_Manual.ToString(); - } - - foreach (var detail in coatingMaterialRequest.Details) - { - var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - CheckLocation(locationDto, detail.ToLocationCode); - - var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); - CheckItemBasic(itemBasicDto, detail.ItemCode); - - detail.ToLocationArea = locationDto.AreaCode; - detail.ToLocationErpCode = locationDto.ErpLocationCode; - detail.ToLocationGroup = locationDto.LocationGroupCode; - detail.ToWarehouseCode = locationDto.WarehouseCode; - detail.ItemDesc1 = itemBasicDto.Desc1; - detail.ItemDesc2 = itemBasicDto.Desc2; - detail.ItemName = itemBasicDto.Name; - detail.Uom = itemBasicDto.BasicUom; - detail.StdPackQty = itemBasicDto.StdPackQty; - } - } - - return dictionary; - } - - /// - /// 导入验证 - /// - /// - /// - /// - protected override async Task ValidateImportModelAsync(CoatingIssueRequestImportInput model, - List validationRresult) - { - _ = new Dictionary(); - _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); - _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); - await CheckAreaAsync(model, validationRresult).ConfigureAwait(false); - await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false); - } - - #endregion - #region 校验 - protected override async Task ValidateImportEntities(Dictionary dict) - { - foreach (var entity in dict.Keys) - { - var tranType = await TransactionTypeAclService - .GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); - - Check.NotNull(tranType, "事务类型", "事务类型不存在"); - - entity.AutoCompleteJob = tranType.AutoCompleteJob; - entity.AutoSubmit = tranType.AutoSubmitRequest; - entity.AutoAgree = tranType.AutoAgreeRequest; - entity.AutoHandle = tranType.AutoHandleRequest; - entity.DirectCreateNote = tranType.DirectCreateNote; - } - - return await base.ValidateImportEntities(dict).ConfigureAwait(false); - } - - protected async Task CheckAreaAsync(CoatingIssueRequestImportInput importInput, - List validationRresult) - { - var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false); - if (area == null) - { - validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" })); - } - } - - protected async Task CheckStoreRelationAsync(CoatingIssueRequestImportInput importInput, - List validationRresult) - { - var itemStoreRelation = await _itemStoreRelationApp - .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false); - if (itemStoreRelation == null) - { - validationRresult.Add(new ValidationResult( - $"物品代码{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" })); - } - } - private void CheckItemBasic(ItemBasicDTO itemBasicDto, string itemCode) { if (itemBasicDto == null) @@ -278,34 +170,5 @@ public class CoatingIssueRequestAppService : SfsStoreRequestAppServiceBase CheckItemBasicAsync(CoatingIssueRequestImportInput importInput, - List validationRresult) - { - var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); - if (item == null) - { - validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" })); - } - else if (item.StdPackQty == 0) - { - validationRresult.Add( - new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" })); - } - - return item; - } - - protected async Task CheckLocationAsync(CoatingIssueRequestImportInput importInput, - List validationRresult) - { - var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false); - if (location == null) - { - validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" })); - } - - return location; - } - #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAutoMapperProfile.cs index 9dd74e917..02a21e0fa 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAutoMapperProfile.cs @@ -26,7 +26,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() - .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString())) .Ignore(x => x.UseOnTheWayLocation) .Ignore(x => x.Details) .Ignore(x => x.Remark) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs index 119c5d67f..e02f54e3a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs @@ -1,26 +1,13 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Linq; -using System.Linq.Expressions; -using System.Threading; using System.Threading.Tasks; -using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main; -using IdentityModel; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; using Volo.Abp; -using Volo.Abp.Application.Dtos; -using Volo.Abp.Domain.Entities; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.ObjectMapping; -using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; -using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -28,52 +15,41 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; /// -/// 注塑发料申请 +/// 注塑发料申请 /// [Authorize] [Route($"{StoreConsts.RootPath}injection-issue-request")] -public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase, IInjectionIssueRequestAppService { private readonly IInjectionIssueRequestManager _injectionRequestManager; - private readonly IItemStoreRelationAppService _itemStoreRelationApp; - private readonly IAreaAppService _areaApp; private readonly ILocationAppService _locationAppService; private readonly IItemBasicAppService _itemBasicAppService; private readonly IItemContainerAppService _itemContainerAppService; - private readonly IProductionLineAppService _productionLineAppService; - + private readonly ITransactionTypeAppService _transactionTypeAppService; public InjectionIssueRequestAppService( IInjectionIssueRequestRepository repository, IInjectionIssueRequestManager injectionRequestManager, - IPreparationPlanManager preparationPlanManager, - IItemStoreRelationAppService itemStoreRelationApp, - IAreaAppService areaApp, ILocationAppService locationAppService, IItemBasicAppService itemBasicAppService, IItemContainerAppService itemContainerAppService, - IProductionLineAppService productionLineAppService, ITransactionTypeAppService transactionTypeAppService - ) + ) : base(repository, injectionRequestManager) { _injectionRequestManager = injectionRequestManager; - _itemStoreRelationApp = itemStoreRelationApp; - _areaApp = areaApp; _locationAppService = locationAppService; _itemBasicAppService = itemBasicAppService; - _itemContainerAppService= itemContainerAppService; - _productionLineAppService = productionLineAppService; + _itemContainerAppService = itemContainerAppService; _transactionTypeAppService = transactionTypeAppService; } - - #region 东阳V2 - public override async Task HandleAsync(Guid id) { await Task.CompletedTask.ConfigureAwait(false); @@ -101,7 +77,7 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase0) + var itemContainerDto = await _itemContainerAppService.GetListByItemCodeAsync(detailInput.ItemCode) + .ConfigureAwait(false); + if (itemContainerDto.Count > 0) { detailInput.Uom = itemContainerDto[0].BasicUom; detailInput.Qty = itemContainerDto[0].Qty; @@ -121,7 +98,7 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase - /// 赋值Request业务属性 + /// 赋值Request业务属性 /// /// /// private async Task SetRequestAutoPropertiesAsync(InjectionIssueRequestEditInput entity) { - var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); + var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None) + .ConfigureAwait(false); Check.NotNull(tranType, "事务类型", "事务类型不存在"); entity.AutoSubmit = tranType.AutoSubmitRequest; entity.AutoAgree = tranType.AutoAgreeRequest; @@ -166,125 +144,51 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase - /// 获取物品类别列表 + /// 获取物品类别列表 /// /// /// [HttpGet("list/item-category")] public virtual async Task> GetItemCategoryListAsync() { - var entities = await _itemBasicAppService.GetCategoryListAsync().ConfigureAwait(false); + var entities = await _itemBasicAppService.GetCategoryListAsync().ConfigureAwait(false); return entities; } - #endregion - - #region 导入 - /// - /// 用来重写 导入数据时可以加工数据 + /// 获取已完成的叫料单数量 /// - /// /// - protected override async Task> ImportProcessingEntityAsync( - Dictionary dictionary) + [HttpPost("get-uncompleted-request")] + public async Task> GetUnCompletedRequestAsync(List p_list) { - var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); - - foreach (var injectionRequest in addList) + var returnList = new List(); + //枚举类型查不到改成SQL查询 + var list = await _repository.GetListAsync(p => + p.RequestStatus != EnumRequestStatus.Completed && p.IssueRequestType == EnumIssueRequestType.Vision) + .ConfigureAwait(false); + foreach (var itm in list) { - injectionRequest.Worker = CurrentUser.GetUserName(); - injectionRequest.CreatorId = CurrentUser.Id; - if (injectionRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) - { - injectionRequest.Type = EnumTransSubType.Issue_Manual.ToString(); - } - - foreach (var detail in injectionRequest.Details) - { - var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - CheckLocation(locationDto, detail.ToLocationCode); - - var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); - CheckItemBasic(itemBasicDto, detail.ItemCode); - - detail.ToLocationArea = locationDto.AreaCode; - detail.ToLocationErpCode = locationDto.ErpLocationCode; - detail.ToLocationGroup = locationDto.LocationGroupCode; - detail.ToWarehouseCode = locationDto.WarehouseCode; - detail.ItemDesc1 = itemBasicDto.Desc1; - detail.ItemDesc2 = itemBasicDto.Desc2; - detail.ItemName = itemBasicDto.Name; - detail.Uom = itemBasicDto.BasicUom; - detail.StdPackQty = itemBasicDto.StdPackQty; - } + var query = from detail in itm.Details + join citm in p_list on new + { + detail.ItemCode, locCode = detail.ToLocationCode, areaCode = detail.PositionCode + } equals + new { citm.ItemCode, locCode = citm.LocCode, areaCode = citm.PositionCode } + select new UnCompletedRequestDto + { + ItemCode = detail.ItemCode, LocCode = detail.ToLocationCode, PositionCode = detail.PositionCode + }; + + returnList.AddRange(query.ToList()); } - return dictionary; - } - - /// - /// 导入验证 - /// - /// - /// - /// - protected override async Task ValidateImportModelAsync(InjectionIssueRequestImportInput model, - List validationRresult) - { - _ = new Dictionary(); - _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); - _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); - await CheckAreaAsync(model, validationRresult).ConfigureAwait(false); - await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false); + return returnList; } - #endregion - #region 校验 - protected override async Task ValidateImportEntities(Dictionary dict) - { - foreach (var entity in dict.Keys) - { - var tranType = await TransactionTypeAclService - .GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); - - Check.NotNull(tranType, "事务类型", "事务类型不存在"); - - entity.AutoCompleteJob = tranType.AutoCompleteJob; - entity.AutoSubmit = tranType.AutoSubmitRequest; - entity.AutoAgree = tranType.AutoAgreeRequest; - entity.AutoHandle = tranType.AutoHandleRequest; - entity.DirectCreateNote = tranType.DirectCreateNote; - } - - return await base.ValidateImportEntities(dict).ConfigureAwait(false); - } - - protected async Task CheckAreaAsync(InjectionIssueRequestImportInput importInput, - List validationRresult) - { - var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false); - if (area == null) - { - validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" })); - } - } - - protected async Task CheckStoreRelationAsync(InjectionIssueRequestImportInput importInput, - List validationRresult) - { - var itemStoreRelation = await _itemStoreRelationApp - .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false); - if (itemStoreRelation == null) - { - validationRresult.Add(new ValidationResult( - $"物品代码{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" })); - } - } - private void CheckItemBasic(ItemBasicDTO itemBasicDto, string itemCode) { if (itemBasicDto == null) @@ -306,78 +210,5 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase CheckItemBasicAsync(InjectionIssueRequestImportInput importInput, - List validationRresult) - { - var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); - if (item == null) - { - validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" })); - } - else if (item.StdPackQty == 0) - { - validationRresult.Add( - new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" })); - } - - return item; - } - - protected async Task CheckLocationAsync(InjectionIssueRequestImportInput importInput, - List validationRresult) - { - var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false); - if (location == null) - { - validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" })); - } - - return location; - } - - /// - /// 获取已完成的叫料单数量 - /// - /// - [HttpGet("get-completed-injection-request-count")] - public async Task GetCountAsync() - { - //枚举类型查不到改成SQL查询 - var query =await _repository.GetCountAsync(p => p.RequestStatus != EnumRequestStatus.Completed - &&p.Type==nameof(EnumIssueType.Vision)).ConfigureAwait(false); - - return query; - } - - /// - /// 获取已完成的叫料单数量 - /// - /// - [HttpPost("get-uncompleted-request")] - public async Task> GetUnCompletedRequestAsync(List p_list) - { - List returnList = new List(); - //枚举类型查不到改成SQL查询 - var list =await _repository.WithDetails().Where(p => p.RequestStatus != EnumRequestStatus.Completed && p.Type == nameof(EnumIssueType.Vision)).ToListAsync().ConfigureAwait(false); - foreach (var itm in list) - { - var query = from detail in itm.Details join citm in p_list on new { detail.ItemCode, locCode= detail.ToLocationCode,areaCode=detail.PositionCode } equals - new { citm.ItemCode, locCode= citm.LocCode,areaCode=citm.PositionCode } - select new UnCompletedRequestDto { ItemCode = detail.ItemCode, LocCode = detail.ToLocationCode, PositionCode = detail.PositionCode } ; - - returnList.AddRange(query.ToList()); - } - return returnList; - } - - - - - - - - - - #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAutoMapperProfile.cs index b4a66ebf8..99eef2047 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAutoMapperProfile.cs @@ -25,7 +25,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() - .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString())) .Ignore(x => x.UseOnTheWayLocation) .Ignore(x => x.Details) .Ignore(x => x.Remark) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs index 8e348599b..f508e12b5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs @@ -1,25 +1,12 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Linq; -using System.Linq.Expressions; -using System.Threading; using System.Threading.Tasks; -using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main; -using IdentityModel; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; using Volo.Abp; -using Volo.Abp.Application.Dtos; -using Volo.Abp.Domain.Entities; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.ObjectMapping; -using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; -using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -27,7 +14,7 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; /// -/// kitting叫料申请 +/// kitting叫料申请 /// [Authorize] [Route($"{StoreConsts.RootPath}kitting-issue-request")] @@ -42,7 +29,8 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase HandleAsync(Guid id) { - await Task.CompletedTask.ConfigureAwait(false); - return null; + return await base.HandleAsync(id).ConfigureAwait(false); } [HttpPost("")] @@ -88,18 +72,21 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase - /// 赋值Request业务属性 + /// 赋值Request业务属性 /// /// /// private async Task SetRequestAutoPropertiesAsync(KittingIssueRequestEditInput entity) { - var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); + var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None) + .ConfigureAwait(false); Check.NotNull(tranType, "事务类型", "事务类型不存在"); entity.AutoSubmit = tranType.AutoSubmitRequest; entity.AutoAgree = tranType.AutoAgreeRequest; @@ -144,115 +133,108 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase - /// 用来重写 导入数据时可以加工数据 - /// - /// - /// - protected override async Task> ImportProcessingEntityAsync( - Dictionary dictionary) + [HttpPost("UpdateStatusCompleted")] + public async Task UpdateStatusCompletedAsync(string number) { - var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + var kittingIssueRequest=await _repository.FindAsync(p=>p.Number== number).ConfigureAwait(false); + + var kittingIssueJobDtos=await _kittingIssueJobAppService.GetByRequestNumberAsync(kittingIssueRequest.Number).ConfigureAwait(false); - foreach (var kittingIssueRequest in addList) + if (!kittingIssueJobDtos.Any(p => + p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || + p.JobStatus == EnumJobStatus.Partial) ) { - kittingIssueRequest.Worker = CurrentUser.GetUserName(); - kittingIssueRequest.CreatorId = CurrentUser.Id; - if (kittingIssueRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) + return; + } + else + { + bool flag = true; + + foreach (var detail in kittingIssueRequest.Details) { - kittingIssueRequest.Type = EnumTransSubType.Issue_Manual.ToString(); + if (detail.Qty > detail.IssuedQty) + { + flag = false; + return; + } } - foreach (var detail in kittingIssueRequest.Details) + if (flag) { - var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - CheckLocation(locationDto, detail.ToLocationCode); - - var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); - CheckItemBasic(itemBasicDto, detail.ItemCode); - - detail.ToLocationArea = locationDto.AreaCode; - detail.ToLocationErpCode = locationDto.ErpLocationCode; - detail.ToLocationGroup = locationDto.LocationGroupCode; - detail.ToWarehouseCode = locationDto.WarehouseCode; - detail.ItemDesc1 = itemBasicDto.Desc1; - detail.ItemDesc2 = itemBasicDto.Desc2; - detail.ItemName = itemBasicDto.Name; - detail.Uom = itemBasicDto.BasicUom; - detail.StdPackQty = itemBasicDto.StdPackQty; + CheckStatus(EnumRequestStatus.Completed, kittingIssueRequest.RequestStatus); + kittingIssueRequest.RequestStatus = EnumRequestStatus.Completed; + await _repository.UpdateAsync(kittingIssueRequest).ConfigureAwait(false); } } - return dictionary; - } - - /// - /// 导入验证 - /// - /// - /// - /// - protected override async Task ValidateImportModelAsync(KittingIssueRequestImportInput model, - List validationRresult) - { - _ = new Dictionary(); - _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); - _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); - await CheckAreaAsync(model, validationRresult).ConfigureAwait(false); - await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false); + kittingIssueRequest.RequestStatus = EnumRequestStatus.Completed; } - #endregion - #region 校验 - protected override async Task ValidateImportEntities(Dictionary dict) + private void CheckStatus(EnumRequestStatus targetStatus, EnumRequestStatus nowStatus) { - foreach (var entity in dict.Keys) + var validSourceStatuses = new List(); + switch (targetStatus) { - var tranType = await TransactionTypeAclService - .GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); - - Check.NotNull(tranType, "事务类型", "事务类型不存在"); - - entity.AutoCompleteJob = tranType.AutoCompleteJob; - entity.AutoSubmit = tranType.AutoSubmitRequest; - entity.AutoAgree = tranType.AutoAgreeRequest; - entity.AutoHandle = tranType.AutoHandleRequest; - entity.DirectCreateNote = tranType.DirectCreateNote; + case EnumRequestStatus.None: + break; + case EnumRequestStatus.New: + break; + case EnumRequestStatus.Reviewing: + validSourceStatuses = new List { EnumRequestStatus.New }; + break; + case EnumRequestStatus.Refused: + validSourceStatuses = new List { EnumRequestStatus.Reviewing }; + break; + case EnumRequestStatus.Agreed: + validSourceStatuses = new List { EnumRequestStatus.Reviewing }; + break; + case EnumRequestStatus.Handling: + validSourceStatuses = new List + { + EnumRequestStatus.Agreed, EnumRequestStatus.Partial, + }; + break; + case EnumRequestStatus.Completed: + validSourceStatuses = new List + { + EnumRequestStatus.Handling, EnumRequestStatus.Partial, + }; + break; + case EnumRequestStatus.Cancelled: + validSourceStatuses = new List + { + EnumRequestStatus.New, EnumRequestStatus.Reviewing, EnumRequestStatus.Agreed, + }; + break; + case EnumRequestStatus.Abort: + validSourceStatuses = new List + { + EnumRequestStatus.Handling, EnumRequestStatus.Partial, + }; + break; + case EnumRequestStatus.Partial: + { + validSourceStatuses = new List + { + EnumRequestStatus.Handling, EnumRequestStatus.Partial, + }; + break; + } + default: + throw new ArgumentOutOfRangeException(nameof(targetStatus), targetStatus, null); } - return await base.ValidateImportEntities(dict).ConfigureAwait(false); - } - - protected async Task CheckAreaAsync(KittingIssueRequestImportInput importInput, - List validationRresult) - { - var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false); - if (area == null) + if (!validSourceStatuses.Contains(nowStatus)) { - validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" })); - } - } - - protected async Task CheckStoreRelationAsync(KittingIssueRequestImportInput importInput, - List validationRresult) - { - var itemStoreRelation = await _itemStoreRelationApp - .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false); - if (itemStoreRelation == null) - { - validationRresult.Add(new ValidationResult( - $"物品代码{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" })); + throw new UserFriendlyException( + $"当前状态为 {nowStatus.GetDisplayName()} ,无法变更为 {targetStatus.GetDisplayName()}"); } } @@ -271,39 +253,18 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase CheckItemBasicAsync(KittingIssueRequestImportInput importInput, - List validationRresult) + private void CheckProductionLine(ProductionLineDTO productionLineDto, string productionCode) { - var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); - if (item == null) - { - validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" })); - } - else if (item.StdPackQty == 0) + if (productionLineDto == null) { - validationRresult.Add( - new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" })); + throw new UserFriendlyException($"未找到生产线【{productionCode}】"); } - - return item; - } - - protected async Task CheckLocationAsync(KittingIssueRequestImportInput importInput, - List validationRresult) - { - var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false); - if (location == null) - { - validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" })); - } - - return location; } #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAutoMapperProfile.cs index 679bc87b1..641908973 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAutoMapperProfile.cs @@ -25,7 +25,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() - .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString())) .Ignore(x => x.UseOnTheWayLocation) .Ignore(x => x.Details) .Ignore(x => x.Remark) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs index a4c20f257..e31231106 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs @@ -61,14 +61,15 @@ public class UnplannedIssueRequestForDongyangAppService : UnplannedIssueRequestA entity.AutoSubmit = true; entity.AutoAgree = true; entity.AutoHandle = true; - if (entity.UnplannedIssueType == EnumUnplannedIssueType.Wip) - { - entity.DirectCreateNote = true; - } - else - { - entity.DirectCreateNote = false; - } + entity.DirectCreateNote = false; + //if (entity.UnplannedIssueType == EnumUnplannedIssueType.Wip) + //{ + // entity.DirectCreateNote = true; + //} + //else + //{ + + //} await _unplannedIssueRequestManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs index eb193e7f8..6f4d40782 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs @@ -65,14 +65,15 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ entity.AutoSubmit = true; entity.AutoAgree = true; entity.AutoHandle = true; - if (entity.UnplannedReceiptType == EnumUnplannedReceiptType.Wip) - { - entity.DirectCreateNote = true; //线边直接生成记录 - } - else - { - entity.DirectCreateNote = false; //原料先生成任务、再生成记录 - } + entity.DirectCreateNote = false; + //if (entity.UnplannedReceiptType == EnumUnplannedReceiptType.Wip) + //{ + // entity.DirectCreateNote = true; //线边直接生成记录 + //} + //else + //{ + // entity.DirectCreateNote = false; //原料先生成任务、再生成记录 + //} var res = await _unplannedReceiptRequestManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs index 5e2ebfd9b..29ab23d85 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs @@ -136,5 +136,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile ChassisAutoMapperProfile(); ChassisOperationSequenceAutoMapperProfile(); + KittingPackagingNoteAutoMapperProfile(); + //高通WMS-立库接口 + GaoTongAutoMapperProfile(); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs index b22c253d6..09a3b16e9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs @@ -32,5 +32,18 @@ public enum EnumExchangeDataType //回收料调整 Item_Transform = 28, //半成品上架 - SemiPutaway = 29 + SemiPutaway = 29, + /// + /// 注塑发料 + /// + InjectionIssue=30, + /// + /// 涂装发料 + /// + CoatingIssue=31, + /// + /// 装配发料 + /// + AssembleIssue=32, + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJob.cs index 677eecc06..274bdf2cb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJob.cs @@ -71,7 +71,6 @@ public class CountJob : SfsJobAggregateRootBase /// /// 任务明细 /// - [IgnoreUpdate] public override List Details { get; set; } = new List(); /// /// 任务从表明细(记录每次扫得明细) @@ -96,7 +95,7 @@ public class CountJob : SfsJobAggregateRootBase detail.ExpireDate = expireDate; detail.LocationCode = locationCode; - detail.CountQty = qty; + detail.CountQty = detail.CountQty +qty; detail.CountTime = time; detail.CountOperator = oper; detail.CountDescription = desc; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDependentDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDependentDetail.cs index 2e83fcba1..51b16c59a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDependentDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDependentDetail.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Domain; namespace Win_in.Sfs.Wms.Store.Domain; @@ -51,5 +52,10 @@ public class CountJobDependentDetail : SfsJobDetailEntityBase, IHasCountResult, /// 盘点描述 /// public string CountDescription { get; set; } + /// + /// 是否删除 + /// + [NotMapped] + public bool IsDelete { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDetail.cs index 9ed5558e1..05e66e6b7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobDetail.cs @@ -1,11 +1,14 @@ using System; using System.ComponentModel.DataAnnotations; +using System.Diagnostics; +using Org.BouncyCastle.Crypto.Prng.Drbg; using Win_in.Sfs.Shared.Domain; namespace Win_in.Sfs.Wms.Store.Domain; public class CountJobDetail : SfsJobDetailEntityBase, IHasCountResult, IHasInventoryQty { + /// /// 盘点计划单号 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobManager.cs index 88e1b0935..3297f432b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobManager.cs @@ -4,6 +4,8 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Linq.Expressions; using System.Threading.Tasks; +using DocumentFormat.OpenXml.Drawing; +using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.ObjectMapping; using Volo.Abp.Users; @@ -39,7 +41,7 @@ public class CountJobManager : SfsJobManagerBase, ICou /// public virtual async Task> ResetStatusByNumberAsync(List numbers) { - var joblist = await _repository.GetListAsync(r => numbers.Contains(r.Number)).ConfigureAwait(false); + var joblist = await _repository.GetListAsync(r => numbers.Contains(r.Number), true).ConfigureAwait(false); var planNumbers = joblist.Select(r => r.CountPlanNumber).Distinct(); if (planNumbers.Count() > 1) { @@ -53,12 +55,58 @@ public class CountJobManager : SfsJobManagerBase, ICou throw new UserFriendlyException($"任务号 【{job.Number}】生成的记录【{note.Number}】已经进行了调整,无法重盘"); } job.JobStatus = EnumJobStatus.Open; + var details = job.Details.Where(r => r.InventoryStage == job.InventoryStage && r.InventoryQty != 0).ToList(); + List newDetails = new List(); + foreach (var detail in details) + { + var newDetail= BuildCountJob(detail); + newDetails.Add(newDetail); + } + job.InventoryStage++; + job.AddDetails(newDetails); } await _repository.UpdateManyAsync(joblist).ConfigureAwait(false); + await _noteRepository.DeleteAsync(r => numbers.Contains(r.CountJobNumber)).ConfigureAwait(false); await LocalEventBus.PublishAsync(new SfsSubmittedEntityEventData>(joblist), false).ConfigureAwait(false); return joblist; } + private CountJobDetail BuildCountJob(CountJobDetail job) + { + CountJobDetail newDetail = new CountJobDetail(); + newDetail.SetIdAndNumber(GuidGenerator, job.Id, job.Number); + newDetail.CountPlanNumber = job.CountPlanNumber; + newDetail.CountLabel = job.CountLabel; + newDetail.InventoryQty = job.InventoryQty; + newDetail.InventoryStage = job.InventoryStage+1; + newDetail.Uom = job.Uom; + newDetail.InventoryLocationCode = job.InventoryLocationCode; + newDetail.CountQty = 0; + newDetail.CountTime = job.CountTime; + newDetail.CountOperator = job.CountOperator; + newDetail.CountDescription = job.CountDescription; + newDetail.ItemName = job.ItemName; + newDetail.ItemDesc1 = job.ItemDesc1; + newDetail.ItemDesc2 = job.ItemDesc2; + newDetail.ItemCode = job.ItemCode; + newDetail.StdPackQty = job.StdPackQty; + newDetail.Status = job.Status; + newDetail.ContainerCode = job.ContainerCode; + newDetail.PackingCode = job.PackingCode; + newDetail.Lot = job.Lot; ; + newDetail.SupplierBatch = job.SupplierBatch; + newDetail.ArriveDate = job.ArriveDate; + newDetail.ProduceDate = job.ProduceDate; + newDetail.ExpireDate = job.ExpireDate; + newDetail.LocationCode = job.LocationCode; + newDetail.LocationArea = job.LocationArea; + newDetail.LocationGroup = job.LocationGroup; + newDetail.LocationErpCode = job.LocationErpCode; + newDetail.WarehouseCode = job.WarehouseCode; + + return newDetail; + } + /// /// 执行任务 @@ -85,6 +133,74 @@ public class CountJobManager : SfsJobManagerBase, ICou return await _repository.UpdateAsync(entity).ConfigureAwait(false); } + /// + /// 导入盘点任务明细是调用 + /// + /// + /// + /// + /// + public async Task ImportAsync( CountJob entity, List depDetails, ICurrentUser user) + { + //修改子表数据 + string locationCode = entity.Details.First().LocationCode; + string locationArea = entity.Details.First().LocationArea; + string locationGroup = entity.Details.First().LocationGroup; + string locationErpCode = entity.Details.First().LocationErpCode; + string warehouseCode = entity.Details.First().WarehouseCode; + foreach (var depDetail in depDetails) + { + decimal countCount = depDetail.CountQty; + depDetail.LocationCode = locationCode; + depDetail.LocationArea = locationArea; + depDetail.LocationGroup = locationGroup; + depDetail.LocationErpCode = locationErpCode; + depDetail.WarehouseCode = warehouseCode; + depDetail.InventoryStage = entity.InventoryStage; + if (!string.IsNullOrEmpty(depDetail.PackingCode)) + { + var oldDepDetail = entity.DepDetails.FirstOrDefault(r => r.ItemCode == depDetail.ItemCode && r.PackingCode == depDetail.PackingCode && r.LocationCode == locationCode && r.InventoryStage == entity.InventoryStage && r.Lot == depDetail.Lot); + if (oldDepDetail != null) + { + countCount = depDetail.CountQty - oldDepDetail.CountQty; + entity.DepDetails.Remove(oldDepDetail); + } + } + var jobDepDetail = ObjectMapper.Map(depDetail); + jobDepDetail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); + jobDepDetail.CountLabel = GuidGenerator.Create().ToString(); + entity.DepDetails.Add(jobDepDetail); + var detail = entity.Details.FirstOrDefault(r => r.ItemCode == depDetail.ItemCode && r.PackingCode == depDetail.PackingCode && r.LocationCode == locationCode && r.InventoryStage == entity.InventoryStage && r.Lot == depDetail.Lot); + if (detail == null) + { + var jobDetail = ObjectMapper.Map(depDetail); + jobDetail.ArriveDate = DateTime.Now; + jobDetail.ProduceDate = DateTime.Now; + jobDetail.ExpireDate = DateTime.Parse("9999-12-31 23:59:59.9999999"); + jobDetail.InventoryQty = 0; + var detailNumber = await GetNumber().ConfigureAwait(false); + jobDetail.SetIdAndNumber(GuidGenerator, entity.Id, detailNumber); + jobDetail.CountLabel = GuidGenerator.Create().ToString(); + entity.Details.Add(jobDetail); + } + else + { + jobDepDetail.ArriveDate = detail.ArriveDate; + jobDepDetail.ProduceDate = detail.ProduceDate; + jobDepDetail.ExpireDate = detail.ExpireDate; + await entity.SetDetail(detail.Id, detail.SupplierBatch, detail.ArriveDate, detail.ProduceDate, detail.ExpireDate, detail.LocationCode, countCount, detail.CountTime, detail.CountOperator, detail.CountDescription) + .ConfigureAwait(false); + } + } + //移除原有明细里没有,并且第二次扫描以处的项目 + entity.Details.RemoveAll(r => r.InventoryQty == 0 && r.CountQty == 0 && r.InventoryStage == entity.InventoryStage); + + entity.CompleteUserId = user.Id; + entity.CompleteUserName = user.Name; + entity.CompleteTime = Clock.Now; + await PublishCompletedAsync(entity).ConfigureAwait(false); + return await _repository.UpdateAsync(entity).ConfigureAwait(false); + } /// /// 根据之前定义的条件生成盘点计划 /// @@ -116,8 +232,13 @@ public class CountJobManager : SfsJobManagerBase, ICou return jobList; } - - private async Task SetDetailsAsync(CountJob input, CountJob entity) + /// + /// 此方法弃用 + /// + /// + /// + /// + private async Task SetDetailsAsync_back(CountJob input, CountJob entity) { //将任务里所有可盘数量置为0 input.Details.ForEach(r => @@ -159,7 +280,7 @@ public class CountJobManager : SfsJobManagerBase, ICou if (entityDetail == null || entityDetail.Id == Guid.Empty) { - var jobDetail = ObjectMapper.Map(detail); + var jobDetail = ObjectMapper.Map(detail); entity.AddDetail(jobDetail); } else @@ -172,6 +293,62 @@ public class CountJobManager : SfsJobManagerBase, ICou entity.Details.RemoveAll(r => r.InventoryQty == 0 && r.CountQty == 0&& r.InventoryStage == entity.InventoryStage); } + + private async Task SetDetailsAsync(CountJob input, CountJob entity) + { + //遍历扫描明细 + foreach (var depDetail in input.DepDetails.Where(r => r.InventoryStage == entity.InventoryStage)) + { + decimal countCount = depDetail.CountQty; + var detail = entity.Details.FirstOrDefault(r => r.ItemCode == depDetail.ItemCode && r.PackingCode == depDetail.PackingCode && r.LocationCode == depDetail.LocationCode && r.InventoryStage == entity.InventoryStage&&r.Lot==depDetail.Lot); + var oldDepDetail = entity.DepDetails.FirstOrDefault(r => r.ItemCode == depDetail.ItemCode && r.PackingCode == depDetail.PackingCode && r.LocationCode == depDetail.LocationCode && r.InventoryStage == entity.InventoryStage && r.Lot == depDetail.Lot); + if (depDetail.IsDelete) + { + countCount = -oldDepDetail.CountQty; + entity.DepDetails.Remove(oldDepDetail); + } + else + { + if (oldDepDetail != null && depDetail.Id == oldDepDetail.Id) + { + countCount = depDetail.CountQty - oldDepDetail.CountQty; + entity.DepDetails.Remove(oldDepDetail); + } + + var jobDepDetail = ObjectMapper.Map(depDetail); + var number = entity.Number; + jobDepDetail.SetIdAndNumber(GuidGenerator, entity.Id, number); + jobDepDetail.CountLabel = GuidGenerator.Create().ToString(); + entity.DepDetails.Add(jobDepDetail); + if (detail != null) + { + jobDepDetail.ArriveDate = detail.ArriveDate; + jobDepDetail.ProduceDate = detail.ProduceDate; + jobDepDetail.ExpireDate = detail.ExpireDate; + } + } + if (detail == null) + { + var jobDetail = ObjectMapper.Map(depDetail); + jobDetail.ArriveDate = DateTime.Now; + jobDetail.ProduceDate = DateTime.Now; + jobDetail.ExpireDate = DateTime.Parse("9999-12-31 23:59:59.9999999"); + jobDetail.InventoryQty = 0; + var detailNumber = await GetNumber().ConfigureAwait(false); + jobDetail.SetIdAndNumber(GuidGenerator, entity.Id, detailNumber); + jobDetail.CountLabel = GuidGenerator.Create().ToString(); + entity.Details.Add(jobDetail); + } + else + { + await entity.SetDetail(detail.Id, detail.SupplierBatch, detail.ArriveDate, detail.ProduceDate, detail.ExpireDate, detail.LocationCode, countCount, detail.CountTime, detail.CountOperator, detail.CountDescription) + .ConfigureAwait(false); + } + } + //移除原有明细里没有,并且第二次扫描以处的项目 + entity.Details.RemoveAll(r => r.InventoryQty == 0 && r.CountQty == 0 && r.InventoryStage == entity.InventoryStage); + } + public override void CheckDetails(CountJob entity, AbpValidationResult result) { var details = entity.Details; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/ICountJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/ICountJobManager.cs index 19b46538a..7db5a0c54 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/ICountJobManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/ICountJobManager.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Threading.Tasks; +using Volo.Abp.Users; using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Domain; @@ -13,4 +14,5 @@ public interface ICountJobManager : IJobManager Task> CreateWithConditionAsync(CountPlan entity, List partCondition, List locCondition, List statusList); Task> ResetStatusByNumberAsync(List numbers); + Task ImportAsync(CountJob entity,List depDetails, ICurrentUser user); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJob.cs index 6dded95ea..c51492a35 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJob.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; @@ -12,11 +13,12 @@ namespace Win_in.Sfs.Wms.Store.Domain; [Display(Name = "装配发料任务")] public class AssembleIssueJob : SfsJobAggregateRootBase { + /// - /// 叫料请求类型 + /// 叫料类型 /// - [IgnoreUpdate] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 生产线 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJob.cs index 9acd01250..53715b721 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJob.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; @@ -14,10 +15,10 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; public class CoatingIssueJob : SfsJobAggregateRootBase { /// - /// 叫料请求类型 + /// 叫料类型 /// - [IgnoreUpdate] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 生产线 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJob.cs index 44bcd96f8..819c4104e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJob.cs @@ -1,47 +1,44 @@ -using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using System.Threading.Tasks; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; /// -/// 注塑发料任务 +/// 注塑发料任务 /// [Display(Name = "注塑发料任务")] public class InjectionIssueJob : SfsJobAggregateRootBase { /// - /// 叫料请求类型 + /// 叫料类型 /// - [IgnoreUpdate] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// - /// 生产线 + /// 生产线 /// [IgnoreUpdate] public string ProdLine { get; set; } /// - /// 注塑要料单号 + /// 注塑要料单号 /// [IgnoreUpdate] public string InjectionIssueRequestNumber { get; set; } /// - /// 使用在途库 + /// 使用在途库 /// [Display(Name = "使用在途库")] [IgnoreUpdate] public bool UseOnTheWayLocation { get; set; } /// - /// 任务明细 + /// 任务明细 /// [IgnoreUpdate] - public override List Details { get; set; } = new List(); - - + public override List Details { get; set; } = new(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDetail.cs index 436d8104e..b7a715fd9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDetail.cs @@ -1,8 +1,9 @@ using System; -using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; @@ -11,40 +12,46 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase #region 库存基础信息 /// - /// 物品代码 + /// 物品代码 /// + [Display(Name = "物品代码")] public string ItemCode { get; set; } /// - /// 物品名称 + /// 物品名称 /// + [Display(Name = "物品名称")] public string ItemName { get; set; } /// - /// 物品描述1 + /// 物品描述1 /// + [Display(Name = "物品描述1")] public string ItemDesc1 { get; set; } /// - /// 物品描述2 + /// 物品描述2 /// + [Display(Name = "物品描述2")] public string ItemDesc2 { get; set; } /// - /// 标包数量 + /// 标包数量 /// [Display(Name = "标包数量")] [Column(TypeName = "decimal(18,6)")] public decimal StdPackQty { get; set; } /// - /// 库存状态 + /// 库存状态 /// + [Display(Name = "库存状态")] public EnumInventoryStatus Status { get; set; } /// - /// 计量单位 + /// 计量单位 /// + [Display(Name = "计量单位")] public string Uom { get; set; } #endregion @@ -52,52 +59,52 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase #region 请求信息 /// - /// 请求库位 + /// 请求库位 /// public string RequestLocationCode { get; set; } /// - /// 到库区 + /// 到库区 /// public string RequestLocationArea { get; set; } /// - /// 到库位组 + /// 到库位组 /// public string RequestLocationGroup { get; set; } /// - /// 到ERP库位 + /// 到ERP库位 /// public string RequestLocationErpCode { get; set; } /// - /// 到仓库 + /// 到仓库 /// public string RequestWarehouseCode { get; set; } /// - /// 在途库库位 + /// 在途库库位 /// public string OnTheWayLocationCode { get; set; } /// - /// 生产线 + /// 生产线 /// public string ProdLine { get; set; } /// - /// 位置码 + /// 位置码 /// public string PositionCode { get; set; } /// - /// 推荐的类型 + /// 推荐的类型 /// public EnumRecommendType RecommendType { get; set; } /// - /// 需求数量 + /// 需求数量 /// public decimal RequestQty { get; set; } @@ -106,67 +113,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase #region 推荐来源 /// - /// 推荐来源托标签 + /// 推荐来源托标签 /// public string RecommendFromContainerCode { get; set; } /// - /// 推荐来源箱标签 + /// 推荐来源箱标签 /// public string RecommendFromPackingCode { get; set; } /// - /// 推荐来源批次供应商批次 + /// 推荐来源批次供应商批次 /// public string RecommendFromSupplierBatch { get; set; } /// - /// 推荐来源批次到货时间 + /// 推荐来源批次到货时间 /// public DateTime RecommendFromArriveDate { get; set; } /// - /// 推荐来源批次生产时间 + /// 推荐来源批次生产时间 /// public DateTime RecommendFromProduceDate { get; set; } /// - /// 推荐来源批次过期时间 + /// 推荐来源批次过期时间 /// public DateTime RecommendFromExpireDate { get; set; } /// - /// 推荐来源批次排序 + /// 推荐来源批次排序 /// public string RecommendFromLot { get; set; } /// - /// 推荐来源库位 + /// 推荐来源库位 /// public string RecommendFromLocationCode { get; set; } /// - /// 推荐来源库区 + /// 推荐来源库区 /// public string RecommendFromLocationArea { get; set; } /// - /// 推荐来源库位组 + /// 推荐来源库位组 /// public string RecommendFromLocationGroup { get; set; } /// - /// 推荐来源ERP库位 + /// 推荐来源ERP库位 /// public string RecommendFromLocationErpCode { get; set; } /// - /// 推荐来源仓库 + /// 推荐来源仓库 /// public string RecommendFromWarehouseCode { get; set; } /// - /// 推荐来源数量 + /// 推荐来源数量 /// public decimal RecommendFromQty { get; set; } @@ -175,67 +182,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase #region 推荐目标 /// - /// 推荐目标托标签 + /// 推荐目标托标签 /// public string RecommendToContainerCode { get; set; } /// - /// 推荐目标箱标签 + /// 推荐目标箱标签 /// public string RecommendToPackingCode { get; set; } /// - /// 推荐目标批次供应商批次 + /// 推荐目标批次供应商批次 /// public string RecommendToSupplierBatch { get; set; } /// - /// 推荐目标批次到货时间 + /// 推荐目标批次到货时间 /// public DateTime RecommendToArriveDate { get; set; } /// - /// 推荐目标批次生产时间 + /// 推荐目标批次生产时间 /// public DateTime RecommendToProduceDate { get; set; } /// - /// 推荐目标批次过期时间 + /// 推荐目标批次过期时间 /// public DateTime RecommendToExpireDate { get; set; } /// - /// 推荐目标批次排序 + /// 推荐目标批次排序 /// public string RecommendToLot { get; set; } /// - /// 推荐目标库位 + /// 推荐目标库位 /// public string RecommendToLocationCode { get; set; } /// - /// 推荐目标库区 + /// 推荐目标库区 /// public string RecommendToLocationArea { get; set; } /// - /// 推荐目标库位组 + /// 推荐目标库位组 /// public string RecommendToLocationGroup { get; set; } /// - /// 推荐目标ERP库位 + /// 推荐目标ERP库位 /// public string RecommendToLocationErpCode { get; set; } /// - /// 推荐目标仓库 + /// 推荐目标仓库 /// public string RecommendToWarehouseCode { get; set; } /// - /// 推荐目标数量 + /// 推荐目标数量 /// public decimal RecommendToQty { get; set; } @@ -244,67 +251,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase #region 库移来源 /// - /// 库移来源托标签 + /// 库移来源托标签 /// public string TransferLibFromContainerCode { get; set; } /// - /// 库移来源箱标签 + /// 库移来源箱标签 /// public string TransferLibFromPackingCode { get; set; } /// - /// 库移来源批次供应商批次 + /// 库移来源批次供应商批次 /// public string TransferLibFromSupplierBatch { get; set; } /// - /// 库移来源批次到货时间 + /// 库移来源批次到货时间 /// public DateTime TransferLibFromArriveDate { get; set; } /// - /// 库移来源批次生产时间 + /// 库移来源批次生产时间 /// public DateTime TransferLibFromProduceDate { get; set; } /// - /// 库移来源批次过期时间 + /// 库移来源批次过期时间 /// public DateTime TransferLibFromExpireDate { get; set; } /// - /// 库移来源批次排序 + /// 库移来源批次排序 /// public string TransferLibFromLot { get; set; } /// - /// 库移来源库位 + /// 库移来源库位 /// public string TransferLibFromLocationCode { get; set; } /// - /// 库移来源库区 + /// 库移来源库区 /// public string TransferLibFromLocationArea { get; set; } /// - /// 库移来源库位组 + /// 库移来源库位组 /// public string TransferLibFromLocationGroup { get; set; } /// - /// 库移来源ERP库位 + /// 库移来源ERP库位 /// public string TransferLibFromLocationErpCode { get; set; } /// - /// 库移来源仓库 + /// 库移来源仓库 /// public string TransferLibFromWarehouseCode { get; set; } /// - /// 库移来源数量 + /// 库移来源数量 /// public decimal TransferLibFromQty { get; set; } @@ -313,67 +320,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase #region 库移目标 /// - /// 库移目标托标签 + /// 库移目标托标签 /// public string TransferLibToContainerCode { get; set; } /// - /// 库移目标箱标签 + /// 库移目标箱标签 /// public string TransferLibToPackingCode { get; set; } /// - /// 库移目标批次供应商批次 + /// 库移目标批次供应商批次 /// public string TransferLibToSupplierBatch { get; set; } /// - /// 库移目标批次到货时间 + /// 库移目标批次到货时间 /// public DateTime TransferLibToArriveDate { get; set; } /// - /// 库移目标批次生产时间 + /// 库移目标批次生产时间 /// public DateTime TransferLibToProduceDate { get; set; } /// - /// 库移目标批次过期时间 + /// 库移目标批次过期时间 /// public DateTime TransferLibToExpireDate { get; set; } /// - /// 库移目标批次排序 + /// 库移目标批次排序 /// public string TransferLibToLot { get; set; } /// - /// 库移目标库位 + /// 库移目标库位 /// public string TransferLibToLocationCode { get; set; } /// - /// 库移目标库区 + /// 库移目标库区 /// public string TransferLibToLocationArea { get; set; } /// - /// 库移目标库位组 + /// 库移目标库位组 /// public string TransferLibToLocationGroup { get; set; } /// - /// 库移目标ERP库位 + /// 库移目标ERP库位 /// public string TransferLibToLocationErpCode { get; set; } /// - /// 库移目标仓库 + /// 库移目标仓库 /// public string TransferLibToWarehouseCode { get; set; } /// - /// 库移目标数量 + /// 库移目标数量 /// public decimal TransferLibToQty { get; set; } @@ -382,67 +389,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase #region 实际来源 /// - /// 实际目标托标签 + /// 实际目标托标签 /// public string HandledFromContainerCode { get; set; } /// - /// 实际箱标签 + /// 实际箱标签 /// public string HandledFromPackingCode { get; set; } /// - /// 实际批次供应商批次 + /// 实际批次供应商批次 /// public string HandledFromSupplierBatch { get; set; } /// - /// 实际批次到货时间 + /// 实际批次到货时间 /// public DateTime HandledFromArriveDate { get; set; } /// - /// 实际批次生产时间 + /// 实际批次生产时间 /// public DateTime HandledFromProduceDate { get; set; } /// - /// 实际批次过期时间 + /// 实际批次过期时间 /// public DateTime HandledFromExpireDate { get; set; } /// - /// 实际批次排序 + /// 实际批次排序 /// public string HandledFromLot { get; set; } /// - /// 实际库位 + /// 实际库位 /// public string HandledFromLocationCode { get; set; } /// - /// 实际库区 + /// 实际库区 /// public string HandledFromLocationArea { get; set; } /// - /// 实际库位组 + /// 实际库位组 /// public string HandledFromLocationGroup { get; set; } /// - /// 实际ERP库位 + /// 实际ERP库位 /// public string HandledFromLocationErpCode { get; set; } /// - /// 实际仓库 + /// 实际仓库 /// public string HandledFromWarehouseCode { get; set; } /// - /// 实际数量 + /// 实际数量 /// public decimal HandledFromQty { get; set; } @@ -451,67 +458,67 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase #region 实际目标 /// - /// 实际目标托标签 + /// 实际目标托标签 /// public string HandledToContainerCode { get; set; } /// - /// 实际箱标签 + /// 实际箱标签 /// public string HandledToPackingCode { get; set; } /// - /// 实际批次供应商批次 + /// 实际批次供应商批次 /// public string HandledToSupplierBatch { get; set; } /// - /// 实际批次到货时间 + /// 实际批次到货时间 /// public DateTime HandledToArriveDate { get; set; } /// - /// 实际批次生产时间 + /// 实际批次生产时间 /// public DateTime HandledToProduceDate { get; set; } /// - /// 实际批次过期时间 + /// 实际批次过期时间 /// public DateTime HandledToExpireDate { get; set; } /// - /// 实际批次排序 + /// 实际批次排序 /// public string HandledToLot { get; set; } /// - /// 实际库位 + /// 实际库位 /// public string HandledToLocationCode { get; set; } /// - /// 实际库区 + /// 实际库区 /// public string HandledToLocationArea { get; set; } /// - /// 实际库位组 + /// 实际库位组 /// public string HandledToLocationGroup { get; set; } /// - /// 实际ERP库位 + /// 实际ERP库位 /// public string HandledToLocationErpCode { get; set; } /// - /// 实际仓库 + /// 实际仓库 /// public string HandledToWarehouseCode { get; set; } /// - /// 实际数量 + /// 实际数量 /// public decimal HandledToQty { get; set; } @@ -519,6 +526,6 @@ public class InjectionIssueJobDetail : SfsDetailEntityBase public void SetId(Guid id) { - this.Id = id; + Id = id; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJob.cs index 74707b71a..5d4cf2c24 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJob.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; @@ -13,35 +14,31 @@ namespace Win_in.Sfs.Wms.Store.Domain; public class KittingIssueJob : SfsJobAggregateRootBase { /// - /// 叫料请求类型 + /// 叫料类型 /// - [IgnoreUpdate] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 生产线 /// - [IgnoreUpdate] public string ProdLine { get; set; } /// /// 要料单号 /// - [IgnoreUpdate] public string KittingRequestNumber { get; set; } /// /// 使用在途库 /// [Display(Name = "使用在途库")] - [IgnoreUpdate] public bool UseOnTheWayLocation { get; set; } /// /// 任务明细 /// - [IgnoreUpdate] public override List Details { get; set; } = new List(); - + public EnumIssueSendType EnumIssueSendType { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CountNotes/CountNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CountNotes/CountNoteManager.cs index 67fbd3e37..427684168 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CountNotes/CountNoteManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CountNotes/CountNoteManager.cs @@ -58,13 +58,16 @@ public class CountNoteManager : SfsStoreManagerBase, List deleteItems = new List(); foreach (var entity in entities) { - var deleteentity=await Repository.GetAsync(r=>r.CountJobNumber== entity.CountJobNumber).ConfigureAwait(false); - deleteItems.Add(deleteentity); + var deleteentity=await Repository.FindAsync(r=>r.CountJobNumber== entity.CountJobNumber).ConfigureAwait(false); + if(deleteentity!=null) deleteItems.Add(deleteentity); entity.SetIdAndNumberWithDetails(GuidGenerator, await GenerateNumberAsync(typeof(CountNote).Name, entity.ActiveDate).ConfigureAwait(false)); } //先删除之前得记录 - await Repository.DeleteManyAsync(deleteItems).ConfigureAwait(false); + if (deleteItems.Count >0) + { + await Repository.DeleteManyAsync(deleteItems).ConfigureAwait(false); + } await Repository.InsertManyAsync(entities).ConfigureAwait(false); await PublishCreatedAsync(entities).ConfigureAwait(false); return entities; @@ -92,12 +95,12 @@ public class CountNoteManager : SfsStoreManagerBase, //变更盘点计划为完成 var countPlan = await _countPlanRepository.GetAsync(p => p.Number == entity.CountPlanNumber).ConfigureAwait(false); - if (countPlan.RequestType == CountPlanRequestType.Import) - { - countPlan.RequestStatus = EnumRequestStatus.Completed; - countPlan.EndTime = DateTime.Now; - await _countPlanRepository.UpdateAsync(countPlan).ConfigureAwait(false); - } + //if (countPlan.RequestType == CountPlanRequestType.Import) + //{ + // countPlan.RequestStatus = EnumRequestStatus.Completed; + // countPlan.EndTime = DateTime.Now; + // await _countPlanRepository.UpdateAsync(countPlan).ConfigureAwait(false); + //} } private async Task ThawBalancesAsync(CountNote entity) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs index fff0e8fea..ae672d219 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNoteDetail.cs @@ -8,4 +8,16 @@ public class DeliverNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase /// 扩展属性 /// public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary(); + /// + /// Mes发货单号 + /// + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + public string IdentityNo { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNote.cs index 533852b2d..60310d53e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNote.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Volo.Abp; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; @@ -27,10 +28,10 @@ public class AssembleIssueNote : SfsStoreAggregateRootBase - /// 叫料请求类型 + /// 叫料类型 /// - [IgnoreUpdate] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs index 360c84095..5c3280457 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Volo.Abp; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; @@ -28,10 +29,10 @@ public class CoatingIssueNote : SfsStoreAggregateRootBase - /// 叫料请求类型 + /// 叫料类型 /// - [IgnoreUpdate] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNote.cs index 6f650d255..960879c43 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNote.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Volo.Abp; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; @@ -27,10 +28,10 @@ public class InjectionIssueNote : SfsStoreAggregateRootBase - /// 叫料请求类型 + /// 叫料类型 /// - [IgnoreUpdate] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDetail.cs index 2ebdcc003..7428e0eb6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDetail.cs @@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/KittingIssueNotes/KittingIssueNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/KittingIssueNotes/KittingIssueNote.cs index 46394a025..378f0ac76 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/KittingIssueNotes/KittingIssueNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/KittingIssueNotes/KittingIssueNote.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Volo.Abp; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; @@ -20,29 +21,24 @@ public class KittingIssueNote : SfsStoreAggregateRootBase /// 明细列表 /// - [IgnoreUpdate] public override List Details { get; set; } = new List(); - [IgnoreUpdate] public string RequestNumber { get; set; } - /// - /// 叫料请求类型 + /// 叫料类型 /// - [IgnoreUpdate] - public string RequestType { get; set; } + [Display(Name = "叫料类型")] + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 /// - [IgnoreUpdate] public bool UseOnTheWayLocation { get; set; } /// /// 确认时间 /// [Display(Name = "确认时间")] - [IgnoreUpdate] public DateTime? ConfirmTime { get; set; } /// @@ -51,6 +47,8 @@ public class KittingIssueNote : SfsStoreAggregateRootBase /// 明细(记录Kitting打包中的子物品明细) /// - public List Details { get; set; } = new(); + public override List Details { get; set; } = new(); /// /// 明细(记录底盘相关的信息) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ProductReceiptNotes/ProductReceiptNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ProductReceiptNotes/ProductReceiptNoteDetail.cs index a6cf2c8a2..36379e3cf 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ProductReceiptNotes/ProductReceiptNoteDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ProductReceiptNotes/ProductReceiptNoteDetail.cs @@ -26,4 +26,13 @@ public class ProductReceiptNoteDetail : SfsStoreRecommendToDetailWithLotPackingQ /// 返线数量 /// public decimal ReturnQty { get; set; } + + /// + /// Mes条码号 + /// + public string MesBarCode { get; set; } + /// + /// Mes质量补标识 + /// + public string MesQuality { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlan.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlan.cs index 186624026..e707eccec 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlan.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlan.cs @@ -29,11 +29,6 @@ public class CountPlan : SfsStoreRequestAggregateRootBase /// public int InventoryStage { get; set; } - /// - /// 盘点执行形式 - /// - public CountPlanRequestType RequestType { get; set; } - /// /// 盘点方式 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlanManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlanManager.cs index 3306c2ad6..f60603fae 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlanManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/CountPlans/CountPlanManager.cs @@ -293,10 +293,10 @@ public class CountPlanManager : SfsStoreRequestManagerBaser.Number==number).ConfigureAwait(false); entity.RequestStatus = EnumRequestStatus.Handling; + entity.InventoryStage++; entity.Details.ForEach(p=> { p.DetailStatus = EnumCountStatus.New; - }); } /// @@ -321,7 +321,8 @@ public class CountPlanManager : SfsStoreRequestManagerBase p.CountLabel == planDetail.CountLabel); + //var entityDetail = entity.Details.FirstOrDefault(p => p.CountLabel == planDetail.CountLabel); + var entityDetail = entity.Details.FirstOrDefault(p => p.ItemCode == planDetail.ItemCode && p.PackingCode == planDetail.PackingCode&& p.Lot == planDetail.Lot &&p.LocationCode == planDetail.LocationCode); if (entityDetail == null) { entityDetail = ObjectMapper.Map(planDetail); @@ -348,7 +349,7 @@ public class CountPlanManager : SfsStoreRequestManagerBase /// 发货类型 /// - [IgnoreUpdate] public EnumDeliverRequestType DeliverRequestType { get; set; } /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs index 0d0890d61..4ef1869ee 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestDetail.cs @@ -16,5 +16,16 @@ public class DeliverRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasExtraPr /// 扩展属性 /// public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary(); - + /// + /// Mes发货单号 + /// + public string MesDeliveryNo { get; set; } + /// + /// Mes发货计划号 + /// + public string MesDeliveryPlan { get; set; } + /// + /// 底盘号 + /// + public string IdentityNo { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestManager.cs index 01209e9f6..0457301bd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequestManager.cs @@ -1,7 +1,12 @@ using System.Collections.Generic; using System.Threading.Tasks; +using IdentityModel; using Volo.Abp; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Event; namespace Win_in.Sfs.Wms.Store.Domain; @@ -67,4 +72,21 @@ public class DeliverRequestManager : SfsStoreRequestManagerBase + /// 执行 + /// + /// + /// + [UnitOfWork] + public async Task> HandleListAsync(List entitys) + { + foreach (var entity in entitys) + { + entity.Handle(); + await AddOrUpdateAsync(entity).ConfigureAwait(false); + } + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData>(entitys), false).ConfigureAwait(false); + return entitys; + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/IDeliverRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/IDeliverRequestManager.cs index 49f0a28fa..0c5fc53c2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/IDeliverRequestManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/IDeliverRequestManager.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Threading.Tasks; using Win_in.Sfs.Shared.Domain; @@ -7,4 +8,5 @@ public interface IDeliverRequestManager : ISfsStoreRequestManager { Task CompleteAsync(string number); + Task> HandleListAsync(List entitys); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequest.cs index 261db709a..678218ee2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequest.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; @@ -10,11 +11,10 @@ namespace Win_in.Sfs.Wms.Store.Domain; public class AssembleIssueRequest : SfsStoreRequestAggregateRootBase { /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - [IgnoreUpdate] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/CoatingIssuelRequests/CoatingIssueRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/CoatingIssuelRequests/CoatingIssueRequest.cs index 1af995bc6..1cbce661a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/CoatingIssuelRequests/CoatingIssueRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/CoatingIssuelRequests/CoatingIssueRequest.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; @@ -11,11 +12,10 @@ namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; public class CoatingIssueRequest : SfsStoreRequestAggregateRootBase { /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - [IgnoreUpdate] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequest.cs index fc8355c98..55a447a0f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequest.cs @@ -1,29 +1,29 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; /// -/// 注塑申请 +/// 注塑申请 /// public class InjectionIssueRequest : SfsStoreRequestAggregateRootBase { /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - [IgnoreUpdate] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// - /// 使用在途库 + /// 使用在途库 /// public bool UseOnTheWayLocation { get; set; } /// - /// 明细列表 + /// 明细列表 /// [IgnoreUpdate] - public override List Details { get; set; } = new List(); + public override List Details { get; set; } = new(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequestDetail.cs index 843bdcb62..7d74e93ef 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequestDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/InjectionIssueRequests/InjectionIssueRequestDetail.cs @@ -1,4 +1,3 @@ -using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Domain; @@ -7,96 +6,95 @@ using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Domain; /// -/// 注塑叫料申请明细 +/// 注塑叫料申请明细 /// public class InjectionIssueRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasToLocation { #region 目标库位信息 /// - /// 目标库位 + /// 目标库位 /// [Display(Name = "目标库位")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string ToLocationCode { get; set; } /// - /// 目标库区 + /// 目标库区 /// [Display(Name = "目标库区")] public string ToLocationArea { get; set; } /// - /// 目标库位组 + /// 目标库位组 /// [Display(Name = "目标库位组")] public string ToLocationGroup { get; set; } /// - /// 目标ERP储位 + /// 目标ERP储位 /// [Display(Name = "目标ERP储位")] public string ToLocationErpCode { get; set; } /// - /// 目标仓库 + /// 目标仓库 /// [Display(Name = "目标仓库")] public string ToWarehouseCode { get; set; } #endregion - /// - /// 生产线 + /// 生产线 /// public string ProdLine { get; set; } /// - /// 已发数量 + /// 已发数量 /// public decimal IssuedQty { get; set; } /// - /// 已收数量 + /// 已收数量 /// public decimal ReceivedQty { get; set; } /// - /// 明细状态 + /// 明细状态 /// public EnumStatus Status { get; set; } /// - /// 请求未发 还未发送的数量 + /// 请求未发 还未发送的数量 /// [NotMapped] public decimal ToBeIssuedQty => Qty - IssuedQty; /// - /// 已发未收 + /// 已发未收 /// [NotMapped] public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; /// - /// 请求未收 + /// 请求未收 /// [NotMapped] public decimal NotFinishQty => Qty - ReceivedQty; /// - /// 位置码 + /// 位置码 /// public string PositionCode { get; set; } /// - /// 推荐类型 + /// 推荐类型 /// public EnumRecommendType RecommendType { get; set; } /// - /// 需求箱数量 + /// 需求箱数量 /// [Display(Name = "需求箱数量")] public decimal BoxQty { get; set; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequest.cs index 35a4ec107..1bc480097 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequest.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; namespace Win_in.Sfs.Wms.Store.Domain; @@ -10,20 +11,18 @@ namespace Win_in.Sfs.Wms.Store.Domain; public class KittingIssueRequest : SfsStoreRequestAggregateRootBase { /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] - [IgnoreUpdate] - public string Type { get; set; } + public EnumIssueRequestType IssueRequestType { get; set; } /// /// 使用在途库 /// public bool UseOnTheWayLocation { get; set; } - /// - /// 明细列表 - /// - [IgnoreUpdate] - public override List Details { get; set; } = new List(); + ///// + ///// 明细列表 + ///// + //public List Details { get; set; } = new List(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequestManager.cs index 2624c553d..7bd369ae5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequestManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequestManager.cs @@ -19,11 +19,6 @@ public class KittingIssueRequestManager _repository = repository; } - #region 东阳V2 - - #endregion - - /// /// 创建 同时 直接赋值Number 为了返回Number /// @@ -53,22 +48,8 @@ public class KittingIssueRequestManager } } - - #region 导入 - - /// - /// 执行导入 - /// - public virtual async Task ImportDataAsync(List mergeEntities, - List deleteEntities = null) + public Task ImportDataAsync(List entities, List deleteEntities = null) { - if (deleteEntities != null && deleteEntities.Count > 0) - { - await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); - } - - await CreateManyAsync(mergeEntities).ConfigureAwait(false); + throw new System.NotImplementedException(); } - - #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobDbContextModelCreatingExtensions.cs index b5fd375b9..5af1510ff 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobDbContextModelCreatingExtensions.cs @@ -21,7 +21,6 @@ public static class AssembleIssueJobDbContextModelCreatingExtensions //Configure Job base properties b.ConfigureJob(); //Properties - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.AssembleRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.JobType).HasConversion(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs index f9abf7d85..304324f4f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs @@ -22,7 +22,6 @@ public static class CoatingIssueJobDbContextModelCreatingExtensions //Configure Job base properties b.ConfigureJob(); //Properties - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.MaterialRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.JobType).HasConversion(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDbContextModelCreatingExtensions.cs index 70a34bc6f..0a5feec23 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobDbContextModelCreatingExtensions.cs @@ -21,7 +21,6 @@ public static class InjectionIssueJobDbContextModelCreatingExtensions //Configure Job base properties b.ConfigureJob(); //Properties - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.InjectionIssueRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.JobType).HasConversion(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobDbContextModelCreatingExtensions.cs index e2ca203f8..11f32d8f2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobDbContextModelCreatingExtensions.cs @@ -21,7 +21,6 @@ public static class KittingIssueJobDbContextModelCreatingExtensions //Configure Job base properties b.ConfigureJob(); //Properties - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.KittingRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.JobType).HasConversion(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240426024936_Update_Issue.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240426024936_Update_Issue.Designer.cs new file mode 100644 index 000000000..f9920e15b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240426024936_Update_Issue.Designer.cs @@ -0,0 +1,32114 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + [DbContext(typeof(StoreDbContext))] + [Migration("20240426024936_Update_Issue")] + partial class Update_Issue + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "6.0.13") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AssembleRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_AssembleIssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc1") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemName") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferLibFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_AssembleIssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_AssembleIssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferLibFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("HandledFromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "HandledFromPackingCode", "HandledFromLocationCode", "HandledToLocationCode") + .IsUnique() + .HasFilter("[HandledFromPackingCode] IS NOT NULL AND [HandledFromLocationCode] IS NOT NULL AND [HandledToLocationCode] IS NOT NULL"); + + b.ToTable("Store_AssembleIssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IssueRequestType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_AssembleIssueRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BoxQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_AssembleIssueRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductRecycleNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductionPlanNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_BackFlushNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("IsOffLine") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "Lot") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_BackFlushNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.Chassis", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDateTime") + .HasColumnType("datetime2"); + + b.Property("ReceiveInterfaceDateTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SortNumber") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ChassisNumber") + .IsUnique(); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SortNumber") + .IsUnique(); + + b.ToTable("Store_Chassis", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ChassisOperationSequence", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChassisNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ChassisSortNumber") + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("KittingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Store_ChassisOperationSequence", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliverNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_CheckJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Order") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CheckJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CoatingIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc1") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemName") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferLibFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CoatingIssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CoatingIssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferLibFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("HandledFromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "HandledFromPackingCode", "HandledFromLocationCode", "HandledToLocationCode") + .IsUnique() + .HasFilter("[HandledFromPackingCode] IS NOT NULL AND [HandledFromLocationCode] IS NOT NULL AND [HandledToLocationCode] IS NOT NULL"); + + b.ToTable("Store_CoatingIssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BindTime") + .HasColumnType("datetime2"); + + b.Property("BindType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerBindNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_ContainerBindNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ContainerJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ContainerJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("ContainerRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .HasColumnType("int"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .HasColumnType("int"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountAdjustRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CountNoteNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdjusted") + .HasColumnType("bit"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountAdjustNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransInOut") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_CountAdjustNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountAdjustRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_CountAdjustRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountStage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InventoryMode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InventoryStage") + .HasColumnType("int"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_CountJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDependentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CountTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InventoryStage") + .HasColumnType("int"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CountJobDependentDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CountTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InventoryStage") + .HasColumnType("int"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CountJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("Adjusted") + .HasColumnType("bit"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountJobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CountPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDependentDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CountTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_CountNoteDependentDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjusted") + .HasColumnType("bit"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InventoryMode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InventoryStage") + .HasColumnType("int"); + + b.Property("JsonInventoryStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("JsonItemCodes") + .HasColumnType("nvarchar(max)"); + + b.Property("JsonLocationCodes") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("AuditCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("AuditCountTime") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailStatus") + .HasColumnType("int"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountTime") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RepeatCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DockCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CustomerAsn", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_CustomerAsnDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerProductionReturnNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductionReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CustomerProductionReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerProductionReturnNoteDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_CustomerProductionReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Customer") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CustomerReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_CustomerReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_DeliverJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_DeliverJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountPrint") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLot", "FromLocationCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_DeliverNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Project") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "SoNumber", "SoLine") + .IsUnique() + .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); + + b.ToTable("Store_DeliverPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverRequestType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_DeliverRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ExchangeData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DataAction") + .HasColumnType("int"); + + b.Property("DataContent") + .HasColumnType("nvarchar(max)"); + + b.Property("DataIdentityCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DestinationSystem") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ErrorCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ErrorMessage") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .HasColumnType("bigint"); + + b.Property("ReadTime") + .HasColumnType("datetime2"); + + b.Property("Reader") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RetryTimes") + .HasColumnType("int"); + + b.Property("SourceSystem") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TyrpNumber") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WriteTime") + .HasColumnType("datetime2"); + + b.Property("Writer") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Store_ExchangeData", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectioModelPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectioModelPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectioModelPlanDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_InjectioModelPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionIssueRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IssueRequestType") + .HasColumnType("int"); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_InjectionIssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc1") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemName") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferLibFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InjectionIssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IssueRequestType") + .HasColumnType("int"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionIssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferLibFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("HandledFromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "HandledFromPackingCode", "HandledFromLocationCode", "HandledToLocationCode") + .IsUnique() + .HasFilter("[HandledFromPackingCode] IS NOT NULL AND [HandledFromLocationCode] IS NOT NULL AND [HandledToLocationCode] IS NOT NULL"); + + b.ToTable("Store_InjectionIssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IssueRequestType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionIssueRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BoxQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_InjectionIssueRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_InspectJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("Attributes") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("GoodQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "Lot") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InspectRequestSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryInitialNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InventoryInitialNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryTransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InventoryTransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IsolationNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IsolationNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_IssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") + .HasColumnType("datetime2"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_IssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ItemTransformNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromArriveDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromProduceDate") + .HasColumnType("datetime2"); + + b.Property("FromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToArriveDate") + .HasColumnType("datetime2"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToExpireDate") + .HasColumnType("datetime2"); + + b.Property("ToItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ItemTransformNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ItemTransformRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromArriveDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromProduceDate") + .HasColumnType("datetime2"); + + b.Property("FromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToArriveDate") + .HasColumnType("datetime2"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToExpireDate") + .HasColumnType("datetime2"); + + b.Property("ToItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ItemTransformRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Customer") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerAddressCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_JisDeliverJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerName") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_JisDeliverJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ArrivalTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Customer") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalPackCapacity") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_JisDeliverNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnlineType") + .HasColumnType("nvarchar(max)"); + + b.Property("PackCapacity") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SeqNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Stage") + .HasColumnType("nvarchar(max)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("UsedFor") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_JisDeliverNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProdLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiptType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SourceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkShop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_JisProductReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SeqNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("KittingRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_KittingIssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc1") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemName") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferLibFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_KittingIssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_KittingIssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationCode") + .HasColumnType("nvarchar(450)"); + + b.Property("HandledToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferLibFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibFromSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibFromWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToArriveDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToExpireDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToProduceDate") + .HasColumnType("datetime2"); + + b.Property("TransferLibToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TransferLibToSupplierBatch") + .HasColumnType("nvarchar(max)"); + + b.Property("TransferLibToWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("HandledFromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "HandledFromPackingCode", "HandledFromLocationCode", "HandledToLocationCode") + .IsUnique() + .HasFilter("[HandledFromPackingCode] IS NOT NULL AND [HandledFromLocationCode] IS NOT NULL AND [HandledToLocationCode] IS NOT NULL"); + + b.ToTable("Store_KittingIssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IssueRequestType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_KittingIssueRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BoxQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_KittingIssueRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingPackagingNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("KittingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .HasColumnType("nvarchar(450)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique() + .HasFilter("[Number] IS NOT NULL"); + + b.ToTable("Store_KittingPackagingNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingPackagingNoteChassisDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ChassisNumber") + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("KittingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_KittingPackagingNoteChassisDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingPackagingNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("KittingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_KittingPackagingNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_MaterialRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_MaterialRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MesNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MesRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_MesNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MesNoteDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(450)"); + + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); + + b.ToTable("Store_MesNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MesRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MesRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_MesRecord", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MesRecordDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(450)"); + + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); + + b.ToTable("Store_MesRecordDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_NoOkConvertOkNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_NoOkConvertOkNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_OfflineSettlementNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_OfflineSettlementNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PreparationPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LatestTime") + .HasColumnType("datetime2"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_PreparationPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .HasColumnType("int"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NoGoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductionPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductionReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductionReturnJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductionReturnJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductionReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ProductionReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionReturnRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromLocationCode") + .IsUnique(); + + b.ToTable("Store_ProductionReturnRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configuration") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreateDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FATA") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Program") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductL7PartsNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CanBuy") + .HasColumnType("bit"); + + b.Property("CanMake") + .HasColumnType("bit"); + + b.Property("Configuration") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreateDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FATA") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("L7Part") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Position") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductNo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Program") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("int"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RowID") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ProductNo", "Position", "Configuration", "L7Part") + .IsUnique() + .HasFilter("[ProductNo] IS NOT NULL AND [Position] IS NOT NULL AND [Configuration] IS NOT NULL AND [L7Part] IS NOT NULL"); + + b.ToTable("Store_ProductL7PartsNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SourceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkShop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "PackingCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_ProductReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); + + b.ToTable("Store_ProductReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductReceiveJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductReceiveJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasPrecision(18, 6) + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductRecycleJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BomVersion") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExecutedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RawWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductRecycleJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ProductItemCode", "ItemCode"); + + b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("RecycleTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductRecycleRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductRecycleRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("OrderStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Lot") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjectCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutAwayQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ShippedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("ItemCode", "Number", "PoLine") + .IsUnique() + .HasFilter("[PoLine] IS NOT NULL"); + + b.ToTable("Store_PurchaseOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PurchaseReceiptJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("PurchaseReceiptInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_PurchaseReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("DockCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PurchaseReturnJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Reason") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PurchaseReturnJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutawayMode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PutawayJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PutawayJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PutawayNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_PutawayNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PutawayMode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PutawayRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_PutawayRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode"); + + b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") + .IsUnique(); + + b.ToTable("Store_ReceiptAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ReceiptNumber") + .IsUnique(); + + b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_SaleOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CustomerPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "SoLine", "ItemCode") + .IsUnique(); + + b.ToTable("Store_SaleOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ScrapRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ScrapNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(450)"); + + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); + + b.ToTable("Store_ScrapNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ScrapRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); + + b.ToTable("Store_ScrapRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreateType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("DockCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ShipDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_SupplierAsn", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "PackingCode") + .IsUnique(); + + b.ToTable("Store_SupplierAsnDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ThirdLocationJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") + .HasColumnType("datetime2"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ThirdLocationJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ThirdLocationNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_ThirdLocationNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ThirdLocationRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_ThirdLocationRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallBusinessType") + .HasColumnType("nvarchar(max)"); + + b.Property("CallJobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CallRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CallServerName") + .HasColumnType("nvarchar(max)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_TransferLibJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallBusinessType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallServerName") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsItemCodeFrom") + .HasColumnType("bit"); + + b.Property("IsItemCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationAreaFrom") + .HasColumnType("bit"); + + b.Property("IsLocationAreaTo") + .HasColumnType("bit"); + + b.Property("IsLocationCodeFrom") + .HasColumnType("bit"); + + b.Property("IsLocationCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationErpCodeFrom") + .HasColumnType("bit"); + + b.Property("IsLocationErpCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationGroupFrom") + .HasColumnType("bit"); + + b.Property("IsLocationGroupTo") + .HasColumnType("bit"); + + b.Property("IsLotFrom") + .HasColumnType("bit"); + + b.Property("IsLotTo") + .HasColumnType("bit"); + + b.Property("IsPackingCodeFrom") + .HasColumnType("bit"); + + b.Property("IsPackingCodeTo") + .HasColumnType("bit"); + + b.Property("IsQtyFrom") + .HasColumnType("bit"); + + b.Property("IsQtyTo") + .HasColumnType("bit"); + + b.Property("IsStatusFrom") + .HasColumnType("bit"); + + b.Property("IsStatusTo") + .HasColumnType("bit"); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemDesc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemDesc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendType") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_TransferLibJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("CallBusinessType") + .HasColumnType("nvarchar(max)"); + + b.Property("CallJobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CallRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CallServerName") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferLibNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallBusinessType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallServerName") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledFromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledToContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsItemCodeFrom") + .HasColumnType("bit"); + + b.Property("IsItemCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationAreaFrom") + .HasColumnType("bit"); + + b.Property("IsLocationAreaTo") + .HasColumnType("bit"); + + b.Property("IsLocationCodeFrom") + .HasColumnType("bit"); + + b.Property("IsLocationCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationErpCodeFrom") + .HasColumnType("bit"); + + b.Property("IsLocationErpCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationGroupFrom") + .HasColumnType("bit"); + + b.Property("IsLocationGroupTo") + .HasColumnType("bit"); + + b.Property("IsLotFrom") + .HasColumnType("bit"); + + b.Property("IsLotTo") + .HasColumnType("bit"); + + b.Property("IsPackingCodeFrom") + .HasColumnType("bit"); + + b.Property("IsPackingCodeTo") + .HasColumnType("bit"); + + b.Property("IsQtyFrom") + .HasColumnType("bit"); + + b.Property("IsQtyTo") + .HasColumnType("bit"); + + b.Property("IsStatusFrom") + .HasColumnType("bit"); + + b.Property("IsStatusTo") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendType") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferLibNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("CallBusinessType") + .HasColumnType("nvarchar(max)"); + + b.Property("CallJobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CallRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CallServerName") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferLibRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CallBusinessType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CallServerName") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("IsItemCodeFrom") + .HasColumnType("bit"); + + b.Property("IsItemCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationAreaFrom") + .HasColumnType("bit"); + + b.Property("IsLocationAreaTo") + .HasColumnType("bit"); + + b.Property("IsLocationCodeFrom") + .HasColumnType("bit"); + + b.Property("IsLocationCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationErpCodeFrom") + .HasColumnType("bit"); + + b.Property("IsLocationErpCodeTo") + .HasColumnType("bit"); + + b.Property("IsLocationGroupFrom") + .HasColumnType("bit"); + + b.Property("IsLocationGroupTo") + .HasColumnType("bit"); + + b.Property("IsLotFrom") + .HasColumnType("bit"); + + b.Property("IsLotTo") + .HasColumnType("bit"); + + b.Property("IsPackingCodeFrom") + .HasColumnType("bit"); + + b.Property("IsPackingCodeTo") + .HasColumnType("bit"); + + b.Property("IsQtyFrom") + .HasColumnType("bit"); + + b.Property("IsQtyTo") + .HasColumnType("bit"); + + b.Property("IsStatusFrom") + .HasColumnType("bit"); + + b.Property("IsStatusTo") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Reason") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RecommendFromArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendFromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendType") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RequestWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_TransferLibRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_TransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_TransferRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UnplannedIssueType") + .HasColumnType("int"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_UnplannedIssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_UnplannedIssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UnplannedIssueType") + .HasColumnType("int"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedIssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueType") + .HasColumnType("int"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedIssueRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UnplannedReceiptType") + .HasColumnType("int"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_UnplannedReceiptJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UnplannedReceiptType") + .HasColumnType("int"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedReceiptType") + .HasColumnType("int"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WarehouseTransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WipWarehouseAdjustNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReasonCode") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + + b.Property("ReasonCode") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkOrderId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WorkOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_WorkOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Equipments.EquipmentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BarCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Batch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EqptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EqptCode"); + + b.ToTable("Store_EquipmentRecord", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_CoatingIssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CoatingIssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingIssueRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IssueRequestType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CoatingIssueRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingIssueRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BoxQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_CoatingIssueRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.AssembleIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.AssembleIssueRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CheckJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CoatingIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CoatingIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDependentDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountJob", null) + .WithMany("DepDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDependentDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountNote", null) + .WithMany("DepDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerProductionReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerProductionReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectioModelPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectioModelPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionIssueRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectJob", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectNote", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectRequest", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IsolationNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.KittingIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.KittingIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.KittingIssueRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingPackagingNoteChassisDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.KittingPackagingNote", null) + .WithMany("DepDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingPackagingNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.KittingPackagingNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MesNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.MesNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MesRecordDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.MesRecord", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) + .WithMany("MaterialDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.SaleOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ScrapNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ThirdLocationJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ThirdLocationNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ThirdLocationRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WorkOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingIssueRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingIssueRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + { + b.Navigation("DepDetails"); + + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + { + b.Navigation("DepDetails"); + + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerProductionReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectioModelPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionIssueRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingIssueRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.KittingPackagingNote", b => + { + b.Navigation("DepDetails"); + + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MesNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MesRecord", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + { + b.Navigation("Details"); + + b.Navigation("MaterialDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ThirdLocationRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingIssueRequest", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240426024936_Update_Issue.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240426024936_Update_Issue.cs new file mode 100644 index 000000000..43207a0cd --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240426024936_Update_Issue.cs @@ -0,0 +1,181 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + public partial class Update_Issue : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Store_KittingPackagingNoteDetail_KittingCode", + table: "Store_KittingPackagingNoteDetail"); + + migrationBuilder.DropIndex( + name: "IX_Store_KittingPackagingNoteChassisDetail_KittingCode", + table: "Store_KittingPackagingNoteChassisDetail"); + + migrationBuilder.DropColumn( + name: "Type", + table: "Store_KittingIssueRequest"); + + migrationBuilder.DropColumn( + name: "Type", + table: "Store_InjectionIssueRequest"); + + migrationBuilder.DropColumn( + name: "RequestType", + table: "Store_InjectionIssueNote"); + + migrationBuilder.DropColumn( + name: "RequestType", + table: "Store_CountPlan"); + + migrationBuilder.DropColumn( + name: "Type", + table: "Store_CoatingIssueRequest"); + + migrationBuilder.DropColumn( + name: "Type", + table: "Store_AssembleIssueRequest"); + + migrationBuilder.DropColumn( + name: "RequestType", + table: "Job_InjectionIssueJob"); + + migrationBuilder.AddColumn( + name: "IssueRequestType", + table: "Store_KittingIssueRequest", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "IssueRequestType", + table: "Store_InjectionIssueRequest", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "IssueRequestType", + table: "Store_InjectionIssueNote", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "IssueRequestType", + table: "Store_CoatingIssueRequest", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "IssueRequestType", + table: "Store_AssembleIssueRequest", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "IssueRequestType", + table: "Job_InjectionIssueJob", + type: "int", + nullable: false, + defaultValue: 0); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "IssueRequestType", + table: "Store_KittingIssueRequest"); + + migrationBuilder.DropColumn( + name: "IssueRequestType", + table: "Store_InjectionIssueRequest"); + + migrationBuilder.DropColumn( + name: "IssueRequestType", + table: "Store_InjectionIssueNote"); + + migrationBuilder.DropColumn( + name: "IssueRequestType", + table: "Store_CoatingIssueRequest"); + + migrationBuilder.DropColumn( + name: "IssueRequestType", + table: "Store_AssembleIssueRequest"); + + migrationBuilder.DropColumn( + name: "IssueRequestType", + table: "Job_InjectionIssueJob"); + + migrationBuilder.AddColumn( + name: "Type", + table: "Store_KittingIssueRequest", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "Type", + table: "Store_InjectionIssueRequest", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "RequestType", + table: "Store_InjectionIssueNote", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "RequestType", + table: "Store_CountPlan", + type: "nvarchar(64)", + maxLength: 64, + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "Type", + table: "Store_CoatingIssueRequest", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "Type", + table: "Store_AssembleIssueRequest", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "RequestType", + table: "Job_InjectionIssueJob", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_KittingPackagingNoteDetail_KittingCode", + table: "Store_KittingPackagingNoteDetail", + column: "KittingCode", + unique: true, + filter: "[KittingCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Store_KittingPackagingNoteChassisDetail_KittingCode", + table: "Store_KittingPackagingNoteChassisDetail", + column: "KittingCode", + unique: true, + filter: "[KittingCode] IS NOT NULL"); + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs index 9799f4289..b4b430afe 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs @@ -965,6 +965,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IssueRequestType") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -993,10 +996,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("UseOnTheWayLocation") .HasColumnType("bit"); @@ -5158,11 +5157,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RequestType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Stage") .IsRequired() .HasMaxLength(64) @@ -7684,6 +7678,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("bit") .HasDefaultValue(false); + b.Property("IssueRequestType") + .HasColumnType("int"); + b.Property("JobDescription") .HasMaxLength(1024) .HasColumnType("nvarchar(1024)"); @@ -7730,10 +7727,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -8131,6 +8124,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IssueRequestType") + .HasColumnType("int"); + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -8159,10 +8155,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RequestType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -8573,6 +8565,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IssueRequestType") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -8601,10 +8596,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("UseOnTheWayLocation") .HasColumnType("bit"); @@ -14258,6 +14249,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IssueRequestType") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -14286,10 +14280,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("UseOnTheWayLocation") .HasColumnType("bit"); @@ -14572,10 +14562,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); - b.HasIndex("KittingCode") - .IsUnique() - .HasFilter("[KittingCode] IS NOT NULL"); - b.HasIndex("MasterID"); b.ToTable("Store_KittingPackagingNoteChassisDetail", (string)null); @@ -14647,10 +14633,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); - b.HasIndex("KittingCode") - .IsUnique() - .HasFilter("[KittingCode] IS NOT NULL"); - b.HasIndex("MasterID"); b.ToTable("Store_KittingPackagingNoteDetail", (string)null); @@ -30506,6 +30488,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IssueRequestType") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -30534,10 +30519,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("UseOnTheWayLocation") .HasColumnType("bit"); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs index 381ea2d2c..5d71253f9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs @@ -50,7 +50,9 @@ public static class DeliverNoteDbContextModelCreatingExtensions b.Property(q => q.ToPackingCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.FromLot).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ToLot).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); - + b.Property(q => q.IdentityNo).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MesDeliveryPlan).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MesDeliveryNo).HasMaxLength(SfsPropertyConst.CodeLength); //Indexes b.HasIndex(q => new { q.Number, q.ItemCode, q.FromPackingCode, q.FromLot, q.FromLocationCode, q.ToLocationCode }).IsUnique(); }); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteDbContextModelCreatingExtensions.cs index 3ddeacd5c..9e45c0817 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleIssueNotes/AssembleIssueNoteDbContextModelCreatingExtensions.cs @@ -20,7 +20,6 @@ public static class AssembleIssueNoteDbContextModelCreatingExtensions //Properties b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDbContextModelCreatingExtensions.cs index 01678828a..361a3ed2e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDbContextModelCreatingExtensions.cs @@ -21,7 +21,6 @@ public static class CoatingIssueNoteDbContextModelCreatingExtensions //Properties b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDbContextModelCreatingExtensions.cs index c6f35b84b..f36696af3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionIssueNotes/InjectionIssueNoteDbContextModelCreatingExtensions.cs @@ -20,7 +20,6 @@ public static class InjectionIssueNoteDbContextModelCreatingExtensions //Properties b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteDbContextModelCreatingExtensions.cs index 0623b75f4..28f43109a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/KittingIssueNotes/KittingIssueNoteDbContextModelCreatingExtensions.cs @@ -20,7 +20,6 @@ public static class KittingIssueNoteDbContextModelCreatingExtensions //Properties b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/KittingPackagingNotes/KittingPackagingNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/KittingPackagingNotes/KittingPackagingNoteDbContextModelCreatingExtensions.cs index 77c5acc94..2ee0c6e2e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/KittingPackagingNotes/KittingPackagingNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/KittingPackagingNotes/KittingPackagingNoteDbContextModelCreatingExtensions.cs @@ -40,7 +40,6 @@ public static class KittingPackagingNoteDbContextModelCreatingExtensions //Properties b.Property(q => q.KittingCode).HasMaxLength(SfsPropertyConst.CodeLength); //Indexes - b.HasIndex(q => new { q.KittingCode }).IsUnique(); }); @@ -55,7 +54,6 @@ public static class KittingPackagingNoteDbContextModelCreatingExtensions //Properties b.Property(q => q.KittingCode).HasMaxLength(SfsPropertyConst.CodeLength); //Indexes - b.HasIndex(q => new { q.KittingCode }).IsUnique(); }); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ProductReceiptNotes/ProductReceiptNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ProductReceiptNotes/ProductReceiptNoteDbContextModelCreatingExtensions.cs index 48cb6c311..d127a8e5f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ProductReceiptNotes/ProductReceiptNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ProductReceiptNotes/ProductReceiptNoteDbContextModelCreatingExtensions.cs @@ -54,7 +54,8 @@ public static class ProductReceiptNoteDbContextModelCreatingExtensions b.Property(q => q.LocationCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.ReturnQty).HasDefaultValue(0); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); - + b.Property(q => q.MesBarCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MesQuality).HasMaxLength(SfsPropertyConst.CodeLength); //Relations //Indexes diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/CountPlans/CountPlanDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/CountPlans/CountPlanDbContextModelCreatingExtensions.cs index 6df93d090..82e8438c9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/CountPlans/CountPlanDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Plans/CountPlans/CountPlanDbContextModelCreatingExtensions.cs @@ -21,7 +21,6 @@ public static class CountPlanDbContextModelCreatingExtensions //Properties b.Property(q => q.Type).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); b.Property(q => q.Stage).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); - b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); b.Property(q => q.CountMethod).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); b.Property(q => q.InventoryMode).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); b.Property(q => q.RequestStatus).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs index 328fa0d71..b6530b9ff 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs @@ -42,7 +42,9 @@ public static class DeliverRequestDbContextModelCreatingExtensions b.ConfigureSfsStoreBase(); //Configure Sfs store detail properties b.ConfigureSfsStoreDetailBase(); - + b.Property(q => q.IdentityNo).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MesDeliveryPlan).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MesDeliveryNo).HasMaxLength(SfsPropertyConst.CodeLength); //Properties //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestDbContextModelCreatingExtensions.cs index 2c65665ff..b3f8e9b0d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestDbContextModelCreatingExtensions.cs @@ -19,7 +19,6 @@ public static class AssembleIssueRequestDbContextModelCreatingExtensions b.ConfigureSfsStoreBase(); //Properties - b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/CoatingIssueRequests/CoatingIssueRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/CoatingIssueRequests/CoatingIssueRequestDbContextModelCreatingExtensions.cs index e2f1ffdd5..b1c7ee6eb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/CoatingIssueRequests/CoatingIssueRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/CoatingIssueRequests/CoatingIssueRequestDbContextModelCreatingExtensions.cs @@ -19,7 +19,6 @@ public static class CoatingIssueRequestDbContextModelCreatingExtensions b.ConfigureSfsStoreBase(); //Properties - b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/InjectionRequests/InjectionIssueRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/InjectionRequests/InjectionIssueRequestDbContextModelCreatingExtensions.cs index 0e5261b27..ee878d764 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/InjectionRequests/InjectionIssueRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/InjectionRequests/InjectionIssueRequestDbContextModelCreatingExtensions.cs @@ -19,7 +19,6 @@ public static class InjectionIssueRequestDbContextModelCreatingExtensions b.ConfigureSfsStoreBase(); //Properties - b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequestDbContextModelCreatingExtensions.cs index b8113b843..9d5b90902 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/IssueRequests/KittingIssueRequests/KittingIssueRequestDbContextModelCreatingExtensions.cs @@ -19,7 +19,6 @@ public static class KittingIssueRequestDbContextModelCreatingExtensions b.ConfigureSfsStoreBase(); //Properties - b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs index 85a6bb112..023366466 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs @@ -45,7 +45,6 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.AutoHandle) .Ignore(x => x.AutoCompleteJob) .Ignore(x => x.DirectCreateNote) - .Ignore(x => x.RequestType) .Ignore(x => x.ActiveDate) .Ignore(x => x.BeginTime) .Ignore(x => x.EndTime) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs index 065cc9c81..416b5fb1d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs @@ -46,6 +46,9 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ToLocationArea) .Ignore(x => x.ToLocationGroup) .Ignore(x => x.ExtraProperties) + .Ignore(x => x.MesDeliveryNo) + .Ignore(x => x.IdentityNo) + .Ignore(x => x.MesDeliveryPlan) ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/KittingIssueJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/KittingIssueJobAutoMapperProfile.cs index ef4f206d1..55ba9837f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/KittingIssueJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/KittingIssueJobAutoMapperProfile.cs @@ -33,5 +33,14 @@ public partial class StoreEventAutoMapperProfile : Profile ; CreateMap() ; + + CreateMap() + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.KittingRequestNumber)) + .Ignore(x => x.Confirmed) + .Ignore(x => x.JobNumber) + .Ignore(x => x.ActiveDate) + ; + CreateMap() + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ProductReceiveJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ProductReceiveJobAutoMapperProfile.cs index 1057b5a5c..306212009 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ProductReceiveJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ProductReceiveJobAutoMapperProfile.cs @@ -45,6 +45,8 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.Shift) .Ignore(x => x.Remark) .Ignore(x => x.ArriveDate) + .Ignore(x => x.MesBarCode) + .Ignore(x => x.MesQuality) ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Plans/CountPlanAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Plans/CountPlanAutoMapperProfile.cs index d219dd28e..e637d934f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Plans/CountPlanAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Plans/CountPlanAutoMapperProfile.cs @@ -38,6 +38,7 @@ public partial class StoreEventAutoMapperProfile : Profile //.Ignore(x => x.InventoryUom) //.Ignore(x => x.InventoryQty) .ForMember(x => x.InventoryLocationCode, y => y.MapFrom(d => d.LocationCode)) + .ForMember(x => x.CountPlanNumber, y => y.MapFrom(d => d.Number)) .Ignore(x => x.CountQty) .Ignore(x => x.CountTime) .Ignore(x => x.CountOperator) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleIssueRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleIssueRequestAutoMapperProfile.cs index 02237495c..428b1dc99 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleIssueRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleIssueRequestAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreEventAutoMapperProfile : Profile { CreateMap() .ForMember(x => x.AssembleRequestNumber, y => y.MapFrom(d => d.Number)) - .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) .Ignore(x => x.WarehouseCode) .Ignore(x => x.UpStreamJobNumber) .Ignore(x => x.JobType) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs index 91b1fc045..52b0a8ab1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs @@ -15,7 +15,6 @@ public partial class StoreEventAutoMapperProfile : Profile { CreateMap() .ForMember(x => x.MaterialRequestNumber, y => y.MapFrom(d => d.Number)) - .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) .Ignore(x => x.WarehouseCode) .Ignore(x => x.UpStreamJobNumber) .Ignore(x => x.JobType) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs index 5dbb2df1b..0d04d1a29 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs @@ -97,6 +97,9 @@ public partial class StoreEventAutoMapperProfile : Profile .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) .ForMember(x => x.ToWarehouseCode, y => y.MapFrom(d => d.WarehouseCode)) .Ignore(t => t.StdPackQty) + .Ignore(t => t.MesDeliveryNo) + .Ignore(t => t.MesDeliveryPlan) + .Ignore(t => t.IdentityNo) .Ignore(x => x.ExtraProperties) .IgnoreIHasRecommendAndHandledFrom(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs index a2e5c6569..ec7195320 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreEventAutoMapperProfile : Profile { CreateMap() .ForMember(x => x.InjectionIssueRequestNumber, y => y.MapFrom(d => d.Number)) - .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) .Ignore(x => x.WarehouseCode) .Ignore(x => x.UpStreamJobNumber) .Ignore(x => x.JobType) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/KittingIssueRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/KittingIssueRequestAutoMapperProfile.cs index fbd3b450c..5333732f1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/KittingIssueRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/KittingIssueRequestAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreEventAutoMapperProfile : Profile { CreateMap() .ForMember(x => x.KittingRequestNumber, y => y.MapFrom(d => d.Number)) - .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) .Ignore(x => x.WarehouseCode) .Ignore(x => x.UpStreamJobNumber) .Ignore(x => x.JobType) @@ -31,6 +30,7 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.CompleteUserName) .Ignore(x => x.CompleteTime) .Ignore(x => x.Details) + .Ignore(x=>x.EnumIssueSendType) ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ProductReceiptRequestMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ProductReceiptRequestMapperProfile.cs index 865415fd1..f966e48c8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ProductReceiptRequestMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ProductReceiptRequestMapperProfile.cs @@ -28,6 +28,8 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.RawLocationCode).Ignore(x => x.Shift).Ignore(x => x.ProdLine) .Ignore(x => x.Status) .Ignore(x => x.ContainerCode) + .Ignore(x => x.MesBarCode) + .Ignore(x => x.MesQuality) .IgnoreIHasRecommendAndHandledTo(); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/AssembleIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/AssembleIssueNoteEventHandler.cs new file mode 100644 index 000000000..bfcaccd94 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/AssembleIssueNoteEventHandler.cs @@ -0,0 +1,107 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.Event.DataExchanges; + +/// +/// 装配发料记录传给TYRP(线边仓领料单) +/// +public class AssembleIssueNoteEventHandler + : StoreDataExchangeEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> +{ + + private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.AssembleIssue; + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + await AddExchangeDataAsync(entity).ConfigureAwait(false); + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); + } + + protected override async Task AddExchangeDataAsync(List entities) + { + var dtos = ObjectMapper.Map, List>(entities); + foreach (var detail in dtos.SelectMany(dto => dto.Details)) + { + if (string.IsNullOrEmpty(detail.HandledFromLocationErpCode)) + { + var location = await LocationAclService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false); + if (location != null) + { + detail.HandledFromLocationErpCode = location.ErpLocationCode; + detail.HandledFromLocationGroup = location.LocationGroupCode; + detail.HandledFromLocationArea = location.AreaCode; + + if (string.IsNullOrEmpty(detail.HandledFromWarehouseCode)) + { + detail.HandledFromWarehouseCode = location.WarehouseCode; + } + } + } + + if (string.IsNullOrEmpty(detail.HandledToLocationErpCode)) + { + var location = await LocationAclService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false); + if (location != null) + { + detail.HandledToLocationErpCode = location.ErpLocationCode; + detail.HandledToLocationGroup = location.LocationGroupCode; + detail.HandledToLocationArea = location.AreaCode; + + if (string.IsNullOrEmpty(detail.HandledToWarehouseCode)) + { + detail.HandledToWarehouseCode = location.WarehouseCode; + } + } + } + + } + + var toErpDto = new List(); + foreach (var item in dtos) + { + if (item.Details != null && item.Details.Count != 0) + { + toErpDto.Add(item); + } + } + + //2023-12-6要求同储位不传入接口 按历史规则 + var result = new List(); + foreach (var assembleIssueNoteDto in toErpDto) + { + assembleIssueNoteDto.Details.RemoveAll(p => p.HandledFromLocationErpCode == p.HandledToLocationErpCode); + if (assembleIssueNoteDto.Details.Count > 0) + { + result.Add(assembleIssueNoteDto); + } + } + + if (result.Count > 0) + { + var exchangeDataerp = + await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, result) + .ConfigureAwait(false); + await AddManyAsync(exchangeDataerp).ConfigureAwait(false); + } + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CoatingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CoatingIssueNoteEventHandler.cs new file mode 100644 index 000000000..523e5973f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CoatingIssueNoteEventHandler.cs @@ -0,0 +1,107 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.Event.DataExchanges; + +/// +/// 涂装发料记录传给TYRP(线边仓领料单) +/// +public class CoatingIssueNoteEventHandler + : StoreDataExchangeEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> +{ + + private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.CoatingIssue; + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + await AddExchangeDataAsync(entity).ConfigureAwait(false); + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); + } + + protected override async Task AddExchangeDataAsync(List entities) + { + var dtos = ObjectMapper.Map, List>(entities); + foreach (var detail in dtos.SelectMany(dto => dto.Details)) + { + if (string.IsNullOrEmpty(detail.HandledFromLocationErpCode)) + { + var location = await LocationAclService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false); + if (location != null) + { + detail.HandledFromLocationErpCode = location.ErpLocationCode; + detail.HandledFromLocationGroup = location.LocationGroupCode; + detail.HandledFromLocationArea = location.AreaCode; + + if (string.IsNullOrEmpty(detail.HandledFromWarehouseCode)) + { + detail.HandledFromWarehouseCode = location.WarehouseCode; + } + } + } + + if (string.IsNullOrEmpty(detail.HandledToLocationErpCode)) + { + var location = await LocationAclService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false); + if (location != null) + { + detail.HandledToLocationErpCode = location.ErpLocationCode; + detail.HandledToLocationGroup = location.LocationGroupCode; + detail.HandledToLocationArea = location.AreaCode; + + if (string.IsNullOrEmpty(detail.HandledToWarehouseCode)) + { + detail.HandledToWarehouseCode = location.WarehouseCode; + } + } + } + + } + + var toErpDto = new List(); + foreach (var item in dtos) + { + if (item.Details != null && item.Details.Count != 0) + { + toErpDto.Add(item); + } + } + + //2023-12-6要求同储位不传入接口 按历史规则 + var result = new List(); + foreach (var coatingIssueNoteDto in toErpDto) + { + coatingIssueNoteDto.Details.RemoveAll(p => p.HandledFromLocationErpCode == p.HandledToLocationErpCode); + if (coatingIssueNoteDto.Details.Count > 0) + { + result.Add(coatingIssueNoteDto); + } + } + + if (result.Count > 0) + { + var exchangeDataerp = + await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, result) + .ConfigureAwait(false); + await AddManyAsync(exchangeDataerp).ConfigureAwait(false); + } + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/InjectionIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/InjectionIssueNoteEventHandler.cs new file mode 100644 index 000000000..10600d8ce --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/InjectionIssueNoteEventHandler.cs @@ -0,0 +1,106 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event.DataExchanges; + +/// +/// 注塑发料记录传给TYRP(线边仓领料单) +/// +public class InjectionIssueNoteEventHandler + : StoreDataExchangeEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> +{ + + private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.InjectionIssue; + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + await AddExchangeDataAsync(entity).ConfigureAwait(false); + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); + } + + protected override async Task AddExchangeDataAsync(List entities) + { + var dtos = ObjectMapper.Map, List>(entities); + foreach (var detail in dtos.SelectMany(dto => dto.Details)) + { + if(string.IsNullOrEmpty(detail.HandledFromLocationErpCode)) + { + var location = await LocationAclService.GetByCodeAsync(detail.HandledFromLocationCode).ConfigureAwait(false); + if (location != null) + { + detail.HandledFromLocationErpCode = location.ErpLocationCode; + detail.HandledFromLocationGroup = location.LocationGroupCode; + detail.HandledFromLocationArea = location.AreaCode; + + if (string.IsNullOrEmpty(detail.HandledFromWarehouseCode)) + { + detail.HandledFromWarehouseCode = location.WarehouseCode; + } + } + } + + if(string.IsNullOrEmpty(detail.HandledToLocationErpCode)) + { + var location = await LocationAclService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false); + if (location != null) + { + detail.HandledToLocationErpCode = location.ErpLocationCode; + detail.HandledToLocationGroup = location.LocationGroupCode; + detail.HandledToLocationArea = location.AreaCode; + + if (string.IsNullOrEmpty(detail.HandledToWarehouseCode)) + { + detail.HandledToWarehouseCode = location.WarehouseCode; + } + } + } + + } + + var toErpDto = new List(); + foreach (var item in dtos) + { + if (item.Details != null && item.Details.Count != 0) + { + toErpDto.Add(item); + } + } + + //2023-12-6要求同储位不传入接口 按历史规则 + var result = new List(); + foreach (var injectionIssueNoteDto in toErpDto) + { + injectionIssueNoteDto.Details.RemoveAll(p => p.HandledFromLocationErpCode == p.HandledToLocationErpCode); + if (injectionIssueNoteDto.Details.Count > 0) + { + result.Add(injectionIssueNoteDto); + } + } + + if (result.Count > 0) + { + var exchangeDataerp = + await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, result) + .ConfigureAwait(false); + await AddManyAsync(exchangeDataerp).ConfigureAwait(false); + } + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs new file mode 100644 index 000000000..7adb5dde4 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Inventory.Domain.Acl.Location; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using ILocationAclService = Win_in.Sfs.Wms.Store.Domain.Acl.Location.ILocationAclService; + +namespace Win_in.Sfs.Wms.Store.Event.DataExchanges +{ + public class ThirdLocationNoteEventHandler : + StoreDataExchangeEventHandlerBase + , ILocalEventHandler> + { + private readonly Domain.Acl.Location.ILocationAclService _locationAclService; + + public ThirdLocationNoteEventHandler(ILocationAclService locationAclService) + { + _locationAclService = locationAclService; + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + await AddExchangeDataAsync(entity).ConfigureAwait(false); + } + + protected override async Task AddExchangeDataAsync(List entities) + { + var dtos = ObjectMapper.Map, List>(entities); + + var exchangeData = await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, EnumExchangeDataType.Transfer, dtos).ConfigureAwait(false); + await AddManyAsync(exchangeData).ConfigureAwait(false); + + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/KittingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/KittingIssueJobEventHandler.cs index 598fc89f2..b2f396b3a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/KittingIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/KittingIssueJobEventHandler.cs @@ -41,9 +41,7 @@ public class KittingIssueJobEventHandler : [UnitOfWork] public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) { - var entity = eventData.Entity; - var kittingIssueNote = await BuildKittingIssueNoteAsync(entity).ConfigureAwait(false); - await _kittingIssueNoteAppService.CreateAsync(kittingIssueNote).ConfigureAwait(false); + await Task.CompletedTask.ConfigureAwait(false); } /// @@ -125,63 +123,68 @@ public class KittingIssueJobEventHandler : /// private async Task CreateTransferLibAsync(KittingIssueJob kittingIssueJob) { - if (!await IsMinRowAsync(kittingIssueJob).ConfigureAwait(false)) + foreach (var detail in kittingIssueJob.Details) { - foreach (var detail in kittingIssueJob.Details) + var locationDto = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode) + .ConfigureAwait(false); + if (locationDto.Type == EnumLocationType.RAW) { - var input = new TransferLibRequestEditInput(); - input.CallBusinessType = nameof(IKittingIssueJobAppService); - input.CallJobNumber = kittingIssueJob.Number; - input.CallRequestNumber = kittingIssueJob.KittingRequestNumber; - input.CallServerName = "Win_in.Sfs.Wms.Store.Application.KittingIssueJobAppService"; - input.Type = "Transfer_Warehouse"; - input.UseOnTheWayLocation = true; - - var detailInput = new TransferLibRequestDetailInput(); - detailInput.CallBusinessType = nameof(IKittingIssueJobAppService); - detailInput.CallRequestNumber = kittingIssueJob.KittingRequestNumber; - detailInput.CallServerName = "Win_in.Sfs.Wms.Store.Application.KittingIssueJobAppService"; - detailInput.CallJobNumber = kittingIssueJob.Number; - - detailInput.JobStatus = EnumJobStatus.Open; - detailInput.ItemCode = detail.ItemCode; - detailInput.StdPackQty = detail.StdPackQty; - detailInput.Uom = detail.Uom; - detailInput.Status = detail.Status; - - detailInput.RecommendFromQty = detail.RecommendFromQty; - detailInput.RecommendFromLot = detail.RecommendFromLot; - detailInput.RecommendFromPackingCode = detailInput.RecommendFromPackingCode; - detailInput.RecommendToLot = detail.RecommendToLot; - - detailInput.RecommendFromArriveDate = detail.RecommendFromArriveDate; - detailInput.RecommendFromExpireDate = detail.RecommendFromExpireDate; - detailInput.RecommendFromProduceDate = detail.RecommendFromProduceDate; - detailInput.RecommendFromSupplierBatch = detail.RecommendFromSupplierBatch; - - detailInput.RecommendFromLocationCode = detail.RecommendFromLocationCode; - detailInput.RecommendFromLocationGroup = detail.RecommendFromLocationGroup; - detailInput.RecommendFromLocationArea = detail.RecommendFromLocationArea; - detailInput.RecommendFromLocationErpCode = detail.RecommendFromLocationErpCode; - detailInput.RecommendFromWarehouseCode = detail.RecommendFromWarehouseCode; - - detailInput.RecommendToQty = detail.RecommendToQty; - detailInput.RecommendToLot = detail.RecommendToLot; - detailInput.RecommendToPackingCode = detailInput.RecommendToPackingCode; - detailInput.RecommendToLot = detail.RecommendToLot; - - detailInput.RecommendToArriveDate = detail.RecommendToArriveDate; - detailInput.RecommendToExpireDate = detail.RecommendToExpireDate; - detailInput.RecommendToProduceDate = detail.RecommendToProduceDate; - detailInput.RecommendToSupplierBatch = detail.RecommendToSupplierBatch; - - detailInput.RecommendToLocationCode = detail.RecommendToLocationCode; - detailInput.RecommendToLocationGroup = detail.RecommendToLocationGroup; - detailInput.RecommendToLocationArea = detail.RecommendToLocationArea; - detailInput.RecommendToLocationErpCode = detail.RecommendToLocationErpCode; - detailInput.RecommendToWarehouseCode = detail.RecommendToWarehouseCode; - - await _transferLibRequestAppService.CreateAsync(input).ConfigureAwait(false); + if (!await IsMinRowAsync(kittingIssueJob).ConfigureAwait(false)) + { + var input = new TransferLibRequestEditInput(); + input.CallBusinessType = nameof(IKittingIssueJobAppService); + input.CallJobNumber = kittingIssueJob.Number; + input.CallRequestNumber = kittingIssueJob.KittingRequestNumber; + input.CallServerName = "Win_in.Sfs.Wms.Store.Application.KittingIssueJobAppService"; + input.Type = "Transfer_Warehouse"; + input.UseOnTheWayLocation = true; + + var detailInput = new TransferLibRequestDetailInput(); + detailInput.CallBusinessType = nameof(IKittingIssueJobAppService); + detailInput.CallRequestNumber = kittingIssueJob.KittingRequestNumber; + detailInput.CallServerName = "Win_in.Sfs.Wms.Store.Application.KittingIssueJobAppService"; + detailInput.CallJobNumber = kittingIssueJob.Number; + + detailInput.JobStatus = EnumJobStatus.Open; + detailInput.ItemCode = detail.ItemCode; + detailInput.StdPackQty = detail.StdPackQty; + detailInput.Uom = detail.Uom; + detailInput.Status = detail.Status; + + detailInput.RecommendFromQty = detail.RecommendFromQty; + detailInput.RecommendFromLot = detail.RecommendFromLot; + detailInput.RecommendFromPackingCode = detailInput.RecommendFromPackingCode; + detailInput.RecommendToLot = detail.RecommendToLot; + + detailInput.RecommendFromArriveDate = detail.RecommendFromArriveDate; + detailInput.RecommendFromExpireDate = detail.RecommendFromExpireDate; + detailInput.RecommendFromProduceDate = detail.RecommendFromProduceDate; + detailInput.RecommendFromSupplierBatch = detail.RecommendFromSupplierBatch; + + detailInput.RecommendFromLocationCode = detail.RecommendFromLocationCode; + detailInput.RecommendFromLocationGroup = detail.RecommendFromLocationGroup; + detailInput.RecommendFromLocationArea = detail.RecommendFromLocationArea; + detailInput.RecommendFromLocationErpCode = detail.RecommendFromLocationErpCode; + detailInput.RecommendFromWarehouseCode = detail.RecommendFromWarehouseCode; + + detailInput.RecommendToQty = detail.RecommendToQty; + detailInput.RecommendToLot = detail.RecommendToLot; + detailInput.RecommendToPackingCode = detailInput.RecommendToPackingCode; + detailInput.RecommendToLot = detail.RecommendToLot; + + detailInput.RecommendToArriveDate = detail.RecommendToArriveDate; + detailInput.RecommendToExpireDate = detail.RecommendToExpireDate; + detailInput.RecommendToProduceDate = detail.RecommendToProduceDate; + detailInput.RecommendToSupplierBatch = detail.RecommendToSupplierBatch; + + detailInput.RecommendToLocationCode = detail.RecommendToLocationCode; + detailInput.RecommendToLocationGroup = detail.RecommendToLocationGroup; + detailInput.RecommendToLocationArea = detail.RecommendToLocationArea; + detailInput.RecommendToLocationErpCode = detail.RecommendToLocationErpCode; + detailInput.RecommendToWarehouseCode = detail.RecommendToWarehouseCode; + + await _transferLibRequestAppService.CreateAsync(input).ConfigureAwait(false); + } } } } @@ -210,9 +213,9 @@ public class KittingIssueJobEventHandler : { var detail = kittingIssueJob.Details.FirstOrDefault(); - var loctionDto = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode) + var locationDto = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode) .ConfigureAwait(false); - if (loctionDto.RowCode == 1) + if (locationDto.Type==EnumLocationType.RAW&& locationDto.RowCode == 1) { return true; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleIssueRequestEventHandler.cs index 01990dc2b..fdb4e5d3f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleIssueRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleIssueRequestEventHandler.cs @@ -72,15 +72,15 @@ public class AssembleIssueRequestEventHandler List assembleJobs = new EditableList(); - switch (entity.Type) - { - case nameof(EnumIssueType.BoxQty): - assembleJobs = await CreateAssembleIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false); - break; - case nameof(EnumIssueType.Qty): - assembleJobs = await CreateAssembleIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false); - break; - } + //switch (entity.Type) + //{ + // case nameof(EnumIssueType.BoxQty): + // assembleJobs = await CreateAssembleIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false); + // break; + // case nameof(EnumIssueType.Qty): + // assembleJobs = await CreateAssembleIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false); + // break; + //} if (assembleJobs.Any()) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueRequestEventHandler.cs index aca5239a6..120155d66 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueRequestEventHandler.cs @@ -74,15 +74,15 @@ public class CoatingIssueRequestEventHandler List coatingIssueJobs = new EditableList(); - switch (entity.Type) - { - case nameof(EnumIssueType.BoxQty): - coatingIssueJobs = await CreateCoatingIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false); - break; - case nameof(EnumIssueType.Qty): - coatingIssueJobs = await CreateCoatingIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false); - break; - } + //switch (entity.Type) + //{ + // case nameof(EnumIssueType.BoxQty): + // coatingIssueJobs = await CreateCoatingIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false); + // break; + // case nameof(EnumIssueType.Qty): + // coatingIssueJobs = await CreateCoatingIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false); + // break; + //} if (coatingIssueJobs.Any()) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs index ab4562f87..a453c0ef9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountPlanEventHandler.cs @@ -37,21 +37,7 @@ public class CountPlanEventHandler public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { var entity = eventData.Entity; - - switch (entity.RequestType) - { - case CountPlanRequestType.Import: - //冻结库存 - await FreezeBalancesAsync(entity).ConfigureAwait(false); - break; - case CountPlanRequestType.Manual: - //冻结库存 - await FreezeBalancesAsync(entity).ConfigureAwait(false); - break; - case CountPlanRequestType.None: - default: - throw new UserFriendlyException("盘点执行方式错误"); - } + await FreezeBalancesAsync(entity).ConfigureAwait(false); } /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs index 8ef9669ed..29c1e645d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs @@ -3,7 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Volo.Abp; +using Volo.Abp.Domain.Entities; using Volo.Abp.EventBus; +using Volo.Abp.ObjectMapping; using Volo.Abp.Uow; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; @@ -17,6 +19,7 @@ namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; public class DeliverRequestEventHandler : StoreEventHandlerBase , ILocalEventHandler> + , ILocalEventHandler>> , ILocalEventHandler> , ILocalEventHandler> , ILocalEventHandler>> @@ -26,16 +29,19 @@ public class DeliverRequestEventHandler private readonly IDeliverJobAppService _deliverJobApp; private readonly ICustomerAddressAppService _customerAddressApp; private readonly IDeliverRequestManager _deliverRequestManager; - + private readonly IBalanceAppService _balanceAppService; + private readonly ILocationAppService _locationAppService; public DeliverRequestEventHandler( IDeliverJobAppService deliverJobApp , IDeliverNoteAppService deliverNoteApp - , ICustomerAddressAppService customerAddressApp, IDeliverRequestManager deliverRequestManager) + , ICustomerAddressAppService customerAddressApp, IDeliverRequestManager deliverRequestManager, IBalanceAppService balanceAppService, ILocationAppService locationAppService) { _deliverNoteApp = deliverNoteApp; _deliverJobApp = deliverJobApp; _customerAddressApp = customerAddressApp; _deliverRequestManager = deliverRequestManager; + _balanceAppService = balanceAppService; + _locationAppService = locationAppService; } @@ -46,11 +52,7 @@ public class DeliverRequestEventHandler [UnitOfWork] public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - var entity = eventData.Entity; - if (entity.AutoSubmit) - { - await _deliverRequestManager.SubmitAsync(entity).ConfigureAwait(false); - } + await Task.CompletedTask.ConfigureAwait(false); } /// @@ -60,14 +62,7 @@ public class DeliverRequestEventHandler [UnitOfWork] public async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - var entitys = eventData.Entity; - foreach (var entity in entitys) - { - if (entity.AutoSubmit) - { - await _deliverRequestManager.SubmitAsync(entity).ConfigureAwait(false); - } - } + await Task.CompletedTask.ConfigureAwait(false); } /// @@ -109,10 +104,110 @@ public class DeliverRequestEventHandler await _deliverJobApp.CreateManyAsync(deliverJobCreateInputs).ConfigureAwait(false); } } + /// + /// 执行后 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsHandledEntityEventData> eventData) + { + var entitys = eventData.Entity; + //东阳特殊逻辑 + if (entitys.First().DirectCreateNote) + { + var noteCreateInput = await BuildDeliverNoteAsync(entitys).ConfigureAwait(false); + await _deliverNoteApp.CreateAsync(noteCreateInput).ConfigureAwait(false); + } + } #region 私有 + private async Task BuildDeliverNoteAsync(List requests) + { + var transactionType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Deliver, EnumTransSubType.None).ConfigureAwait(false); + + if (requests.First().DeliverRequestType == EnumDeliverRequestType.Normal) + { + transactionType = await TransactionTypeAclService.GetByTransTypeAsync( + EnumTransType.Deliver, + EnumTransSubType.Deliver_Standard).ConfigureAwait(false); + } + else if (requests.First().DeliverRequestType == EnumDeliverRequestType.FIS) + { + transactionType = await TransactionTypeAclService.GetByTransTypeAsync( + EnumTransType.Deliver, + EnumTransSubType.Deliver_FIS).ConfigureAwait(false); + } + + var createInput = ObjectMapper.Map(requests.First()); + + var customerAddress = + (await _customerAddressApp.GetByCustomerCodeAsync(createInput.CustomerCode).ConfigureAwait(false)) + .FirstOrDefault(); + + LocationDTO toLocation = null; + if (customerAddress != null && !string.IsNullOrEmpty(customerAddress.LocationCode)) + { + toLocation = await LocationAclService.GetByCodeAsync(customerAddress.LocationCode).ConfigureAwait(false); + + Check.NotNull(toLocation, $"客户库位 {customerAddress.LocationCode} 不存在"); + } + + createInput.Details = new List(); + foreach (var detail in requests.SelectMany(r=>r.Details)) + { + var locations = await _locationAppService.GetListByTypesAndErpCodeAsync(transactionType.OutLocationTypes, detail.AreaCode).ConfigureAwait(false); + if (locations.Count <= 0) + { + throw new UserFriendlyException($"储位 {detail.AreaCode} 未找到对应的成品库和半成品库。"); + } + + var balances = await _balanceAppService.GetRecommendBalancesByLocationsAsync( + new RecommendBalanceRequestInput + { + ItemCode = detail.ItemCode, + Qty = detail.Qty, + Locations = locations.Select(r => r.Code).ToList(), + Statuses = transactionType.OutInventoryStatuses + }).ConfigureAwait(false); + + var sumQty = balances.Sum(t => t.Qty); + + if (sumQty < detail.Qty) + { + throw new UserFriendlyException($"物料号 {detail.ItemCode} 库存余额 {sumQty} 小于 {detail.Qty}。"); + } + + foreach (var balance in balances) + { + var inputDetail = ObjectMapper.Map(balance); + + var item = await ItemBasicAclService.GetByCodeAsync(balance.ItemCode).ConfigureAwait(false); + + if (item != null) + { + inputDetail.StdPackQty = item.StdPackQty; + } + + if (toLocation != null) + { + inputDetail.ToLocationCode = toLocation.Code; + + inputDetail.ToLocationErpCode = toLocation.ErpLocationCode; + } + + inputDetail.ExtraProperties = detail.ExtraProperties; + inputDetail.MesDeliveryNo = detail.MesDeliveryNo; + inputDetail.IdentityNo = detail.IdentityNo; + inputDetail.MesDeliveryPlan = detail.MesDeliveryPlan; + createInput.Details.Add(inputDetail); + } + } + return createInput; + } private async Task BuildDeliverNoteAsync(DeliverRequest request) { var transactionType = await TransactionTypeAclService @@ -149,16 +244,21 @@ public class DeliverRequestEventHandler foreach (var detail in request.Details) { - var balances = await BalanceAclService.GetRecommendBalancesAsync( + var locations = await _locationAppService.GetListByTypesAndErpCodeAsync(transactionType.OutLocationTypes, detail.AreaCode).ConfigureAwait(false); + if (locations.Count<=0) + { + throw new UserFriendlyException($"储位 {detail.AreaCode} 未找到对应的成品库和半成品库。"); + } + + var balances = await _balanceAppService.GetRecommendBalancesByLocationsAsync( new RecommendBalanceRequestInput { ItemCode = detail.ItemCode, Qty = detail.Qty, - LocationTypes = transactionType.OutLocationTypes, - LocationAreas = new List { detail.AreaCode }, + Locations = locations.Select(r=>r.Code).ToList(), Statuses = transactionType.OutInventoryStatuses }).ConfigureAwait(false); - + var sumQty = balances.Sum(t => t.Qty); if (sumQty < detail.Qty) @@ -185,7 +285,9 @@ public class DeliverRequestEventHandler } inputDetail.ExtraProperties = detail.ExtraProperties; - + inputDetail.MesDeliveryNo = detail.MesDeliveryNo; + inputDetail.IdentityNo = detail.IdentityNo; + inputDetail.MesDeliveryPlan = detail.MesDeliveryPlan; createInput.Details.Add(inputDetail); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionIssueRequestEventHandler.cs index 29927219a..80821e7f4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionIssueRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionIssueRequestEventHandler.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Text; using System.Text.Json; using System.Threading.Tasks; using Castle.Components.DictionaryAdapter; @@ -8,12 +7,10 @@ using Volo.Abp; using Volo.Abp.EventBus; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; -using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; -using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; @@ -72,15 +69,7 @@ public class InjectionIssueRequestEventHandler List injectionJobs = new EditableList(); - switch (entity.Type) - { - case nameof(EnumIssueType.BoxQty): - injectionJobs = await CreateInjectionIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false); - break; - case nameof(EnumIssueType.Qty): - injectionJobs = await CreateInjectionIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false); - break; - } + injectionJobs = await CreateInjectionIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false); if (injectionJobs.Any()) { @@ -113,249 +102,6 @@ public class InjectionIssueRequestEventHandler #region 私有 - #region 按数量叫料 - - /// - /// 创建注塑任务 - /// - /// - /// - /// - private async Task> CreateInjectionIssueJobWithQtyTypeAsync - (InjectionIssueRequest injectionRequest) - { - var jobs = new List(); - - var toLocationCodes = injectionRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList(); //所有发送库位的集合 - var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false); //所有库位的集合 - - var injectionRequestDetails = injectionRequest.Details.Where(p => p.ToBeIssuedQty > 0); //所有还没发送物品的集合 - foreach (var injectionRequestDetail in injectionRequestDetails) //如果有还有剩余未叫料的数量 则创建新的任务 - { - var toLocation = - toLocations.FirstOrDefault(p => p.Code == injectionRequestDetail.ToLocationCode); //判断目标库位是否存在 - Check.NotNull(toLocation, "库位代码", $"库位 {injectionRequestDetail.ToLocationCode} 不存在"); - - //创建详情 - var jobDetails = - await CreateInjectionIssueJobDetailInputsWithQtyTypeAsync(injectionRequest, injectionRequestDetail, - toLocation.LocationGroupCode).ConfigureAwait(false); - if (!jobDetails.Any()) - { - continue; - } - - var fromLocationCode = jobDetails[0].RecommendFromLocationCode; - var fromLocation = await _locationAppService.GetByCodeAsync(fromLocationCode).ConfigureAwait(false); - var job = jobs.FirstOrDefault(p => p.WorkGroupCode == fromLocation?.WorkGroupCode); - if (job == null || job.Details.Any(p => p.RecommendToLocationCode != injectionRequestDetail.ToLocationCode)) - { - job = await BuildInjectionIssueJobCreateInputWithQtyTypeAsync(injectionRequest, fromLocation) - .ConfigureAwait(false); - jobs.Add(job); - } - - job.Details.AddRange(jobDetails); - if (injectionRequestDetail.ToBeIssuedQty < 0) - { - injectionRequestDetail.Status = EnumStatus.Close; - } - } - - jobs = jobs.Where(p => p.Details.Any()).ToList(); - - var openRequestDetails = - injectionRequest.Details.Where(p => p.Status != EnumStatus.Close).ToList(); - - if (!openRequestDetails.Any()) - { - return jobs; - } - - - var enableMultipleCreateInjectionIssueJob = await SettingManager - .IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false); - if (enableMultipleCreateInjectionIssueJob) - { - //injectionRequest.Partial(); - } - else - { - var sb = new StringBuilder(); - foreach (var openRequestDetail in openRequestDetails) - { - sb.AppendLine( - $"{openRequestDetail.ItemCode}请求数量 {openRequestDetail.Qty},可用库存数量 {openRequestDetail.IssuedQty}"); - } - - throw new UserFriendlyException($"{sb} 可用库存数量不足, 无法生成发料任务"); - } - - return jobs; - } - - /// - /// 构造注塑任务 - /// - /// - /// - /// - private async Task BuildInjectionIssueJobCreateInputWithQtyTypeAsync( - InjectionIssueRequest injectionRequest, - LocationDTO fromLocation) - { - InjectionIssueJobEditInput job; - job = ObjectMapper.Map(injectionRequest); - job.JobType = EnumJobType.IssueJob; - job.JobStatus = EnumJobStatus.Open; - job.WorkGroupCode = fromLocation.WorkGroupCode; - job.WarehouseCode = fromLocation.WarehouseCode; - job.Worker = injectionRequest.Worker; - if (string.IsNullOrEmpty(job.Worker)) - { - job.Worker = "admin"; - } - - job.InjectionIssueRequestNumber = injectionRequest.Number; - - await Task.CompletedTask.ConfigureAwait(false); - - return job; - } - - /// - /// 创建注塑任务明细 - /// - /// - /// - /// - /// - /// - private async Task> CreateInjectionIssueJobDetailInputsWithQtyTypeAsync( - InjectionIssueRequest injectionRequest, - InjectionIssueRequestDetail injectionRequestDetail, string toLocationGroupCode) - { - var jobDetails = new List(); - - //获取推荐库存 - var productionLineDto = await _productionLineAppService - .GetByLocationCodeAsync(injectionRequestDetail.ToLocationCode).ConfigureAwait(false); - var productionLineItemDtos = await _productionLineItemAppService - .GetByProductLineCodeAsync(productionLineDto.Code).ConfigureAwait(false); - if (productionLineItemDtos == null) - { - throw new UserFriendlyException($"物品代码【{injectionRequestDetail.ItemCode}】没有对应的【生产线物品关系】"); - } - - var productionLineItemDto = - productionLineItemDtos.FirstOrDefault(p => p.ItemCode == injectionRequestDetail.ItemCode); - if (productionLineItemDto == null) - { - throw new UserFriendlyException( - $"物品代码【{injectionRequestDetail.ItemCode}】在生产线【{productionLineDto.Code}】中没有对应的【生产线物品关系】"); - } - var input = new RecommendBalanceRequestInput - { - ItemCode = injectionRequestDetail.ItemCode, - Qty = injectionRequestDetail.ToBeIssuedQty, - //LocationTypes = transactionType.OutLocationTypes, productionLineItemDto.RawLocationCodeListJson - Statuses = new EditableList { EnumInventoryStatus.OK }, - Locations = JsonSerializer.Deserialize>(productionLineItemDto.RawLocationCodeListJson) - }; - - var recommendList = await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false); - //没有推荐库存时 跳过此明细 不生成任务 - if (recommendList.Count != 0) - { - foreach (var recommend in recommendList) - { - //拿走需求量 - var detail = - await BuildInjectionIssueJobDetailWithQtyTypeAsync(injectionRequestDetail, recommend, - toLocationGroupCode) - .ConfigureAwait(false); - - jobDetails.Add(detail); - - } - } - - return jobDetails; - } - - /// - /// 构造注塑任务明细 - /// - /// - /// - /// - /// - private async Task BuildInjectionIssueJobDetailWithQtyTypeAsync( - InjectionIssueRequestDetail injectionRequestDetail, BalanceDTO balance, string toLocationGroupCode) - { - var detail = new InjectionIssueJobDetailInput(); - detail.RequestLocationCode = injectionRequestDetail.ToLocationCode; - detail.RequestLocationGroup=injectionRequestDetail.ToLocationGroup; - detail.RequestLocationArea = injectionRequestDetail.ToLocationArea; - detail.RequestLocationErpCode = injectionRequestDetail.ToLocationErpCode; - detail.RequestWarehouseCode=injectionRequestDetail.ToWarehouseCode; - - detail.PositionCode = injectionRequestDetail.PositionCode; - detail.RecommendType = injectionRequestDetail.RecommendType; - detail.ProdLine = injectionRequestDetail.ToLocationCode; - - detail.ItemCode = injectionRequestDetail.ItemCode; - detail.ItemName=injectionRequestDetail.ItemName; - detail.ItemDesc1=injectionRequestDetail.ItemDesc1; - detail.ItemDesc2 = injectionRequestDetail.ItemDesc2; - detail.StdPackQty = injectionRequestDetail.StdPackQty; - detail.RequestQty= injectionRequestDetail.Qty; - - detail.Status = EnumInventoryStatus.OK; - detail.Uom = balance.Uom; - - detail.RecommendFromPackingCode = balance.PackingCode; - detail.RecommendFromContainerCode = balance.ContainerCode; - detail.RecommendFromLot = balance.Lot; - - detail.RecommendFromQty = balance.Qty; - - detail.RecommendFromSupplierBatch = balance.SupplierBatch; - detail.RecommendFromProduceDate = balance.ProduceDate; - detail.RecommendFromExpireDate = balance.ExpireDate; - detail.RecommendFromProduceDate = balance.ProduceDate; - detail.RecommendFromArriveDate = balance.ArriveDate; - - detail.RecommendFromLocationArea = balance.LocationArea; - detail.RecommendFromLocationCode = balance.LocationCode; - detail.RecommendFromLocationErpCode = balance.LocationErpCode; - detail.RecommendFromLocationGroup = balance.LocationGroup; - detail.RecommendFromWarehouseCode = balance.WarehouseCode; - - detail.RecommendToPackingCode = balance.PackingCode; - detail.RecommendToContainerCode = balance.ContainerCode; - detail.RecommendToLot = balance.Lot; - - detail.RecommendToQty = balance.Qty; - - detail.RecommendToSupplierBatch = balance.SupplierBatch; - detail.RecommendToProduceDate = balance.ProduceDate; - detail.RecommendToExpireDate = balance.ExpireDate; - detail.RecommendToProduceDate = balance.ProduceDate; - detail.RecommendToArriveDate = balance.ArriveDate; - - detail.RecommendToLocationCode = injectionRequestDetail.ToLocationCode; - detail.RecommendToLocationErpCode = injectionRequestDetail.ToLocationErpCode; - detail.RecommendToLocationArea = injectionRequestDetail.ToLocationArea; - detail.RecommendToWarehouseCode = injectionRequestDetail.ToWarehouseCode; - detail.RecommendToLocationGroup = injectionRequestDetail.ToLocationGroup; - - await Task.CompletedTask.ConfigureAwait(false); - return detail; - } - - #endregion - #region 按箱叫料 /// @@ -410,21 +156,25 @@ public class InjectionIssueRequestEventHandler .RawLocationCodeListJson) }; var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); - usableList = usableList.Where(p => !useBalanceList.Contains(p.PackingCode) && p.Qty!=0).ToList(); + usableList = usableList.Where(p => !useBalanceList.Contains(p.PackingCode) && p.Qty != 0).ToList(); if (usableList.Any()) { for (var i = 0; i < sumBoxQty; i++) { + if(usableList.Any()) + { var firstUsable = usableList.First(); useBalanceList.Add(firstUsable.PackingCode); usableList.Remove(firstUsable); var injectionJobEditInput = - await BuildInjectionIssueJobCreateInputWithBoxQtyTypeAsync(injectionRequest, inputDetailTemplate, + await BuildInjectionIssueJobCreateInputWithBoxQtyTypeAsync(injectionRequest, + inputDetailTemplate, firstUsable) .ConfigureAwait(false); inputJobs.Add(injectionJobEditInput); + } } } } @@ -471,18 +221,18 @@ public class InjectionIssueRequestEventHandler { var detail = new InjectionIssueJobDetailInput(); detail.RequestLocationCode = injectionRequestDetail.ToLocationCode; - detail.RequestLocationGroup=injectionRequestDetail.ToLocationGroup; + detail.RequestLocationGroup = injectionRequestDetail.ToLocationGroup; detail.RequestLocationArea = injectionRequestDetail.ToLocationArea; detail.RequestLocationErpCode = injectionRequestDetail.ToLocationErpCode; - detail.RequestWarehouseCode=injectionRequestDetail.ToWarehouseCode; + detail.RequestWarehouseCode = injectionRequestDetail.ToWarehouseCode; detail.PositionCode = injectionRequestDetail.PositionCode; detail.RecommendType = injectionRequestDetail.RecommendType; detail.ProdLine = injectionRequestDetail.ToLocationCode; detail.ItemCode = injectionRequestDetail.ItemCode; - detail.ItemName=injectionRequestDetail.ItemName; - detail.ItemDesc1=injectionRequestDetail.ItemDesc1; + detail.ItemName = injectionRequestDetail.ItemName; + detail.ItemDesc1 = injectionRequestDetail.ItemDesc1; detail.ItemDesc2 = injectionRequestDetail.ItemDesc2; detail.StdPackQty = injectionRequestDetail.StdPackQty; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/KittingIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/KittingIssueRequestEventHandler.cs index 204731cca..878b02ee0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/KittingIssueRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/KittingIssueRequestEventHandler.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Text; using System.Text.Json; using System.Threading.Tasks; using Castle.Components.DictionaryAdapter; @@ -13,7 +12,6 @@ using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; -using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; @@ -30,17 +28,21 @@ public class KittingIssueRequestEventHandler private readonly IProductionLineItemAppService _productionLineItemAppService; private readonly ILocationAppService _locationAppService; private readonly IBalanceAppService _balanceAppService; + //private readonly IKittingIssueRequestManager _kittingIssueRequestManager; public KittingIssueRequestEventHandler( IKittingIssueJobAppService kittingIssueJobAppService, IProductionLineAppService productionLineAppService, ILocationAppService locationAppService, - IBalanceAppService balanceAppService, IProductionLineItemAppService productionLineItemAppService) + IBalanceAppService balanceAppService, IProductionLineItemAppService productionLineItemAppService + //, IKittingIssueRequestManager kittingIssueRequestManager + ) { _kittingIssueJobAppService = kittingIssueJobAppService; _productionLineAppService = productionLineAppService; _locationAppService = locationAppService; _balanceAppService = balanceAppService; _productionLineItemAppService = productionLineItemAppService; + //_kittingIssueRequestManager = kittingIssueRequestManager; } /// @@ -49,7 +51,9 @@ public class KittingIssueRequestEventHandler /// Event data public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - await Task.CompletedTask.ConfigureAwait(false); + var entity = eventData.Entity; + + await CreateAllKittingIssueJobAsync(entity).ConfigureAwait(false); } /// @@ -58,6 +62,8 @@ public class KittingIssueRequestEventHandler /// Event data public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { + var entity = eventData.Entity; + await Task.CompletedTask.ConfigureAwait(false); } @@ -70,22 +76,7 @@ public class KittingIssueRequestEventHandler { var entity = eventData.Entity; - List kittingIssueJobs = new EditableList(); - - switch (entity.Type) - { - case nameof(EnumIssueType.BoxQty): - kittingIssueJobs = await CreateKittingIssueJobWithBoxQtyTypeAsync(entity).ConfigureAwait(false); - break; - case nameof(EnumIssueType.Qty): - kittingIssueJobs = await CreateKittingIssueJobWithQtyTypeAsync(entity).ConfigureAwait(false); - break; - } - - if (kittingIssueJobs.Any()) - { - await _kittingIssueJobAppService.CreateManyAsync(kittingIssueJobs).ConfigureAwait(false); - } + await CreateAllKittingIssueJobAsync(entity).ConfigureAwait(false); } /// @@ -116,194 +107,135 @@ public class KittingIssueRequestEventHandler #region 按数量叫料 /// - /// 创建注塑任务 + /// 创建注塑任务-按数量 /// /// + /// + /// + /// /// /// private async Task> CreateKittingIssueJobWithQtyTypeAsync - (KittingIssueRequest kittingIssueRequest) + (KittingIssueRequest kittingIssueRequest, List kittingIssueRequestDetails, + List recommendbalanceDtos, + List useBalanceList) { var jobs = new List(); + //用来临时存放所有未生成任务的发料集合 如果生成完了再这里去掉 + var tempDetailDtos = + ObjectMapper.Map, List>( + kittingIssueRequestDetails); - var toLocationCodes = kittingIssueRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList(); //所有发送库位的集合 - var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false); //所有库位的集合 + var kittingIssueJobDetailInputs = new List(); - var kittingIssueRequestDetails = kittingIssueRequest.Details.Where(p => p.ToBeIssuedQty > 0); //所有还没发送物品的集合 - foreach (var kittingIssueRequestDetail in kittingIssueRequestDetails) //如果有还有剩余未叫料的数量 则创建新的任务 + if (recommendbalanceDtos != null && recommendbalanceDtos.Count > 0) { - var toLocation = - toLocations.FirstOrDefault(p => p.Code == kittingIssueRequestDetail.ToLocationCode); //判断目标库位是否存在 - Check.NotNull(toLocation, "库位代码", $"库位 {kittingIssueRequestDetail.ToLocationCode} 不存在"); - - //创建详情 - var jobDetails = - await CreateKittingIssueJobDetailInputsWithQtyTypeAsync(kittingIssueRequest, kittingIssueRequestDetail, - toLocation.LocationGroupCode).ConfigureAwait(false); - if (!jobDetails.Any()) + var queue = new Queue(recommendbalanceDtos); + while (queue.TryDequeue(out var balanceDto)) { - continue; - } + var next = false; - var fromLocationCode = jobDetails[0].RecommendFromLocationCode; - var fromLocation = await _locationAppService.GetByCodeAsync(fromLocationCode).ConfigureAwait(false); - var job = jobs.FirstOrDefault(p => p.WorkGroupCode == fromLocation?.WorkGroupCode); - if (job == null || job.Details.Any(p => p.RecommendToLocationCode != kittingIssueRequestDetail.ToLocationCode)) - { - job = await BuildKittingIssueJobCreateInputWithQtyTypeAsync(kittingIssueRequest, fromLocation) - .ConfigureAwait(false); - jobs.Add(job); - } - - job.Details.AddRange(jobDetails); - if (kittingIssueRequestDetail.ToBeIssuedQty < 0) - { - kittingIssueRequestDetail.Status = EnumStatus.Close; - } - } + var temp = tempDetailDtos.ToList(); - jobs = jobs.Where(p => p.Details.Any()).ToList(); + foreach (var tempDetailDto in tempDetailDtos) + { + //未发送的数量 + tempDetailDto.Qty = tempDetailDto.Qty - tempDetailDto.IssuedQty; + + if (tempDetailDto.Qty > balanceDto.Qty) //需求量大于 这条推荐库存的余额 + { + tempDetailDto.Qty -= balanceDto.Qty; + } + else if (tempDetailDto.Qty <= balanceDto.Qty) + { + temp.Remove(tempDetailDto); + balanceDto.Qty = tempDetailDto.Qty; + } + + kittingIssueJobDetailInputs.Add( + await BuildKittingIssueJobDetailWithQtyTypeAsync(tempDetailDto, balanceDto) + .ConfigureAwait(false)); + useBalanceList.Add(balanceDto); + + if (balanceDto.Qty <= 0) + { + next = true; + break; + } + } - var openRequestDetails = - kittingIssueRequest.Details.Where(p => p.Status != EnumStatus.Close).ToList(); + tempDetailDtos = temp; - if (!openRequestDetails.Any()) - { - return jobs; + if (next) + { + } + } } - - var enableMultipleCreateKittingIssueJob = await SettingManager - .IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false); - if (enableMultipleCreateKittingIssueJob) + if (kittingIssueJobDetailInputs.Any()) { - //kittingIssueRequest.Partial(); - } - else - { - var sb = new StringBuilder(); - foreach (var openRequestDetail in openRequestDetails) - { - sb.AppendLine( - $"{openRequestDetail.ItemCode}请求数量 {openRequestDetail.Qty},可用库存数量 {openRequestDetail.IssuedQty}"); - } - - throw new UserFriendlyException($"{sb} 可用库存数量不足, 无法生成发料任务"); + var kittingIssueJobEditInput = new KittingIssueJobEditInput(); + kittingIssueJobEditInput = await BuildKittingIssueJobCreateInputWithQtyTypeAsync(kittingIssueRequest, + kittingIssueRequestDetails.First()).ConfigureAwait(false); + kittingIssueJobEditInput.Details = kittingIssueJobDetailInputs; + jobs.Add(kittingIssueJobEditInput); } return jobs; } /// - /// 构造注塑任务 + /// 构造注塑任务-按数量 /// /// - /// + /// /// private async Task BuildKittingIssueJobCreateInputWithQtyTypeAsync( - KittingIssueRequest kittingIssueRequest, - LocationDTO fromLocation) + KittingIssueRequest kittingIssueRequest, KittingIssueRequestDetail requestDetailInput) { - KittingIssueJobEditInput job; - job = ObjectMapper.Map(kittingIssueRequest); + var job = ObjectMapper.Map(kittingIssueRequest); job.JobType = EnumJobType.IssueJob; job.JobStatus = EnumJobStatus.Open; - job.WorkGroupCode = fromLocation.WorkGroupCode; - job.WarehouseCode = fromLocation.WarehouseCode; + job.WorkGroupCode = requestDetailInput.ToLocationGroup; + job.WarehouseCode = requestDetailInput.ToWarehouseCode; job.Worker = kittingIssueRequest.Worker; - if (string.IsNullOrEmpty(job.Worker)) - { - job.Worker = "admin"; - } - job.KittingRequestNumber = kittingIssueRequest.Number; + job.EnumIssueSendType = EnumIssueSendType.QtyType; await Task.CompletedTask.ConfigureAwait(false); return job; } - /// - /// 创建注塑任务明细 - /// - /// - /// - /// - /// - /// - private async Task> CreateKittingIssueJobDetailInputsWithQtyTypeAsync( - KittingIssueRequest kittingIssueRequest, - KittingIssueRequestDetail kittingIssueRequestDetail, string toLocationGroupCode) - { - var jobDetails = new List(); - - //获取推荐库存 - var productionLineDto = await _productionLineAppService - .GetByLocationCodeAsync(kittingIssueRequestDetail.ToLocationCode).ConfigureAwait(false); - var productionLineItemDtos = await _productionLineItemAppService - .GetByProductLineCodeAsync(productionLineDto.Code).ConfigureAwait(false); - if (productionLineItemDtos == null) - { - throw new UserFriendlyException($"物品代码【{kittingIssueRequestDetail.ItemCode}】没有对应的【生产线物品关系】"); - } - - var productionLineItemDto = - productionLineItemDtos.FirstOrDefault(p => p.ItemCode == kittingIssueRequestDetail.ItemCode); - var input = new RecommendBalanceRequestInput - { - ItemCode = kittingIssueRequestDetail.ItemCode, - Qty = kittingIssueRequestDetail.ToBeIssuedQty, - //LocationTypes = transactionType.OutLocationTypes, productionLineItemDto.RawLocationCodeListJson - Statuses = new EditableList { EnumInventoryStatus.OK }, - Locations = JsonSerializer.Deserialize>(productionLineItemDto.RawLocationCodeListJson) - }; - - var recommendList = await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false); - //没有推荐库存时 跳过此明细 不生成任务 - if (recommendList.Count != 0) - { - foreach (var recommend in recommendList) - { - //拿走需求量 - var detail = - await BuildKittingIssueJobDetailWithQtyTypeAsync(kittingIssueRequestDetail, recommend, - toLocationGroupCode) - .ConfigureAwait(false); - if (kittingIssueRequest.UseOnTheWayLocation) - { - //获取在途库 - var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT) - .ConfigureAwait(false); - - detail.OnTheWayLocationCode = locationDto.Code; - } - - jobDetails.Add(detail); - kittingIssueRequestDetail.IssuedQty += recommend.Qty; - - //await _kittingIssueRequestManager.UpdateDetailsAsync(kittingIssueRequest).ConfigureAwait(false); - } - } - - return jobDetails; - } /// - /// 构造注塑任务明细 + /// 构造注塑任务明细-按数量 /// /// /// - /// /// private async Task BuildKittingIssueJobDetailWithQtyTypeAsync( - KittingIssueRequestDetail kittingIssueRequestDetail, BalanceDTO balance, string toLocationGroupCode) + KittingIssueRequestDetailDTO kittingIssueRequestDetail, BalanceDTO balance) { - //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); - - var detail = ObjectMapper.Map(balance); + var detail = new KittingIssueJobDetailInput(); detail.RequestLocationCode = kittingIssueRequestDetail.ToLocationCode; detail.PositionCode = kittingIssueRequestDetail.PositionCode; detail.RecommendType = kittingIssueRequestDetail.RecommendType; + detail.Uom = balance.Uom; + detail.ItemCode = balance.ItemCode; + detail.ItemDesc2 = balance.ItemDesc2; + detail.ItemDesc1 = balance.ItemDesc1; + detail.ItemName = balance.ItemName; + detail.ProdLine = kittingIssueRequestDetail.ProdLine; + detail.RequestQty = balance.Qty; + detail.StdPackQty = kittingIssueRequestDetail.StdPackQty; + detail.Status = balance.Status; + + detail.RequestLocationErpCode = kittingIssueRequestDetail.ToLocationErpCode; + detail.RequestLocationArea = kittingIssueRequestDetail.ToLocationArea; + detail.RequestWarehouseCode = kittingIssueRequestDetail.ToWarehouseCode; + detail.RequestLocationGroup = kittingIssueRequestDetail.ToLocationGroup; + detail.RequestLocationCode = kittingIssueRequestDetail.ToLocationCode; detail.RecommendFromPackingCode = balance.PackingCode; detail.RecommendFromContainerCode = balance.ContainerCode; @@ -313,21 +245,69 @@ public class KittingIssueRequestEventHandler detail.RecommendFromLot = balance.Lot; detail.RecommendFromProduceDate = balance.ProduceDate; detail.RecommendFromArriveDate = balance.ArriveDate; + detail.RecommendFromQty = balance.Qty; + detail.RecommendFromContainerCode = balance.ContainerCode; + detail.RecommendFromPackingCode = balance.PackingCode; + + detail.RecommendToPackingCode = balance.PackingCode; + detail.RecommendToContainerCode = balance.ContainerCode; + detail.RecommendToSupplierBatch = balance.SupplierBatch; + detail.RecommendToProduceDate = balance.ProduceDate; + detail.RecommendToExpireDate = balance.ExpireDate; + detail.RecommendToLot = balance.Lot; + detail.RecommendToProduceDate = balance.ProduceDate; + detail.RecommendToArriveDate = balance.ArriveDate; + detail.RecommendToQty = balance.Qty; + detail.RecommendToContainerCode = balance.ContainerCode; + detail.RecommendToPackingCode = balance.PackingCode; + detail.RecommendFromLocationArea = balance.LocationArea; detail.RecommendFromLocationCode = balance.LocationCode; detail.RecommendFromLocationErpCode = balance.LocationErpCode; detail.RecommendFromLocationGroup = balance.LocationGroup; detail.RecommendFromWarehouseCode = balance.WarehouseCode; - detail.RecommendFromQty = balance.Qty; - detail.Uom = balance.Uom; detail.RecommendToLocationCode = kittingIssueRequestDetail.ToLocationCode; detail.RecommendToLocationErpCode = kittingIssueRequestDetail.ToLocationErpCode; detail.RecommendToLocationArea = kittingIssueRequestDetail.ToLocationArea; detail.RecommendToWarehouseCode = kittingIssueRequestDetail.ToWarehouseCode; + detail.RecommendToLocationGroup = kittingIssueRequestDetail.ToLocationGroup; + + detail.TransferLibFromPackingCode = balance.PackingCode; + detail.TransferLibFromContainerCode = balance.ContainerCode; + detail.TransferLibFromSupplierBatch = balance.SupplierBatch; + detail.TransferLibFromProduceDate = balance.ProduceDate; + detail.TransferLibFromExpireDate = balance.ExpireDate; + detail.TransferLibFromLot = balance.Lot; + detail.TransferLibFromProduceDate = balance.ProduceDate; + detail.TransferLibFromArriveDate = balance.ArriveDate; + detail.TransferLibFromQty = balance.Qty; + detail.TransferLibFromContainerCode = balance.ContainerCode; + detail.TransferLibFromPackingCode = balance.PackingCode; + + detail.TransferLibToPackingCode = balance.PackingCode; + detail.TransferLibToContainerCode = balance.ContainerCode; + detail.TransferLibToSupplierBatch = balance.SupplierBatch; + detail.TransferLibToProduceDate = balance.ProduceDate; + detail.TransferLibToExpireDate = balance.ExpireDate; + detail.TransferLibToLot = balance.Lot; + detail.TransferLibToProduceDate = balance.ProduceDate; + detail.TransferLibToArriveDate = balance.ArriveDate; + detail.TransferLibToQty = balance.Qty; + detail.TransferLibToPackingCode = balance.PackingCode; + + detail.TransferLibFromLocationArea = balance.LocationArea; + detail.TransferLibFromLocationCode = balance.LocationCode; + detail.TransferLibFromLocationErpCode = balance.LocationErpCode; + detail.TransferLibFromLocationGroup = balance.LocationGroup; + detail.TransferLibFromWarehouseCode = balance.WarehouseCode; + + detail.TransferLibToLocationCode = kittingIssueRequestDetail.ToLocationCode; + detail.TransferLibToLocationErpCode = kittingIssueRequestDetail.ToLocationErpCode; + detail.TransferLibToLocationArea = kittingIssueRequestDetail.ToLocationArea; + detail.TransferLibToWarehouseCode = kittingIssueRequestDetail.ToWarehouseCode; + detail.TransferLibToLocationGroup = kittingIssueRequestDetail.ToLocationGroup; - //detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; - detail.ProdLine = toLocationGroupCode; await Task.CompletedTask.ConfigureAwait(false); return detail; } @@ -337,72 +317,71 @@ public class KittingIssueRequestEventHandler #region 按箱叫料 /// - /// 创建注塑任务 + /// 创建注塑任务 按箱叫料-按箱 /// /// + /// + /// + /// /// /// private async Task> CreateKittingIssueJobWithBoxQtyTypeAsync - (KittingIssueRequest kittingIssueRequest) + ( + KittingIssueRequest kittingIssueRequest, + List kittingIssueRequestDetailList, + List recommendbalanceDtos, + List useBalanceList) { var inputJobs = new List(); - var inputExpectOutEditInput = new ExpectOutEditInput(); - //已用的库存的箱码集合 - var useBalanceList = new List(); - var groupByItemCodeAndLocationCode = - kittingIssueRequest.Details.GroupBy(p => new { p.ItemCode, p.ToLocationCode }); + //已用的库存的集合 + useBalanceList = useBalanceList; - foreach (var locationCodeItemCodeGroup in groupByItemCodeAndLocationCode) + foreach (var detail in kittingIssueRequestDetailList) { - var inputDetails = kittingIssueRequest.Details.Where(p => - p.ItemCode == locationCodeItemCodeGroup.Key.ItemCode && - p.ToLocationCode == locationCodeItemCodeGroup.Key.ToLocationCode); - var inputDetailTemplate = inputDetails.First(); + //当前零件的集合 + var inputDetails = kittingIssueRequestDetailList; //获取请求下 这个零件和这个库位一个需要多少箱 - var sumBoxQty = inputDetails.Sum(p => p.BoxQty); + var sumBoxQty = inputDetails.Sum(p => p.BoxQty - p.IssuedQty); //获取生产线 var productionLineDto = await _productionLineAppService .GetByLocationCodeAsync(inputDetails.First().ToLocationCode).ConfigureAwait(false); - if (productionLineDto == null) - { - throw new UserFriendlyException($"库位【{inputDetailTemplate.ToLocationCode}】没有对应的【生产线】"); - } + var productLineCodeAndItemCode = await _productionLineItemAppService - .GetByProductLineCodeAndItemCodeAsync(productionLineDto.Code, inputDetailTemplate.ItemCode) + .GetByProductLineCodeAndItemCodeAsync(productionLineDto.Code, detail.ItemCode) .ConfigureAwait(false); if (productLineCodeAndItemCode == null) { throw new UserFriendlyException( - $"物品代码【{inputDetailTemplate.ItemCode}】在生产线【{productionLineDto.Code}】中没有对应的【生产线物品关系】"); + $"物品代码【{detail.ItemCode}】在生产线【{productionLineDto.Code}】中没有对应的【生产线物品关系】"); } - //获取可用库存 - var input = new RecommendBalanceRequestInput - { - ItemCode = locationCodeItemCodeGroup.Key.ItemCode, - Qty = decimal.MaxValue, - Statuses = new EditableList { EnumInventoryStatus.OK }, - Locations = JsonSerializer.Deserialize>(productLineCodeAndItemCode - .RawLocationCodeListJson) - }; - var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); - usableList = usableList.Where(p => !useBalanceList.Contains(p.PackingCode)).ToList(); + //可用库存 + var usableList = recommendbalanceDtos; + usableList = usableList.Where(p => !useBalanceList.Select(p => p.PackingCode).Contains(p.PackingCode)) + .ToList(); if (usableList.Any()) { for (var i = 0; i < sumBoxQty; i++) { - var firstUsable = usableList.First(); - useBalanceList.Add(firstUsable.PackingCode); - usableList.Remove(firstUsable); - - var kittingIssueJobEditInput = - await BuildKittingIssueJobCreateInputWithBoxQtyTypeAsync(kittingIssueRequest, inputDetailTemplate, - firstUsable) - .ConfigureAwait(false); - - inputJobs.Add(kittingIssueJobEditInput); + if (usableList.Any()) + { + var firstUsable = usableList.First(); + useBalanceList.Add(firstUsable); + usableList.Remove(firstUsable); + + var kittingIssueJobEditInput = + await BuildKittingIssueJobCreateInputWithBoxQtyTypeAsync(kittingIssueRequest, + detail, firstUsable) + .ConfigureAwait(false); + + inputJobs.Add(kittingIssueJobEditInput); + } + else + { + break; + } } } } @@ -411,7 +390,7 @@ public class KittingIssueRequestEventHandler } /// - /// 构造注塑任务 + /// 构造注塑任务-按箱 /// /// /// @@ -428,6 +407,7 @@ public class KittingIssueRequestEventHandler job.WarehouseCode = kittingIssueRequestDetail.ToWarehouseCode; job.Worker = kittingIssueRequest.Worker; job.KittingRequestNumber = kittingIssueRequest.Number; + job.EnumIssueSendType = EnumIssueSendType.BoxQtyType; job.Details.Add(await BuildKittingIssueJobDetailWithBoxQtyTypeAsync(kittingIssueRequestDetail, balanceDtos) .ConfigureAwait(false)); @@ -438,7 +418,7 @@ public class KittingIssueRequestEventHandler } /// - /// 构造注塑任务明细 + /// 构造注塑任务明细-按箱 /// /// /// @@ -453,6 +433,7 @@ public class KittingIssueRequestEventHandler detail.RequestLocationArea = kittingIssueRequestDetail.ToLocationArea; detail.RequestLocationErpCode = kittingIssueRequestDetail.ToLocationErpCode; detail.RequestWarehouseCode = kittingIssueRequestDetail.ToWarehouseCode; + detail.RequestQty = 1; detail.PositionCode = kittingIssueRequestDetail.PositionCode; detail.RecommendType = kittingIssueRequestDetail.RecommendType; @@ -509,4 +490,174 @@ public class KittingIssueRequestEventHandler #endregion #endregion + + //创建任务 + private async Task> CreateAllKittingIssueJobAsync( + KittingIssueRequest kittingIssueRequest) + { + var kittingIssueJobEditInputs = new List(); + + //已用的库存的集合 + var useBalanceList = new List(); + + foreach (var groupbyItemCodeAndProdLine in kittingIssueRequest.Details.GroupBy(p => + new { p.ItemCode })) + { + foreach (var kittingIssueRequestDetail in groupbyItemCodeAndProdLine) + { + var productionLineItemDto = await _productionLineItemAppService.GetByProductLineCodeAndItemCodeAsync( + kittingIssueRequestDetail.ProdLine, + groupbyItemCodeAndProdLine.Key.ItemCode).ConfigureAwait(false); + + if (productionLineItemDto == null) + { + throw new UserFriendlyException( + $"未在生产线【{kittingIssueRequestDetail.ProdLine}】物品【{groupbyItemCodeAndProdLine.Key.ItemCode}】的关系,请查看【生产线物品关系】"); + } + + //原料 + if (!string.IsNullOrEmpty(productionLineItemDto.RawLocationCodeListJson)) //因为一个零件 要不是原料 要不是半成品 + { + var usableLocationCode = + JsonSerializer.Deserialize>(productionLineItemDto.RawLocationCodeListJson); + if (usableLocationCode.Any()) + { + //获取可用库存 + var input = new RecommendBalanceRequestInput + { + ItemCode = kittingIssueRequestDetail.ItemCode, + Qty = decimal.MaxValue, + Statuses = new EditableList { EnumInventoryStatus.OK }, + Locations = + JsonSerializer.Deserialize>(productionLineItemDto.RawLocationCodeListJson), + IsPackingCode = true + }; + var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); + + //因为是按箱叫料 先把值赋值给箱数量上 + kittingIssueRequestDetail.BoxQty = kittingIssueRequestDetail.Qty; + + if (usableList.Any()) + { + //因为是原料所以按箱叫料 + kittingIssueJobEditInputs.AddRange( + await CreateKittingIssueJobWithBoxQtyTypeAsync(kittingIssueRequest, + new EditableList { kittingIssueRequestDetail }, + usableList, + useBalanceList).ConfigureAwait(false)); + } + } + } + + //半成品 + if (!string.IsNullOrEmpty(productionLineItemDto.ProductLocationCodeListJson)) //因为一个零件 要不是原料 要不是半成品 + { + var usableLocationCode = + JsonSerializer.Deserialize>(productionLineItemDto.ProductLocationCodeListJson); + if (usableLocationCode.Any()) + { + //获取可用库存 + var input = new RecommendBalanceRequestInput + { + ItemCode = groupbyItemCodeAndProdLine.Key.ItemCode, + Qty = kittingIssueRequestDetail.Qty, + Statuses = new EditableList { EnumInventoryStatus.OK }, + Locations = + JsonSerializer.Deserialize>(productionLineItemDto + .ProductLocationCodeListJson), + IsPackingCode = false + }; + var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); + var temp = usableList.ToList(); + + foreach (var balanceDto in usableList) //计算已经用过的库存 + { + var useBalanceDto = useBalanceList.Where(p => + p.ItemCode == balanceDto.ItemCode && p.LocationCode == balanceDto.LocationCode && + p.Lot == balanceDto.Lot && p.Status == balanceDto.Status && + p.PackingCode == balanceDto.PackingCode); + if (useBalanceDto.Any()) //如果不为NULL,就是用过了的库存 需要减去使用量 + { + balanceDto.Qty -= useBalanceDto.Sum(p => p.Qty); + if (balanceDto.Qty <= 0) + { + temp.Remove(balanceDto); + } + } + } + + usableList = temp; + + kittingIssueJobEditInputs.AddRange( + await CreateKittingIssueJobWithQtyTypeAsync(kittingIssueRequest, + new List { kittingIssueRequestDetail }, temp, + useBalanceList).ConfigureAwait(false)); + } + } + } + } + + if (kittingIssueJobEditInputs.Count > 0) //有库存 可以创建任务 + { + //新增任务 + var addKittingIssueJobDtos = await _kittingIssueJobAppService.CreateManyAsync(kittingIssueJobEditInputs) + .ConfigureAwait(false); + + await UpdateKittingIssueRequestDetailQtyAsync(kittingIssueRequest, addKittingIssueJobDtos) + .ConfigureAwait(false); + + return addKittingIssueJobDtos; + } + + return new List(); + } + + /// + /// 修改请求的 已发 已收数量 + /// + /// + /// + /// + private async Task UpdateKittingIssueRequestDetailQtyAsync(KittingIssueRequest kittingIssueRequest, + List addKittingIssueJobDtos) + { + //原有任务 + var existKittingIssueJobDtos = await _kittingIssueJobAppService + .GetByRequestNumberAsync(kittingIssueRequest.Number) + .ConfigureAwait(false); + + //新增的任务和已有的任务总和 + var allKittingIssueJobDtos = new List(); + allKittingIssueJobDtos.AddRange(addKittingIssueJobDtos); + allKittingIssueJobDtos.AddRange(existKittingIssueJobDtos); + + var groupByItemCodeLocationCode = kittingIssueRequest.Details.GroupBy(p => + new { p.ItemCode, p.ToLocationCode }); + foreach (var group in groupByItemCodeLocationCode) + { + foreach (var requestDetail in group) + { + //所有已发数量 + decimal allIssuedQty = 0; + + //所有已发数量 + decimal allReceivedQty = 0; + + foreach (var allKittingIssueJobDto in allKittingIssueJobDtos) + { + var jobDetailDtos = allKittingIssueJobDto.Details.Where(p => + p.ItemCode == group.Key.ItemCode && p.RequestLocationCode == group.Key.ToLocationCode); + //所有已发数量 + allIssuedQty += jobDetailDtos.Sum(p => p.RequestQty); + //所有已发数量 + allReceivedQty += jobDetailDtos.Sum(p => p.HandledToQty); + } + + requestDetail.IssuedQty += allIssuedQty; + requestDetail.ReceivedQty += allReceivedQty; + } + } + + //await _kittingIssueRequestManager.UpdateAsync(kittingIssueRequest).ConfigureAwait(false); + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/KittingPackagingNoteHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/KittingPackagingNoteHandler.cs index 0062b8f79..d3f34885b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/KittingPackagingNoteHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/KittingPackagingNoteHandler.cs @@ -24,13 +24,15 @@ public class KittingPackagingNoteEventHandler private readonly IProductionLineAppService _productionLineAppService; private readonly IProductionLineItemAppService _productionLineItemAppService; private readonly ILocationAppService _locationAppService; + private readonly ITransferLogAppService _transferLogAppService; public KittingPackagingNoteEventHandler( - IProductionLineAppService productionLineAppService, ILocationAppService locationAppService, IProductionLineItemAppService productionLineItemAppService) + IProductionLineAppService productionLineAppService, ILocationAppService locationAppService, IProductionLineItemAppService productionLineItemAppService, ITransferLogAppService transferLogAppService) { _productionLineAppService = productionLineAppService; _locationAppService = locationAppService; _productionLineItemAppService = productionLineItemAppService; + _transferLogAppService = transferLogAppService; } [UnitOfWork] @@ -38,7 +40,7 @@ public class KittingPackagingNoteEventHandler { var entity = eventData.Entity; var transferLogEditInputs = await BuildTransferLogsAsync(entity).ConfigureAwait(false); - await TransferLogAppService.AddManyAsync(transferLogEditInputs).ConfigureAwait(false); + await _transferLogAppService.AddManyAsync(transferLogEditInputs).ConfigureAwait(false); } [UnitOfWork] @@ -51,7 +53,7 @@ public class KittingPackagingNoteEventHandler transferLogCreateInputs.AddRange(await BuildTransferLogsAsync(entitie).ConfigureAwait(false)); } - await TransferLogAppService.AddManyAsync(transferLogCreateInputs).ConfigureAwait(false); + await _transferLogAppService.AddManyAsync(transferLogCreateInputs).ConfigureAwait(false); } /// @@ -73,7 +75,11 @@ public class KittingPackagingNoteEventHandler //Kitting线边库位 var kittingLocation = - await LocationAclService.GetFirstByTypeAsync(EnumLocationType.KittingWip).ConfigureAwait(false); + await _locationAppService.GetFirstByTypeAsync(EnumLocationType.KittingWip).ConfigureAwait(false); + if (kittingLocation == null) + { + throw new UserFriendlyException("没有设置Kitting线边库位"); + } foreach (var detail in kittingPackagingNote.Details.Where(detail => detail.Qty != 0)) { @@ -81,14 +87,14 @@ public class KittingPackagingNoteEventHandler if (productionLineItemDtos == null) { var strProductionLine = string.Empty; - productionLineList.ForEach(dto => strProductionLine += " " + dto.Code); - throw new UserFriendlyException($"没有在 生产线代码列表中找到【{strProductionLine}】物料代码【{detail.ItemCode}】的配置"); + productionLineList.ForEach(dto => strProductionLine += dto.Code+ ","); + throw new UserFriendlyException($"没有在 【生产线零件】中找到 生产线代码【{strProductionLine.Remove(strProductionLine.Length-1)}】物料代码【{detail.ItemCode}】的配置"); } var list = JsonSerializer.Deserialize>(productionLineItemDtos.WipLocationCodeListJson); if (list == null || list.Count < 1) { - throw new UserFriendlyException($"没有在 生产线代码【{productionLineItemDtos.ProdLineCode}】物料代码【{detail.ItemCode}】中配置线边库位"); + throw new UserFriendlyException($"没有在 【生产线零件】中 生产线代码【{productionLineItemDtos.ProdLineCode}】物料代码【{detail.ItemCode}】中配置线边库位"); } var assembleFirstLocationCode = list.First();