diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs index 809c11b66..0d9ebb392 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs @@ -156,8 +156,7 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase } #endregion - #region --接口以关闭-- 退货单 CustomerReturn wmsoutm - //暂无此接口 + #region 客户退货单 CustomerReturn wmsoutm Logger.LogInformation($"Write CustomerReturnNote");//退货单 var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService(); var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false); diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs index a671ec107..6ab0ce990 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs @@ -60,10 +60,10 @@ public class AssembleIssueJobsController : AbpController { MaxResultCount = pageSize, SkipCount = (pageIndex - 1) * pageSize, - Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC", + Sorting = $"{nameof(AssembleIssueJobDTO.JobStatus)} ASC,{nameof(AssembleIssueJobDTO.CreationTime)} ASC", Condition = new Condition { - Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") } + Filters = new List { new(nameof(AssembleIssueJobDTO.JobStatus), jsonStatus, "In") } } }; diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs index e51636f82..e0c042c3d 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs @@ -60,10 +60,10 @@ public class CoatingIssueJobsController : AbpController { MaxResultCount = pageSize, SkipCount = (pageIndex - 1) * pageSize, - Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC", + Sorting = $"{nameof(CoatingIssueJobDTO.JobStatus)} ASC,{nameof(CoatingIssueJobDTO.CreationTime)} ASC", Condition = new Condition { - Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") } + Filters = new List { new(nameof(CoatingIssueJobDTO.JobStatus), jsonStatus, "In") } } }; diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs index b9f0dc3f8..ba2c33478 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs @@ -60,10 +60,10 @@ public class InjectionIssueJobsController : AbpController { MaxResultCount = pageSize, SkipCount = (pageIndex - 1) * pageSize, - Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC", + Sorting = $"{nameof(InjectionIssueJobDTO.JobStatus)} ASC,{nameof(InjectionIssueJobDTO.CreationTime)} ASC", Condition = new Condition { - Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") } + Filters = new List { new(nameof(InjectionIssueJobDTO.JobStatus), jsonStatus, "In") } } }; 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 index 7ce5bb355..9efc9c252 100644 --- 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 @@ -60,10 +60,10 @@ public class KittingIssueJobsController : AbpController { MaxResultCount = pageSize, SkipCount = (pageIndex - 1) * pageSize, - Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC", + Sorting = $"{nameof(KittingIssueJobDTO.JobStatus)} ASC,{nameof(KittingIssueJobDTO.CreationTime)} ASC", Condition = new Condition { - Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") } + Filters = new List { new(nameof(KittingIssueJobDTO.JobStatus), jsonStatus, "In") } } }; diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs index fe5ac52ef..2c6555ca0 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs @@ -60,10 +60,10 @@ public class SparePartIssueJobsController : AbpController { MaxResultCount = pageSize, SkipCount = (pageIndex - 1) * pageSize, - Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC", + Sorting = $"{nameof(SparePartIssueJobDTO.JobStatus)} ASC,{nameof(SparePartIssueJobDTO.CreationTime)} ASC", Condition = new Condition { - Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") } + Filters = new List { new(nameof(SparePartIssueJobDTO.JobStatus), jsonStatus, "In") } } }; diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs index 3bd5ffa48..d04a1c455 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs @@ -15,6 +15,7 @@ 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; namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs; @@ -46,5 +47,136 @@ public class ThirdLocationJobController : AbpController _dictApp = dictApp; } - + /// + /// 执行任务明细 + /// + /// + [HttpPost("ExecuteDetail/{masterId}")] + public async Task ExecuteDetailAsync(Guid masterId, List detailDtoList) + { + await _thirdLocationJobAppService.ExecuteDetailAsync(masterId,detailDtoList).ConfigureAwait(false); + } + + /// + /// 获取上架任务详情 + /// + /// + /// + [HttpGet("{id}")] + + public virtual async Task> GetAsync(Guid id) + { + var result = await _thirdLocationJobAppService.GetAsync(id).ConfigureAwait(false); + return Ok(result); + } + + /// + /// 获取列表 + /// + /// + /// + /// + [HttpGet("list")] + public virtual async Task> GetListAsync(int pageSize, int pageIndex) + { + var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); + //var jsonCodes = JsonSerializer.Serialize(wlgCodes); + + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing ,(int)EnumJobStatus.Partial}; + var jsonStatus = JsonSerializer.Serialize(status); + + var request = new SfsJobRequestInputBase + { + MaxResultCount = pageSize, + SkipCount = (pageIndex - 1) * pageSize, + Sorting = $"{nameof(ThirdLocationJobDTO.Priority)} ASC", + Condition = new Condition + { + Filters = new List + { + //new(nameof(ThirdLocationJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In") + } + } + }; + + var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); + return list; + } + + /// + /// 获取列表 筛选 + /// + /// + /// + [HttpPost("list")] + public virtual async Task> GetListAsync(SfsJobRequestInputBase sfsRequestDTO) + { + var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false); + return list; + } + + /// + /// 获取任务数量 + /// + /// + [HttpGet("count")] + public virtual async Task> CountAsync() + { + var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); + var jsonCodes = JsonSerializer.Serialize(wlgCodes); + + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing ,(int)EnumJobStatus.Partial}; + var jsonStatus = JsonSerializer.Serialize(status); + + var request = new SfsJobRequestInputBase + { + Sorting = $"{nameof(ThirdLocationJobDTO.Priority)} ASC", + Condition = new Condition + { + Filters = new List + { + new(nameof(ThirdLocationJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In") + } + } + }; + + var count = await _thirdLocationJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false); + + return Ok(count); + } + + /// + /// 承接任务 + /// + /// + /// + [HttpPost("take/{id}")] + public virtual async Task TakeAsync(Guid id) + { + await _thirdLocationJobAppService.AcceptAsync(id).ConfigureAwait(false); + } + + /// + /// 取消承接任务 + /// + /// + /// + [HttpPost("cancel-take/{id}")] + public virtual async Task CancelTakeAsync(Guid id) + { + await _thirdLocationJobAppService.CancelAcceptAsync(id).ConfigureAwait(false); + } + + /// + /// 完成任务 + /// + /// + /// + [HttpPost("Complete/{id}")] + public async Task CompleteAsync(Guid id) + { + await _thirdLocationJobAppService.CompleteAsync(id).ConfigureAwait(false); + } } diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs index 529776dbb..373071d48 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs @@ -120,6 +120,4 @@ public class ThirdLocationRequestController : AbpController var result = await _thirdLocationRequestAppService.CompleteAsync(id).ConfigureAwait(false); return Ok(result); } - - } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs index 7f7c482c6..bc84be04e 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs @@ -11,6 +11,10 @@ using Win_in.Sfs.Basedata.Domain.Shared; namespace Win_in.Sfs.Basedata.Application.Contracts; public class SplitPackingRecDTO : SfsBaseDataDTOBase + , IHasPurchaseInfoDto + , IHasProductionInfoDto + , IHasQualityInfoDto + { /// /// 操作类型 @@ -156,5 +160,163 @@ public class SplitPackingRecDTO : SfsBaseDataDTOBase [Display(Name = "标签类型")] public EnumLabelType LabelType { get; set; } + + + + + #region InventoryLabel兼容成员 + + /// + /// 完整条码文本 + /// + [Display(Name = "完整条码文本")] + public string FullBarcodeString { get; set; } + + /// + /// 供应商批次 + /// + [Display(Name = "供应商批次")] + public string SupplierBatch { get; set; } + + /// + /// 到货时间 + /// + [Display(Name = "summary")] + public DateTime ArriveDate { get; set; } + + /// + /// 生产时间 + /// + [Display(Name = "生产时间")] + public DateTime ProduceDate { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpireDate { get; set; } + + /// + /// 标签状态 + /// + [Display(Name = "标签状态")] + public LabelStatus LabelStatus { get; set; } + + /// + /// 建议库位 + /// + [Display(Name = "建议库位")] + public string RecommendLocationCode { get; set; } + + /// + /// 目标ERP库位 + /// + [Display(Name = "目标ERP库位")] + public string LocationErpCode { get; set; } + + /// + /// 托标签号 + /// + [Display(Name = "托标签号")] + public string ContainerCode { get; set; } + + #region 三个子实体成员 + //-----------------------QualityInfo + /// + /// 质量级别 + /// + [Display(Name = "质量级别")] + public string QLevel { get; set; } + + /// + /// 质检文件 + /// + [Display(Name = "质检文件")] + public string QualityFile { get; set; } + + //----------------------PurchaseInfo + /// + /// 供应商代码 + /// + [Display(Name = "供应商代码")] + public string SupplierCode { get; set; } + + /// + /// 订单号 + /// + [Display(Name = "订单号")] + public string PoNumber { get; set; } + + /// + /// 要货看板号 + /// + [Display(Name = "要货看板号")] + public string RpNumber { get; set; } + + /// + /// 发货单号 + /// + [Display(Name = "发货单号")] + public string AsnNumber { get; set; } + + //--------------------------------ProductionInfo + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 班组 + /// + [Display(Name = "班组")] + public string Team { get; set; } + + /// + /// 班次 + /// + [Display(Name = "班次")] + public string Shift { get; set; } + + #endregion + + /// + /// 规格 + /// + [Display(Name = "规格")] + public string Specifications { get; set; } + + /// + /// 供应商名称 + /// + [Display(Name = "供应商名称")] + public string SupplierName { get; set; } + + /// + /// 供应商简称 + /// + [Display(Name = "供应商简称")] + public string SupplierSimpleName { get; set; } + + /// + /// 供应商ERP料号 + /// + [Display(Name = "供应商ERP料号")] + public string SupplierItemCode { get; set; } + + /// + /// 供应商物品名 + /// + [Display(Name = "供应商物品名")] + public string SupplierItemName { get; set; } + + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } + #endregion + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs index 1715995bc..1a450a8fc 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs @@ -13,6 +13,9 @@ namespace Win_in.Sfs.Basedata.Application.Contracts; public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase + , IHasPurchaseInfoDto + , IHasProductionInfoDto + , IHasQualityInfoDto { /// /// 操作类型 @@ -159,4 +162,162 @@ public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase /// 标签类型 /// public EnumLabelType LabelType { get; set; } + + + + + #region InventoryLabel兼容成员 + + /// + /// 完整条码文本 + /// + [Display(Name = "完整条码文本")] + public string FullBarcodeString { get; set; } + + /// + /// 供应商批次 + /// + [Display(Name = "供应商批次")] + public string SupplierBatch { get; set; } + + /// + /// 到货时间 + /// + [Display(Name = "summary")] + public DateTime ArriveDate { get; set; } + + /// + /// 生产时间 + /// + [Display(Name = "生产时间")] + public DateTime ProduceDate { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpireDate { get; set; } + + /// + /// 标签状态 + /// + [Display(Name = "标签状态")] + public LabelStatus LabelStatus { get; set; } + + /// + /// 建议库位 + /// + [Display(Name = "建议库位")] + public string RecommendLocationCode { get; set; } + + /// + /// 目标ERP库位 + /// + [Display(Name = "目标ERP库位")] + public string LocationErpCode { get; set; } + + /// + /// 托标签号 + /// + [Display(Name = "托标签号")] + public string ContainerCode { get; set; } + + #region 三个子实体成员 + //-----------------------QualityInfo + /// + /// 质量级别 + /// + [Display(Name = "质量级别")] + public string QLevel { get; set; } + + /// + /// 质检文件 + /// + [Display(Name = "质检文件")] + public string QualityFile { get; set; } + + //----------------------PurchaseInfo + /// + /// 供应商代码 + /// + [Display(Name = "供应商代码")] + public string SupplierCode { get; set; } + + /// + /// 订单号 + /// + [Display(Name = "订单号")] + public string PoNumber { get; set; } + + /// + /// 要货看板号 + /// + [Display(Name = "要货看板号")] + public string RpNumber { get; set; } + + /// + /// 发货单号 + /// + [Display(Name = "发货单号")] + public string AsnNumber { get; set; } + + //--------------------------------ProductionInfo + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 班组 + /// + [Display(Name = "班组")] + public string Team { get; set; } + + /// + /// 班次 + /// + [Display(Name = "班次")] + public string Shift { get; set; } + + #endregion + + /// + /// 规格 + /// + [Display(Name = "规格")] + public string Specifications { get; set; } + + /// + /// 供应商名称 + /// + [Display(Name = "供应商名称")] + public string SupplierName { get; set; } + + /// + /// 供应商简称 + /// + [Display(Name = "供应商简称")] + public string SupplierSimpleName { get; set; } + + /// + /// 供应商ERP料号 + /// + [Display(Name = "供应商ERP料号")] + public string SupplierItemCode { get; set; } + + /// + /// 供应商物品名 + /// + [Display(Name = "供应商物品名")] + public string SupplierItemName { get; set; } + + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } + #endregion + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs index 828a8bba0..67c7941df 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs @@ -17,6 +17,7 @@ using System.Text; using DocumentFormat.OpenXml.Office2010.ExcelAc; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; +using Volo.Abp; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories; using Win_in.Sfs.Shared; @@ -60,9 +61,17 @@ public class DictAppService : SfsBaseDataWithCodeAppServiceBase UpdateAsync(Guid id, DictEditInput input) + public override async Task UpdateAsync(Guid id, DictEditInput input) { - return base.UpdateAsync(id, input); + //return await base.UpdateAsync(id, input).ConfigureAwait(false); //lyf at 0621, 更新报错所以注释 + var entity = await _repository.GetAsync(id).ConfigureAwait(false); + if (entity == null) + { + throw new UserFriendlyException($"根据Id取字典表为空:{id}"); + } + ObjectMapper.Map(input, entity); + await _repository.UpdateAsync(entity, true).ConfigureAwait(false); + return ObjectMapper.Map(entity); } [HttpPost("update")] diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs index dc89749ef..35486936c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs @@ -9,8 +9,15 @@ public partial class BasedataApplicationAutoMapperProfile : Profile { private void SplitPackingRecAutoMapperProfile() { - CreateMap(); + CreateMap() + .MapPurchaseInfo() + .MapProductionInfo() + .MapQualityInfo(); + CreateMap() + .MapQualityInfoDto() + .MapPurchaseInfoDto() + .MapProductionInfoDto() .Ignore(t => t.FromTopPackingCode) .Ignore(t => t.ToTopPackingCode) .Ignore(t => t.LastModificationTime) @@ -19,5 +26,75 @@ public partial class BasedataApplicationAutoMapperProfile : Profile .Ignore(t => t.CreatorId) .Ignore(t => t.ConcurrencyStamp) .Ignore(t => t.Id); + + } +} + +public static class LabelCommonMapperExtensions +{ + public static IMappingExpression MapPurchaseInfo( + this IMappingExpression m) + where TSource : IHasPurchaseInfo + where TDestination : IHasPurchaseInfoDto + { + return m + .ForMember(dest => dest.SupplierCode, opts => opts.MapFrom(src => src.PurchaseInfo.SupplierCode)) + .ForMember(dest => dest.PoNumber, opts => opts.MapFrom(src => src.PurchaseInfo.PoNumber)) + .ForMember(dest => dest.RpNumber, opts => opts.MapFrom(src => src.PurchaseInfo.RpNumber)) + .ForMember(dest => dest.AsnNumber, opts => opts.MapFrom(src => src.PurchaseInfo.AsnNumber)) + ; + } + + public static IMappingExpression MapProductionInfo( + this IMappingExpression m) + where TSource : IHasProductionInfo + where TDestination : IHasProductionInfoDto + { + return m + .ForMember(dest => dest.ProdLine, opts => opts.MapFrom(src => src.ProductionInfo.ProdLine)) + .ForMember(dest => dest.Team, opts => opts.MapFrom(src => src.ProductionInfo.Team)) + .ForMember(dest => dest.Shift, opts => opts.MapFrom(src => src.ProductionInfo.Shift)) + ; + } + + public static IMappingExpression MapPurchaseInfoDto( + this IMappingExpression m) + where TSource : IHasPurchaseInfoDto + where TDestination : IHasPurchaseInfo + { + return m + .ForMember(dest => dest.PurchaseInfo, opts => opts.MapFrom(src => new PurchaseInfo(src.SupplierCode, src.PoNumber, src.RpNumber, src.AsnNumber))) + ; + } + + public static IMappingExpression MapProductionInfoDto( + this IMappingExpression m) + where TSource : IHasProductionInfoDto + where TDestination : IHasProductionInfo + { + return m + .ForMember(dest => dest.ProductionInfo, opts => opts.MapFrom(src => new ProductionInfo(src.ProdLine, src.Team, src.Shift))) + ; + } + + public static IMappingExpression MapQualityInfo( + this IMappingExpression m) + where TSource : IHasQualityInfo + where TDestination : IHasQualityInfoDto + { + return m + .ForMember(dest => dest.QLevel, opts => opts.MapFrom(src => src.QualityInfo.QLevel)) + .ForMember(dest => dest.QualityFile, opts => opts.MapFrom(src => src.QualityInfo.QualityFile)) + ; + } + + public static IMappingExpression MapQualityInfoDto( + this IMappingExpression m) + where TSource : IHasQualityInfoDto + where TDestination : IHasQualityInfo + { + return m + .ForMember(dest => dest.QualityInfo, opts => opts.MapFrom(src => new QualityInfo(src.QLevel, src.QualityFile))) + ; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/IHasPurchaseInfo.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/IHasPurchaseInfo.cs new file mode 100644 index 000000000..11123aeb6 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/IHasPurchaseInfo.cs @@ -0,0 +1,272 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Domain.Values; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Basedata; +#region 枚举及实体 +/// +/// 标签类别 +/// +public enum EnumLabelType +{ + /// + /// 空枚举 + /// + [Display(Name = "未定义")] + None = 0, + + /// + /// 采购标签 + /// + [Display(Name = "采购标签")] + PurchaseLabel = 1, + + /// + /// 生产标签 + /// + [Display(Name = "生产标签")] + ProductionLabel = 2, + + /// + /// 销售标签 + /// + [Display(Name = "销售标签")] + SaleLabel = 3, + + /// + /// 托盘标签 + /// + [Display(Name = "托盘标签")] + PalletLabel = 4, + + /// + /// 盘点标签 + /// + [Display(Name = "盘点标签")] + CountLabel = 5, +} + +public enum LabelStatus +{ + /// + /// 未定义 + /// + [Display(Name = "未定义")] + None = 0, + + /// + /// 有效 + /// + [Display(Name = "有效")] + Enable = 1, + + /// + /// 无效 + /// + [Display(Name = "无效")] + Disable = 2 +} + +/// +/// 质量信息 +/// +public class QualityInfo : ValueObject +{ + + /// + /// 质量等级 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string QLevel { get; set; } + + /// + /// 质检文件 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string QualityFile { get; set; } + + protected override IEnumerable GetAtomicValues() + { + yield return QLevel; + yield return QualityFile; + } + + public QualityInfo(string qLevel, string qualityFile) + { + QLevel = qLevel; + QualityFile = qualityFile; + } + + public QualityInfo() + { + + } +} + + +/// +/// 采购信息 +/// +[Owned] +public class PurchaseInfo : ValueObject +{ + /// + /// 供应商代码 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string SupplierCode { get; set; } + + /// + /// 订单号 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string PoNumber { get; set; } + + /// + /// 要货计划号 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string RpNumber { get; set; } + + /// + /// 发货单号 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string AsnNumber { get; set; } + + protected override IEnumerable GetAtomicValues() + { + yield return SupplierCode; + yield return PoNumber; + yield return RpNumber; + yield return AsnNumber; + } + + public PurchaseInfo(string supplierCode, string poNumber, string rpNumber, string asnNumber) + { + SupplierCode = supplierCode; + PoNumber = poNumber; + RpNumber = rpNumber; + AsnNumber = asnNumber; + } + + public PurchaseInfo() + { + + } +} + +/// +/// 生产信息 +/// +public class ProductionInfo : ValueObject +{ + public ProductionInfo() + { + + } + + public ProductionInfo(string prodLine, string team, string shift) + { + ProdLine = prodLine; + Team = team; + Shift = shift; + } + + /// + /// 生产线 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string ProdLine { get; set; } + + /// + /// 班组 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string Team { get; set; } + + /// + /// 班次 + /// + [MaxLength(SfsEfCorePropertyConst.CodeLength)] + public string Shift { get; set; } + + protected override IEnumerable GetAtomicValues() + { + + yield return ProdLine; + yield return Team; + yield return Shift; + } +} + +#endregion + + + + +#region 接口 +public interface IHasPurchaseInfo +{ + /// + /// 采购信息 + /// + public PurchaseInfo PurchaseInfo { get; set; } + +} + +public interface IHasProductionInfo +{ + /// + /// 生产信息 + /// + public ProductionInfo ProductionInfo { get; set; } + +} + +public interface IHasPurchaseInfoDto +{ + /// + /// 供应商编号 + /// + [Display(Name = "供应商编号")] + public string SupplierCode { get; set; } + + public string PoNumber { get; set; } + + public string RpNumber { get; set; } + + public string AsnNumber { get; set; } + +} + +public interface IHasProductionInfoDto +{ + public string ProdLine { get; set; } + public string Team { get; set; } + public string Shift { get; set; } +} + +public interface IHasQualityInfo +{ + /// + /// 质量信息 + /// + public QualityInfo QualityInfo { get; set; } +} + +public interface IHasQualityInfoDto +{ + public string QLevel { get; set; } + + public string QualityFile { get; set; } + +} + +#endregion diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj index 9d201acdf..3900f3899 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj @@ -10,6 +10,7 @@ + @@ -22,6 +23,10 @@ + + + + all diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs index 7a3f427cd..8eb845d83 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs @@ -1,6 +1,9 @@ using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Domain.Values; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; @@ -12,6 +15,9 @@ namespace Win_in.Sfs.Basedata.Domain; /// public class SplitPackingRec : SfsBaseDataAggregateRootBase , IHasItem + , IHasPurchaseInfo + , IHasQualityInfo + , IHasProductionInfo { /// /// 操作类型 @@ -141,46 +147,107 @@ public class SplitPackingRec : SfsBaseDataAggregateRootBase public string PutOnShelfNumber { get; set; } public EnumLabelType LabelType { get; set; } -} -/// -/// 标签类别 -/// -public enum EnumLabelType -{ + + + #region InventoryLabel兼容成员 + + /// + /// 完整条码文本 + /// + public string FullBarcodeString { get; set; } + + /// + /// 供应商批次 + /// + public string SupplierBatch { get; set; } + + /// + /// 到货时间 + /// + public DateTime ArriveDate { get; set; } + + /// + /// 生产时间 + /// + public DateTime ProduceDate { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpireDate { get; set; } + /// - /// 空枚举 + /// 标签状态 /// - [Display(Name = "未定义")] - None = 0, + public LabelStatus LabelStatus { get; set; } /// - /// 采购标签 + /// 建议库位 /// - [Display(Name = "采购标签")] - PurchaseLabel = 1, + public string RecommendLocationCode { get; set; } /// - /// 生产标签 + /// 目标ERP库位 /// - [Display(Name = "生产标签")] - ProductionLabel = 2, + public string LocationErpCode { get; set; } /// - /// 销售标签 + /// 托标签号 /// - [Display(Name = "销售标签")] - SaleLabel = 3, + public string ContainerCode { get; set; } /// - /// 托盘标签 + /// 质量信息 /// - [Display(Name = "托盘标签")] - PalletLabel = 4, + public QualityInfo QualityInfo { get; set; } = new(); /// - /// 盘点标签 + /// 采购信息 /// - [Display(Name = "盘点标签")] - CountLabel = 5, + public PurchaseInfo PurchaseInfo { get; set; } = new(); + + /// + /// 生产信息 + /// + public ProductionInfo ProductionInfo { get; set; } = new(); + + /// + /// 规格 + /// + [Display(Name = "规格")] + public string Specifications { get; set; } + + /// + /// 供应商名称 + /// + [Display(Name = "供应商名称")] + public string SupplierName { get; set; } + + /// + /// 供应商简称 + /// + [Display(Name = "供应商简称")] + public string SupplierSimpleName { get; set; } + + /// + /// 供应商ERP料号 + /// + [Display(Name = "供应商ERP料号")] + public string SupplierItemCode { get; set; } + + /// + /// 供应商物品名 + /// + [Display(Name = "供应商物品名")] + public string SupplierItemName { get; set; } + + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } + #endregion } + diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.Designer.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.Designer.cs new file mode 100644 index 000000000..6d2384fca --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.Designer.cs @@ -0,0 +1,4443 @@ +// +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.Basedata.EntityFrameworkCore; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + [DbContext(typeof(BasedataDbContext))] + [Migration("20240624071015_BaseData")] + partial class BaseData + { + 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.Basedata.Domain.AQL", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("CeilingQty") + .HasColumnType("decimal(18,6)"); + + 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("FloorQty") + .HasColumnType("decimal(18,6)"); + + b.Property("IsUsePercent") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("SampleQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode", "FloorQty") + .IsUnique(); + + b.ToTable("Basedata_AQL", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFunctional") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Area", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ComponentQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ComponentUom") + .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("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ERPOp") + .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("Layer") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("MFGOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Product") + .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("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Product", "Component") + .IsUnique(); + + b.ToTable("Basedata_Bom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .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("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("Module") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Module") + .IsUnique() + .HasFilter("[Module] IS NOT NULL"); + + b.ToTable("Basedata_Calendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .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("Code") + .IsUnique(); + + b.ToTable("Basedata_Category", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsBasicCurrency") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .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("Code") + .IsUnique(); + + b.ToTable("Basedata_Currency", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicCurrencyId") + .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("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("EfficetiveTime") + .HasColumnType("datetime2"); + + b.Property("ExpireTime") + .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("Rate") + .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("CurrencyId", "BasicCurrencyId") + .IsUnique(); + + b.ToTable("Basedata_CurrencyExchange", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Customer", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerAddress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contact") + .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("Desc") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + 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("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "CustomerCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerAddress", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .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") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CustomerPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .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("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .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("Code") + .IsUnique(); + + b.ToTable("Basedata_Dict", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_DictItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dock", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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("DefaultLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DocumentSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberFormat") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberPrefix") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSeparator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSerialLength") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransactionType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_DocumentSetting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Equipment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreatTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasColumnType("nvarchar(max)"); + + 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("LocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Model") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Equipment", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLoc", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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("LocCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code", "LocCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLoc", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLocCap", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Percent") + .HasColumnType("decimal(18,6)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLocCap", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentPartCode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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("PartCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Unit") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "PartCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentPartCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ErpLocation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocationItem", 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("ErpLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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.HasIndex("ItemCode", "ErpLocationCode") + .IsUnique(); + + b.ToTable("Basedata_ErpLocationItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.InterfaceCalendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConvertToTime") + .HasColumnType("datetime2"); + + 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("Month") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_InterfaceCalendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemBasic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("CanBuy") + .HasColumnType("bit"); + + b.Property("CanMake") + .HasColumnType("bit"); + + b.Property("CanOutsourcing") + .HasColumnType("bit"); + + b.Property("Category") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Color") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configuration") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Eco") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Elevel") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsPhantom") + .HasColumnType("bit"); + + b.Property("IsRecycled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManageType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Project") + .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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Validity") + .HasColumnType("int"); + + b.Property("ValidityUnit") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ItemBasic", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryCode") + .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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemCategory", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemContainer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .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("ContainerName") + .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)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + 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("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemContainer", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemGuideBook", 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("Desc1") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PictureBlobName") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Step") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemGuideBook", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemPack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PackCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("ItemCode", "PackCode") + .IsUnique(); + + b.ToTable("Basedata_ItemPack", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemQuality", 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique(); + + b.ToTable("Basedata_ItemQuality", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemSafetyStock", 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeedLine") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaxStock") + .HasColumnType("decimal(18,6)"); + + b.Property("MinStock") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SafetyStock") + .HasColumnType("decimal(18,6)"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemSafetyStock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemStoreRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltUm") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AltUmQty") + .HasColumnType("decimal(18,6)"); + + 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("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MultiLoc") + .HasColumnType("int"); + + b.Property("PramaryUM") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UmQty") + .HasColumnType("decimal(18,6)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemStoreRelation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ChassisQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Code") + .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("Name") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Kitting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Conf") + .HasColumnType("nvarchar(max)"); + + b.Property("Configuration") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemName") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + 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("Basedata_KittingDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Location", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ColumnCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + 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("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ErpLocationCode") + .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("LocationGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickOrder") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RowCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("ShelfCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Location", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.LocationGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .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("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OverflowLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_LocationGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Machine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLineId") + .HasColumnType("uniqueidentifier"); + + 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("WorkStationId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Machine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PositionCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("Code") + .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("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("PartName") + .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("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("Code", "PartCode", "LocationCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); + + b.ToTable("Basedata_PositionCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLine", b => + { + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionLineType") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Code"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ProductionLine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .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("ProdLineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ProductLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WipLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Basedata_ProductionLineItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Project", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .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("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + 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("Name") + .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("Code") + .IsUnique(); + + b.ToTable("Basedata_Project", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PurchasePriceSheet", 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PurchasePrice") + .HasColumnType("decimal(18,6)"); + + 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.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique() + .HasFilter("[ItemCode] IS NOT NULL AND [SupplierCode] IS NOT NULL"); + + b.ToTable("Basedata_PurchasePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SalePriceSheet", 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("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("SalePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique() + .HasFilter("[CustomerCode] IS NOT NULL"); + + b.ToTable("Basedata_SalePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Shift", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndAtNextDay") + .HasColumnType("bit"); + + 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("Name") + .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("Code") + .IsUnique(); + + b.ToTable("Basedata_Shift", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SplitPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArrivalNoticNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerCode") + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FromStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FullBarcodeString") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .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("LabelStatus") + .HasColumnType("int"); + + b.Property("LabelType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OprType") + .HasColumnType("int"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("PurchaseInfo_AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseInfo_PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutOnShelfNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptRecNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Specifications") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierSimpleName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaskOrderNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ToStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ToPackingCode"); + + b.HasIndex("FromPackingCode", "ToPackingCode"); + + b.ToTable("Basedata_SplitPackingRec", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.StdCostPriceSheet", 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("StdCostPrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_StdCostPriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Supplier", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Bank") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Supplier", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierItem", 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QtyPerPallet") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierSimpleName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_SupplierItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierTimeWindow", 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + 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("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeSlot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Week") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "TimeSlot", "Week") + .IsUnique(); + + b.ToTable("Basedata_SupplierTimeWindow", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Team", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .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("Members") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .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("Code") + .IsUnique(); + + b.ToTable("Basedata_Team", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.TransactionType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoAgreeRequest") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandleRequest") + .HasColumnType("bit"); + + b.Property("AutoSubmitRequest") + .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("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("InLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OutInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OutLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("OutLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransSubType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TransType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("TransType", "TransSubType") + .IsUnique(); + + b.ToTable("Basedata_TransactionType", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Uom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Uom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Warehouse", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .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("Code") + .IsUnique(); + + b.ToTable("Basedata_Warehouse", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkShop", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .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("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkShop", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkStation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .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") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionLineCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkStation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Dict", null) + .WithMany("Items") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Kitting", null) + .WithMany("Details") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SplitPackingRec", b => + { + b.OwnsOne("Win_in.Sfs.Basedata.ProductionInfo", "ProductionInfo", b1 => + { + b1.Property("SplitPackingRecId") + .HasColumnType("uniqueidentifier"); + + b1.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.HasKey("SplitPackingRecId"); + + b1.ToTable("Basedata_SplitPackingRec"); + + b1.WithOwner() + .HasForeignKey("SplitPackingRecId"); + }); + + b.OwnsOne("Win_in.Sfs.Basedata.PurchaseInfo", "PurchaseInfo", b1 => + { + b1.Property("SplitPackingRecId") + .HasColumnType("uniqueidentifier"); + + b1.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PurchaseInfo_AsnNumber1"); + + b1.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PurchaseInfo_PoNumber1"); + + b1.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.HasKey("SplitPackingRecId"); + + b1.ToTable("Basedata_SplitPackingRec"); + + b1.WithOwner() + .HasForeignKey("SplitPackingRecId"); + }); + + b.OwnsOne("Win_in.Sfs.Basedata.QualityInfo", "QualityInfo", b1 => + { + b1.Property("SplitPackingRecId") + .HasColumnType("uniqueidentifier"); + + b1.Property("QLevel") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.Property("QualityFile") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.HasKey("SplitPackingRecId"); + + b1.ToTable("Basedata_SplitPackingRec"); + + b1.WithOwner() + .HasForeignKey("SplitPackingRecId"); + }); + + b.Navigation("ProductionInfo"); + + b.Navigation("PurchaseInfo"); + + b.Navigation("QualityInfo"); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.cs new file mode 100644 index 000000000..f81350df6 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.cs @@ -0,0 +1,424 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + public partial class BaseData : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropPrimaryKey( + name: "PK_Basedata_ProductionLineItem", + table: "Basedata_ProductionLineItem"); + + migrationBuilder.DropIndex( + name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode", + table: "Basedata_ProductionLineItem"); + + migrationBuilder.DropIndex( + name: "IX_Basedata_PositionCode_PartCode", + table: "Basedata_PositionCode"); + + migrationBuilder.RenameColumn( + name: "PartCode", + table: "Basedata_KittingDetail", + newName: "ItemCode"); + + migrationBuilder.RenameColumn( + name: "Desc2", + table: "Basedata_KittingDetail", + newName: "ItemDesc2"); + + migrationBuilder.RenameColumn( + name: "Desc1", + table: "Basedata_KittingDetail", + newName: "ItemName"); + + migrationBuilder.AddColumn( + name: "ArriveDate", + table: "Basedata_SplitPackingRec", + type: "datetime2", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "ContainerCode", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "ExpireDate", + table: "Basedata_SplitPackingRec", + type: "datetime2", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "FullBarcodeString", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "LabelStatus", + table: "Basedata_SplitPackingRec", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "LocationErpCode", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "PlanArriveDate", + table: "Basedata_SplitPackingRec", + type: "datetime2", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "ProduceDate", + table: "Basedata_SplitPackingRec", + type: "datetime2", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "ProductionInfo_ProdLine", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "ProductionInfo_Shift", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "ProductionInfo_Team", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "PurchaseInfo_AsnNumber1", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "PurchaseInfo_PoNumber1", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "PurchaseInfo_RpNumber", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "PurchaseInfo_SupplierCode", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "QualityInfo_QLevel", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "QualityInfo_QualityFile", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "RecommendLocationCode", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "Specifications", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "SupplierBatch", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "SupplierItemCode", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "SupplierItemName", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "SupplierName", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "SupplierSimpleName", + table: "Basedata_SplitPackingRec", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AlterColumn( + name: "ItemCode", + table: "Basedata_ProductionLineItem", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(450)"); + + migrationBuilder.AlterColumn( + name: "ProdLineCode", + table: "Basedata_ProductionLineItem", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(450)"); + + migrationBuilder.AddColumn( + name: "ProductionLineType", + table: "Basedata_ProductionLine", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "Configuration", + table: "Basedata_KittingDetail", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "ItemDesc1", + table: "Basedata_KittingDetail", + type: "nvarchar(1024)", + maxLength: 1024, + nullable: true); + + migrationBuilder.AddColumn( + name: "LocationCode", + table: "Basedata_CustomerItem", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddPrimaryKey( + name: "PK_Basedata_ProductionLineItem", + table: "Basedata_ProductionLineItem", + column: "Id"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropPrimaryKey( + name: "PK_Basedata_ProductionLineItem", + table: "Basedata_ProductionLineItem"); + + migrationBuilder.DropColumn( + name: "ArriveDate", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "ContainerCode", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "ExpireDate", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "FullBarcodeString", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "LabelStatus", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "LocationErpCode", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "PlanArriveDate", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "ProduceDate", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "ProductionInfo_ProdLine", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "ProductionInfo_Shift", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "ProductionInfo_Team", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "PurchaseInfo_AsnNumber1", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "PurchaseInfo_PoNumber1", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "PurchaseInfo_RpNumber", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "PurchaseInfo_SupplierCode", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "QualityInfo_QLevel", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "QualityInfo_QualityFile", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "RecommendLocationCode", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "Specifications", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "SupplierBatch", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "SupplierItemCode", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "SupplierItemName", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "SupplierName", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "SupplierSimpleName", + table: "Basedata_SplitPackingRec"); + + migrationBuilder.DropColumn( + name: "ProductionLineType", + table: "Basedata_ProductionLine"); + + migrationBuilder.DropColumn( + name: "Configuration", + table: "Basedata_KittingDetail"); + + migrationBuilder.DropColumn( + name: "ItemDesc1", + table: "Basedata_KittingDetail"); + + migrationBuilder.DropColumn( + name: "LocationCode", + table: "Basedata_CustomerItem"); + + migrationBuilder.RenameColumn( + name: "ItemName", + table: "Basedata_KittingDetail", + newName: "Desc1"); + + migrationBuilder.RenameColumn( + name: "ItemDesc2", + table: "Basedata_KittingDetail", + newName: "Desc2"); + + migrationBuilder.RenameColumn( + name: "ItemCode", + table: "Basedata_KittingDetail", + newName: "PartCode"); + + migrationBuilder.AlterColumn( + name: "ProdLineCode", + table: "Basedata_ProductionLineItem", + type: "nvarchar(450)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ItemCode", + table: "Basedata_ProductionLineItem", + type: "nvarchar(450)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Basedata_ProductionLineItem", + table: "Basedata_ProductionLineItem", + column: "ProdLineCode"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode", + table: "Basedata_ProductionLineItem", + columns: new[] { "ProdLineCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PositionCode_PartCode", + table: "Basedata_PositionCode", + column: "PartCode", + unique: true, + filter: "[PartCode] IS NOT NULL"); + } + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs index 4327e2935..5c5637445 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs @@ -774,6 +774,10 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -2289,6 +2293,9 @@ namespace Win_in.Sfs.Basedata.Migrations b.Property("Conf") .HasColumnType("nvarchar(max)"); + b.Property("Configuration") + .HasColumnType("nvarchar(max)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -2297,14 +2304,21 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Desc1") + b.Property("ItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemDesc1") .HasMaxLength(1024) .HasColumnType("nvarchar(1024)"); - b.Property("Desc2") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ItemName") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -2316,9 +2330,6 @@ namespace Win_in.Sfs.Basedata.Migrations b.Property("MasterId") .HasColumnType("uniqueidentifier"); - b.Property("PartCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasColumnType("decimal(18,2)"); @@ -2861,10 +2872,6 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.HasIndex("PartCode") - .IsUnique() - .HasFilter("[PartCode] IS NOT NULL"); - b.HasIndex("Code", "PartCode", "LocationCode") .IsUnique() .HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); @@ -2919,6 +2926,9 @@ namespace Win_in.Sfs.Basedata.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ProductionLineType") + .HasColumnType("int"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -2938,8 +2948,8 @@ namespace Win_in.Sfs.Basedata.Migrations modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b => { - b.Property("ProdLineCode") - .HasColumnType("nvarchar(450)"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -2959,12 +2969,9 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("Id") - .HasColumnType("uniqueidentifier"); - b.Property("ItemCode") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasColumnType("nvarchar(max)"); b.Property("ItemDesc1") .HasColumnType("nvarchar(max)"); @@ -2983,6 +2990,10 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("ProdLineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + b.Property("ProductLocationCodeListJson") .HasColumnType("nvarchar(max)"); @@ -3001,10 +3012,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.Property("WipLocationCodeListJson") .HasColumnType("nvarchar(max)"); - b.HasKey("ProdLineCode"); - - b.HasIndex("ProdLineCode", "ItemCode") - .IsUnique(); + b.HasKey("Id"); b.ToTable("Basedata_ProductionLineItem", (string)null); }); @@ -3288,12 +3296,19 @@ namespace Win_in.Sfs.Basedata.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3302,6 +3317,9 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -3332,6 +3350,10 @@ namespace Win_in.Sfs.Basedata.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("FullBarcodeString") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -3349,6 +3371,9 @@ namespace Win_in.Sfs.Basedata.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("LabelStatus") + .HasColumnType("int"); + b.Property("LabelType") .HasColumnType("int"); @@ -3360,9 +3385,19 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("OprType") .HasColumnType("int"); + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + b.Property("PurchaseInfo_AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3379,9 +3414,37 @@ namespace Win_in.Sfs.Basedata.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("RecommendLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasColumnType("nvarchar(max)"); + b.Property("Specifications") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierSimpleName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TaskOrderNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4277,6 +4340,92 @@ namespace Win_in.Sfs.Basedata.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SplitPackingRec", b => + { + b.OwnsOne("Win_in.Sfs.Basedata.ProductionInfo", "ProductionInfo", b1 => + { + b1.Property("SplitPackingRecId") + .HasColumnType("uniqueidentifier"); + + b1.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.HasKey("SplitPackingRecId"); + + b1.ToTable("Basedata_SplitPackingRec"); + + b1.WithOwner() + .HasForeignKey("SplitPackingRecId"); + }); + + b.OwnsOne("Win_in.Sfs.Basedata.PurchaseInfo", "PurchaseInfo", b1 => + { + b1.Property("SplitPackingRecId") + .HasColumnType("uniqueidentifier"); + + b1.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PurchaseInfo_AsnNumber1"); + + b1.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PurchaseInfo_PoNumber1"); + + b1.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.HasKey("SplitPackingRecId"); + + b1.ToTable("Basedata_SplitPackingRec"); + + b1.WithOwner() + .HasForeignKey("SplitPackingRecId"); + }); + + b.OwnsOne("Win_in.Sfs.Basedata.QualityInfo", "QualityInfo", b1 => + { + b1.Property("SplitPackingRecId") + .HasColumnType("uniqueidentifier"); + + b1.Property("QLevel") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.Property("QualityFile") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b1.HasKey("SplitPackingRecId"); + + b1.ToTable("Basedata_SplitPackingRec"); + + b1.WithOwner() + .HasForeignKey("SplitPackingRecId"); + }); + + b.Navigation("ProductionInfo"); + + b.Navigation("PurchaseInfo"); + + b.Navigation("QualityInfo"); + }); + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => { b.Navigation("Items"); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs index db760c765..c052bccbf 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs @@ -46,9 +46,30 @@ public static class SplitPackingRecDbContextModelCreatingExtensions b.Property(q => q.ReceiptRecNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.PutOnShelfNumber).HasMaxLength(SfsPropertyConst.CodeLength); + #region InventoryLabel兼容成员 + b.Property(q => q.FullBarcodeString).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.SupplierBatch).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RecommendLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.LocationErpCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ContainerCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Specifications).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.SupplierName).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.SupplierSimpleName).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.SupplierItemCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.SupplierItemName).HasMaxLength(SfsPropertyConst.NameLength); + //子实体成员属性中已经定义字段长度 + #endregion + //Indexes b.HasIndex(q => new { FromPackingCode = q.FromPackingCode, ToPackingCode = q.ToPackingCode }); b.HasIndex(q => new { ToPackingCode = q.ToPackingCode }); + //Relations + + b.OwnsOne(q => q.PurchaseInfo); + b.OwnsOne(q => q.ProductionInfo); + b.OwnsOne(q => q.QualityInfo); + }); + } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs index d5eb0339f..d37e03c89 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs @@ -193,6 +193,34 @@ public class InventoryLabelAppService packRec.TaskOrderNumber = null; //任务单 packRec.ReceiptRecNumber = null; //收货记录单 packRec.PutOnShelfNumber = null; //上架单 + + + #region InventoryLabel兼容成员 + packRec.FullBarcodeString = inputObj.FullBarcodeString; + packRec.SupplierBatch = inputObj.SupplierBatch; + packRec.ArriveDate = inputObj.ArriveDate; + packRec.ProduceDate = inputObj.ProduceDate; + packRec.ExpireDate = inputObj.ExpireDate; + packRec.LabelStatus = (Win_in.Sfs.Basedata.LabelStatus)((int)inputObj.LabelStatus); + packRec.RecommendLocationCode = inputObj.RecommendLocationCode; + packRec.LocationErpCode = inputObj.LocationErpCode; + packRec.ContainerCode = inputObj.ContainerCode; + packRec.QLevel = inputObj.QLevel;// + packRec.QualityFile = inputObj.QualityFile; + packRec.SupplierCode = inputObj.SupplierCode; + packRec.PoNumber = inputObj.PoNumber; + packRec.RpNumber = inputObj.RpNumber; + packRec.AsnNumber = inputObj.AsnNumber; + packRec.ProdLine = inputObj.ProdLine; + packRec.Team = inputObj.Team; + packRec.Shift = inputObj.Shift;// + packRec.Specifications = inputObj.Specifications; + packRec.SupplierName = inputObj.SupplierName; + packRec.SupplierSimpleName = inputObj.SupplierSimpleName; + packRec.SupplierItemCode = inputObj.SupplierItemCode; + packRec.SupplierItemName = inputObj.SupplierItemName; + packRec.PlanArriveDate = inputObj.PlanArriveDate; + #endregion recLst.Add(packRec); } bool bo = await _splitPackingRecAppService.BatchInsertAsync(recLst).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs index a97202981..0bf1ac2ce 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; @@ -7,112 +8,121 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class ThirdLocationJobDetailDTO : SfsJobRecommendFromDetailDTOBase, IHasToLocation { - /// - /// 来源库位 + /// 发出时间 /// - [Display(Name = "来源库位")] - public string FromLocationCode { get; set; } + public DateTime IssueTime { get; set; } /// - /// 来源库区 + /// 是否在在途 /// - [Display(Name = "来源库区")] - public string FromLocationArea { get; set; } + public bool IsOnTheWayLocationCode { get; set; } + + #region 目标库位 /// - /// 到库位 + /// 到库位 /// - [Display(Name = "到库位")] 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 + + #region 来源库位 + /// - /// 在途库库位 + /// 到库位 /// - [Display(Name = "在途库库位")] - public string OnTheWayLocationCode { get; set; } - + public string FromLocationCode { get; set; } + /// - /// 收货单件码 + /// 到库区 /// - [Display(Name = "收货单件码")] - public string SingleCodeJob { get; set; } + public string FromLocationArea { get; set; } /// - /// 申请单件码 + /// 到库位组 /// - [Display(Name = "申请单件码")] - public string SingleCodeRequest { get; set; } + public string FromLocationGroup { get; set; } /// - /// 过期时间 + /// 到ERP库位 /// - [Display(Name = "过期时间")] - public DateTime ExpiredTime { get; set; } + public string FromLocationErpCode { get; set; } /// - /// 工序 + /// 到仓库 /// - [Display(Name = "工序")] - public string Operation { get; set; } + public string FromWarehouseCode { get; set; } + + #endregion + + #region 在途库位 /// - /// 配送方式 + /// 在途库库位 /// - [Display(Name = "配送方式")] - public EnumDistributionType DistributionType { get; set; } + public string OnTheWayLocationCode { get; set; } + + #endregion /// - /// 取整方式 + /// 申请单件码 /// - [Display(Name = "取整方式")] - public EnumTruncType TruncType { get; set; } + public string SingleCodeRequest { get; set; } /// - /// 取整后数量 + /// 已发数量 /// - [Display(Name = "取整后数量")] - public decimal RoundedQty { get; set; } + public decimal IssuedQty { get; set; } /// - /// 计划拆分规则 + /// 已收数量 /// - [Display(Name = "计划拆分规则")] - public EnumPlannedSplitRule PlannedSplitRule { get; set; } + public decimal ReceivedQty { get; set; } + + /// + /// 箱码 + /// + public string PackingCode { get; set; } + + /// + /// 批次 + /// + public string Lot { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } /// - /// 计划开始时间 + /// 库位状态 /// - [Display(Name = "计划开始时间")] - public DateTime PlanBeginTime { get; set; } + public EnumInventoryStatus EnumInventoryStatus { get; set; } /// - /// 每次配送数量 + /// 请求未收 /// - [Display(Name = "每次配送数量")] - public decimal DeliveryQty { get; set; } + [NotMapped] + public decimal NotFinishQty => IssuedQty - ReceivedQty; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs index a0e156bfa..e0244fc40 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -9,4 +9,18 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public interface IThirdLocationJobAppService : ISfsJobAppServiceBase { + /// + /// 执行任务明细 + /// + /// + Task ExecuteDetailAsync(Guid masterId,List detailDto); + + Task> GetByRequestNumberAsync(string requestNumber); + + /// + /// 完成任务 + /// + /// + /// + Task CompleteAsync(Guid id); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs index b64661f1c..472297611 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; @@ -7,136 +8,121 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class ThirdLocationJobDetailInput : SfsJobRecommendFromDetailInputBase, IHasToLocation { - /// - /// 来源库位 + /// 发出时间 /// - [Display(Name = "来源库位")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string FromLocationCode { get; set; } + public DateTime IssueTime { get; set; } /// - /// 来源库区 + /// 是否在在途 /// - [Display(Name = "来源库位")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string FromLocationArea { get; set; } + public bool IsOnTheWayLocationCode { get; set; } + + #region 目标库位 /// - /// 到库位 + /// 到库位 /// - [Display(Name = "到库位")] - [Required(ErrorMessage = "{0}是必填项")] - [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库位")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string ToLocationErpCode { get; set; } /// - /// 到仓库 + /// 到仓库 /// - [Display(Name = "到仓库")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string ToWarehouseCode { get; set; } + #endregion + + #region 来源库位 + /// - /// 在途库库位 + /// 到库位 /// - [Display(Name = "在途库库位")] - public string OnTheWayLocationCode { get; set; } + public string FromLocationCode { get; set; } + + /// + /// 到库区 + /// + public string FromLocationArea { get; set; } /// - /// 收货单件码 + /// 到库位组 /// - [Display(Name = "收货单件码")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string SingleCodeJob { get; set; } + public string FromLocationGroup { get; set; } /// - /// 申请单件码 + /// 到ERP库位 /// - [Display(Name = "申请单件码")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string SingleCodeRequest { get; set; } + public string FromLocationErpCode { get; set; } /// - /// 过期时间 + /// 到仓库 /// - [Display(Name = "过期时间")] - [Required(ErrorMessage = "{0}是必填项")] - public DateTime ExpiredTime { get; set; } + public string FromWarehouseCode { get; set; } + + #endregion + + #region 在途库位 /// - /// 工序 + /// 在途库库位 /// - [Display(Name = "工序")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string Operation { get; set; } + public string OnTheWayLocationCode { get; set; } + + #endregion /// - /// 配送方式 + /// 申请单件码 /// - [Display(Name = "配送方式")] - public EnumDistributionType DistributionType { get; set; } + public string SingleCodeRequest { get; set; } /// - /// 取整方式 + /// 已发数量 /// - [Display(Name = "取整方式")] - public EnumTruncType TruncType { get; set; } + public decimal IssuedQty { get; set; } /// - /// 取整后数量 + /// 已收数量 /// - [Display(Name = "取整后数量")] - public decimal RoundedQty { get; set; } + public decimal ReceivedQty { get; set; } /// - /// 计划拆分规则 + /// 箱码 /// - [Display(Name = "计划拆分规则")] - public EnumPlannedSplitRule PlannedSplitRule { get; set; } + public string PackingCode { get; set; } /// - /// 计划开始时间 + /// 批次 /// - [Display(Name = "计划开始时间")] - public DateTime PlanBeginTime { get; set; } + public string Lot { get; set; } /// - /// 每次配送数量 + /// 过期时间 /// - [Display(Name = "每次配送数量")] - public decimal DeliveryQty { get; set; } + public DateTime ExpiredTime { get; set; } /// - /// 位置码 + /// 库位状态 /// - public string PositionCode { get; set; } + public EnumInventoryStatus EnumInventoryStatus { get; set; } /// - /// 推荐类型 + /// 请求未收 /// - public EnumRecommendType RecommendType { get; set; } + [NotMapped] + public decimal NotFinishQty => IssuedQty - ReceivedQty; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs index 1a22495df..98850ea2b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs @@ -3,10 +3,16 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Application.Contracts; public interface IThirdLocationNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase { - + /// + /// 创建 同时 直接赋值Number 为了返回Number + /// + /// + /// + Task CreateByNumberAsync(ThirdLocationNoteEditInput input); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/IThirdLocationRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/IThirdLocationRequestAppService.cs index e1f47cb2d..166605947 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/IThirdLocationRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/IThirdLocationRequestAppService.cs @@ -9,5 +9,5 @@ public interface IThirdLocationRequestAppService : ISfsStoreRequestMasterAppServiceBase { - + Task UpdateRequestStatusAsync(string requestNumber); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs index f4c6af449..eada1d84f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; @@ -7,81 +8,111 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class ThirdLocationRequestDetailInput : SfsStoreDetailWithQtyInputBase { + #region 目标库位 + /// - /// 目标库位 + /// 到库位 /// - [Display(Name = "目标库位")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string ToLocationCode { get; set; } /// - /// 来源库位 + /// 到库区 + /// + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + public string ToWarehouseCode { get; set; } + + #endregion + + #region 来源库位 + + /// + /// 到库位 /// - [Display(Name = "来源库位")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string FromLocationCode { get; set; } /// - /// 来源库区 + /// 到库区 /// - [Display(Name = "来源库区")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] public string FromLocationArea { get; set; } /// - /// 申请单件码 + /// 到库位组 /// - [Display(Name = "申请单件码")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string SingleCodeRequest { get; set; } + public string FromLocationGroup { get; set; } /// - /// 工作中心 + /// 到ERP库位 /// - [Display(Name = "工作中心")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string WorkStation { get; set; } + public string FromLocationErpCode { get; set; } /// - /// 过期时间 + /// 到仓库 /// - [Display(Name = "过期时间")] - public DateTime ExpiredTime { get; set; } + public string FromWarehouseCode { get; set; } + + #endregion + + #region 在途库位 /// - /// 状态 + /// 在途库库位 /// - [Display(Name = "状态")] - public EnumRequestStatus RequestStatus { get; set; } = EnumRequestStatus.New; + public string OnTheWayLocationCode { get; set; } + + #endregion /// - /// ERP储位 + /// 申请单件码 /// - [Display(Name = "ERP储位")] - public string ToLocationErpCode { get; set; } + public string SingleCodeRequest { get; set; } /// - /// 已发数量 + /// 已发数量 /// - [Display(Name = "已发数量")] public decimal IssuedQty { get; set; } /// - /// 已收数量 + /// 已收数量 /// - [Display(Name = "已收数量")] public decimal ReceivedQty { get; set; } - /// - /// 位置码 + /// 箱码 /// - public string PositionCode { get; set; } + public string PackingCode { get; set; } /// - /// 推荐类型 + /// 批次 /// - public EnumRecommendType RecommendType { get; set; } + public string Lot { get; set; } + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + /// + /// 库位状态 + /// + public EnumInventoryStatus EnumInventoryStatus { get; set; } + + /// + /// 请求未收 + /// + [NotMapped] + public decimal NotFinishQty => IssuedQty - ReceivedQty; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestEditInput.cs index 57b2978e9..209e19f4e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestEditInput.cs @@ -6,41 +6,15 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class ThirdLocationRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase { - #region Base - - /// - /// 申请单件码 - /// - [Display(Name = "生产线")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string SingleCodeRequest { get; set; } - - /// - /// 使用在途库 - /// - [Display(Name = "使用在途库")] - public bool UseOnTheWayLocation { get; set; } - #endregion - - #region Create - /// - /// 要货单号 - /// - [Display(Name = "要货单号")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string Number { get; set; } - /// - /// 叫料类型 + /// 三方库申请类型 /// - [Display(Name = "叫料类型")] + [Display(Name = "三方库申请类型")] public string Type { get; set; } - /// /// 明细列表 /// [Display(Name = "明细列表")] public List Details { get; set; } = new List(); - #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs index 42cf848e8..2f01874b8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs @@ -4,6 +4,8 @@ using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; +using Castle.Components.DictionaryAdapter; +using IdentityServer4.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; @@ -12,10 +14,14 @@ using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; using Volo.Abp.ObjectMapping; using Volo.Abp.Uow; +using Volo.Abp.Users; +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.Event; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Inventory.Domain; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -29,12 +35,294 @@ public class ThirdLocationJobAppService IThirdLocationJobAppService { private readonly IThirdLocationJobManager _thirdLocationJobManager; + private readonly ITransferLogAppService _transferLogAppService; + private readonly ILocationAppService _locationAppService; + private readonly IThirdLocationNoteAppService _thirdLocationNoteAppService; + private readonly ICurrentUser _currentUser; + + protected IThirdLocationRequestAppService ThirdLocationRequestAppService => + LazyServiceProvider.LazyGetRequiredService(); public ThirdLocationJobAppService( - IThirdLocationJobRepository repository, IThirdLocationJobManager thirdLocationJobManager - ) : base(repository, thirdLocationJobManager) + IThirdLocationJobRepository repository, IThirdLocationJobManager thirdLocationJobManager, + ITransferLogAppService transferLogAppService, ILocationAppService locationAppService, IThirdLocationNoteAppService thirdLocationNoteAppService, ICurrentUser currentUser) : base(repository, thirdLocationJobManager) { _thirdLocationJobManager = thirdLocationJobManager; + _transferLogAppService = transferLogAppService; + _locationAppService = locationAppService; + _thirdLocationNoteAppService = thirdLocationNoteAppService; + _currentUser = currentUser; + } + + [HttpPost("")] + public override async Task CreateAsync(ThirdLocationJobEditInput input) + { + input.JobStatus = EnumJobStatus.Open; + var result = await base.CreateAsync(input).ConfigureAwait(false); + + var buildTransferLogsAsync = await BuildTransferLogsByToTransportAsync(result).ConfigureAwait(false); + + await AddTransferLogsAsync(buildTransferLogsAsync).ConfigureAwait(false); + + return result; + } + + [HttpPost("add-many")] + public override async Task> CreateManyAsync(List inputs) + { + var thirdLocationJobDtos = new List(); + + foreach (var input in inputs) + { + thirdLocationJobDtos.Add(await CreateAsync(input).ConfigureAwait(false)); + } + + return thirdLocationJobDtos; + } + + /// + /// 执行任务明细 + /// + /// + [HttpPost("ExecuteDetail/{masterId}")] + public async Task ExecuteDetailAsync(Guid masterId,List detailDtoList) + { + var thirdLocationJob=await _repository.GetAsync(masterId).ConfigureAwait(false); + thirdLocationJob.JobStatus = EnumJobStatus.Partial; + + var tempDetailDto= new List(); + var entityList=ObjectMapper.Map, List>(thirdLocationJob.Details); + foreach (var detailDto in detailDtoList)//为了不用DTO的赋值 + { + var jobDetailDto=entityList.First(p => p.Id == detailDto.Id); + jobDetailDto.HandledQty = detailDto.HandledQty; + jobDetailDto.RecommendQty = detailDto.RecommendQty; + tempDetailDto.Add(jobDetailDto); + + thirdLocationJob.Details.First(p => p.Id == detailDto.Id).ReceivedQty += detailDto.HandledQty; + } + + var transferLogs = await BuildTransferLogsByFromTransportAsync(thirdLocationJob, tempDetailDto).ConfigureAwait(false); + await _transferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); + + var jobDto=await GetAsync(masterId).ConfigureAwait(false); + var tempDetailDtos = new List(); + foreach (var detailDto in detailDtoList) + { + var temp=jobDto.Details.First(p => p.Id == detailDto.Id); + temp.HandledQty=detailDto.HandledQty; + temp.RecommendQty = detailDto.RecommendQty; + tempDetailDtos.Add(temp); + } + + jobDto.Details = tempDetailDtos; + + var input =await BuildThirdLocationNoteAsync(jobDto).ConfigureAwait(false); + var noteDto = await _thirdLocationNoteAppService.CreateByNumberAsync(input).ConfigureAwait(false); + + await UpdateJobStatusAsync(thirdLocationJob).ConfigureAwait(false); + + await _repository.UpdateAsync(thirdLocationJob).ConfigureAwait(false); + } + + /// + /// 完成任务 + /// + /// + /// + [HttpPost("Complete/{id}")] + public async Task CompleteAsync(Guid id) + { + var kittingIssueJob = await _repository.FindAsync(id).ConfigureAwait(false); + + kittingIssueJob.JobStatus = EnumJobStatus.Done; + + var entity=await _repository.UpdateAsync(kittingIssueJob).ConfigureAwait(false); + + var dto=ObjectMapper.Map(entity); + + var transferLogEditInputs=await BuildTransferLogsByBackFromAsync(dto).ConfigureAwait(false); + + await AddTransferLogsAsync(transferLogEditInputs).ConfigureAwait(false); + + await ThirdLocationRequestAppService.UpdateRequestStatusAsync(kittingIssueJob.RequestNumber).ConfigureAwait(false); + } + + [HttpPost("Get-By-Request-Number")] + public async Task> GetByRequestNumberAsync(string requestNumber) + { + var list=await _repository.GetListAsync(p => p.RequestNumber == requestNumber).ConfigureAwait(false); + return ObjectMapper.Map, List>(list); + } + + [HttpPost("accept/{id}")] + [UnitOfWork] + public override async Task AcceptAsync(Guid id) + { + var entity = await _repository.FindAsync(id).ConfigureAwait(false); + entity.IsClaims = true; + entity.ClaimsUserName = _currentUser.UserName; + entity.ClaimsUserId = _currentUser.Id.ToString(); + entity.AcceptTime = Clock.Now; + await _repository.UpdateAsync(entity).ConfigureAwait(false); + } + + /// + /// 取消承接任务 + /// + /// + /// + [HttpPost("cancel-accept/{id}")] + [UnitOfWork] + public override async Task CancelAcceptAsync(Guid id) + { + var entity = await _repository.FindAsync(id).ConfigureAwait(false); + entity.IsClaims = false; + entity.ClaimsUserName = string.Empty; + entity.ClaimsUserId = string.Empty; + entity.AcceptTime = DateTime.Now; + await _repository.UpdateAsync(entity).ConfigureAwait(false); + } + #region 私有 + + private async Task UpdateJobStatusAsync(ThirdLocationJob thirdLocationJob) + { + var flag = true; + foreach (var detail in thirdLocationJob.Details) + { + if (detail.IssuedQty > detail.ReceivedQty) + { + flag = false; + break; + } + } + if (flag) + { + thirdLocationJob.JobStatus = EnumJobStatus.Done; + } + + await _repository.UpdateAsync(thirdLocationJob).ConfigureAwait(false); + await ThirdLocationRequestAppService.UpdateRequestStatusAsync(thirdLocationJob.RequestNumber).ConfigureAwait(false); + await Task.CompletedTask.ConfigureAwait(false); + } + + private async Task AddTransferLogsAsync(List inputList) + { + var transferLogs = new List(); + + transferLogs.AddRange(inputList); + + await _transferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); + } + + private async Task BuildThirdLocationNoteAsync(ThirdLocationJobDTO jobDto) + { + await Task.CompletedTask.ConfigureAwait(false); + + return ObjectMapper.Map(jobDto); + } + + /// + /// 创建库移 从from到在途 + /// + /// + /// + private async Task> BuildTransferLogsByToTransportAsync(ThirdLocationJobDTO dto) + { + //获取在途库 + var transportLocation =await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + + var transferLog = new List(); + foreach (var detailDto in dto.Details) + { + var transferLogEditInput = ObjectMapper.Map(detailDto); + transferLogEditInput.TransType = EnumTransType.Transfer; + transferLogEditInput.DocNumber = dto.Number; + transferLogEditInput.JobNumber = dto.Number; + transferLogEditInput.Remark = $"目标库位:{detailDto.ToLocationCode.Clone()}"; + transferLogEditInput.ToLocationCode = transportLocation.Code; + transferLogEditInput.ToLocationErpCode = transportLocation.ErpLocationCode; + transferLogEditInput.ToLocationArea = transportLocation.AreaCode; + transferLogEditInput.ToLocationGroup = transportLocation.LocationGroupCode; + transferLogEditInput.ToWarehouseCode = transportLocation.WarehouseCode; + + transferLog.Add(transferLogEditInput); + } + + await Task.CompletedTask.ConfigureAwait(false); + + return transferLog; + } + + /// + /// 创建库移 从在途到To + /// + /// + /// + /// + private async Task> BuildTransferLogsByFromTransportAsync(ThirdLocationJob entity, List detailDtos) + { + //获取在途库 + var transportLocation =await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + + var transferLog = new List(); + foreach (var detail in entity.Details) + { + var transferLogEditInput = ObjectMapper.Map(detail); + transferLogEditInput.TransType = EnumTransType.Transfer; + transferLogEditInput.DocNumber = entity.Number; + transferLogEditInput.JobNumber = entity.Number; + transferLogEditInput.Remark = $"来源库位:{detail.FromLocationCode.Clone()}"; + transferLogEditInput.FromLocationCode = transportLocation.Code; + transferLogEditInput.FromLocationErpCode = transportLocation.ErpLocationCode; + transferLogEditInput.FromLocationArea = transportLocation.AreaCode; + transferLogEditInput.FromLocationGroup = transportLocation.LocationGroupCode; + transferLogEditInput.FromWarehouseCode = transportLocation.WarehouseCode; + transferLogEditInput.Qty = detailDtos.First(p => p.Id == detail.Id).HandledQty; + + transferLog.Add(transferLogEditInput); + } + + await Task.CompletedTask.ConfigureAwait(false); + + return transferLog; + } + + + private async Task> BuildTransferLogsByBackFromAsync(ThirdLocationJobDTO dto) + { + //获取在途库 + var transportLocation = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + + var transferLog = new List(); + foreach (var detailDto in dto.Details) + { + var transferLogEditInput = ObjectMapper.Map(detailDto); + transferLogEditInput.TransType = EnumTransType.Transfer; + transferLogEditInput.DocNumber = dto.Number; + transferLogEditInput.JobNumber = dto.Number; + + transferLogEditInput.FromLocationCode = transportLocation.Code; + transferLogEditInput.FromLocationErpCode = transportLocation.ErpLocationCode; + transferLogEditInput.FromLocationArea = transportLocation.AreaCode; + transferLogEditInput.FromLocationGroup = transportLocation.LocationGroupCode; + transferLogEditInput.FromWarehouseCode = transportLocation.WarehouseCode; + + transferLogEditInput.ToLocationCode = detailDto.FromLocationCode; + transferLogEditInput.ToLocationErpCode = detailDto.FromLocationErpCode; + transferLogEditInput.ToLocationArea = detailDto.FromLocationArea; + transferLogEditInput.ToLocationGroup = detailDto.FromLocationGroup; + transferLogEditInput.ToWarehouseCode = detailDto.ToWarehouseCode; + + transferLogEditInput.Qty = detailDto.IssuedQty - detailDto.ReceivedQty; + + transferLog.Add(transferLogEditInput); + } + + await Task.CompletedTask.ConfigureAwait(false); + + return transferLog; } + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs index 14876bc10..d29cb989b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs @@ -17,6 +17,8 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; using System.Linq; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application.Contracts; [Authorize] @@ -33,6 +35,7 @@ public class PutawayNoteAppService : public readonly IPurchasePriceSheetAppService _purchasePriceSheetAppService; public readonly IErpLocationItemAppService _erpLocationItemAppService; public readonly IItemBasicAppService _itemBasicAppService; + public readonly ISplitPackingRecAppService _splitPackingRecAppService; public PutawayNoteAppService( IPutawayNoteRepository repository, @@ -42,7 +45,7 @@ public class PutawayNoteAppService : IPurchaseOrderManager purchaseOrderManager, IPurchasePriceSheetAppService purchasePriceSheetAppService, IErpLocationItemAppService erpLocationItemAppService, - IItemBasicAppService itemBasicAppService) : base(repository) + IItemBasicAppService itemBasicAppService, ISplitPackingRecAppService splitPackingRecAppService) : base(repository) { _putawayNoteManager = putawayNoteManager; _purchaseReceiptNoteAppService = purchaseReceiptNoteAppService; @@ -51,6 +54,7 @@ public class PutawayNoteAppService : _purchasePriceSheetAppService = purchasePriceSheetAppService; _erpLocationItemAppService = erpLocationItemAppService; _itemBasicAppService = itemBasicAppService; + _splitPackingRecAppService = splitPackingRecAppService; } /// @@ -62,45 +66,76 @@ public class PutawayNoteAppService : //[Authorize(PutawayNotePermissions.Create)] public override async Task CreateAsync(PutawayNoteEditInput input) { - foreach (var detail in input.Details) + var inputSplits = new List(); + var resultPutawayNote=new List(); + + //先获取所有的箱码 + var selectPackingCode=input.Details.Select(p => p.ToPackingCode); + var splitPackingRecList = await _splitPackingRecAppService.GetListByToPackingCode(selectPackingCode.ToList()).ConfigureAwait(false); + //按照不同的条件分组 + var group= splitPackingRecList.GroupBy(p => new { + p.SupplierCode,p.AsnNumber,p.PoNumber + }); + foreach (var groupWhere in group) { - var isClosed = await _purchaseOrderManager.CheckIsCloseAsync(input.Number, input.SupplierCode, detail.ItemCode).ConfigureAwait(false); - if (isClosed) + var tempEditInput = new PutawayNoteEditInput(); + tempEditInput.Details = new List(); + tempEditInput.SupplierCode = groupWhere.First().SupplierCode; + tempEditInput.AsnNumber = groupWhere.First().AsnNumber; + tempEditInput.InspectNumber = string.Empty; + tempEditInput.JobNumber = string.Empty; + tempEditInput.ProductReceiptNumber = string.Empty; + tempEditInput.PurchaseReceiptRequestNumber = string.Empty; + tempEditInput.Type = EnumPutawayType.PurchasePutaway; + foreach (var packingCode in groupWhere) { - throw new UserFriendlyException($"物品名称【{detail.ItemCode}】的订单明细行以关闭无法执行采购上架!"); + var detailInput=input.Details.First(p => p.ToPackingCode == packingCode.ToPackingCode); + tempEditInput.Details.Add(detailInput); } - var item = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); - if (!item.CanMake) + inputSplits.Add(tempEditInput); + } + + foreach (var inputSplit in inputSplits) + { + foreach (var detail in inputSplit.Details) { - var isprice = await _purchasePriceSheetAppService.CheckPurPriceAsync(input.SupplierCode, detail.ItemCode).ConfigureAwait(false); - if (isprice) + var isClosed = await _purchaseOrderManager.CheckIsCloseAsync(inputSplit.Number, inputSplit.SupplierCode, detail.ItemCode).ConfigureAwait(false); + if (isClosed) { - throw new UserFriendlyException($"供应商【{input.SupplierCode}】物品名称【{detail.ItemCode}】无采购价格无法执行采购上架!"); + throw new UserFriendlyException($"物品名称【{detail.ItemCode}】的订单明细行以关闭无法执行采购上架!"); } - } - var erpLocationItem = await _erpLocationItemAppService.CheckItemErpLocationIsAvailable(detail.ItemCode, detail.ToLocationErpCode).ConfigureAwait(false); + var item = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + if (!item.CanMake) + { + var isprice = await _purchasePriceSheetAppService.CheckPurPriceAsync(inputSplit.SupplierCode, detail.ItemCode).ConfigureAwait(false); + if (isprice) + { + throw new UserFriendlyException($"供应商【{inputSplit.SupplierCode}】物品名称【{detail.ItemCode}】无采购价格无法执行采购上架!"); + } + } + var erpLocationItem = await _erpLocationItemAppService.CheckItemErpLocationIsAvailable(detail.ItemCode, detail.ToLocationErpCode).ConfigureAwait(false); - if (erpLocationItem == null) - { - throw new UserFriendlyException($"未找到物品【{detail.ItemCode}】与ERP储位【{detail.ToLocationErpCode}】的开账信息"); - } - var purchasereDetail = await _purchaseReceiptNoteAppService - .GetDetailByItemAndPackingAsync(detail.ItemCode, detail.ToPackingCode).ConfigureAwait(false); - if (purchasereDetail != null) - { - var inspectJobDto = await _inspectJobAppService - .GetInspectNoteDetailByPackingCodeAsync(detail.ToPackingCode).ConfigureAwait(false); - if (inspectJobDto.JobStatus != EnumJobStatus.Done) + if (erpLocationItem == null) { - throw new UserFriendlyException($"包含【{detail.ToPackingCode}】箱码的报检单,尚未完成质检"); + throw new UserFriendlyException($"未找到物品【{detail.ItemCode}】与ERP储位【{detail.ToLocationErpCode}】的开账信息"); + } + var purchasereDetail = await _purchaseReceiptNoteAppService + .GetDetailByItemAndPackingAsync(detail.ItemCode, detail.ToPackingCode).ConfigureAwait(false); + if (purchasereDetail != null) + { + var inspectJobDto = await _inspectJobAppService + .GetInspectNoteDetailByPackingCodeAsync(detail.ToPackingCode).ConfigureAwait(false); + if (inspectJobDto.JobStatus != EnumJobStatus.Done) + { + throw new UserFriendlyException($"包含【{detail.ToPackingCode}】箱码的报检单,尚未完成质检"); + } } } + var entity = ObjectMapper.Map(inputSplit); + resultPutawayNote.Add( await _putawayNoteManager.CreateByPurchaseAsync(entity).ConfigureAwait(false)); } - var entity = ObjectMapper.Map(input); - var result = await _putawayNoteManager.CreateByPurchaseAsync(entity).ConfigureAwait(false); - - var dto = ObjectMapper.Map(result); + var dto = ObjectMapper.Map(resultPutawayNote.First()); return dto; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs index c746455d6..a3b83c547 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs @@ -9,7 +9,9 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; +using Volo.Abp.ObjectMapping; 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; @@ -33,4 +35,25 @@ public class ThirdLocationNoteAppService : { _thirdLocationNoteManager = thirdLocationNoteManager; } + + /// + /// 创建 同时 直接赋值Number 为了返回Number + /// + /// + /// + [HttpPost("Create-By-Number")] + public virtual async Task CreateByNumberAsync(ThirdLocationNoteEditInput input) + { + var entity=ObjectMapper.Map(input); + + var number = string.IsNullOrEmpty(entity.Number) + ? await GenerateNumberAsync(nameof(AssembleIssueRequest), entity.ActiveDate).ConfigureAwait(false) + : entity.Number; + entity.SetIdAndNumberWithDetails(GuidGenerator, number); + await _repository.InsertAsync(entity, true).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData(entity), false) + .ConfigureAwait(false); + + return entity; + } } 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 2768b848b..3fb7b5b0e 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 @@ -474,6 +474,34 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { packRec.PurchaseInfo_PoNumber = inventoryLabelDto.PoNumber; packRec.PurchaseInfo_AsnNumber = inventoryLabelDto.AsnNumber; + + #region InventoryLabel兼容成员 + var inputObj = inventoryLabelDto; + packRec.FullBarcodeString = inputObj.FullBarcodeString; + packRec.SupplierBatch = inputObj.SupplierBatch; + packRec.ArriveDate = inputObj.ArriveDate; + packRec.ProduceDate = inputObj.ProduceDate; + packRec.ExpireDate = inputObj.ExpireDate; + packRec.LabelStatus = (Win_in.Sfs.Basedata.LabelStatus)((int)inputObj.LabelStatus); + packRec.RecommendLocationCode = inputObj.RecommendLocationCode; + packRec.LocationErpCode = inputObj.LocationErpCode; + packRec.ContainerCode = inputObj.ContainerCode; + packRec.QLevel = inputObj.QLevel;// + packRec.QualityFile = inputObj.QualityFile; + packRec.SupplierCode = inputObj.SupplierCode; + packRec.PoNumber = inputObj.PoNumber; + packRec.RpNumber = inputObj.RpNumber; + packRec.AsnNumber = inputObj.AsnNumber; + packRec.ProdLine = inputObj.ProdLine; + packRec.Team = inputObj.Team; + packRec.Shift = inputObj.Shift;// + packRec.Specifications = inputObj.Specifications; + packRec.SupplierName = inputObj.SupplierName; + packRec.SupplierSimpleName = inputObj.SupplierSimpleName; + packRec.SupplierItemCode = inputObj.SupplierItemCode; + packRec.SupplierItemName = inputObj.SupplierItemName; + packRec.PlanArriveDate = inputObj.PlanArriveDate; + #endregion } recLst.Add(packRec); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs index 809db3d71..547dbdb05 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs @@ -232,7 +232,7 @@ ISupplierItemAppService supplierItemAppService) : base(repository) { if (result.All(p => p.Code != itemCode)) { - throw new UserFriendlyException($"供应商代码【{itemCode}】不存在"); + throw new UserFriendlyException($"ERP料号代码【{itemCode}】不存在"); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs index 0d74a5c9d..cc4fbcfff 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; +using Castle.Components.DictionaryAdapter; using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main; using DocumentFormat.OpenXml.Vml.Office; using IdentityModel; @@ -40,49 +41,183 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase CreateAsync(ThirdLocationRequestEditInput input) + { + foreach (var detailInput in input.Details) + { + var transportLocationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + var fromLocationDto=await _locationAppService.GetByCodeAsync(detailInput.FromLocationCode).ConfigureAwait(false); + var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.FromLocationCode).ConfigureAwait(false); + var itemBasicDto= await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false); + + detailInput.OnTheWayLocationCode = transportLocationDto.Code; + + if (fromLocationDto == null) + { + throw new UserFriendlyException($"库位【{detailInput.FromLocationCode}】不存在"); + } + if (toLocationDto == null) + { + throw new UserFriendlyException($"库位【{detailInput.ToLocationCode}】不存在"); + } + if (itemBasicDto == null) + { + throw new UserFriendlyException($"ERP料号【{detailInput.ItemCode}】不存在"); + } + + detailInput.FromLocationArea = fromLocationDto.AreaCode; + detailInput.FromLocationErpCode = fromLocationDto.ErpLocationCode; + detailInput.FromWarehouseCode= fromLocationDto.WarehouseCode; + detailInput.FromLocationGroup = fromLocationDto.LocationGroupCode; + + detailInput.ToLocationArea = toLocationDto.AreaCode; + detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode; + detailInput.ToWarehouseCode = toLocationDto.WarehouseCode; + detailInput.ToLocationGroup = toLocationDto.LocationGroupCode; + + detailInput.ItemName = itemBasicDto.Name; + detailInput.ItemDesc1 = itemBasicDto.Name; + detailInput.ItemDesc2= itemBasicDto.Name; + + var balanceDto = await _balanceAppService.GetRealQtyByPackingCodeAndItemCodeAndLocationCodeAndStatusAsync(detailInput.PackingCode, detailInput.ItemCode, detailInput.FromLocationCode, detailInput.EnumInventoryStatus, detailInput.Lot).ConfigureAwait(false); + if (balanceDto == null || balanceDto.Qty <= 0) + { + throw new UserFriendlyException($"ERP料号【{detailInput.ItemCode}】,箱码【{detailInput.PackingCode}】,批次【{detailInput.Lot}】,库位【{detailInput.FromLocationCode}】,状态【{detailInput.EnumInventoryStatus}】的库存,可用余额为【{balanceDto.Qty}】,无法使用。"); + } + + detailInput.ExpiredTime = balanceDto.ExpireDate; + detailInput.StdPackQty=balanceDto.StdPackQty; + detailInput.Uom=balanceDto.Uom; + detailInput.EnumInventoryStatus = balanceDto.Status; + } + + var entity = ObjectMapper.Map(input); + var result =await _thirdLocationRequestManager.CreateByNumberAsync(entity).ConfigureAwait(false); + var requestDto = ObjectMapper.Map(result); + + var thirdLocationJobAsync=await BuildThirdLocationJobAsync(requestDto).ConfigureAwait(false); + + await _thirdLocationJobAppService.CreateManyAsync(thirdLocationJobAsync).ConfigureAwait(false); + + return requestDto; + } + + [HttpPost("Update-Request-Status")] + public async Task UpdateRequestStatusAsync(string requestNumber) + { + var thirdLocationRequest=await _repository.GetAsync(p=>p.Number==requestNumber).ConfigureAwait(false); + var jobDtos=await _thirdLocationJobAppService.GetByRequestNumberAsync(requestNumber).ConfigureAwait(false); + var noFinsh=jobDtos.Any(p => p.JobStatus == EnumJobStatus.Open || + p.JobStatus == EnumJobStatus.Doing || + p.JobStatus == EnumJobStatus.Wait || + p.JobStatus == EnumJobStatus.Partial); + if (noFinsh==false) + { + thirdLocationRequest.RequestStatus = EnumRequestStatus.Completed; + await _repository.UpdateAsync(thirdLocationRequest).ConfigureAwait(false); + } + } + + public override async Task CompleteAsync(Guid id) + { + var thirdLocationRequest = await _repository.GetAsync(id).ConfigureAwait(false); + if (thirdLocationRequest.RequestStatus == EnumRequestStatus.Handling || + thirdLocationRequest.RequestStatus == EnumRequestStatus.Partial || + thirdLocationRequest.RequestStatus == EnumRequestStatus.New) + { + + } + else + { + throw new UserFriendlyException($"【{thirdLocationRequest.RequestStatus.GetDisplayName()}】状态不允许完成"); + } + + + var jobDtos=await _thirdLocationJobAppService.GetByRequestNumberAsync(thirdLocationRequest.Number).ConfigureAwait(false); + foreach (var job in jobDtos) + { + await _thirdLocationJobAppService.CompleteAsync(job.Id).ConfigureAwait(false); + } + thirdLocationRequest.RequestStatus = EnumRequestStatus.Completed; + var entity=await _repository.UpdateAsync(thirdLocationRequest).ConfigureAwait(false); + + return ObjectMapper.Map(entity); + } + + public override async Task CancelAsync(Guid id) + { + var thirdLocationRequest = await _repository.GetAsync(id).ConfigureAwait(false); + if (thirdLocationRequest.RequestStatus == EnumRequestStatus.Handling || + thirdLocationRequest.RequestStatus == EnumRequestStatus.Partial || + thirdLocationRequest.RequestStatus == EnumRequestStatus.New) + { + + } + else + { + throw new UserFriendlyException($"【{thirdLocationRequest.RequestStatus.GetDisplayName()}】状态不允许取消"); + } + + + var jobDtos = await _thirdLocationJobAppService.GetByRequestNumberAsync(thirdLocationRequest.Number).ConfigureAwait(false); + foreach (var job in jobDtos) + { + await _thirdLocationJobAppService.CompleteAsync(job.Id).ConfigureAwait(false); + } + thirdLocationRequest.RequestStatus = EnumRequestStatus.Cancelled; + var entity = await _repository.UpdateAsync(thirdLocationRequest).ConfigureAwait(false); + + return ObjectMapper.Map(entity); } + + #region 私有 + private async Task> BuildThirdLocationJobAsync(ThirdLocationRequestDTO requestDto) + { + var inputsDict = new Dictionary(); + var groupBy = requestDto.Details.GroupBy(p => p.ItemCode); + var thirdLocationJobEditInputs = new List(); + + foreach (var itemCodeGroupBy in groupBy) + { + var list = itemCodeGroupBy.ToList();//当前零件所有的集合 + + var mastEditInput = ObjectMapper.Map(requestDto); + mastEditInput.Details = new List(); + mastEditInput.Worker = requestDto.Worker; + mastEditInput.WarehouseCode = list.First().ToWarehouseCode; + + var tempJobDetailInputs = ObjectMapper.Map, List>(list); + tempJobDetailInputs.ForEach(p => + { + p.IssuedQty = p.RecommendQty; + p.IssueTime = DateTime.Now; + }); + mastEditInput.Details = tempJobDetailInputs; + + thirdLocationJobEditInputs.Add(mastEditInput); + } + + await Task.CompletedTask.ConfigureAwait(false); + + return thirdLocationJobEditInputs; + } + + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs index 657c21eee..09d997b29 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs @@ -1,6 +1,7 @@ using AutoMapper; using Volo.Abp.AutoMapper; 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; @@ -18,10 +19,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() - .Ignore(x => x.ToLocationArea) - .Ignore(x => x.IssuedQty) - .Ignore(x => x.ToLocationGroup) - .Ignore(x => x.ToWarehouseCode) .Ignore(x => x.MasterID) .Ignore(x => x.TenantId) .Ignore(x => x.Number) @@ -64,5 +61,59 @@ public partial class StoreApplicationAutoMapperProfile : Profile .IgnoreAuditedObjectProperties() .Ignore(x => x.RequestStatus) .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); + + CreateMap() + .Ignore(x => x.DocNumber) + .Ignore(x => x.JobNumber) + .Ignore(x => x.Worker) + .Ignore(x => x.TransType) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.TransSubType) + + .ForMember(x => x.Qty, y => y.MapFrom(t => t.HandledQty)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(t => t.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(t => t.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(t => t.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(t => t.ExpiredTime)) + + .ForMember(x => x.FromPackingCode, y => y.MapFrom(t => t.HandledPackingCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(t => t.HandledContainerCode)) + + .ForMember(x => x.FromLot, y => y.MapFrom(t => t.HandledLot)) + .ForMember(x => x.FromStatus, y => y.MapFrom(t => t.Status)) + + .ForMember(x => x.ToLot, y => y.MapFrom(t => t.HandledLot)) + .ForMember(x => x.ToStatus, y => y.MapFrom(t => t.Status)) + + .ForMember(x => x.ToPackingCode, y => y.MapFrom(t => t.HandledPackingCode)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(t => t.HandledContainerCode)) + ; + + CreateMap() + .Ignore(x => x.DocNumber) + .Ignore(x => x.JobNumber) + .Ignore(x => x.Worker) + .Ignore(x => x.TransType) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.TransSubType) + + .ForMember(x => x.Qty, y => y.MapFrom(t => t.HandledQty)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(t => t.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(t => t.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(t => t.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(t => t.ExpiredTime)) + + .ForMember(x => x.FromPackingCode, y => y.MapFrom(t => t.HandledPackingCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(t => t.HandledContainerCode)) + + .ForMember(x => x.FromLot, y => y.MapFrom(t => t.HandledLot)) + .ForMember(x => x.FromStatus, y => y.MapFrom(t => t.Status)) + + .ForMember(x => x.ToLot, y => y.MapFrom(t => t.HandledLot)) + .ForMember(x => x.ToStatus, y => y.MapFrom(t => t.Status)) + + .ForMember(x => x.ToPackingCode, y => y.MapFrom(t => t.HandledPackingCode)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(t => t.HandledContainerCode)) + ; } } 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 547f89df8..eb36c9763 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,6 +32,9 @@ public enum EnumExchangeDataType //回收料调整 Item_Transform = 28, //半成品上架 - SemiPutaway = 29, - + SemiPutaway = 29, + /// + /// 客户退货 + /// + CustomerReturn = 30, } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs index 02b71010a..61875635a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs @@ -7,5 +7,10 @@ using Win_in.Sfs.Shared.Domain; public interface IThirdLocationRequestManager : ISfsStoreRequestManager, IBulkImportService { - + /// + /// ͬʱ ֱӸֵNumber Ϊ˷Number + /// + /// + /// + Task CreateByNumberAsync(ThirdLocationRequest entity); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs index dd04c88bc..ce5dbbc8d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs @@ -29,4 +29,25 @@ public class ThirdLocationRequestManager { throw new NotImplementedException(); } + + /// + /// 创建 同时 直接赋值Number 为了返回Number + /// + /// + /// + public virtual async Task CreateByNumberAsync(ThirdLocationRequest entity) + { + var number = string.IsNullOrEmpty(entity.Number) + ? await GenerateNumberAsync(nameof(ThirdLocationRequest), entity.ActiveDate).ConfigureAwait(false) + : entity.Number; + entity.SetIdAndNumberWithDetails(GuidGenerator, number); + entity.Submit(); + entity.Agree(); + entity.RequestStatus = EnumRequestStatus.Partial; + await _repository.InsertAsync(entity, true).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false) + .ConfigureAwait(false); + + return entity; + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs index 1416fa618..2dee1d1c4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs @@ -17,12 +17,9 @@ public partial class StoreEventAutoMapperProfile : Profile .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber)) .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) - .Ignore(x => x.Number) - - .Ignore(x => x.IssueTime) .Ignore(x => x.ReceiptTime) - ; + .Ignore(x => x.Number); CreateMap() .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) @@ -48,8 +45,6 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ToLocationArea) .Ignore(x => x.ToLocationGroup) .Ignore(x => x.ToLocationErpCode) - - ; CreateMap() @@ -67,14 +62,22 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber)) + .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) .Ignore(x => x.Confirmed) - .Ignore(x => x.JobNumber) .Ignore(x => x.ActiveDate) - .Ignore(x => x.Workshop) .Ignore(x => x.RequestType) .Ignore(x => x.UseOnTheWayLocation) + ; + CreateMap() + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber)) + .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) + .Ignore(x => x.Confirmed) + .Ignore(x => x.ActiveDate) + .Ignore(x => x.Workshop) + .Ignore(x => x.RequestType) + .Ignore(x => x.UseOnTheWayLocation) ; CreateMap() .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) @@ -97,10 +100,35 @@ public partial class StoreEventAutoMapperProfile : Profile .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) .ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest)) - .Ignore(x => x.SingleCodeJob) + .Ignore(x => x.RecommendType) .Ignore(x => x.PositionCode) + ; + + CreateMap() + .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpiredTime)) + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) + .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.FromLocationArea)) + .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup)) + .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) + .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest)) + .Ignore(x => x.SingleCodeJob) .Ignore(x => x.RecommendType) + .Ignore(x => x.PositionCode) ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs index eaa70bea5..8e479aad1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs @@ -43,6 +43,12 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ReverseMap(); CreateMap(); + + CreateMap() + .ForMember(x => x.Customer, y => y.MapFrom(d => d.CustomerCode)) + ; + + CreateMap(); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs index 7a5ab62ff..3684d545a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs @@ -25,7 +25,6 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.CallBusinessType) .Ignore(x => x.CallRequestNumber) .Ignore(x => x.CallJobNumber) - .Ignore(x => x.UseOnTheWayLocation) .Ignore(x => x.Confirmed) .Ignore(x => x.ConfirmTime) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs index 3a1e0e3b8..ddbb9401d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs @@ -1,6 +1,8 @@ +using System; using AutoMapper; using Volo.Abp.AutoMapper; using Win_in.Sfs.Shared.Application; +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; @@ -35,7 +37,7 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ToContainerCode) ; - CreateMap() + CreateMap() .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.Number)) .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) .Ignore(x => x.SingleCodeJob) @@ -57,29 +59,21 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.CompleteUserName) .Ignore(x => x.CompleteTime) .Ignore(x => x.Details) - .Ignore(x => x.UseOnTheWayLocation) ; CreateMap() .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) .ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest)) - .Ignore(x => x.SingleCodeJob) + .ForMember(x => x.IsOnTheWayLocationCode, y => y.MapFrom(d => true)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) .Ignore(x => x.RecommendFromLocationArea) .Ignore(x => x.RecommendFromLocationGroup) .Ignore(x => x.HandledFromLocationArea) .Ignore(x => x.HandledFromLocationGroup) .Ignore(x => x.RecommendFromWarehouseCode) .Ignore(x => x.HandledFromWarehouseCode) - .Ignore(x => x.OnTheWayLocationCode) - .Ignore(x => x.DistributionType) - .Ignore(x => x.RoundedQty) - .Ignore(x => x.Operation) .Ignore(x => x.ExpiredTime) - .Ignore(x => x.TruncType) - .Ignore(x => x.PlanBeginTime) - .Ignore(x => x.PlannedSplitRule) - .Ignore(x => x.DeliveryQty) .Ignore(x => x.Status) .Ignore(x => x.RecommendContainerCode) .Ignore(x => x.RecommendPackingCode) @@ -104,10 +98,51 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.RecommendFromLocationCode) .Ignore(x => x.RecommendLot) - .Ignore(x => x.PositionCode) - .Ignore(x => x.RecommendType) .IgnoreIHasRecommendAndHandledFrom(); + CreateMap() + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) + .ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest)) + .ForMember(x => x.IsOnTheWayLocationCode, y => y.MapFrom(d => true)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.Uom, y => y.MapFrom(d => d.Uom)) + .ForMember(x => x.IssuedQty, y => y.MapFrom(d => 0)) + .ForMember(x => x.NotFinishQty, y => y.MapFrom(d => 0)) + .ForMember(x => x.ReceivedQty, y => y.MapFrom(d => 0)) + + .ForMember(x => x.RecommendFromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) + .ForMember(x => x.RecommendFromLocationGroup, y => y.MapFrom(d => d.FromLocationGroup)) + .ForMember(x => x.RecommendFromLocationArea, y => y.MapFrom(d => d.FromLocationArea)) + .ForMember(x => x.RecommendFromLocationErpCode, y => y.MapFrom(d => d.FromLocationErpCode)) + .ForMember(x => x.RecommendFromWarehouseCode, y => y.MapFrom(d => d.FromWarehouseCode)) + + .ForMember(x => x.HandledFromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) + .ForMember(x => x.HandledFromLocationGroup, y => y.MapFrom(d => d.FromLocationGroup)) + .ForMember(x => x.HandledFromLocationArea, y => y.MapFrom(d => d.FromLocationArea)) + .ForMember(x => x.HandledFromLocationErpCode, y => y.MapFrom(d => d.FromLocationErpCode)) + .ForMember(x => x.HandledFromWarehouseCode, y => y.MapFrom(d => d.FromWarehouseCode)) + + .ForMember(x => x.RecommendPackingCode, y => y.MapFrom(d => d.PackingCode)) + .ForMember(x => x.RecommendLot, y => y.MapFrom(d => d.Lot)) + .ForMember(x => x.RecommendProduceDate, y => y.MapFrom(d => DateTime.MinValue)) + .ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => string.Empty)) + .ForMember(x => x.RecommendExpireDate, y => y.MapFrom(d => d.ExpiredTime)) + .ForMember(x => x.RecommendSupplierBatch, y => y.MapFrom(d => string.Empty)) + .ForMember(x => x.RecommendQty, y => y.MapFrom(d => d.Qty)) + .ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => DateTime.MinValue)) + + .ForMember(x => x.HandledPackingCode, y => y.MapFrom(d => d.PackingCode)) + .ForMember(x => x.HandledLot, y => y.MapFrom(d => d.Lot)) + .ForMember(x => x.HandledProduceDate, y => y.MapFrom(d => DateTime.MinValue)) + .ForMember(x => x.HandledContainerCode, y => y.MapFrom(d => string.Empty)) + .ForMember(x => x.HandledExpireDate, y => y.MapFrom(d => d.ExpiredTime)) + .ForMember(x => x.HandledSupplierBatch, y => y.MapFrom(d => string.Empty)) + .ForMember(x => x.HandledQty, y => y.MapFrom(d => d.Qty)) + .ForMember(x => x.HandledArriveDate, y => y.MapFrom(d => DateTime.MinValue)) + .ForMember(x => x.HandledUom, y => y.MapFrom(d => d.Uom)) + .ForMember(x => x.Status, y => y.MapFrom(d => d.EnumInventoryStatus)) + ; + CreateMap() .ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => d.ArriveDate)) .ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => d.ContainerCode)) @@ -132,7 +167,6 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.HandledFromWarehouseCode) .Ignore(x => x.FromLocationCode) .Ignore(x => x.ToLocationCode) - .Ignore(x => x.SingleCodeJob) .Ignore(x => x.SingleCodeRequest) .Ignore(x => x.HandledContainerCode) .Ignore(x => x.HandledExpireDate) @@ -146,21 +180,21 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.HandledUom) .Ignore(x => x.Remark) .Ignore(x => x.OnTheWayLocationCode) - .Ignore(x => x.DistributionType) - .Ignore(x => x.RoundedQty) - .Ignore(x => x.Operation) .Ignore(x => x.ExpiredTime) - .Ignore(x => x.TruncType) - .Ignore(x => x.PlanBeginTime) - .Ignore(x => x.PlannedSplitRule) - .Ignore(x => x.DeliveryQty) .Ignore(x => x.FromLocationCode) .Ignore(x => x.ToLocationCode) - .Ignore(x => x.SingleCodeJob) .Ignore(x => x.SingleCodeRequest) - .Ignore(x => x.PositionCode) - .Ignore(x => x.RecommendType) .Ignore(x => x.FromLocationArea) + .Ignore(x=>x.IssueTime) + .Ignore(x=>x.IsOnTheWayLocationCode) + + .Ignore(x => x.FromLocationGroup) + .Ignore(x => x.FromLocationErpCode) + .Ignore(x => x.FromWarehouseCode) + .Ignore(x => x.IssuedQty) + .Ignore(x => x.ReceivedQty) + .Ignore(x => x.EnumInventoryStatus) + .IgnoreIHasRecommendAndHandledFrom(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs new file mode 100644 index 000000000..b2d8cae6c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +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; + +public class CustomerProductionReturnNoteEventHandler + : StoreDataExchangeEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> + +{ + private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.CustomerReturn; + + [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); + var exchangeData = await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, dtos).ConfigureAwait(false); + await AddManyAsync(exchangeData).ConfigureAwait(false); + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs index bfe440962..841238749 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class AssembleIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - //var entity = eventData.Entity; - //await AddExchangeDataAsync(entity).ConfigureAwait(false); + 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); + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs index 498316eb2..698184507 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class CoatingIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - //var entity = eventData.Entity; - //await AddExchangeDataAsync(entity).ConfigureAwait(false); + 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); + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs index ca8cbca9d..022d1d360 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class InjectionIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - //var entity = eventData.Entity; - //await AddExchangeDataAsync(entity).ConfigureAwait(false); + 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); + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs index 8e5555472..18b26002d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class KittingIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - //var entity = eventData.Entity; - //await AddExchangeDataAsync(entity).ConfigureAwait(false); + 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); + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs index ffdbd21dc..bc03a1ed9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs @@ -24,15 +24,15 @@ public class SparePartIssueNoteEventHandler [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - //var entity = eventData.Entity; - //await AddExchangeDataAsync(entity).ConfigureAwait(false); + 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); + var entities = eventData.Entity; + await AddExchangeDataAsync(entities).ConfigureAwait(false); } protected override async Task AddExchangeDataAsync(List entities) 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 index 04bcf9e6e..f6358cc17 100644 --- 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 @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Quartz.Simpl; using Volo.Abp.EventBus; using Volo.Abp.Uow; using Win_in.Sfs.Basedata.Application.Contracts; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs index 2ef2db1cd..abf93fb30 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs @@ -35,18 +35,18 @@ public class ThirdLocationJobEventHandler : _thirdLocationJobRepository = thirdLocationJobRepository; } - public Task HandleEventAsync(SfsCompletedEntityEventData eventData) + public async Task HandleEventAsync(SfsCompletedEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsCancelledEntityEventData eventData) + public async Task HandleEventAsync(SfsCancelledEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsClosedEntityEventData eventData) + public async Task HandleEventAsync(SfsClosedEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs index 25a0d9a72..deb0ac59c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs @@ -55,33 +55,33 @@ public class ThirdLocationRequestEventHandler _transferLogAppService = transferLogAppService; } - public Task HandleEventAsync(SfsHandledEntityEventData eventData) + public async Task HandleEventAsync(SfsHandledEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsAbortedEntityEventData eventData) + public async Task HandleEventAsync(SfsAbortedEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsCompletedEntityEventData eventData) + public async Task HandleEventAsync(SfsCompletedEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsCreatedEntityEventData eventData) + public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsCancelledEntityEventData eventData) + public async Task HandleEventAsync(SfsCancelledEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + public async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs index cb126c2a2..c4c37ef02 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs @@ -31,18 +31,18 @@ public class ThirdLocationNoteEventHandler _ThirdLocationRequestRepository = ThirdLocationRequestRepository; } - public Task HandleEventAsync(SfsCreatedEntityEventData eventData) + public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + public async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } - public Task HandleEventAsync(SfsConfirmedEntityEventData eventData) + public async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) { - throw new NotImplementedException(); + await Task.CompletedTask.ConfigureAwait(false); } } diff --git a/build/src/docker/publish/conf/settings/appsettings.Development.json b/build/src/docker/publish/conf/settings/appsettings.Development.json index ec97ab563..c74d5217b 100644 --- a/build/src/docker/publish/conf/settings/appsettings.Development.json +++ b/build/src/docker/publish/conf/settings/appsettings.Development.json @@ -133,8 +133,8 @@ //"BaseUrl": "http://localhost:59093/" }, "BaseData": { - //"BaseUrl": "http://dev.ccwin-in.com:60084/" - "BaseUrl": "http://localhost:59094/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" + //"BaseUrl": "http://localhost:59094/" }, "Default": { "BaseUrl": "http://dev.ccwin-in.com:60083/"