From fc9410f484ffb064f1c730db2cefc6523445389e Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Wed, 12 Apr 2023 15:35:29 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Inventories/BalanceController.cs | 57 +- .../Controllers/Jobs/CountJobController.cs | 6 +- .../Controllers/Jobs/DeliverJobController.cs | 4 +- .../Controllers/Jobs/InspectJobController.cs | 4 +- .../Controllers/Jobs/IssueJobController.cs | 6 +- .../Jobs/JisDeliverJobController.cs | 4 +- .../Controllers/Jobs/JobController.cs | 2 +- .../Jobs/ProductReceiveJobController.cs | 4 +- .../Jobs/ProductionReturnJobController.cs | 4 +- .../Jobs/PurchaseReceiptJobController.cs | 72 +- .../Jobs/PurchaseReturnJobController.cs | 4 +- .../Controllers/Jobs/PutawayJobController.cs | 4 +- .../Controllers/Stores/IssueNoteController.cs | 13 +- .../PurchaseReceiptRequestController.cs | 13 + .../Stores/PurchaseReturnNoteController.cs | 23 +- .../ExpectOuts/IExpectOutAppService.cs | 1 + .../ExpectOuts/ExpectOutAppService.cs | 8 + .../InventoryLabels/InventoryLabelDto.cs | 7 + .../InventoryLabelEditInput.cs | 7 + .../InventoryLabelImportInput.cs | 7 + .../InventoryLabelWithoutCodeCreateInput.cs | 7 + .../InventoryLabels/InventoryLabel.cs | 7 + .../ISfsCrudWithDetailsAppService.cs | 1 + .../SfsCrudWithDetailsAppServiceBase.cs | 9 +- .../Enums/Store/EnumMaterialRequestType.cs | 3 + .../IPurchaseReceiptJobAppService.cs | 8 + .../Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs | 7 + .../Inputs/DeliverNoteEditInput.cs | 8 + .../IPurchaseReceiptRequestAppService.cs | 9 + .../Jobs/InspectJobs/InspectJobAppService.cs | 1 + .../PurchaseReceiptJobAppService.cs | 14 + .../DeliverNotes/DeliverNoteAppService.cs | 21 +- .../DeliverNoteAutoMapperProfile.cs | 13 + .../IssueNotes/IssueNoteAutoMapperProfile.cs | 7 + .../PurchaseReturnNoteAutoMapperProfile.cs | 14 + .../Notes/ScrapNotes/ScrapNoteAppService.cs | 27 +- .../ScrapNotes/ScrapNoteAutoMapperProfile.cs | 14 + .../SupplierAsns/SupplierAsnAppService.cs | 1 + .../PurchaseReceiptRequestAppService.cs | 20 + .../ScrapRequests/ScrapRequestAppService.cs | 121 +- .../TransferRequestAppService.cs | 15 +- .../Jobs/InspectJobs/InspectJobManager.cs | 7 +- .../Notes/DeliverNotes/DeliverNote.cs | 9 + .../Notes/ScrapNotes/ScrapNoteManager.cs | 4 +- ...20230412072454_Store_AddColumn.Designer.cs | 20983 ++++++++++++++++ .../20230412072454_Store_AddColumn.cs | 68 + .../Migrations/StoreDbContextModelSnapshot.cs | 12 +- .../Jobs/IssueJobAutoMapperProfile.cs | 30 +- .../StoreDataExchangeEventHandlerBase.cs | 4 +- .../Jobs/IssueJobEventHandler.cs | 2 +- .../Orders/PurchaseOrderEventHandler.cs | 21 +- .../Requests/IssueNoteEventHandler.cs | 132 +- .../Requests/Note/ScrapNoteEventHandler.cs | 57 + .../Requests/ScrapRequestEventHandler.cs | 39 +- .../Transactions/DeliverNoteEventHandler.cs | 15 +- .../Transactions/IssueNoteEventHandler.cs | 255 +- .../Transactions/ScrapNoteEventHandler.cs | 18 +- .../settings/appsettings.Development.json | 6 +- 58 files changed, 21916 insertions(+), 323 deletions(-) create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.Designer.cs create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.cs create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs index 9adb5c110..4c5488710 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs @@ -5,6 +5,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; +using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.AspNetCore.Mvc; using Win_in.Sfs.Basedata.Application.Contracts; @@ -29,6 +31,8 @@ public class BalanceController : AbpController private readonly ILocationAppService _locationAppService; + private readonly IExpectOutAppService _expectOutAppService; + /// /// /// @@ -38,10 +42,11 @@ public class BalanceController : AbpController public BalanceController( IBalanceAppService balanceAppService, IItemBasicAppService itemBasicAppService, - ILocationAppService locationAppService) + ILocationAppService locationAppService, IExpectOutAppService expectOutAppService) { this._balanceAppService = balanceAppService; this._locationAppService = locationAppService; + _expectOutAppService = expectOutAppService; this._itemBasicAppService = itemBasicAppService; } @@ -426,6 +431,56 @@ public class BalanceController : AbpController return balanceDTOs; } + /// + /// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次 并且没有被预计出 占用 + /// + /// + /// + [HttpPost("by-balances-request-many-parameter-not-in-expect-out")] + public async Task> GetListByLocationTypeAndInventoryStatusAndNotExpectOutAsync( + BalanceListByIssueInputByInventoryStatusAndLocationType listInput) + { + var expectOut = await _expectOutAppService.GetListByPackingCodeAsync(listInput.packingCode); + + if (expectOut != null && expectOut.Any()) + { + throw new UserFriendlyException($"箱码为 {listInput.packingCode} 已被任务{expectOut[0].JobNumber}使用"); + } + + var input = new SfsInventoryRequestInputBase() + { + MaxResultCount = listInput.pageSize, + SkipCount = (listInput.pageIndex - 1) * listInput.pageSize, + Sorting = listInput.sortBy, + Condition = new Condition { Filters = new List() } + }; + if (!string.IsNullOrWhiteSpace(listInput.itemCode)) + input.Condition.Filters.Add(new Filter("ItemCode", listInput.itemCode)); + if (!string.IsNullOrWhiteSpace(listInput.locationCode)) + input.Condition.Filters.Add(new Filter("LocationCode", listInput.locationCode)); + if (!string.IsNullOrWhiteSpace(listInput.lot)) input.Condition.Filters.Add(new Filter("Lot", listInput.lot)); + if (!string.IsNullOrWhiteSpace(listInput.packingCode)) + input.Condition.Filters.Add(new Filter("PackingCode", listInput.packingCode)); + if (!string.IsNullOrWhiteSpace(listInput.containerCode)) + input.Condition.Filters.Add(new Filter("ContainerCode", listInput.containerCode)); + + if (listInput.locationTypes != null && listInput.locationTypes.Any()) + { + var locationCodes = (await this._locationAppService.GetListByTypesAsync(listInput.locationTypes).ConfigureAwait(false)) + .Select(t => t.Code).ToList(); + + if (locationCodes.Any()) + input.Condition.Filters.Add( + new Filter("LocationCode", JsonConvert.SerializeObject(locationCodes), "In")); + } + + if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any()) + input.Condition.Filters.Add( + new Filter("Status", JsonConvert.SerializeObject(listInput.inventoryStatuses), "In")); + + return await this._balanceAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false); + } + /* /// /// 查询库余额 diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/CountJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/CountJobController.cs index 7ed1b4d54..6c6a13d7b 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/CountJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/CountJobController.cs @@ -75,7 +75,7 @@ public class CountJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -133,7 +133,7 @@ public class CountJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonWlgCodes = JsonSerializer.Serialize(wlgCodes); - var status = new List() {EnumJobStatus.Open.ToString(),EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var requestInput = new SfsJobRequestInputBase @@ -165,7 +165,7 @@ public class CountJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/DeliverJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/DeliverJobController.cs index 0b93cc8db..de127336d 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/DeliverJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/DeliverJobController.cs @@ -75,7 +75,7 @@ public class DeliverJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); _ = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -132,7 +132,7 @@ public class DeliverJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InspectJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InspectJobController.cs index aabb49b1c..c74c9ae7c 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InspectJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InspectJobController.cs @@ -64,7 +64,7 @@ public class InspectJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -108,7 +108,7 @@ public class InspectJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobController.cs index c6763da04..2efe34c7d 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobController.cs @@ -65,7 +65,7 @@ public class IssueJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonWlgCodes = JsonSerializer.Serialize(wlgCodes); - var status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -143,7 +143,7 @@ public class IssueJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonWlgCodes = JsonSerializer.Serialize(wlgCodes); - var status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var requestInput = new SfsJobRequestInputBase @@ -175,7 +175,7 @@ public class IssueJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JisDeliverJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JisDeliverJobController.cs index 420840bed..0b95984ee 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JisDeliverJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JisDeliverJobController.cs @@ -74,7 +74,7 @@ public class JisDeliverJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -106,7 +106,7 @@ public class JisDeliverJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs index 4c88f25d3..ead6be2c7 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs @@ -76,7 +76,7 @@ public class JobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var list = new List(); diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductReceiveJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductReceiveJobController.cs index cbbab2341..33ce064ff 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductReceiveJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductReceiveJobController.cs @@ -62,7 +62,7 @@ public class ProductReceiveJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -106,7 +106,7 @@ public class ProductReceiveJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnJobController.cs index ca0f1946e..d448d69b2 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnJobController.cs @@ -69,7 +69,7 @@ public class ProductionReturnJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -113,7 +113,7 @@ public class ProductionReturnJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReceiptJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReceiptJobController.cs index e24f784c4..dc0477c94 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReceiptJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReceiptJobController.cs @@ -21,14 +21,10 @@ namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs; /// [ApiController] [Route($"{PdaHostConst.ROOT_ROUTE}job/purchase-receipt")] - public class PurchaseReceiptJobController : AbpController { private readonly ISupplierAppService _supplierAppService; - private readonly IPurchaseReceiptRequestAppService _purchaseReceiptRequestAppService; private readonly IPurchaseReceiptJobAppService _purchaseReceiptJobAppService; - private readonly IFileAppService _fileAppService; - private readonly IUserWorkGroupAppService _userWorkGroupAppService; /// @@ -42,15 +38,11 @@ public class PurchaseReceiptJobController : AbpController public PurchaseReceiptJobController( IPurchaseReceiptJobAppService purchaseReceiptJobAppService , IUserWorkGroupAppService userWorkGroupAppService - , IPurchaseReceiptRequestAppService purchaseReceiptRequestAppService - , ISupplierAppService supplierAppService - , IFileAppService fileAppService) + , ISupplierAppService supplierAppService) { _userWorkGroupAppService = userWorkGroupAppService; _purchaseReceiptJobAppService = purchaseReceiptJobAppService; - _purchaseReceiptRequestAppService = purchaseReceiptRequestAppService; _supplierAppService = supplierAppService; - _fileAppService = fileAppService; } /// @@ -59,10 +51,9 @@ public class PurchaseReceiptJobController : AbpController /// /// [HttpGet("{id}")] - public virtual async Task> GetAsync(Guid id) { - var result = await _purchaseReceiptJobAppService.GetAsync(id).ConfigureAwait(false); + var result = await _purchaseReceiptJobAppService.GetNoCacheAsync(id).ConfigureAwait(false); var supplier = await _supplierAppService.GetByCodeAsync(result.SupplierCode).ConfigureAwait(false); result.SupplierName = supplier.Name; @@ -79,12 +70,13 @@ public class PurchaseReceiptJobController : AbpController /// 是否今天 /// [HttpGet("list")] - public virtual async Task> GetListAsync(int pageSize, int pageIndex, bool isTimeWindowSorting, bool isToday) + public virtual async Task> GetListAsync(int pageSize, int pageIndex, + bool isTimeWindowSorting, bool isToday) { var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -96,17 +88,19 @@ public class PurchaseReceiptJobController : AbpController { Filters = new List { - new(nameof(PurchaseReceiptJobDTO.WorkGroupCode),jsonCodes,"In"), - new(nameof(PurchaseReceiptJobDTO.JobStatus),jsonStatus,"In") + new(nameof(PurchaseReceiptJobDTO.WorkGroupCode), jsonCodes, "In"), + new(nameof(PurchaseReceiptJobDTO.JobStatus), jsonStatus, "In") } } }; - if (isToday)//只看当日 + if (isToday) //只看当日 { - request.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); + request.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), + Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); } - if (isTimeWindowSorting)//窗口时间排序 + + if (isTimeWindowSorting) //窗口时间排序 { request.Sorting = $"{nameof(PurchaseReceiptJobDTO.TimeWindow)} ASC"; } @@ -131,7 +125,8 @@ public class PurchaseReceiptJobController : AbpController [HttpPost("list")] public virtual async Task> GetListAsync(SfsJobRequestInputBase sfsRequestDTO) { - var list = await _purchaseReceiptJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false); + var list = await _purchaseReceiptJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true) + .ConfigureAwait(false); return list; } @@ -155,22 +150,27 @@ public class PurchaseReceiptJobController : AbpController { return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); } + if (!wlgCodes.Any(r => r == jobDto.WorkGroupCode)) { return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); } + if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id) { return new NotFoundObjectResult($"任务正在被 {jobDto.AcceptUserName} 处理"); } - if (isToday)//只看当日 + + if (isToday) //只看当日 { if (jobDto.PlanArriveDate.ToString("yyyy-MM-dd") == Clock.Now.ToString("yyyy-MM-dd")) { return jobDto; } + return new NotFoundObjectResult($"不是当天的收货任务"); } + return jobDto; } @@ -181,12 +181,13 @@ public class PurchaseReceiptJobController : AbpController /// /// [HttpGet("list/by-asn")] - public virtual async Task> GetListByAsnNumberAsync(string asnNumber, bool isToday) + public virtual async Task> GetListByAsnNumberAsync(string asnNumber, + bool isToday) { var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonWlgCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var requestInput = new SfsJobRequestInputBase @@ -198,17 +199,20 @@ public class PurchaseReceiptJobController : AbpController { Filters = new List { - new(nameof(PurchaseReceiptJobDTO.AsnNumber),asnNumber), - new(nameof(IssueJobDTO.WorkGroupCode),jsonWlgCodes,"In"), - new(nameof(IssueJobDTO.JobStatus),jsonStatus,"In"), + new(nameof(PurchaseReceiptJobDTO.AsnNumber), asnNumber), + new(nameof(IssueJobDTO.WorkGroupCode), jsonWlgCodes, "In"), + new(nameof(IssueJobDTO.JobStatus), jsonStatus, "In"), } } }; - if (isToday)//只看当日 + if (isToday) //只看当日 { - requestInput.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); + requestInput.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), + Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); } - var list = await _purchaseReceiptJobAppService.GetPagedListByFilterAsync(requestInput, true).ConfigureAwait(false); + + var list = await _purchaseReceiptJobAppService.GetPagedListByFilterAsync(requestInput, true) + .ConfigureAwait(false); return list; } @@ -222,7 +226,7 @@ public class PurchaseReceiptJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -232,8 +236,8 @@ public class PurchaseReceiptJobController : AbpController { Filters = new List { - new(nameof(PurchaseReceiptJobDTO.WorkGroupCode),jsonCodes,"In"), - new(nameof(PurchaseReceiptJobDTO.JobStatus),jsonStatus,"In") + new(nameof(PurchaseReceiptJobDTO.WorkGroupCode), jsonCodes, "In"), + new(nameof(PurchaseReceiptJobDTO.JobStatus), jsonStatus, "In") } } }; @@ -292,9 +296,11 @@ public class PurchaseReceiptJobController : AbpController /// /// [HttpPost("save-detail-inspect/{id}")] - public virtual async Task SaveDetailAsync(Guid id, PurchaseReceiptJobDetailSaveInput purchaseReceiptJobDetailSaveInput) + public virtual async Task SaveDetailAsync(Guid id, + PurchaseReceiptJobDetailSaveInput purchaseReceiptJobDetailSaveInput) { - return await _purchaseReceiptJobAppService.SaveDetailInspectAsync(id, purchaseReceiptJobDetailSaveInput).ConfigureAwait(false); + return await _purchaseReceiptJobAppService.SaveDetailInspectAsync(id, purchaseReceiptJobDetailSaveInput) + .ConfigureAwait(false); } /// diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReturnJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReturnJobController.cs index c6a071cce..490fd4a44 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReturnJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReturnJobController.cs @@ -63,7 +63,7 @@ public class PurchaseReturnJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -132,7 +132,7 @@ public class PurchaseReturnJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PutawayJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PutawayJobController.cs index 88cb5d770..3c7227ccd 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PutawayJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PutawayJobController.cs @@ -62,7 +62,7 @@ public class PutawayJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -106,7 +106,7 @@ public class PutawayJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueNoteController.cs index 57ae6fad1..450e9326c 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueNoteController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueNoteController.cs @@ -2,6 +2,7 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; +using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; @@ -29,9 +30,17 @@ public class IssueNoteController : AbpController /// 创建发料记录 /// /// - [HttpPost("{input}")] - public virtual async Task CreateAsync(IssueNoteEditInput input) + [HttpPost("")] + public virtual async Task CreateAsync([FromBody] IssueNoteEditInput input) { + input.RequestType = EnumMaterialRequestType.Direct_Issue.ToString(); + + input.Details.ForEach(p => + { + p.ToLot = string.Empty; + p.ToPackingCode = string.Empty; + }); + await _issueNoteAppService.CreateAsync(input).ConfigureAwait(false); } diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs index dfcbbf219..b7cdd062a 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs @@ -35,4 +35,17 @@ public class PurchaseReceiptRequestController : AbpController var result = await _purchaseReceiptRequestAppService.GetByNumberAsync(number).ConfigureAwait(false); return Ok(result); } + + /// + /// 根据 物品 箱 获取收货记录 + /// + /// + /// + /// + [HttpGet("detail-by-item-and-packing")] + public virtual async Task GetDetailByItemAndPackingAsync(string itemCode, + string packingCode) + { + return await _purchaseReceiptRequestAppService.GetDetailByItemAndPackingAsync(itemCode, packingCode).ConfigureAwait(false); + } } diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs index 459ea3fe8..0dde430e2 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Domain.Entities.Auditing; using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Label.Domain; using Win_in.Sfs.Shared.Domain.Shared; @@ -109,33 +110,34 @@ public class PurchaseReturnNoteController : AbpController { var poNumber = poNumberItem.Key; - var createInput = new PurchaseReturnNoteEditInput() { Details = new List() }; + var returnNoteEditInput = new PurchaseReturnNoteEditInput() { Details = new List() }; - createInput.PoNumber = poNumber; + returnNoteEditInput.PoNumber = poNumber; foreach (var poNumberDetail in poNumberItem) { var packingCode = poNumberDetail.PackingCode; - await SetFromInventoryLabelAsync(packingCode, createInput).ConfigureAwait(false); + await SetFromInventoryLabelAsync(packingCode, returnNoteEditInput).ConfigureAwait(false); - await SetFormPurchaseOrderAsync(poNumber, createInput).ConfigureAwait(false); + await SetFormPurchaseOrderAsync(poNumber, returnNoteEditInput).ConfigureAwait(false); - createInput.ReturnType = returnType; - createInput.ReturnTime = returnTime; - createInput.ReturnReason = returnReason; + returnNoteEditInput.ReturnType = returnType; + returnNoteEditInput.ReturnTime = returnTime; + returnNoteEditInput.ReturnReason = returnReason; var createInputDetail = new PurchaseReturnNoteDetailInput(); createInputDetail.PoNumber = poNumber; createInputDetail.Reason = returnReason; + //createInputDetail.WarehouseCode= poNumberItem. await SetDetailByBalanceAsync(packingCode, createInputDetail).ConfigureAwait(false); - createInput.Details.Add(createInputDetail); + returnNoteEditInput.Details.Add(createInputDetail); } - createInputs.Add(createInput); + createInputs.Add(returnNoteEditInput); } return createInputs; @@ -149,6 +151,9 @@ public class PurchaseReturnNoteController : AbpController createInputDetail.LocationCode = balance.LocationCode; createInputDetail.LocationErpCode = balance.LocationErpCode; + createInputDetail.LocationArea = balance.LocationArea; + createInputDetail.LocationGroup= balance.LocationGroup; + createInputDetail.WarehouseCode= balance.WarehouseCode; createInputDetail.PackingCode = balance.PackingCode; createInputDetail.ContainerCode = balance.ContainerCode; createInputDetail.Uom = balance.Uom; diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs index a936326b9..509c60744 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs @@ -13,4 +13,5 @@ public interface IExpectOutAppService Task> GetListByJobAsync(string jobNumber); Task> GetListByItemAsync(string itemCode); Task> GetListByLocationAsync(string locationCode); + Task> GetListByPackingCodeAsync(string packingCode); } diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs index fddb1bbff..cc04a325d 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs @@ -146,4 +146,12 @@ public class ExpectOutAppService //TODO throw new UserFriendlyException(""); } + + [HttpGet("list/by-packing/{packingCode}")] + public virtual async Task> GetListByPackingCodeAsync(string packingCode) + { + var entitys = await _repository.GetListAsync(p => p.PackingCode == packingCode).ConfigureAwait(false); + + return ObjectMapper.Map, List>(entitys); + } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelDto.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelDto.cs index 8e3ccfbe0..ffda20f6b 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelDto.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelDto.cs @@ -214,4 +214,11 @@ public class InventoryLabelDto : SfsBasicDTOBase /// [Display(Name = "供应商零件名")] public string SupplierItemName { get; set; } + + /// + /// 计划到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs index a6330a941..facf0ad7a 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs @@ -221,5 +221,12 @@ public class InventoryLabelEditInput : SfsLabelCreateOrUpdateInputBase [Required(ErrorMessage = "{0}是必填项")] public EnumLabelType LabelType { get; set; } + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } + #endregion } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelImportInput.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelImportInput.cs index 11c00f68f..78e0282ae 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelImportInput.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelImportInput.cs @@ -74,6 +74,13 @@ public class InventoryLabelImportInput : SfsImportInputBase [Display(Name = "规格")] public string Specifications { get; set; } + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } + #region PurchaseInfo /// diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelWithoutCodeCreateInput.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelWithoutCodeCreateInput.cs index 2b07f178d..d2dc012b1 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelWithoutCodeCreateInput.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelWithoutCodeCreateInput.cs @@ -200,4 +200,11 @@ public class InventoryLabelWithoutCodeCreateInput [Display(Name = "标签类型")] [Required(ErrorMessage = "{0}是必填项")] public EnumLabelType LabelType { get; set; } + + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Domain/InventoryLabels/InventoryLabel.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Domain/InventoryLabels/InventoryLabel.cs index a14dd8a51..3fc352575 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Domain/InventoryLabels/InventoryLabel.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Domain/InventoryLabels/InventoryLabel.cs @@ -166,4 +166,11 @@ public class InventoryLabel : SfsAggregateRootBase /// [Display(Name = "供应商零件名")] public string SupplierItemName { get; set; } + + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsCrudWithDetailsAppService.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsCrudWithDetailsAppService.cs index b40d08de4..6be45cee7 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsCrudWithDetailsAppService.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsCrudWithDetailsAppService.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Services; namespace Win_in.Sfs.Shared.Application.Contracts; diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs index e7643873e..2c022d8d3 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs @@ -188,10 +188,11 @@ public abstract class SfsCrudWithDetailsAppServiceBase GetAsync(Guid id) { - var dto = await Cache.GetOrAddItemAsync( - id.ToString(), - async () => await base.GetAsync(id).ConfigureAwait(false), - SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + //var dto = await Cache.GetOrAddItemAsync( + // id.ToString(), + // async () => await base.GetAsync(id).ConfigureAwait(false), + // SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + var dto=await base.GetAsync(id).ConfigureAwait(false); return dto; } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumMaterialRequestType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumMaterialRequestType.cs index b653ddd6b..245c1f9e8 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumMaterialRequestType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumMaterialRequestType.cs @@ -26,4 +26,7 @@ public enum EnumMaterialRequestType ///// //[Display(Name = "安全库存拉动")] //Issue_SfaetyStock = 1504, + + [Display(Name = "直接发料")] + Direct_Issue = 1505 } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/PurchaseReceiptJobs/IPurchaseReceiptJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/PurchaseReceiptJobs/IPurchaseReceiptJobAppService.cs index dc4e8ffe1..1b26733b8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/PurchaseReceiptJobs/IPurchaseReceiptJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/PurchaseReceiptJobs/IPurchaseReceiptJobAppService.cs @@ -40,4 +40,12 @@ public interface IPurchaseReceiptJobAppService /// /// Task> SetInspectWithNotInspectAsync(Guid id); + + /// + /// 按Id获取实体 不走缓存 + /// + /// 实体Id + /// + /// + Task GetNoCacheAsync(Guid id); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs index d44b88d24..0bc9f5a03 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs @@ -48,6 +48,13 @@ public class DeliverNoteDTO : SfsStoreDTOBase [Display(Name = "发货申请单号")] public string DeliverRequestNumber { get; set; } + /// + /// 打印次数 + /// + /// + [Display(Name = "打印次数")] + public int CountPrint { get; set; } + /// /// 发货类型 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs index 1985d4213..38c0e9206 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs @@ -63,5 +63,13 @@ public class DeliverNoteEditInput : SfsStoreCreateOrUpdateInputBase /// [Display(Name = "明细列表")] public List Details { get; set; } + + /// + /// 打印次数 + /// + /// + [Display(Name = "打印次数")] + public int CountPrint { get; set; } + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs index d08927f6e..07a28912f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs @@ -20,4 +20,13 @@ public interface IPurchaseReceiptRequestAppService /// /// Task> CreateManyAsync(List inputs); + + /// + /// 【获取】【收货记录详情】根据 物品 箱码 + /// + /// + /// + /// + Task GetDetailByItemAndPackingAsync(string itemCode, + string packingCode); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs index 81b97e990..c7090612f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs @@ -4,6 +4,7 @@ using System.Text.Json; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.FileStorage.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs index 0b43b47f6..22b45c3bf 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs @@ -5,6 +5,7 @@ using System.Text.Json; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.FileStorage.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -177,6 +178,19 @@ public class PurchaseReceiptJobAppService : entity.Details.Find(p => p.Id == input.DetailId)); } + /// + /// 按Id获取实体 不走缓存 + /// + /// 实体Id + /// + /// + [HttpGet("no-cache/{id}")] + public virtual async Task GetNoCacheAsync(Guid id) + { + var entity= await _repository.GetAsync(id).ConfigureAwait(false); + return ObjectMapper.Map(entity); + } + #endregion /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAppService.cs index b1922fd4b..c50a174bb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAppService.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -72,7 +73,7 @@ public class DeliverNoteAppService : CancellationToken cancellationToken = default) { sfsRequestDTO.Condition.Filters.Add( - new Filter(nameof(DeliverRequest.DeliverRequestType), "2")); + new Filter(nameof(DeliverRequest.DeliverRequestType), EnumDeliverRequestType.FIS.ToString())); return await base.GetPagedListByFilterAsync(sfsRequestDTO, includeDetails, cancellationToken) .ConfigureAwait(false); @@ -85,7 +86,7 @@ public class DeliverNoteAppService : CancellationToken cancellationToken = default) { sfsRequestDTO.Condition.Filters.Add( - new Filter(nameof(DeliverRequest.DeliverRequestType), "1")); + new Filter(nameof(DeliverRequest.DeliverRequestType), EnumDeliverRequestType.Normal.ToString())); return await base.GetPagedListByFilterAsync(sfsRequestDTO, includeDetails, cancellationToken) .ConfigureAwait(false); @@ -98,7 +99,7 @@ public class DeliverNoteAppService : CancellationToken cancellationToken = default) { sfsRequestDTO.Condition.Filters.Add( - new Filter(nameof(DeliverRequest.DeliverRequestType), "3")); + new Filter(nameof(DeliverRequest.DeliverRequestType), EnumDeliverRequestType.RAW.ToString())); return await base.GetPagedListByFilterAsync(sfsRequestDTO, includeDetails, cancellationToken) .ConfigureAwait(false); @@ -132,4 +133,18 @@ public class DeliverNoteAppService : var list = ObjectMapper.Map, List>(entities); return ExportImportService.Export(list, true, "Details"); } + + /// + /// 调取打印 + /// + /// + [HttpPost("sum-print/{number}")] + public virtual async Task SumPrintAsync(string number) + { + var entity = await _repository.GetAsync(p => p.Number == number).ConfigureAwait(false); + + entity.CountPrint++; + + await _repository.UpdateAsync(entity).ConfigureAwait(false); + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAutoMapperProfile.cs index 81f3769ea..90aaa4d91 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAutoMapperProfile.cs @@ -19,5 +19,18 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + + CreateMap() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .Ignore(x=>x.CountPrint) + ; + CreateMap() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/IssueNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/IssueNoteAutoMapperProfile.cs index d59cc23ff..7ddb54704 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/IssueNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/IssueNoteAutoMapperProfile.cs @@ -20,5 +20,12 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs index ca75b6d5d..bc12055ab 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs @@ -22,5 +22,19 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + ; + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAppService.cs index f0f21e83b..9407d0b7e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAppService.cs @@ -2,9 +2,11 @@ using System; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; +using DocumentFormat.OpenXml.Bibliography; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Dtos; +using Volo.Abp.EventBus; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -12,7 +14,11 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; using System.Linq; +using IdentityModel; +using Volo.Abp.Domain.Entities; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Event; [Authorize] [Route($"{StoreConsts.RootPath}scrap-note")] @@ -21,28 +27,31 @@ public class ScrapNoteAppService : ScrapNoteDetail, ScrapNoteDetailDTO, SfsStoreRequestInputBase, ScrapNoteImportInput>, IScrapNoteAppService { - private readonly IScrapNoteManager _scrapNoteManager; - public ScrapNoteAppService( - IScrapNoteRepository repository - , IScrapNoteManager scrapNoteManager - ) : base(repository) + IScrapNoteRepository repository) : base(repository) { - _scrapNoteManager = scrapNoteManager; } [HttpPost("")] - //[Authorize(ScrapNotePermissions.Create)] public override async Task CreateAsync(ScrapNoteEditInput input) { var entity = ObjectMapper.Map(input); - await _scrapNoteManager.CreateAsync(entity).ConfigureAwait(false); + var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(nameof(ScrapNote), entity.ActiveDate).ConfigureAwait(false) : entity.Number; + entity.SetIdAndNumberWithDetails(GuidGenerator, number); + + foreach (var detail in entity.Details) + { + detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); + } + + entity = await _repository.InsertAsync(entity).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData(entity), false).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto; } - + [HttpPost("by-type/{type}")] public virtual async Task> GetListByTypeAsync( SfsStoreRequestInputBase requestInput, diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs index 7545e93a1..6488a5f26 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs @@ -20,5 +20,19 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/SupplierAsns/SupplierAsnAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/SupplierAsns/SupplierAsnAppService.cs index f232b2a60..b57a4890e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/SupplierAsns/SupplierAsnAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/SupplierAsns/SupplierAsnAppService.cs @@ -64,6 +64,7 @@ public class SupplierAsnAppService : { var inputEntity = ObjectMapper.Map(input); + inputEntity.Number = input.Number; var resultEntity = await _supplierAsnManager.CreateAsync(inputEntity).ConfigureAwait(false); return ObjectMapper.Map(resultEntity); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs index e1b1a4477..ded767df5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -54,6 +55,25 @@ public class PurchaseReceiptRequestAppService : return ObjectMapper.Map(resultEntity); } + /// + /// 【获取】【收货记录详情】根据 物品 箱码 + /// + /// + /// + /// + [HttpGet("detail-by-item-and-packing")] + public virtual async Task GetDetailByItemAndPackingAsync(string itemCode, + string packingCode) + { + var entity = (await _repository.GetListAsync(p => p.Details.Any(y => y.ItemCode == itemCode && y.PackingCode == packingCode), true).ConfigureAwait(false)).FirstOrDefault(); + + var detail = entity.Details.FirstOrDefault(y => y.ItemCode == itemCode && y.PackingCode == packingCode); + + var dto = ObjectMapper.Map(detail); + + return dto; + } + #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs index b8a8ebb34..2c81b848c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.Application.Dtos; +using Volo.Abp.Users; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; @@ -17,26 +18,85 @@ using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Acl.Dict; using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; [Authorize] [Route($"{StoreConsts.RootPath}scrap-request")] -public class ScrapRequestAppService : - SfsStoreRequestAppServiceBase - +public class ScrapRequestAppService : SfsStoreRequestAppServiceBase + { - private readonly IScrapRequestManager _scrapRequestManager; - private const string ReasonItemCode = "Reason"; + private readonly IScrapRequestManager _scrapRequestManager; + private readonly IDictAclService _dictAclService; + private readonly ITransactionTypeAppService _transactionTypeAppService; + private readonly IItemBasicAppService _itemBasicAppService; public ScrapRequestAppService( - IScrapRequestRepository repository, - IScrapRequestManager scrapRequestManager) + IScrapRequestRepository repository, + IScrapRequestManager scrapRequestManager, + IDictAclService dictAclService, + ITransactionTypeAppService transactionTypeAppService, + IItemBasicAppService itemBasicAppService) : base(repository, scrapRequestManager) { _scrapRequestManager = scrapRequestManager; + _dictAclService = dictAclService; + _transactionTypeAppService = transactionTypeAppService; + _itemBasicAppService = itemBasicAppService; + } + + #region 东阳使用 + + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var scrapRequest in addList) + { + scrapRequest.CreatorId = CurrentUser.Id; + scrapRequest.Worker = CurrentUser.Name; + + scrapRequest.Type = EnumTransSubType.Scrap_WIP.ToString(); + scrapRequest.ActiveDate = DateTime.Now; + + await SetEntityPropertiesAsync(scrapRequest, EnumTransSubType.Scrap_WIP).ConfigureAwait(false); + + foreach (var detail in scrapRequest.Details) + { + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + detail.ItemName = itemBasicDto.Name; + detail.ItemDesc1 = itemBasicDto.Desc1; + detail.ItemDesc2 = itemBasicDto.Desc2; + + detail.Uom = itemBasicDto.BasicUom; + } + } + + return dictionary; + } + + private async Task SetEntityPropertiesAsync(ScrapRequest entity, EnumTransSubType subType) + { + var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Scrap, subType) + .ConfigureAwait(false); + entity.Worker = CurrentUser.GetUserName(); + + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; } [HttpPost("by-type/{type}")] @@ -53,9 +113,11 @@ public class ScrapRequestAppService : } return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, - requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); } + #endregion + [HttpPost("export-by-type")] public virtual async Task ExportByTypeAsync(SfsExportRequestInput requestInput, string type) { @@ -65,16 +127,19 @@ public class ScrapRequestAppService : expression = expression.And(requestInput.Condition.Filters.ToLambda()); } - var entities = await _repository.GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, requestInput.Sorting, true).ConfigureAwait(false); + var entities = await _repository + .GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, requestInput.Sorting, + true).ConfigureAwait(false); var list = ObjectMapper.Map, List>(entities); return ExportImportService.Export(list, true, "Details"); } - #region import + #region 校验 - protected override async Task ValidateImportModelAsync(ScrapRequestImportInput model, List validationRresult) + protected override async Task ValidateImportModelAsync(ScrapRequestImportInput model, + List validationRresult) { _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); @@ -82,33 +147,38 @@ public class ScrapRequestAppService : await CheckDicAsync(model, validationRresult).ConfigureAwait(false); } - protected async Task CheckItemBasicAsync(ScrapRequestImportInput importInput, List validationRresul) + protected async Task CheckItemBasicAsync(ScrapRequestImportInput importInput, + List validationRresul) { var item = await ItemBasicAclService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); if (item == null) { validationRresul.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new string[] { "物品代码" })); } + if (importInput.Qty <= 0) { validationRresul.Add(new ValidationResult($"数量{importInput.Qty}需要大于0", new string[] { "数量" })); } + return item; } - protected async Task CheckLocationAsync(ScrapRequestImportInput importInput, List validationRresul) + protected async Task CheckLocationAsync(ScrapRequestImportInput importInput, + List validationRresul) { var location = await LocationAclService.GetByCodeAsync(importInput.LocationCode).ConfigureAwait(false); if (location == null) { validationRresul.Add(new ValidationResult($"库位代码{importInput.LocationCode}不存在", new string[] { "库位代码" })); } + return location; } protected async Task CheckDicAsync(ScrapRequestImportInput importInput, List validationRresul) { - var dicItem = await DictAclService.GetByCodeAsync(ReasonItemCode).ConfigureAwait(false); + var dicItem = await _dictAclService.GetByCodeAsync(ReasonItemCode).ConfigureAwait(false); if (dicItem == null) { validationRresul.Add(new ValidationResult($"字典编号{ReasonItemCode}不存在", new string[] { "字典编号" })); @@ -116,26 +186,28 @@ public class ScrapRequestAppService : if (!dicItem.Items.Any(r => r.Code == importInput.ReasonCode)) { - validationRresul.Add(new ValidationResult($"报废原因代码{importInput.ReasonCode}在线边仓报废原因中不存在", new string[] { "报废原因代码" })); + validationRresul.Add(new ValidationResult($"报废原因代码{importInput.ReasonCode}在线边仓报废原因中不存在", + new string[] { "报废原因代码" })); } } protected async Task CheckTransactionTypeAsync(List validationRresul) { - - var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Scrap, EnumTransSubType.None).ConfigureAwait(false); + var transactionType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Scrap, EnumTransSubType.Scrap_WIP).ConfigureAwait(false); Check.NotNull(transactionType, "事务类型", "事务类型报废不存在"); return transactionType; } - protected async Task CheckBalanceAsync(ScrapRequestImportInput importInput, List validationRresul) + protected async Task CheckBalanceAsync(ScrapRequestImportInput importInput, + List validationRresul) { var balance = await BalanceAclService.GetByItemLocationAndPackingAsync( - string.Empty, - importInput.ItemCode, - importInput.LocationCode).ConfigureAwait(false); + string.Empty, + importInput.ItemCode, + importInput.LocationCode).ConfigureAwait(false); //var balance = await this._balanceApp.GetByItemLocationAndPackingAsync( // string.Empty, // itemBasic.Code, @@ -145,6 +217,7 @@ public class ScrapRequestAppService : { throw new ArgumentException($"物品代码 {importInput.ItemCode}的库存余额数量{balance.Qty}小于导入数量{importInput.Qty}。"); } + return balance; } @@ -157,7 +230,9 @@ public class ScrapRequestAppService : { foreach (var entity in dict.Keys) { - var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Scrap, Enum.Parse(entity.Type)).ConfigureAwait(false); + var tranType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Scrap, EnumTransSubType.Scrap_WIP) + .ConfigureAwait(false); Check.NotNull(tranType, "事务类型", "事务类型不存在"); entity.AutoCompleteJob = tranType.AutoCompleteJob; entity.AutoSubmit = tranType.AutoSubmitRequest; @@ -165,6 +240,7 @@ public class ScrapRequestAppService : entity.AutoHandle = tranType.AutoHandleRequest; entity.DirectCreateNote = tranType.DirectCreateNote; } + return await base.ValidateImportEntities(dict).ConfigureAwait(false); } @@ -193,6 +269,7 @@ public class ScrapRequestAppService : } } } + await base.SaveImportAsync(dict).ConfigureAwait(false); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferRequests/TransferRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferRequests/TransferRequestAppService.cs index c842b5b93..409de9b89 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferRequests/TransferRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferRequests/TransferRequestAppService.cs @@ -25,8 +25,14 @@ namespace Win_in.Sfs.Wms.Store.Application; [Authorize] [Route($"{StoreConsts.RootPath}transfer-request")] public class TransferRequestAppService : SfsStoreRequestAppServiceBase - , + , ITransferRequestAppService { private readonly ITransferRequestManager _transferRequestManager; @@ -69,7 +75,7 @@ public class TransferRequestAppService : SfsStoreRequestAppServiceBase detail.ItemCode, detail.FromLocationCode).ConfigureAwait(false); var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode) .ConfigureAwait(false); - + detail.ItemCode = balanceDto.ItemCode; detail.ArriveDate = balanceDto.ArriveDate; detail.ItemDesc1 = balanceDto.ItemDesc1; @@ -103,7 +109,8 @@ public class TransferRequestAppService : SfsStoreRequestAppServiceBase detail.ToLot = balanceDto.Lot; } - await SetEntityPropertiesAsync(transferRequest, EnumTransSubType.Transfer_Customer).ConfigureAwait(false); + await SetEntityPropertiesAsync(transferRequest, EnumTransSubType.Transfer_Customer) + .ConfigureAwait(false); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs index 9930d91b2..68e6f5e97 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs @@ -138,8 +138,11 @@ public class InspectJobManager : SfsJobManagerBase { var jobEntity = await Repository.FindAsync(id); - jobEntity.Details.Where(p => p.DetailInspectStatus == EnumDetailInspectStatus.DefaultOK || - p.DetailInspectStatus == EnumDetailInspectStatus.OK).ToList().ForEach(p => + jobEntity.Details.Where(p => (p.DetailInspectStatus == EnumDetailInspectStatus.DefaultOK || + p.DetailInspectStatus == EnumDetailInspectStatus.OK)&& + p.ItemCode== input.ItemCode&& + p.Lot==input.Lot + ).ToList().ForEach(p => { p.GoodQty = p.ReceiveQty; }); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs index 15b096b4a..6a60d8f74 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using DocumentFormat.OpenXml.Wordprocessing; +using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain.Entities; using Win_in.Sfs.Shared.Domain.Shared; @@ -52,6 +54,13 @@ public class DeliverNote : SfsStoreAggregateRootBase, IHasJob [IgnoreUpdate] public EnumDeliverRequestType DeliverRequestType { get; set; } + /// + /// 打印次数 + /// + /// + [Display(Name = "打印次数")] + public int CountPrint { get; set; } + /// /// 明细列表 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ScrapNotes/ScrapNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ScrapNotes/ScrapNoteManager.cs index 467ad4e9d..56c0ffb49 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ScrapNotes/ScrapNoteManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ScrapNotes/ScrapNoteManager.cs @@ -1,3 +1,5 @@ +using System.Threading.Tasks; + namespace Win_in.Sfs.Wms.Store.Domain; public class ScrapNoteManager : SfsStoreManagerBase, IScrapNoteManager @@ -7,6 +9,6 @@ public class ScrapNoteManager : SfsStoreManagerBase, IScrapNoteRepository repository ) : base(repository) { + } - } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.Designer.cs new file mode 100644 index 000000000..72ce9d5e6 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.Designer.cs @@ -0,0 +1,20983 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + [DbContext(typeof(StoreDbContext))] + [Migration("20230412072454_Store_AddColumn")] + partial class Store_AddColumn + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "6.0.13") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductRecycleNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductionPlanNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_BackFlushNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("IsOffLine") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "Lot") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_BackFlushNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliverNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_CheckJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Order") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CheckJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BindTime") + .HasColumnType("datetime2"); + + b.Property("BindType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerBindNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_ContainerBindNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountAdjustRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CountNoteNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdjusted") + .HasColumnType("bit"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountAdjustNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransInOut") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_CountAdjustNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountAdjustRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_CountAdjustRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountStage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_CountJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CountTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CountJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("Adjusted") + .HasColumnType("bit"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjusted") + .HasColumnType("bit"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("AuditCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("AuditCountTime") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountTime") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RepeatCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JsonInventoryStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("JsonItemCodes") + .HasColumnType("nvarchar(max)"); + + b.Property("JsonLocationCodes") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("AuditCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("AuditCountTime") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailStatus") + .HasColumnType("int"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountTime") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RepeatCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DockCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CustomerAsn", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_CustomerAsnDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Customer") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CustomerReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_CustomerReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_DeliverJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_DeliverJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountPrint") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLot", "FromLocationCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_DeliverNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Project") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "SoNumber", "SoLine") + .IsUnique() + .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); + + b.ToTable("Store_DeliverPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverRequestType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_DeliverRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ExchangeData", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DataAction") + .HasColumnType("int"); + + b.Property("DataContent") + .HasColumnType("nvarchar(max)"); + + b.Property("DataIdentityCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DestinationSystem") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ErrorCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ErrorMessage") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .HasColumnType("bigint"); + + b.Property("ReadTime") + .HasColumnType("datetime2"); + + b.Property("Reader") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RetryTimes") + .HasColumnType("int"); + + b.Property("SourceSystem") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WriteTime") + .HasColumnType("datetime2"); + + b.Property("Writer") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Store_ExchangeData", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_InspectJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("Attributes") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("GoodQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "Lot") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InspectRequestSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryInitialNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InventoryInitialNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryTransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InventoryTransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IsolationNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IsolationNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_IssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") + .HasColumnType("datetime2"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_IssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ItemTransformNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromArriveDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromProduceDate") + .HasColumnType("datetime2"); + + b.Property("FromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToArriveDate") + .HasColumnType("datetime2"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToExpireDate") + .HasColumnType("datetime2"); + + b.Property("ToItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ItemTransformNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ItemTransformRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromArriveDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromProduceDate") + .HasColumnType("datetime2"); + + b.Property("FromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToArriveDate") + .HasColumnType("datetime2"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToExpireDate") + .HasColumnType("datetime2"); + + b.Property("ToItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ItemTransformRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Customer") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerAddressCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_JisDeliverJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerName") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_JisDeliverJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ArrivalTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Customer") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalPackCapacity") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_JisDeliverNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnlineType") + .HasColumnType("nvarchar(max)"); + + b.Property("PackCapacity") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SeqNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Stage") + .HasColumnType("nvarchar(max)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("UsedFor") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_JisDeliverNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProdLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiptType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SourceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkShop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_JisProductReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SeqNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_MaterialRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_MaterialRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_NoOkConvertOkNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_NoOkConvertOkNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_OfflineSettlementNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_OfflineSettlementNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PreparationPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LatestTime") + .HasColumnType("datetime2"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_PreparationPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .HasColumnType("int"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NoGoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductionPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductionReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductionReturnJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductionReturnJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductionReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ProductionReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionReturnRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromLocationCode") + .IsUnique(); + + b.ToTable("Store_ProductionReturnRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configuration") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreateDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FATA") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Program") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductL7PartsNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CanBuy") + .HasColumnType("bit"); + + b.Property("CanMake") + .HasColumnType("bit"); + + b.Property("Configuration") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreateDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FATA") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("L7Part") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Position") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductNo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Program") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("int"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RowID") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ProductNo", "Position", "Configuration", "L7Part") + .IsUnique() + .HasFilter("[ProductNo] IS NOT NULL AND [Position] IS NOT NULL AND [Configuration] IS NOT NULL AND [L7Part] IS NOT NULL"); + + b.ToTable("Store_ProductL7PartsNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SourceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkShop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "PackingCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_ProductReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); + + b.ToTable("Store_ProductReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductReceiveJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductReceiveJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ProductItemCode", "ItemCode"); + + b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("RecycleTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductRecycleRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductRecycleRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("OrderStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Lot") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjectCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutAwayQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ShippedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("ItemCode", "Number", "PoLine") + .IsUnique() + .HasFilter("[PoLine] IS NOT NULL"); + + b.ToTable("Store_PurchaseOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PurchaseReceiptJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("PurchaseReceiptInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_PurchaseReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("DockCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PurchaseReturnJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Reason") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PurchaseReturnJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutawayMode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PutawayJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PutawayJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PutawayNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_PutawayNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PutawayMode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PutawayRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_PutawayRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode"); + + b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") + .IsUnique(); + + b.ToTable("Store_ReceiptAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ReceiptNumber") + .IsUnique(); + + b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_SaleOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CustomerPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "SoLine", "ItemCode") + .IsUnique(); + + b.ToTable("Store_SaleOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ScrapRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ScrapNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(450)"); + + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); + + b.ToTable("Store_ScrapNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ScrapRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); + + b.ToTable("Store_ScrapRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreateType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("DockCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ShipDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_SupplierAsn", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "PackingCode") + .IsUnique(); + + b.ToTable("Store_SupplierAsnDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_TransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_TransferRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_UnplannedIssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_UnplannedIssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedIssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedIssueRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_UnplannedReceiptJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WarehouseTransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkOrderId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WorkOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_WorkOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CheckJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectJob", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectNote", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectRequest", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IsolationNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) + .WithMany("MaterialDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.SaleOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ScrapNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WorkOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + { + b.Navigation("Details"); + + b.Navigation("MaterialDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.cs new file mode 100644 index 000000000..93eaf0024 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.cs @@ -0,0 +1,68 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + public partial class Store_AddColumn : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Type", + table: "Store_TransferNote", + type: "nvarchar(64)", + maxLength: 64, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(64)", + oldMaxLength: 64, + oldNullable: true); + + migrationBuilder.AddColumn( + name: "WarehouseCode", + table: "Store_PurchaseReceiptNote", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "WarehouseCode", + table: "Store_InspectRequest", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "CountPrint", + table: "Store_DeliverNote", + type: "int", + nullable: false, + defaultValue: 0); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "WarehouseCode", + table: "Store_PurchaseReceiptNote"); + + migrationBuilder.DropColumn( + name: "WarehouseCode", + table: "Store_InspectRequest"); + + migrationBuilder.DropColumn( + name: "CountPrint", + table: "Store_DeliverNote"); + + migrationBuilder.AlterColumn( + name: "Type", + table: "Store_TransferNote", + type: "nvarchar(64)", + maxLength: 64, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(64)", + oldMaxLength: 64); + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs index c92a6a644..6a513c945 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -3051,6 +3051,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CountPrint") + .HasColumnType("int"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -5202,6 +5205,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -13083,6 +13089,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -17189,6 +17198,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/IssueJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/IssueJobAutoMapperProfile.cs index 22713c44a..d78170183 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/IssueJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/IssueJobAutoMapperProfile.cs @@ -48,8 +48,7 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ToLocationErpCode) ; - CreateMap< - IssueJobDetail, ExpectInEditInput>() + CreateMap() .MapExpectInOutFrom() .Ignore(x => x.Worker) .Ignore(x => x.SerialNumber) @@ -62,5 +61,32 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.SerialNumber) .Ignore(x => x.ExtraProperties); + CreateMap() + .Ignore(x => x.Confirmed) + .Ignore(x => x.JobNumber) + .Ignore(x => x.RequestNumber) + .Ignore(x => x.ActiveDate) + ; + CreateMap() + .Ignore(x => x.IssueTime) + .Ignore(x => x.FromPackingCode) + .Ignore(x => x.ToPackingCode) + .Ignore(x => x.FromContainerCode) + .Ignore(x => x.ToContainerCode) + .Ignore(x => x.FromLot) + .Ignore(x => x.ToLot) + .Ignore(x => x.SupplierBatch) + .Ignore(x => x.ArriveDate) + .Ignore(x => x.ProduceDate) + .Ignore(x => x.ExpireDate) + .Ignore(x => x.FromLocationCode) + .Ignore(x => x.FromLocationArea) + .Ignore(x => x.FromLocationGroup) + .Ignore(x => x.FromLocationErpCode) + .Ignore(x => x.FromWarehouseCode) + .Ignore(x => x.FromStatus) + .Ignore(x => x.ToStatus) + .Ignore(x => x.Qty) + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Bases/StoreDataExchangeEventHandlerBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Bases/StoreDataExchangeEventHandlerBase.cs index 92fc4956d..c0675f55b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Bases/StoreDataExchangeEventHandlerBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Bases/StoreDataExchangeEventHandlerBase.cs @@ -13,8 +13,8 @@ namespace Win_in.Sfs.Wms.Store.Event.DataExchanges; public abstract class StoreDataExchangeEventHandlerBase : StoreEventHandlerBase { - // protected IDataExchangeHelperManager DataExchangeHelperManager => - // LazyServiceProvider.LazyGetRequiredService(); + protected IDataExchangeHelperManager DataExchangeHelperManager => + LazyServiceProvider.LazyGetRequiredService(); protected IExchangeDataManager ExchangeDataManager => LazyServiceProvider.LazyGetRequiredService(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/IssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/IssueJobEventHandler.cs index d2b597995..d5e645fb5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/IssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/IssueJobEventHandler.cs @@ -51,6 +51,7 @@ public class IssueJobEventHandler : private async Task BuildIssueNoteAsync(IssueJob entity) { var issueNoteCreateInput = ObjectMapper.Map(entity); + issueNoteCreateInput.JobNumber = entity.Number; var locationCodes = issueNoteCreateInput.Details.Select(p => p.ToLocationCode).Distinct().ToList(); var locations = await _locationAppService.GetByCodesAsync(locationCodes).ConfigureAwait(false); @@ -61,7 +62,6 @@ public class IssueJobEventHandler : var location = locations.First(p => p.Code == detail.ToLocationCode); await RemovePackingCodeAndContainerCodeAndLotAsync(detail, location.Type); //去箱 去托 去批 - detail.ToLocationArea = location.AreaCode; detail.ToLocationGroup = location.LocationGroupCode; detail.ToLocationErpCode = location.ErpLocationCode; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs index ab126994f..5b8074599 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs @@ -176,10 +176,17 @@ public class PurchaseOrderEventHandler var itemPackDto=ItemPacks.First(p => p.ItemCode == purchaseOrderDetaildetail.ItemCode); //总箱数 - var itemPackQty = (int)(itemQty / itemPackDto.Qty); - if (itemQty % itemPackQty!= 0) + var itemPackingCount = (int)(itemQty / itemPackDto.Qty); + if (itemQty > itemPackDto.Qty) { - itemPackQty++; + if (itemQty % itemPackDto.Qty != 0) + { + itemPackingCount++; + } + } + else + { + itemPackingCount = 1; } //添加物品信息 @@ -192,9 +199,9 @@ public class PurchaseOrderEventHandler //一次性返回所有箱码 var generateManyAsync = await _labelDefinitionAppService .GenerateManyAsync(EnumLabelType.PurchaseLabel.ToString(), Clock.Now.ToString(SharedConst.TimeFormat), - itemPackQty).ConfigureAwait(false); + itemPackingCount).ConfigureAwait(false); - for (var i = 0; i < itemPackQty; i++) + for (var i = 0; i < itemPackingCount; i++) { var supplierAsnDetailInput = ObjectMapper.Map(purchaseOrderDetaildetail); //添加箱码 @@ -257,9 +264,6 @@ public class PurchaseOrderEventHandler ItemPackDTO itemPackDto) { if (itemBasicDto == null) - { - throw new UserFriendlyException($"{supplierAsnDetail.ItemCode}零件信息为空"); - } if (supplierDto == null) { @@ -288,6 +292,7 @@ public class PurchaseOrderEventHandler inputLabel.RecommendLocationCode = supplierAsnDetail.RecommendErpCode; inputLabel.Remark = supplierAsnDetail.Remark; inputLabel.Code = supplierAsnDetail.PackingCode; + inputLabel.PlanArriveDate=supplierAsn.PlanArriveDate; inputLabel.Qty = supplierAsnDetail.Qty; inputLabel.Uom = supplierAsnDetail.Uom; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs index 6bec71c5f..5305923a6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs @@ -1,78 +1,78 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.EventBus; -using Volo.Abp.Uow; -using Win_in.Sfs.Shared.Event; -using Win_in.Sfs.Wms.Store.Domain; +//using System.Collections.Generic; +//using System.Linq; +//using System.Threading.Tasks; +//using Volo.Abp.EventBus; +//using Volo.Abp.Uow; +//using Win_in.Sfs.Shared.Event; +//using Win_in.Sfs.Wms.Store.Domain; -namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; +//namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; -public class IssueNoteEventHandler - : StoreEventHandlerBase - , ILocalEventHandler> - , ILocalEventHandler>> - , ILocalEventHandler> -{ - private readonly IMaterialRequestManager _materialRequestManager; +//public class IssueNoteEventHandler +// : StoreEventHandlerBase +// , ILocalEventHandler> +// , ILocalEventHandler>> +// , ILocalEventHandler> +//{ +// private readonly IMaterialRequestManager _materialRequestManager; - public IssueNoteEventHandler( - IMaterialRequestManager materialRequestManager - ) - { - _materialRequestManager = materialRequestManager; - } +// public IssueNoteEventHandler( +// IMaterialRequestManager materialRequestManager +// ) +// { +// _materialRequestManager = materialRequestManager; +// } - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) - { - var entity = eventData.Entity; +// [UnitOfWork] +// public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) +// { +// var entity = eventData.Entity; - await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); - } +// await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); +// } - private async Task UpdateReceivedQtyMaterialRequestAsync(IssueNote entity) - { - var receiveQtyGroup = entity.Details - .GroupBy(p => new { p.ItemCode, p.ToLocationCode }) - .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) }) - .ToList(); +// private async Task UpdateReceivedQtyMaterialRequestAsync(IssueNote entity) +// { +// var receiveQtyGroup = entity.Details +// .GroupBy(p => new { p.ItemCode, p.ToLocationCode }) +// .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) }) +// .ToList(); - var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); +// var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); - //更新叫料请求的已收数量 - foreach (var materialRequestDetail in materialRequest.Details) - { - var receiveQty = receiveQtyGroup.FirstOrDefault(p => - p.ItemCode == materialRequestDetail.ItemCode && - p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty; - if (receiveQty != null) - { - materialRequestDetail.ReceivedQty += receiveQty.Value; - } - } +// //更新叫料请求的已收数量 +// foreach (var materialRequestDetail in materialRequest.Details) +// { +// var receiveQty = receiveQtyGroup.FirstOrDefault(p => +// p.ItemCode == materialRequestDetail.ItemCode && +// p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty; +// if (receiveQty != null) +// { +// materialRequestDetail.ReceivedQty += receiveQty.Value; +// } +// } - await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); - } +// await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); +// } - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) - { - var entity = eventData.Entity; - if (!entity.UseOnTheWayLocation) - { - await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); - } +// [UnitOfWork] +// public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) +// { +// var entity = eventData.Entity; +// if (!entity.UseOnTheWayLocation) +// { +// await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); +// } - } +// } - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) - { - var entities = eventData.Entity; - foreach (var entity in entities.Where(entity => !entity.UseOnTheWayLocation)) - { - await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); - } - } -} +// [UnitOfWork] +// public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) +// { +// var entities = eventData.Entity; +// foreach (var entity in entities.Where(entity => !entity.UseOnTheWayLocation)) +// { +// await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); +// } +// } +//} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs new file mode 100644 index 000000000..f9270b9be --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; +using Win_in.Sfs.Wms.Store.Event.Transaction; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class ScrapNoteEventHandler + : StoreInventoryEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> +{ + private readonly IScrapRequestManager _scrapRequestManager; + + public ScrapNoteEventHandler(IScrapRequestManager scrapRequestManager) + { + _scrapRequestManager = scrapRequestManager; + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (!string.IsNullOrEmpty(entity.ScrapRequestNumber)) + { + var scrapRequest = await _scrapRequestManager.GetByNumberAsync(entity.ScrapRequestNumber) + .ConfigureAwait(false); + + await _scrapRequestManager.CompleteAsync(scrapRequest).ConfigureAwait(false); + } + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (string.IsNullOrEmpty(entity.ScrapRequestNumber)) + { + var scrapRequest = await _scrapRequestManager.GetByNumberAsync(entity.ScrapRequestNumber) + .ConfigureAwait(false); + + await _scrapRequestManager.CompleteAsync(scrapRequest).ConfigureAwait(false); + } + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ScrapRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ScrapRequestEventHandler.cs index dcd3511ae..4f75f7e83 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ScrapRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ScrapRequestEventHandler.cs @@ -14,16 +14,51 @@ using Win_in.Sfs.Wms.Store.Application.Contracts; public class ScrapRequestEventHandler : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> , ILocalEventHandler> { private readonly IScrapNoteAppService _scrapNoteApp; + private readonly IScrapRequestManager _scrapRequestManager; public ScrapRequestEventHandler( - IScrapNoteAppService scrapNoteApp - ) + IScrapNoteAppService scrapNoteApp, + IScrapRequestManager scrapRequestManager) { _scrapNoteApp = scrapNoteApp; + _scrapRequestManager = scrapRequestManager; + } + + /// + /// 库移创建后 + /// + /// Event data + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _scrapRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 库移批量创建后 + /// + /// Event data + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _scrapRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } } [UnitOfWork] diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/DeliverNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/DeliverNoteEventHandler.cs index 10cf80868..d08b6cd95 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/DeliverNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/DeliverNoteEventHandler.cs @@ -12,13 +12,14 @@ using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; using Win_in.Sfs.Wms.Store.Event.Transaction; + // using Win_in.Sfs.Wms.Job.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Event.Transactions; public class DeliverNoteEventHandler : StoreInventoryEventHandlerBase - , ILocalEventHandler> + , ILocalEventHandler> { private const EnumTransType TransType = EnumTransType.Deliver; private readonly IDeliverRequestAppService _deliverRequestApp; @@ -34,6 +35,11 @@ public class DeliverNoteEventHandler RedisDB = redisConnection.GetDatabase(); } + /// + /// 创建后 + /// + /// + /// [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { @@ -44,19 +50,18 @@ public class DeliverNoteEventHandler await SetRequestStatusAsync(entity).ConfigureAwait(false); } + #region 私有 + private async Task AddTransactionsAsync(DeliverNote deliverNote) { //如果WMS管理客户寄售库,生成库存转移 if (await SettingManager.IsTrueAsync(StoreSettings.Common.EnableCustomerLocation).ConfigureAwait(false)) { - var transferLogs = BuildTransferLogs(deliverNote); await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); - } else //如果WMS不管理客户寄售库,生成出库 { - var transactions = BuildTransactions(deliverNote); await TransactionAppService.AddManyAsync(transactions).ConfigureAwait(false); } @@ -151,4 +156,6 @@ public class DeliverNoteEventHandler return EnumTransSubType.None; } } + + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs index b27cf8c57..f43b6e406 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs @@ -4,119 +4,156 @@ using System.Linq; using System.Threading.Tasks; using Volo.Abp.EventBus; using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; -using Win_in.Sfs.Wms.Store.Event.Transaction; +using Win_in.Sfs.Wms.Store.Event.Transactions; -namespace Win_in.Sfs.Wms.Store.Event.Transactions; - -public class IssueNoteEventHandler - : StoreInventoryEventHandlerBase - , ILocalEventHandler> - , ILocalEventHandler>> - , ILocalEventHandler> +namespace Win_in.Sfs.Wms.Store.Event.BusinessNote { - private const EnumTransType TransType = EnumTransType.Issue; - - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) - { - var entity = eventData.Entity; - var transferLogs = new List(); - var route = entity.UseOnTheWayLocation - ? EnumTransferRoute.SourceToOnTheWay - : EnumTransferRoute.SourceToDestination; - transferLogs.AddRange(await BuildTransferLogsAsync(entity, route).ConfigureAwait(false)); - - await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); - } - - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) - { - var entities = eventData.Entity; - var transferLogs = new List(); - //如果要做库存事务汇总,可以修改此处 - foreach (var issueNote in entities) - { - var route = issueNote.UseOnTheWayLocation - ? EnumTransferRoute.SourceToOnTheWay - : EnumTransferRoute.SourceToDestination; - transferLogs.AddRange(await BuildTransferLogsAsync(issueNote, route).ConfigureAwait(false)); - } - - await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); - } - - [UnitOfWork] - - public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) - { - var entity = eventData.Entity; - - var inputList = await BuildTransferLogsAsync(entity, EnumTransferRoute.OnTheWayToDestination).ConfigureAwait(false); - await AddTransferLogsAsync(inputList).ConfigureAwait(false); - } - - private async Task AddTransferLogsAsync(List inputList) - { - var transferLogs = new List(); - - transferLogs.AddRange(inputList); - - await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); - - } - - private async Task> BuildTransferLogsAsync(IssueNote issueNote, EnumTransferRoute route) - { - var transferLogs = new List(); - foreach (var detail in issueNote.Details.Where(detail => detail.Qty != 0)) - { - var transferLog = ObjectMapper.Map(detail); - - if (issueNote.UseOnTheWayLocation) - { - var location = await LocationAclService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false); - switch (route) - { - case EnumTransferRoute.SourceToOnTheWay: - detail.ToLocationCode = detail.OnTheWayLocationCode; - detail.ToLocationErpCode = location.ErpLocationCode; - detail.ToWarehouseCode = location.WarehouseCode; - break; - case EnumTransferRoute.OnTheWayToDestination: - detail.FromLocationCode = detail.OnTheWayLocationCode; - detail.FromLocationErpCode = location.ErpLocationCode; - detail.FromWarehouseCode = location.WarehouseCode; - break; - case EnumTransferRoute.SourceToDestination: - default: - throw new ArgumentOutOfRangeException(nameof(route), route, null); - } - } - - if (issueNote.UseOnTheWayLocation) - { - transferLog.FromLocationCode = detail.OnTheWayLocationCode; - var location = await LocationAclService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false); - transferLog.FromLocationGroup = location.LocationGroupCode; - transferLog.FromLocationArea = location.AreaCode; - transferLog.FromLocationErpCode = location.ErpLocationCode; - } - - transferLog.TransType = TransType; - transferLog.TransSubType = Enum.Parse(issueNote.RequestType); - transferLog.Worker = issueNote.Worker; - transferLog.DocNumber = issueNote.Number; - transferLog.JobNumber = issueNote.JobNumber; - - transferLogs.Add(transferLog); - } - - return transferLogs; - } - + //public class IssueNoteEventHandler + // : StoreEventHandlerBase + // , ILocalEventHandler> + // , ILocalEventHandler>> + // , ILocalEventHandler> + //{ + // private const EnumTransType TransType = EnumTransType.Issue; + // private readonly Itranlog + + + // [UnitOfWork] + // public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + // { + // var entity = eventData.Entity; + // var transferLogs = new List(); + // var route = entity.UseOnTheWayLocation + // ? EnumTransferRoute.SourceToOnTheWay + // : EnumTransferRoute.SourceToDestination; + + // //如果是mes拉动 先发到在途 + // if (entity.RequestType == EnumMaterialRequestType.Issue_WIP.ToString()) + // { + // route = EnumTransferRoute.SourceToOnTheWay; + // } + + // transferLogs.AddRange(await BuildTransferLogsAsync(entity, route)); + + // await TransferLogAppService.AddManyAsync(transferLogs); + // } + + + // [UnitOfWork] + // public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + // { + // var entities = eventData.Entity; + // var transferLogs = new List(); + // //如果要做库存事务汇总,可以修改此处 + // foreach (var issueNote in entities) + // { + // var route = issueNote.UseOnTheWayLocation + // ? EnumTransferRoute.SourceToOnTheWay + // : EnumTransferRoute.SourceToDestination; + // transferLogs.AddRange(await BuildTransferLogsAsync(issueNote, route)); + // } + + // await TransferLogAppService.AddManyAsync(transferLogs); + // } + + + // [UnitOfWork] + + // public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) + // { + // var entity = eventData.Entity; + + // var inputList = await BuildTransferLogsAsync(entity, EnumTransferRoute.OnTheWayToDestination); + // await AddTransferLogsAsync(inputList); + // } + + // private async Task AddTransferLogsAsync(List inputList) + // { + // var transferLogs = new List(); + + // transferLogs.AddRange(inputList); + + // await TransferLogAppService.AddManyAsync(transferLogs); + + // } + + // private async Task> BuildTransferLogsAsync(IssueNote issueNote, EnumTransferRoute route) + // { + // var transferLogs = new List(); + // foreach (var detail in issueNote.Details.Where(detail => detail.Qty.Qty != 0)) + // { + // var transferLog = ObjectMapper.Map(detail); + + // LocationDTO fromLocationDTO = null; + // LocationDTO toLocationDTO = null; + + // if (issueNote.UseOnTheWayLocation) + // { + // var location = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); + // switch (route) + // { + // case EnumTransferRoute.SourceToOnTheWay: + // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.FromLocationCode); + + // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); + // break; + // case EnumTransferRoute.OnTheWayToDestination: + // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); + + // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.ToLocationCode); + + // await RemovePackingCodeAndContainerCodeAndLotAsync(transferLog); + // break; + // case EnumTransferRoute.SourceToDestination: + // default: + // throw new ArgumentOutOfRangeException(nameof(route), route, null); + // } + // } + // else + // { + // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.FromLocationCode); + // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.ToLocationCode); + // } + + // transferLog.FromLocationCode = fromLocationDTO.Code; + // transferLog.FromLocationArea = fromLocationDTO.AreaCode; + // transferLog.FromLocationErpCode = fromLocationDTO.ErpLocationCode; + // transferLog.FromLocationGroup = fromLocationDTO.LocationGroupCode; + + // transferLog.ToLocationCode = toLocationDTO.Code; + // transferLog.ToLocationArea = toLocationDTO.AreaCode; + // transferLog.ToLocationErpCode = toLocationDTO.ErpLocationCode; + // transferLog.ToLocationGroup = toLocationDTO.LocationGroupCode; + + // transferLog.TransType = TransType; + // transferLog.TransSubType = Enum.Parse(issueNote.RequestType); + // transferLog.Company = issueNote.Company; + // transferLog.Worker = issueNote.Worker; + // transferLog.DocNumber = issueNote.Number; + // transferLog.JobNumber = issueNote.JobNumber; + + // transferLogs.Add(transferLog); + // } + + // return transferLogs; + // } + // private async Task RemovePackingCodeAndContainerCodeAndLotAsync(TransferLogCreateInput transferLogCreateInput) + // { + // transferLogCreateInput.ToPackingCode = ""; + // transferLogCreateInput.ToLot = ""; + // transferLogCreateInput.ToContainerCode = ""; + + // transferLogCreateInput.FromPackingCode = ""; + // transferLogCreateInput.FromLot = ""; + // transferLogCreateInput.FromContainerCode = ""; + + + // } + //} } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ScrapNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ScrapNoteEventHandler.cs index 2e4289476..da4d933d9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ScrapNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ScrapNoteEventHandler.cs @@ -17,37 +17,26 @@ namespace Win_in.Sfs.Wms.Store.Event.Transactions; public class ScrapNoteEventHandler : StoreInventoryEventHandlerBase , ILocalEventHandler> - , ILocalEventHandler>> + , ILocalEventHandler>> { private const EnumTransType TransType = EnumTransType.Scrap; - private readonly IScrapRequestAppService _scrapRequestApp; - - public ScrapNoteEventHandler(IScrapRequestAppService scrapRequestApp) - { - _scrapRequestApp = scrapRequestApp; - } - [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { var entity = eventData.Entity; await AddTransactionsAsync(new List() { entity }).ConfigureAwait(false); - - if (!string.IsNullOrEmpty(entity.ScrapRequestNumber)) - { - await _scrapRequestApp.CompleteByNumberAsync(entity.ScrapRequestNumber).ConfigureAwait(false); - } } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - var entities = eventData.Entity; await AddTransactionsAsync(entities).ConfigureAwait(false); } + #region 私有 + private async Task AddTransactionsAsync(List scrapNotes) { @@ -112,4 +101,5 @@ public class ScrapNoteEventHandler return transactions; } + #endregion } diff --git a/build/src/docker/publish/conf/settings/appsettings.Development.json b/build/src/docker/publish/conf/settings/appsettings.Development.json index d7703852e..38d969c76 100644 --- a/build/src/docker/publish/conf/settings/appsettings.Development.json +++ b/build/src/docker/publish/conf/settings/appsettings.Development.json @@ -122,10 +122,10 @@ "BaseUrl": "http://dev.ccwin-in.com:21292/" }, "Inventory": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://localhost:59095/" }, "Job": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://localhost:59095/" }, "Label": { "BaseUrl": "http://dev.ccwin-in.com:21292/" @@ -134,7 +134,7 @@ "BaseUrl": "http://dev.ccwin-in.com:21292/" }, "Store": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://localhost:59095/" } }, "Serilog": { From 6ef67c6910574407c04c78c53befbc69f29a7896 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 12 Apr 2023 16:46:43 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArriveDbContextModelCreatingExtensions.cs | 4 +- .../ReturnDbContextModelCreatingExtensions.cs | 2 +- ...nge.EntityFrameworkCore.Fawtyg.Tyrp.csproj | 2 +- .../EosAgentModule.cs | 6 +-- .../Incoming/EosIncomingBackgroundWorker.cs | 28 ++++++------- .../Incoming/PlanConverter.cs | 8 +++- .../Incoming/PlanReader.cs | 3 +- .../Incoming/ProductConverter.cs | 8 +++- .../Incoming/ShipConverter.cs | 7 +++- .../Incoming/ShipReader.cs | 3 +- .../Outgoing/ArriveConverter.cs | 2 +- .../Outgoing/ReturnConverter.cs | 2 +- .../Incoming/BomReader.cs | 5 ++- .../Incoming/TyrpIncomingBackgroundWorker.cs | 42 +++++++++---------- .../Outgoing/ScontrolWriter.cs | 6 ++- .../Outgoing/WmsoutmWriter.cs | 4 +- .../TyrpAgentModule.cs | 2 +- .../appsettings.json | 6 +-- .../AgentModule.cs | 2 +- .../Enums/EnumSystemType.cs | 1 + 20 files changed, 80 insertions(+), 63 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Arrives/ArriveDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Arrives/ArriveDbContextModelCreatingExtensions.cs index 3d0ad6793..42e9b6f56 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Arrives/ArriveDbContextModelCreatingExtensions.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Arrives/ArriveDbContextModelCreatingExtensions.cs @@ -11,12 +11,12 @@ public static class ArriveDbContextModelCreatingExtensions builder.Entity(b => { //Configure table & schema Name - b.ToTable(options.TablePrefix + "Sync_arrive", options.Schema); + b.ToTable(options.TablePrefix + "Sync_arrrive", options.Schema); //Configure ABP properties b.ConfigureByConvention(); //Properties - b.Property(q => q.Id); + b.Property(q => q.Id).ValueGeneratedOnAdd(); b.Property(q => q.PlanBillNo).HasMaxLength(255); b.Property(q => q.ShipBillNo).HasMaxLength(255); b.Property(q => q.DocNo).HasMaxLength(255); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Returns/ReturnDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Returns/ReturnDbContextModelCreatingExtensions.cs index b6855dde1..2ecea7856 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Returns/ReturnDbContextModelCreatingExtensions.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Returns/ReturnDbContextModelCreatingExtensions.cs @@ -16,7 +16,7 @@ public static class ReturnDbContextModelCreatingExtensions b.ConfigureByConvention(); //Properties - b.Property(q => q.Id); + b.Property(q => q.Id).ValueGeneratedOnAdd(); b.Property(q => q.PlanBillNo).HasMaxLength(255); b.Property(q => q.ShipBillNo).HasMaxLength(255); b.Property(q => q.DocNo).HasMaxLength(255); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Tyrp/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Tyrp.csproj b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Tyrp/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Tyrp.csproj index e3376708a..ed9e12e59 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Tyrp/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Tyrp.csproj +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Tyrp/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Tyrp.csproj @@ -1,4 +1,4 @@ - + net6.0 diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs index ee6b2a09f..6dc625d8e 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs @@ -41,7 +41,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent; typeof(DataExchangeEntityFrameworkCoreModule), typeof(DataExchangeDomainFawtygEosModule), typeof(DataExchangeEntityFrameworkCoreFawtygModule), - typeof(AbpAccountApplicationContractsModule) + typeof(AbpAccountApplicationContractsModule) )] public class EosAgentModule : AbpModule { @@ -165,8 +165,8 @@ public class EosAgentModule : AbpModule ApplicationInitializationContext context) { - context.AddBackgroundWorkerAsync(); - // context.AddBackgroundWorker(); + //context.AddBackgroundWorkerAsync(); + context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs index a02ce68b4..acb6851bf 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs @@ -43,21 +43,21 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase //转换Plan await planConverter.ConvertAsync(plansFromExternalList).ConfigureAwait(false); - //Logger.LogInformation($"Read Ship"); - //var shipHandleService = workerContext.ServiceProvider.GetRequiredService(); - //var shipConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保持Ship - //var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false); - ////转换Ship - //await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false); + Logger.LogInformation($"Read Ship"); + var shipHandleService = workerContext.ServiceProvider.GetRequiredService(); + var shipConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保持Ship + var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false); + //转换Ship + await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false); - //Logger.LogInformation($"Read Product"); - //var productHandleService = workerContext.ServiceProvider.GetRequiredService(); - //var productConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保持Product - //var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false); - ////转换Product - //await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false); + Logger.LogInformation($"Read Product"); + var productHandleService = workerContext.ServiceProvider.GetRequiredService(); + var productConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保持Product + var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false); + //转换Product + await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false); Logger.LogInformation($"Completed: Handling {Incoming}"); } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs index 83107d1f9..92ddb645a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs @@ -14,6 +14,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent; public class PlanConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IItemBasicAppService _itemBasicAppService; private readonly IItemPackAppService _itemPackAppService; @@ -27,10 +28,12 @@ public class PlanConverter : IIncomingConverter IItemPackAppService itemPackAppService, IObjectMapper objectMapper, ILogger logger, - IConfiguration configuration + IConfiguration configuration, + IIncomingFromExternalManager incomingFromExternalManager ) { + _incomingFromExternalManager = incomingFromExternalManager; _incomingToWmsManager = incomingToWmsManager; _itemBasicAppService = itemBasicAppService; _itemPackAppService = itemPackAppService; @@ -48,7 +51,8 @@ public class PlanConverter : IIncomingConverter //按PlanBillNo合并PurchaseOrder var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(incomingToWmsDataList).ConfigureAwait(false); - + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfPurchaseOrderAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs index 917e143f0..57156aedf 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs @@ -37,8 +37,7 @@ public class PlanReader : IReader public virtual async Task> ReadAsync() { //从EOS读取待处理Plan - var aa = await _planManager.GetToBeProcessedListAsync().ConfigureAwait(false); - var toBeProcessedPlans = aa.Take(100).ToList(); + var toBeProcessedPlans = await _planManager.GetToBeProcessedListAsync().ConfigureAwait(false); if (!toBeProcessedPlans.Any()) { _logger.LogInformation("no plans"); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ProductConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ProductConverter.cs index cd43b789d..945ffc6a1 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ProductConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ProductConverter.cs @@ -15,6 +15,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent.Incoming; public class ProductConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly ISupplierAppService _supplierAppService; private readonly IObjectMapper _objectMapper; @@ -27,9 +28,11 @@ public class ProductConverter : IIncomingConverter IObjectMapper objectMapper, ILogger logger, IGuidGenerator guidGenerator, - IConfiguration configuration + IConfiguration configuration, + IIncomingFromExternalManager incomingFromExternalManager ) { + _incomingFromExternalManager = incomingFromExternalManager; _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _supplierAppService = supplierAppService; @@ -53,7 +56,8 @@ public class ProductConverter : IIncomingConverter incomingToWmsDataList.AddRange(supplierItemIncomingToWmsDataList); //添加IncomingToWms await _incomingToWmsManager.CreateBulkAsync(incomingToWmsDataList).ConfigureAwait(false); - + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildItemPackIncomingToWmsOfProductAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipConverter.cs index 9514b5410..433898ac7 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipConverter.cs @@ -17,6 +17,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent; public class ShipConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IObjectMapper _objectMapper; private readonly IItemBasicAppService _itemBasicAppService; @@ -29,9 +30,11 @@ public class ShipConverter : IIncomingConverter , IItemBasicAppService itemBasicAppService , IItemPackAppService itemPackAppService , ILogger logger, - IConfiguration configuration + IConfiguration configuration, + IIncomingFromExternalManager incomingFromExternalManager ) { + _incomingFromExternalManager = incomingFromExternalManager; _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _itemBasicAppService = itemBasicAppService; @@ -54,6 +57,8 @@ public class ShipConverter : IIncomingConverter var purchaseLabelList = BuildIncomingToWmsOfPurchaseLabelAsync(incomingFromExternalList); await _incomingToWmsManager.CreateManyAsync(purchaseLabelList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); } private List BuildIncomingToWmsOfPurchaseLabelAsync(List incomingFromExternalList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs index 2d022b184..08f4dcb13 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs @@ -32,7 +32,8 @@ public class ShipReader : IReader public virtual async Task> ReadAsync() { //从EOS读取待处理Ship - var toBeProcessedShips = await _shipManager.GetToBeProcessedListAsync().ConfigureAwait(false); + var aa = await _shipManager.GetToBeProcessedListAsync().ConfigureAwait(false); + var toBeProcessedShips = aa.Take(5).ToList(); if (!toBeProcessedShips.Any()) { _logger.LogInformation("no ships"); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs index fa3c734ab..791c8ae4f 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs @@ -35,7 +35,7 @@ public class ArriveConverter : IOutgoingConverter { var outgoingToExternalList = new List(); - var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.PurchaseReceipt, EnumSystemType.SCP).ConfigureAwait(false); + var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.PurchaseReceipt, EnumSystemType.EOS).ConfigureAwait(false); foreach (var outgoingFromWms in outgoingFromWmsList) { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs index 3d762fccf..cef94089a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs @@ -35,7 +35,7 @@ public class ReturnConverter : IOutgoingConverter { var outgoingToExternalList = new List(); - var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.PurchaseReturn, EnumSystemType.SCP).ConfigureAwait(false); + var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.PurchaseReturn, EnumSystemType.EOS).ConfigureAwait(false); foreach (var outgoingFromWms in outgoingFromWmsList) { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BomReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BomReader.cs index 244367485..d5e6072ef 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BomReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BomReader.cs @@ -99,6 +99,7 @@ public class BomReader : IReader SourceSystem = EnumSystemType.ERP.ToString(), SourceDataId = bom.mes_bom_assy.ToString(), SourceDataDetailCode = bom.mes_bom_part.ToString(), + SourceDataGroupCode = bom.mes_bom_part.ToString(), SourceDataContent = JsonSerializer.Serialize(bom), WriteTime = DateTime.Now, Writer = nameof(TyrpIncomingBackgroundWorker), @@ -114,8 +115,8 @@ public class BomReader : IReader { Product = bom.mes_bom_assy, Component = bom.mes_bom_part, - BeginTime = DateTime.ParseExact(bom.mes_bom_chg_e, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture), - EndTime = DateTime.ParseExact(bom.mes_bom_chg_b, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture), + BeginTime = DateTime.ParseExact(bom.mes_bom_chg_b, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture), + EndTime = DateTime.ParseExact(bom.mes_bom_chg_e, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture), ComponentQty = bom.mes_bom_qty }; diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs index d439e1103..86e20cdf5 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs @@ -59,13 +59,13 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase common.updatedt = DateTime.Now; common.isupdate = false; - Logger.LogInformation($"Read ItemBasic");//零件 - var itemBasicReader = workerContext.ServiceProvider.GetRequiredService(); - var itemBasicConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存itemBasic - var itemBasicOutsFromExternalList = await itemBasicReader.ReadAsync().ConfigureAwait(false); - //转换itemBasic - await itemBasicConverter.ConvertAsync(itemBasicOutsFromExternalList).ConfigureAwait(false); + //Logger.LogInformation($"Read ItemBasic");//零件 + //var itemBasicReader = workerContext.ServiceProvider.GetRequiredService(); + //var itemBasicConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存itemBasic + //var itemBasicOutsFromExternalList = await itemBasicReader.ReadAsync().ConfigureAwait(false); + ////转换itemBasic + //await itemBasicConverter.ConvertAsync(itemBasicOutsFromExternalList).ConfigureAwait(false); //Logger.LogInformation($"Read User");//用户和部门 //var userReader = workerContext.ServiceProvider.GetRequiredService(); @@ -80,13 +80,13 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase ////转换department //await departmentConverter.ConvertAsync(departmentOutsFromExternalList).ConfigureAwait(false); - Logger.LogInformation($"Read InterfaceCalendar");//账期 - var interfaceCalendarReader = workerContext.ServiceProvider.GetRequiredService(); - var interfaceCalendarConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存InterfaceCalendar - var interfaceCalendarOutsFromExternalList = await interfaceCalendarReader.ReadAsync().ConfigureAwait(false); - //转换InterfaceCalendar - await interfaceCalendarConverter.ConvertAsync(interfaceCalendarOutsFromExternalList).ConfigureAwait(false); + //Logger.LogInformation($"Read InterfaceCalendar");//账期 + //var interfaceCalendarReader = workerContext.ServiceProvider.GetRequiredService(); + //var interfaceCalendarConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存InterfaceCalendar + //var interfaceCalendarOutsFromExternalList = await interfaceCalendarReader.ReadAsync().ConfigureAwait(false); + ////转换InterfaceCalendar + //await interfaceCalendarConverter.ConvertAsync(interfaceCalendarOutsFromExternalList).ConfigureAwait(false); //Logger.LogInformation($"Read Dict");//系统代码 //var dictReader = workerContext.ServiceProvider.GetRequiredService(); @@ -96,13 +96,13 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase ////转换Dict //await dictConverter.ConvertAsync(dictOutsFromExternalList).ConfigureAwait(false); - //Logger.LogInformation($"Read Bom"); - //var BomReader = workerContext.ServiceProvider.GetRequiredService(); - //var BomConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保存Bom - //var bomsFromExternalList = await BomReader.ReadAsync().ConfigureAwait(false); - ////转换Bom - //await BomConverter.ConvertAsync(bomsFromExternalList).ConfigureAwait(false); + Logger.LogInformation($"Read Bom"); + var BomReader = workerContext.ServiceProvider.GetRequiredService(); + var BomConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Bom + var bomsFromExternalList = await BomReader.ReadAsync().ConfigureAwait(false); + //转换Bom + await BomConverter.ConvertAsync(bomsFromExternalList).ConfigureAwait(false); //Logger.LogInformation($"Read Supplier");//供应商 //var SupplierReader = workerContext.ServiceProvider.GetRequiredService(); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ScontrolWriter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ScontrolWriter.cs index a03c11235..6ed8f0f61 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ScontrolWriter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ScontrolWriter.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json; using System.Threading.Tasks; +using Volo.Abp.Uow; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; using Win_in.Sfs.Wms.DataExchange.Domain.Shared; @@ -25,11 +26,12 @@ public class ScontrolWriter : IWriter /// public virtual async Task WriteAsync(List outgoingDataList) { - var dataInterfaceList = new List(); - var dataInterfaceDetailList = new List(); + var groups = outgoingDataList.GroupBy(r => r.SourceDataGroupCode); foreach (var group in groups) { + var dataInterfaceList = new List(); + var dataInterfaceDetailList = new List(); var entitys = group.ToList(); foreach (var entity in entitys) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/WmsoutmWriter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/WmsoutmWriter.cs index c6203238d..12fc07dd8 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/WmsoutmWriter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/WmsoutmWriter.cs @@ -27,11 +27,11 @@ public class WmsoutmWriter : IWriter /// public virtual async Task WriteAsync(List outgoingDataList) { - var dataInterfaceList = new List(); - var dataInterfaceDetailList = new List(); var groups = outgoingDataList.GroupBy(r => r.SourceDataGroupCode); foreach (var group in groups) { + var dataInterfaceList = new List(); + var dataInterfaceDetailList = new List(); var entitys = group.ToList(); foreach (var entity in entitys) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs index b982f9002..3679cc757 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs @@ -173,7 +173,7 @@ public class TyrpAgentModule : AbpModule { context.AddBackgroundWorkerAsync(); - // context.AddBackgroundWorker(); + //context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json index 39797ae0f..5ae655400 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json @@ -26,13 +26,13 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://dev.ccwin-in.com:59094/" + "BaseUrl": "http://dev.ccwin-in.com:21294/" }, "Store": { - "BaseUrl": "http://dev.ccwin-in.com:59095/" + "BaseUrl": "http://dev.ccwin-in.com:21295/" }, "Label": { - "BaseUrl": "http://dev.ccwin-in.com:59092/" + "BaseUrl": "http://dev.ccwin-in.com:21292/" }, "Auth": { "BaseUrl": "http://dev.ccwin-in.com:21293/" diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs index a4efd96ae..c61e2db2d 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs @@ -150,6 +150,6 @@ public class AgentModule : AbpModule ApplicationInitializationContext context) { context.AddBackgroundWorkerAsync(); - // context.AddBackgroundWorker(); + // context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumSystemType.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumSystemType.cs index 0915e430b..e658b46b2 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumSystemType.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain.Shared/Enums/EnumSystemType.cs @@ -12,5 +12,6 @@ public enum EnumSystemType MES = 3, JIS = 4, QMS = 5, + EOS= 6, } From ee94377aa76134e533bd00933c15386e07bbcfa6 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Wed, 12 Apr 2023 20:21:47 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=8A=A5=E5=BA=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...FrameworkCore.SqlServer.StoreDbContext.sql | 1 + .../Enums/Inventory/EnumTransSubType.cs | 6 + .../Enums/Store/EnumScrapType.cs | 10 +- .../DTOs/SfsJobRecommendFromDetailDTOBase.cs | 7 +- .../Inputs/ScrapRequestImportInput.cs | 15 +- .../PurchaseReturnRequestAppService.cs | 270 +++++++----------- .../ScrapRequests/ScrapRequestAppService.cs | 22 +- .../PurchaseReturnJobs/PurchaseReturnJob.cs | 6 +- .../PurchaseReturnJobManager.cs | 8 +- .../Jobs/DeliverJobAutoMapperProfile.cs | 1 + .../Requests/DeliverRequestMapperProfile.cs | 1 + .../PurchaseReturnRequestAutoMapperProfile.cs | 2 +- .../PurchaseReturnRequestEventHandler.cs | 63 +++- 13 files changed, 229 insertions(+), 183 deletions(-) diff --git a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql index 97de80e01..a817dc41d 100644 --- a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql +++ b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql @@ -700,6 +700,7 @@ CREATE TABLE [Store_DeliverNote] ( [DeliverTime] datetime2 NOT NULL, [DeliverRequestNumber] nvarchar(max) NULL, [DeliverRequestType] nvarchar(64) NOT NULL, + [CountPrint] int NOT NULL, [ExtraProperties] nvarchar(max) NULL, [ConcurrencyStamp] nvarchar(40) NULL, [CreationTime] datetime2 NOT NULL, diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs index c28220728..f99e6672e 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs @@ -85,6 +85,12 @@ public enum EnumTransSubType [Display(Name = "人工报废")] Scrap_Manual = 3601, + /// + /// 完工报废 + /// + [Display(Name = "完工报废")] + Scrap_Product = 3604, + /// /// 线边调整 /// diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumScrapType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumScrapType.cs index 28e91741f..87dfc09eb 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumScrapType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumScrapType.cs @@ -5,9 +5,9 @@ namespace Win_in.Sfs.Shared.Domain.Shared; public enum EnumScrapType { /// - /// 人工报废 + /// 人工报废(原料报废) /// - [Display(Name = "人工报废")] + [Display(Name = "人工报废(原料报废)")] Scrap_Manual = 3601, /// @@ -15,4 +15,10 @@ public enum EnumScrapType /// [Display(Name = "线边报废")] Scrap_WIP = 3603, + + /// + /// 完工报废 + /// + [Display(Name = "完工报废")] + Scrap_Product = 3604, } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/DTOs/SfsJobRecommendFromDetailDTOBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/DTOs/SfsJobRecommendFromDetailDTOBase.cs index e53cb5aee..e2161239f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/DTOs/SfsJobRecommendFromDetailDTOBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/DTOs/SfsJobRecommendFromDetailDTOBase.cs @@ -220,10 +220,13 @@ public abstract class SfsJobRecommendFromDetailDTOBase HandledProduceDate = RecommendProduceDate; HandledExpireDate = RecommendExpireDate; HandledLot = RecommendLot; + HandledQty = RecommendQty; + HandledFromLocationCode = RecommendFromLocationCode; HandledFromLocationErpCode = RecommendFromLocationErpCode; - - HandledQty = RecommendQty; + HandledFromLocationArea= RecommendFromLocationArea; + HandledFromWarehouseCode= RecommendFromWarehouseCode; + HandledFromLocationGroup = RecommendFromLocationGroup; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs index e2331a47f..85191a64c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs @@ -1,4 +1,6 @@ using System.ComponentModel.DataAnnotations; +using DocumentFormat.OpenXml.Wordprocessing; +using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -7,11 +9,16 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class ScrapRequestImportInput : SfsStoreImportInputBase { /// - /// 类型 + /// 报废类型 /// - [Display(Name = "类型")] - [Required] - public EnumScrapType Type { get; set; } + [Display(Name = "报废类型")] + [Required(ErrorMessage = "{0}是必填项")] + [ImporterHeader(Name = "报废类型")] + [ExporterHeader(DisplayName = "报废类型")] + [ValueMapping("线边报废", EnumTransSubType.Scrap_WIP)] + [ValueMapping("原料报废", EnumTransSubType.Scrap_Manual)] + [ValueMapping("完工报废", EnumTransSubType.Scrap_Product)] + public string Type { get; set; } /// /// 物料代码 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReturnRequests/PurchaseReturnRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReturnRequests/PurchaseReturnRequestAppService.cs index 1f997794c..11691171d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReturnRequests/PurchaseReturnRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReturnRequests/PurchaseReturnRequestAppService.cs @@ -6,7 +6,9 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; using Volo.Abp; +using Volo.Abp.Domain.Entities; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Label.Domain; @@ -14,6 +16,7 @@ using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.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; @@ -30,18 +33,22 @@ public class PurchaseReturnRequestAppService : SfsStoreRequestAppServiceBase , IPurchaseReturnRequestAppService { - private readonly IPurchaseReturnRequestManager _purchaseReturnRequestManager; - private readonly IInventoryLabelAppService _inventoryLabelApp; + private readonly ILocationAppService _locationAppService; + private readonly ITransactionTypeAppService _transactionTypeAppService; + private readonly IPurchaseReturnRequestManager _purchaseReturnRequestManager; public PurchaseReturnRequestAppService( IPurchaseReturnRequestRepository repository, IPurchaseReturnRequestManager purchaseReturnRequestManager, - IInventoryLabelAppService inventoryLabelApp - ) : base(repository, purchaseReturnRequestManager) + IInventoryLabelAppService inventoryLabelApp, + ILocationAppService locationAppService, + ITransactionTypeAppService transactionTypeAppService) : base(repository, purchaseReturnRequestManager) { _purchaseReturnRequestManager = purchaseReturnRequestManager; - this._inventoryLabelApp = inventoryLabelApp; + _inventoryLabelApp = inventoryLabelApp; + _locationAppService = locationAppService; + _transactionTypeAppService = transactionTypeAppService; base.CreatePolicyName = PurchaseReturnRequestPermissions.Create; base.UpdatePolicyName = PurchaseReturnRequestPermissions.Update; @@ -55,6 +62,102 @@ public class PurchaseReturnRequestAppService : throw new NotImplementedException(); } + #region 东阳 + + protected override async Task> ImportProcessingEntityAsync(Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var purchaseReturnRequest in addList) + { + await SetRequestAutoPropertiesAsync(purchaseReturnRequest).ConfigureAwait(false); + purchaseReturnRequest.Worker = CurrentUser.GetUserName(); + purchaseReturnRequest.CreatorId = CurrentUser.Id; + + foreach (var detail in purchaseReturnRequest.Details) + { + //通过箱标签 查找标签服务 构造其他字段 + var labelDto = await _inventoryLabelApp.GetByCodeAsync(detail.PackingCode).ConfigureAwait(false); + var balanceDto = await BalanceAclService.GetByPackingCodeAsync(detail.PackingCode).ConfigureAwait(false); + var locationDto= await _locationAppService.GetByCodeAsync(balanceDto.LocationCode).ConfigureAwait(false); + purchaseReturnRequest.AsnNumber = labelDto.AsnNumber; + purchaseReturnRequest.RpNumber = labelDto.RpNumber; + purchaseReturnRequest.ReturnTime=DateTime.Now; + purchaseReturnRequest.SupplierCode= labelDto.SupplierCode; + purchaseReturnRequest.ReturnType = EnumPurchaseReturnType.AfterPuton; + purchaseReturnRequest.PoNumber = labelDto.PoNumber; + await SetDetailPropertiesAsync(detail, labelDto, balanceDto,locationDto).ConfigureAwait(false); + } + } + + return dictionary; + } + + /// + /// 赋值Request业务属性 + /// + /// + /// + private async Task SetRequestAutoPropertiesAsync(PurchaseReturnRequest entity) + { + var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.PurchaseReturn, EnumTransSubType.None).ConfigureAwait(false); + + Check.NotNull(tranType, "事务类型", "事务类型不存在"); + + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; + } + + /// + /// 赋值详情 + /// + /// + /// + /// + private async Task SetDetailPropertiesAsync( + PurchaseReturnRequestDetail detail, + InventoryLabelDto labelDto, + BalanceDTO balanceDto, + LocationDTO locationDto) + { + if (labelDto != null) + { + detail.PoNumber = labelDto.PoNumber; + } + + if (balanceDto != null) + { + detail.PackingCode = balanceDto.PackingCode; + detail.ContainerCode = balanceDto.ContainerCode; + + detail.WarehouseCode = locationDto.WarehouseCode; + detail.LocationCode = balanceDto.LocationCode; + detail.LocationErpCode = locationDto.ErpLocationCode; + detail.LocationArea = locationDto.AreaCode; + detail.LocationGroup = locationDto.LocationGroupCode; + + detail.Status = balanceDto.Status; + detail.Lot = balanceDto.Lot; + detail.SupplierBatch = balanceDto.SupplierBatch; + detail.Uom = balanceDto.Uom; + detail.ArriveDate = balanceDto.ArriveDate; + detail.ProduceDate = balanceDto.ProduceDate; + detail.ExpireDate = balanceDto.ExpireDate; + detail.ItemName = balanceDto.ItemName; + detail.ItemDesc1 = balanceDto.ItemDesc1; + detail.ItemDesc2 = balanceDto.ItemDesc2; + detail.StdPackQty = balanceDto.StdPackQty; + detail.Qty = balanceDto.Qty; + } + } + + #endregion + + #region 校验 + protected virtual async Task CheckImportInputBusinessAsync(PurchaseReturnRequestImportInput importInput, EnumImportMethod importMethod, List validationRresult) { //await base.CheckImportInputBusinessAsync(importInput, importMethod); @@ -140,162 +243,6 @@ public class PurchaseReturnRequestAppService : return transactionType; } - protected virtual async Task ImportDataAsync(List entites, List deleteEntities) - { - await _purchaseReturnRequestManager.ImportDataAsync(entites, deleteEntities).ConfigureAwait(false); - } - - protected override Func GetEntityExpression() - { - return p => (1); - } - - protected virtual async Task<(List entites, List deleteEntities)> BuildImportDataAsync(ImportResult importResult, EnumImportMethod importMethod = EnumImportMethod.Update, bool isAllowPartImport = false) - { - if (importResult.Data.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) - { - if (!isAllowPartImport) - { - return (null, null); - } - } - - var entites = new List(); - - var details = new List(); - - var deleteEntites = new List(); - - var entityExpression = GetEntityExpression(); - - var groupList = importResult.Data.ToList().GroupBy(entityExpression).Distinct().ToList(); - - foreach (var group in groupList) - { - var input = group.FirstOrDefault(); - - var inputDetails = group.ToList(); - - if (!inputDetails.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) - { - var exist = await GetEntityAsync(input).ConfigureAwait(false); - - var entity = ObjectMapper.Map(input); - - await SetEntityPropertiesAsync(entity, input).ConfigureAwait(false); - - switch (importMethod) - { - case EnumImportMethod.Update: - if (exist != null) - { - entity.SetId(exist.Id); - } - break; - case EnumImportMethod.Replace: - if (exist != null) - { - deleteEntites.Add(exist); - } - break; - } - - foreach (var inputDetail in inputDetails) - { - var detail = ObjectMapper.Map(inputDetail); - - detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); - - await SetDetailPropertiesAsync(detail, inputDetail).ConfigureAwait(false); - entity.AddDetail(detail); - } - - entites.Add(entity); - } - } - - return (entites, deleteEntites); - } - - private async Task SetDetailPropertiesAsync( - PurchaseReturnRequestDetail detail, - PurchaseReturnRequestImportInput input) - { - //通过箱标签 查找标签服务 构造其他字段 - - var label = await _inventoryLabelApp.GetByCodeAsync(input.PackingCode).ConfigureAwait(false); - - if (label != null) - { - detail.PoNumber = label.PoNumber; - } - - var balance = await BalanceAclService.GetByPackingCodeAsync(input.PackingCode).ConfigureAwait(false); - - if (balance != null) - { - detail.PackingCode = balance.PackingCode; - detail.ContainerCode = balance.ContainerCode; - detail.LocationCode = balance.LocationCode; - detail.LocationErpCode = balance.LocationErpCode; - detail.WarehouseCode = balance.WarehouseCode; - detail.Status = balance.Status; - detail.Lot = balance.Lot; - detail.SupplierBatch = balance.SupplierBatch; - detail.ArriveDate = balance.ArriveDate; - detail.ProduceDate = balance.ProduceDate; - detail.ExpireDate = balance.ExpireDate; - detail.ItemName = balance.ItemName; - detail.ItemDesc1 = balance.ItemDesc1; - detail.ItemDesc2 = balance.ItemDesc2; - detail.StdPackQty = balance.StdPackQty; - - detail.Qty = balance.Qty; - } - } - - private async Task SetEntityPropertiesAsync(PurchaseReturnRequest entity, PurchaseReturnRequestImportInput input) - { - entity.Worker = CurrentUser.GetUserName(); - - //通过箱标签 查找标签服务 构造其他字段 - - var label = await _inventoryLabelApp.GetByCodeAsync(input.PackingCode).ConfigureAwait(false); - - Check.NotNull(label, nameof(InventoryLabel)); - - entity.RpNumber = label.RpNumber; - entity.AsnNumber = label.AsnNumber; - entity.PoNumber = label.PoNumber; - - var balance = await BalanceAclService.GetByPackingCodeAsync(input.PackingCode).ConfigureAwait(false); - - Check.NotNull(balance, nameof(BalanceDTO)); - - //var order = await this._orderAppService.GetByNumberAsync(label.PoNumber); - - //Check.NotNull(order, nameof(PurchaseOrder)); - - entity.SupplierCode = label.SupplierCode; - - entity.ReturnTime = DateTime.Now; - - await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false); - } - - private async Task SetRequestAutoPropertiesAsync(PurchaseReturnRequest entity) - { - var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.PurchaseReturn, EnumTransSubType.None).ConfigureAwait(false); - - Check.NotNull(tranType, "事务类型", "事务类型不存在"); - - entity.AutoCompleteJob = tranType.AutoCompleteJob; - entity.AutoSubmit = tranType.AutoSubmitRequest; - entity.AutoAgree = tranType.AutoAgreeRequest; - entity.AutoHandle = tranType.AutoHandleRequest; - entity.DirectCreateNote = tranType.DirectCreateNote; - } - /// /// 被 TransactionTypeHelper.CheckTransactionType()取代 /// @@ -375,4 +322,5 @@ public class PurchaseReturnRequestAppService : } + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs index 2c81b848c..be7623764 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs @@ -66,11 +66,27 @@ public class ScrapRequestAppService : SfsStoreRequestAppServiceBase { scrapRequest.CreatorId = CurrentUser.Id; scrapRequest.Worker = CurrentUser.Name; - - scrapRequest.Type = EnumTransSubType.Scrap_WIP.ToString(); scrapRequest.ActiveDate = DateTime.Now; + scrapRequest.Type = scrapRequest.Type; + + EnumTransSubType enumTransSubType = 0; + + if (scrapRequest.Type == "原料报废") + { + enumTransSubType = EnumTransSubType.Scrap_Manual; + } + + if (scrapRequest.Type== "线边报废") + { + enumTransSubType = EnumTransSubType.Scrap_WIP; + } + + if (scrapRequest.Type == "完工报废") + { + enumTransSubType = EnumTransSubType.Scrap_Product; + } - await SetEntityPropertiesAsync(scrapRequest, EnumTransSubType.Scrap_WIP).ConfigureAwait(false); + await SetEntityPropertiesAsync(scrapRequest, enumTransSubType).ConfigureAwait(false); foreach (var detail in scrapRequest.Details) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReturnJobs/PurchaseReturnJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReturnJobs/PurchaseReturnJob.cs index 8749782e5..03978c7a8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReturnJobs/PurchaseReturnJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReturnJobs/PurchaseReturnJob.cs @@ -78,14 +78,18 @@ public class PurchaseReturnJob : SfsJobAggregateRootBase /// /// - public virtual async Task SetDetail(Guid id, string handledLocationCode, string handledLocationErpCode, string handledWarehouseCode, decimal handledQty, + public virtual async Task SetDetail(Guid id, string handledLocationCode, string handledLocationErpCode, string handledWarehouseCode,string handledFromLocationArea,string handledFromLocationGroup, decimal handledQty, string handledSupplierBatch, DateTime handledArriveDate, DateTime handledProduceDate, DateTime handledExpireDate, string handledContainerCode, string handledLot, string handledPackingCode, string reason) { var detail = GetDetail(id); detail.HandledFromLocationCode = handledLocationCode; detail.HandledFromLocationErpCode = handledLocationErpCode; + detail.HandledFromLocationArea = handledFromLocationArea; detail.HandledFromWarehouseCode = handledWarehouseCode; + detail.HandledFromLocationGroup = handledFromLocationGroup; + detail.HandledQty = handledQty; + detail.HandledSupplierBatch = handledSupplierBatch; detail.HandledArriveDate = handledArriveDate; detail.HandledProduceDate = handledProduceDate; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReturnJobs/PurchaseReturnJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReturnJobs/PurchaseReturnJobManager.cs index 081df3087..c375cbcfd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReturnJobs/PurchaseReturnJobManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReturnJobs/PurchaseReturnJobManager.cs @@ -35,13 +35,19 @@ public class PurchaseReturnJobManager : SfsJobManagerBase p.Id == detail.Id); await entity.SetDetail( detail.Id, detail.HandledFromLocationCode, detail.HandledFromLocationErpCode, detail.HandledFromWarehouseCode, + detail.HandledFromLocationArea, + detail.HandledFromLocationGroup, detail.HandledQty, - detail.HandledSupplierBatch, detail.HandledArriveDate, detail.HandledProduceDate, detail.HandledExpireDate, + detail.HandledSupplierBatch, + detail.HandledArriveDate, + detail.HandledProduceDate, + detail.HandledExpireDate, detail.HandledContainerCode, detail.HandledLot, detail.HandledPackingCode, diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs index 0622a13c0..065cc9c81 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/DeliverJobAutoMapperProfile.cs @@ -18,6 +18,7 @@ public partial class StoreEventAutoMapperProfile : Profile .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) + .Ignore(x=>x.CountPrint) ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs index 8cc67eb37..5dbb2df1b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/DeliverRequestMapperProfile.cs @@ -72,6 +72,7 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ForMember(x => x.DeliverRequestNumber, y => y.MapFrom(d => d.Number)).Ignore(x => x.JobNumber) + .Ignore(x=>x.CountPrint) .Ignore(x => x.Details); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/PurchaseReturnRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/PurchaseReturnRequestAutoMapperProfile.cs index bbe21a42e..19215afb5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/PurchaseReturnRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/PurchaseReturnRequestAutoMapperProfile.cs @@ -15,7 +15,7 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ForMember(x => x.PurchaseReturnRequestNumber, y => y.MapFrom(d => d.Number)) - .Ignore(x => x.WarehouseCode) + .Ignore(x=>x.WarehouseCode) .Ignore(x => x.IsAutoComplete) .Ignore(x => x.JobType) .Ignore(x => x.JobDescription) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/PurchaseReturnRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/PurchaseReturnRequestEventHandler.cs index 00d4f1c96..59d9a65cd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/PurchaseReturnRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/PurchaseReturnRequestEventHandler.cs @@ -13,25 +13,57 @@ public class PurchaseReturnRequestEventHandler : StoreEventHandlerBase , ILocalEventHandler> , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> { private readonly IPurchaseReturnJobAppService _purchaseReturnJobAppService; + private readonly IPurchaseReturnRequestManager _purchaseReturnRequestManager; public PurchaseReturnRequestEventHandler( - IPurchaseReturnJobAppService purchaseReturnJobAppService - ) + IPurchaseReturnJobAppService purchaseReturnJobAppService, + IPurchaseReturnRequestManager purchaseReturnRequestManager) { _purchaseReturnJobAppService = purchaseReturnJobAppService; + _purchaseReturnRequestManager = purchaseReturnRequestManager; } - public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) - { - var request = eventData.Entity; - var jobCreateInputs = await BuildPurchaseReturnJobDetailAsync(request).ConfigureAwait(false); + /// + /// 创建后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _purchaseReturnRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } - await _purchaseReturnJobAppService.CreateManyAsync(jobCreateInputs).ConfigureAwait(false); + /// + /// 批量创建后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _purchaseReturnRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } } + /// + /// 审批后 + /// + /// + /// public virtual async Task HandleEventAsync(SfsAbortedEntityEventData eventData) { var request = eventData.Entity; @@ -39,6 +71,20 @@ public class PurchaseReturnRequestEventHandler await _purchaseReturnJobAppService.CancelByPurchaseReturnRequestAsync(request.Number).ConfigureAwait(false); } + /// + /// 执行后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) + { + var request = eventData.Entity; + + var jobCreateInputs = await BuildPurchaseReturnJobDetailAsync(request).ConfigureAwait(false); + + await _purchaseReturnJobAppService.CreateManyAsync(jobCreateInputs).ConfigureAwait(false); + } + #region 私有 private async Task> BuildPurchaseReturnJobDetailAsync(PurchaseReturnRequest request) @@ -50,11 +96,11 @@ public class PurchaseReturnRequestEventHandler foreach (var item in groupBy) { var location = await LocationAclService.GetByCodeAsync(item.Key).ConfigureAwait(false); - if (location != null) { //初始化 var job = ObjectMapper.Map(request); + job.WarehouseCode = location.WarehouseCode; job.JobType = EnumJobType.PurchaseReturnJob; job.JobStatus = EnumJobStatus.Open; @@ -79,4 +125,5 @@ public class PurchaseReturnRequestEventHandler } #endregion + } From 0548f722fb3dbd520c044de71f7a656dd7d52952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B8=A4=E6=97=AD=5BIrelia=5D?= <366601522@qq.com> Date: Wed, 12 Apr 2023 23:36:55 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...FrameworkCore.SqlServer.LabelDbContext.sql | 1 + .../MessageApplicationAutoMapperProfile.cs | 7 +- .../MessageTypeSubscribeAutoMapperProfile.cs | 4 +- .../MessageTypeAutoMapperProfile.cs | 4 +- .../UserNotifyMessageAutoMapperProfile.cs | 4 +- .../DTOs/ProductReceiptRequestDTO.cs | 3 +- .../Inputs/ProductReceiptRequestEditInput.cs | 2 +- .../ProductReceiptRequestAppService.cs | 106 ++++++++++++------ .../ProductReceiptRequest.cs | 3 +- 9 files changed, 88 insertions(+), 46 deletions(-) diff --git a/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.LabelDbContext.sql b/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.LabelDbContext.sql index 62cc74b72..77c90ba24 100644 --- a/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.LabelDbContext.sql +++ b/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.LabelDbContext.sql @@ -49,6 +49,7 @@ CREATE TABLE [Label_InventoryLabel] ( [SupplierSimpleName] nvarchar(max) NULL, [SupplierItemCode] nvarchar(max) NULL, [SupplierItemName] nvarchar(max) NULL, + [PlanArriveDate] datetime2 NOT NULL, [ExtraProperties] nvarchar(max) NULL, [ConcurrencyStamp] nvarchar(40) NULL, [CreationTime] datetime2 NOT NULL, diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageApplicationAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageApplicationAutoMapperProfile.cs index 2d5b76e71..284277277 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageApplicationAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageApplicationAutoMapperProfile.cs @@ -2,7 +2,7 @@ using AutoMapper; namespace Win_in.Sfs.Message.Application; -public class MessageApplicationAutoMapperProfile : Profile +public partial class MessageApplicationAutoMapperProfile : Profile { public MessageApplicationAutoMapperProfile() { @@ -10,7 +10,8 @@ public class MessageApplicationAutoMapperProfile : Profile * Alternatively, you can split your mapping configurations * into multiple profile classes for a better organization. */ - new MessageTypeAutoMapperProfile().MessageTypeAutoMapperProfileConfig(); - new NotifyMessageAutoMapperProfile().NotifyMessageAutoMapperProfileConfig(); + UserNotifyAutoMapperProfile(); + MessageTypeAutoMapperProfile(); + MessageTypeSubscribesAutoMapperProfile(); } } diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs index 6946cb987..d8776f6ae 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs @@ -5,9 +5,9 @@ using Win_in.Sfs.Message.Domain; namespace Win_in.Sfs.Message.Application; -public class MessageTypeSubscribeAutoMapperProfile : Profile +public partial class MessageApplicationAutoMapperProfile : Profile { - public MessageTypeSubscribeAutoMapperProfile() + public void MessageTypeSubscribesAutoMapperProfile() { CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypes/MessageTypeAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypes/MessageTypeAutoMapperProfile.cs index f0f24b3d9..d602c2108 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypes/MessageTypeAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypes/MessageTypeAutoMapperProfile.cs @@ -5,9 +5,9 @@ using Win_in.Sfs.Message.Domain; namespace Win_in.Sfs.Message.Application; -public class MessageTypeAutoMapperProfile : Profile +public partial class MessageApplicationAutoMapperProfile : Profile { - public void MessageTypeAutoMapperProfileConfig() + public void MessageTypeAutoMapperProfile() { CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/UserNotifyMessages/UserNotifyMessageAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/UserNotifyMessages/UserNotifyMessageAutoMapperProfile.cs index 6695cb221..c86fc455e 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/UserNotifyMessages/UserNotifyMessageAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/UserNotifyMessages/UserNotifyMessageAutoMapperProfile.cs @@ -6,9 +6,9 @@ using Win_in.Sfs.Message.Domain; namespace Win_in.Sfs.Message.Application; -public class UserNotifyMessageAutoMapperProfile : Profile +public partial class MessageApplicationAutoMapperProfile : Profile { - public UserNotifyMessageAutoMapperProfile() + public void UserNotifyAutoMapperProfile() { CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductReceiptRequests/DTOs/ProductReceiptRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductReceiptRequests/DTOs/ProductReceiptRequestDTO.cs index 62ad7ba0b..265f55e52 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductReceiptRequests/DTOs/ProductReceiptRequestDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductReceiptRequests/DTOs/ProductReceiptRequestDTO.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -54,6 +55,6 @@ public class ProductReceiptRequestDTO : SfsStoreRequestDTOBase [Display(Name = "类型")] - public string Type { get; set; } + public EnumProductReceiptType Type { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductReceiptRequests/Inputs/ProductReceiptRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductReceiptRequests/Inputs/ProductReceiptRequestEditInput.cs index f4dd44438..09f948138 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductReceiptRequests/Inputs/ProductReceiptRequestEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductReceiptRequests/Inputs/ProductReceiptRequestEditInput.cs @@ -70,7 +70,7 @@ public class ProductReceiptRequestEditInput : SfsStoreRequestCreateOrUpdateInput /// 类型 /// [Display(Name = "类型")] - public string Type { get; set; } + public string EnumProductReceiptType { get; set; } /// /// 明细列表 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAppService.cs index c1aee21d2..46e1e6d0a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAppService.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; - using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp; @@ -25,9 +24,10 @@ namespace Win_in.Sfs.Wms.Store.Application; /// [Authorize] [Route($"{StoreConsts.RootPath}product-receipt-request")] - public class ProductReceiptRequestAppService : - SfsStoreRequestAppServiceBase + SfsStoreRequestAppServiceBase { private readonly IProductReceiptRequestManager _productReceiptRequestManager; @@ -39,14 +39,50 @@ public class ProductReceiptRequestAppService : , IAreaAppService areaApp ) : base(repository, productReceiptRequestManager) { - - this._areaApp = areaApp; + _areaApp = areaApp; _productReceiptRequestManager = productReceiptRequestManager; base.CreatePolicyName = ProductReceiptRequestPermissions.Create; base.UpdatePolicyName = ProductReceiptRequestPermissions.Update; base.DeletePolicyName = ProductReceiptRequestPermissions.Delete; } + #region 东阳 + + /// + /// 设置事务类型 + /// + /// + /// + private async Task SetRequestAutoPropertiesAsync(ProductReceiptRequest entity) + { + var enumTransSubType=EnumTransSubType.None; + switch (entity.Type) + { + case EnumProductReceiptType.ProductReceipt_Manual: + enumTransSubType = EnumTransSubType.ProductReceipt_Manual; + break; + case EnumProductReceiptType.ProductReceipt_WIP: + enumTransSubType = EnumTransSubType.ProductReceipt_WIP; + break; + default: + throw new UserFriendlyException("缴库类型错误"); + } + + var tranType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.ProductReceipt, enumTransSubType) + .ConfigureAwait(false); + + Check.NotNull(tranType, "事务类型", "事务类型不存在"); + + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; + } + + #endregion + /// /// 新增实体 /// @@ -56,7 +92,6 @@ public class ProductReceiptRequestAppService : //[Authorize(ProductReceiptRequestPermissions.Create)] public override async Task CreateAsync(ProductReceiptRequestEditInput input) { - var entity = ObjectMapper.Map(input); await _productReceiptRequestManager.CreateAsync(entity).ConfigureAwait(false); @@ -79,35 +114,37 @@ public class ProductReceiptRequestAppService : bool includeDetails = false, CancellationToken cancellationToken = default) { - Expression> expression = p => p.Type == type; + Expression> expression = p => p.Type.ToString() == type; if (requestInput.Condition.Filters?.Count > 0) { expression = expression.And(requestInput.Condition.Filters.ToLambda()); } return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, - requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); } [HttpPost("export-by-type")] public virtual async Task ExportByTypeAsync(SfsExportRequestInput requestInput, string type) { - - Expression> expression = p => p.Type == type; + Expression> expression = p => p.Type.ToString() == type; if (requestInput.Condition.Filters?.Count > 0) { expression = expression.And(requestInput.Condition.Filters.ToLambda()); } - var entities = await _repository.GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, requestInput.Sorting, true).ConfigureAwait(false); + var entities = await _repository + .GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, requestInput.Sorting, + true).ConfigureAwait(false); var list = ObjectMapper.Map, List>(entities); return ExportImportService.Export(list, true, "Details"); } - #region Import + #region 校验 - protected virtual async Task CheckImportInputBusinessAsync(ProductReceiptRequestImportInput importInput, EnumImportMethod importMethod, List validationRresult) + protected virtual async Task CheckImportInputBusinessAsync(ProductReceiptRequestImportInput importInput, + EnumImportMethod importMethod, List validationRresult) { //await base.CheckImportInputBusinessAsync(importInput, importMethod); @@ -124,7 +161,8 @@ public class ProductReceiptRequestAppService : //CheckTransactionType(EnumTransInOut.In, transactionType.InInventoryStatuses.FirstOrDefault(), transactionType, itemBasic, location); } - protected async Task CheckItemBasicAsync(ProductReceiptRequestImportInput importInput, List validationRresult) + protected async Task CheckItemBasicAsync(ProductReceiptRequestImportInput importInput, + List validationRresult) { var item = await ItemBasicAclService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); @@ -132,25 +170,30 @@ public class ProductReceiptRequestAppService : { validationRresult.Add("物品代码", $"物品代码{importInput.ItemCode}不存在"); } + //可以缴入负数 if (importInput.Qty == 0) { validationRresult.Add("数量", $"数量不能等于0"); } + return item; } - protected async Task CheckLocationAsync(ProductReceiptRequestImportInput importInput, List validationRresult) + protected async Task CheckLocationAsync(ProductReceiptRequestImportInput importInput, + List validationRresult) { var location = await LocationAclService.GetByCodeAsync(importInput.LocationCode).ConfigureAwait(false); if (location == null) { validationRresult.Add("调入库位", $"调入库位{importInput.LocationCode}不存在"); } + return location; } - protected async Task CheckAreaAsync(ProductReceiptRequestImportInput importInput, List validationRresult) + protected async Task CheckAreaAsync(ProductReceiptRequestImportInput importInput, + List validationRresult) { var location = await _areaApp.GetByCodeAsync(importInput.RawArea).ConfigureAwait(false); if (location == null) @@ -161,15 +204,18 @@ public class ProductReceiptRequestAppService : protected async Task CheckTransactionTypeAsync(List validationRresult) { - var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.ProductReceipt, EnumTransSubType.None).ConfigureAwait(false); + var transactionType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.ProductReceipt, EnumTransSubType.None).ConfigureAwait(false); if (transactionType == null) { validationRresult.Add("事务类型", $"{EnumTransType.ProductReceipt.GetDisplayName()}事务类型不存在"); } + return transactionType; } - protected virtual async Task ImportDataAsync(List entites, List deleteEntities) + protected virtual async Task ImportDataAsync(List entites, + List deleteEntities) { await _productReceiptRequestManager.ImportDataAsync(entites, deleteEntities).ConfigureAwait(false); } @@ -179,7 +225,9 @@ public class ProductReceiptRequestAppService : return p => p.Type; } - protected virtual async Task<(List entites, List deleteEntities)> BuildImportDataAsync(ImportResult importResult, EnumImportMethod importMethod = EnumImportMethod.Update, bool isAllowPartImport = false) + protected virtual async Task<(List entites, List deleteEntities)> + BuildImportDataAsync(ImportResult importResult, + EnumImportMethod importMethod = EnumImportMethod.Update, bool isAllowPartImport = false) { if (importResult.Data.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) { @@ -222,6 +270,7 @@ public class ProductReceiptRequestAppService : { entity.SetId(exist.Id); } + break; case EnumImportMethod.Replace: if (exist != null) @@ -235,7 +284,8 @@ public class ProductReceiptRequestAppService : foreach (var inputDetail in inputDetails) { - var detail = ObjectMapper.Map(inputDetail); + var detail = + ObjectMapper.Map(inputDetail); detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); @@ -250,7 +300,8 @@ public class ProductReceiptRequestAppService : return (entites, deleteEntites); } - private async Task SetDetailPropertiesAsync(ProductReceiptRequestDetail detail, ProductReceiptRequestImportInput input) + private async Task SetDetailPropertiesAsync(ProductReceiptRequestDetail detail, + ProductReceiptRequestImportInput input) { var itemBasic = await ItemBasicAclService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); @@ -279,18 +330,5 @@ public class ProductReceiptRequestAppService : await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false); } - private async Task SetRequestAutoPropertiesAsync(ProductReceiptRequest entity) - { - var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.ProductReceipt, Enum.Parse(entity.Type)).ConfigureAwait(false); - - Check.NotNull(tranType, "事务类型", "事务类型不存在"); - - entity.AutoCompleteJob = tranType.AutoCompleteJob; - entity.AutoSubmit = tranType.AutoSubmitRequest; - entity.AutoAgree = tranType.AutoAgreeRequest; - entity.AutoHandle = tranType.AutoHandleRequest; - entity.DirectCreateNote = tranType.DirectCreateNote; - } - #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ProductReceiptRequests/ProductReceiptRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ProductReceiptRequests/ProductReceiptRequest.cs index e81b58839..7d9b25646 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ProductReceiptRequests/ProductReceiptRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ProductReceiptRequests/ProductReceiptRequest.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Domain; @@ -43,7 +44,7 @@ public class ProductReceiptRequest : SfsStoreRequestAggregateRootBase [IgnoreUpdate] - public string Type { get; set; } + public EnumProductReceiptType Type { get; set; } /// /// 明细列表 From 6afde1379dd11d12cf85a128ccf8eb3ea982bd0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B8=A4=E6=97=AD=5BIrelia=5D?= <366601522@qq.com> Date: Thu, 13 Apr 2023 01:16:18 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=AE=8C=E5=B7=A5?= =?UTF-8?q?=E7=BC=B4=E5=BA=93=20=E7=BA=BF=E8=BE=B9=E7=BC=B4=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...FrameworkCore.SqlServer.StoreDbContext.sql | 2 +- .../Enums/Store/EnumProductReceiptType.cs | 4 +- .../ProductReceiptRequestAppService.cs | 226 ++++++++++-------- .../ProductReceiptNoteManager.cs | 75 +++--- ...RequestDbContextModelCreatingExtensions.cs | 2 +- ...RequestDbContextModelCreatingExtensions.cs | 1 - .../Requests/InspectRequestEventHandler.cs | 4 + .../ProductReceiptNoteEventHandler.cs | 18 +- .../ProductReceiptRequestEventHandler.cs | 50 +++- 9 files changed, 243 insertions(+), 139 deletions(-) rename be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/{ => Note}/ProductReceiptNoteEventHandler.cs (70%) diff --git a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql index a817dc41d..8cbecdc09 100644 --- a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql +++ b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql @@ -1281,7 +1281,7 @@ CREATE TABLE [Store_ProductReceiptRequest] ( [Shift] nvarchar(64) NULL, [Team] nvarchar(64) NULL, [PlanDate] datetime2 NOT NULL, - [Type] nvarchar(64) NULL, + [Type] nvarchar(64) NOT NULL, [ExtraProperties] nvarchar(max) NULL, [ConcurrencyStamp] nvarchar(40) NULL, [CreationTime] datetime2 NOT NULL, diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumProductReceiptType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumProductReceiptType.cs index da81aec1e..b6c96841d 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumProductReceiptType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumProductReceiptType.cs @@ -5,9 +5,9 @@ namespace Win_in.Sfs.Shared.Domain.Shared; public enum EnumProductReceiptType { /// - /// 人工缴库 + /// 人工缴库(完工缴库) /// - [Display(Name = "人工缴库")] + [Display(Name = "人工缴库(完工缴库)")] ProductReceipt_Manual = 2101, /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAppService.cs index 46e1e6d0a..5a388cefe 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAppService.cs @@ -5,10 +5,13 @@ using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; +using DocumentFormat.OpenXml.Office.CustomUI; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; @@ -30,16 +33,20 @@ public class ProductReceiptRequestAppService : SfsStoreRequestInputBase, ProductReceiptRequestImportInput> { private readonly IProductReceiptRequestManager _productReceiptRequestManager; - private readonly IAreaAppService _areaApp; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly ILocationAppService _locationAppService; public ProductReceiptRequestAppService( IProductReceiptRequestRepository repository , IProductReceiptRequestManager productReceiptRequestManager - , IAreaAppService areaApp - ) : base(repository, productReceiptRequestManager) + , IAreaAppService areaApp, + IItemBasicAppService itemBasicAppService, + ILocationAppService locationAppService) : base(repository, productReceiptRequestManager) { _areaApp = areaApp; + _itemBasicAppService = itemBasicAppService; + _locationAppService = locationAppService; _productReceiptRequestManager = productReceiptRequestManager; base.CreatePolicyName = ProductReceiptRequestPermissions.Create; base.UpdatePolicyName = ProductReceiptRequestPermissions.Update; @@ -48,6 +55,61 @@ public class ProductReceiptRequestAppService : #region 东阳 + /// + /// 用来重写 导入数据时可以加工数据 + /// + /// + /// + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var productReceiptRequest in addList) + { + productReceiptRequest.Worker = CurrentUser.GetUserName(); + productReceiptRequest.CreatorId = CurrentUser.Id; + + await SetRequestAutoPropertiesAsync(productReceiptRequest).ConfigureAwait(false); + foreach (var detail in productReceiptRequest.Details) + { + await SetDetailPropertiesAsync(detail).ConfigureAwait(false); + } + } + + return dictionary; + } + + /// + /// 赋值详情 + /// + /// + /// + /// + private async Task SetDetailPropertiesAsync(ProductReceiptRequestDetail detail) + { + var itemBasic = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + + if (itemBasic != null) + { + detail.ItemName = itemBasic.Name; + detail.ItemDesc1 = itemBasic.Desc1; + detail.ItemDesc2 = itemBasic.Desc2; + detail.StdPackQty = itemBasic.StdPackQty; + detail.Uom = itemBasic.BasicUom; + } + + var location = await _locationAppService.GetByCodeAsync(detail.LocationCode).ConfigureAwait(false); + + if (location != null) + { + detail.LocationErpCode = location.ErpLocationCode; + detail.WarehouseCode = location.WarehouseCode; + detail.LocationArea = location.AreaCode; + detail.LocationGroup = location.LocationGroupCode; + } + } + /// /// 设置事务类型 /// @@ -55,7 +117,7 @@ public class ProductReceiptRequestAppService : /// private async Task SetRequestAutoPropertiesAsync(ProductReceiptRequest entity) { - var enumTransSubType=EnumTransSubType.None; + var enumTransSubType = EnumTransSubType.None; switch (entity.Type) { case EnumProductReceiptType.ProductReceipt_Manual: @@ -214,121 +276,97 @@ public class ProductReceiptRequestAppService : return transactionType; } - protected virtual async Task ImportDataAsync(List entites, - List deleteEntities) - { - await _productReceiptRequestManager.ImportDataAsync(entites, deleteEntities).ConfigureAwait(false); - } - protected override Func GetEntityExpression() { return p => p.Type; } - protected virtual async Task<(List entites, List deleteEntities)> - BuildImportDataAsync(ImportResult importResult, - EnumImportMethod importMethod = EnumImportMethod.Update, bool isAllowPartImport = false) - { - if (importResult.Data.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) - { - if (!isAllowPartImport) - { - return (null, null); - } - } + #endregion - var entites = new List(); + //protected virtual async Task ImportDataAsync(List entites, + // List deleteEntities) + //{ + // await _productReceiptRequestManager.ImportDataAsync(entites, deleteEntities).ConfigureAwait(false); + //} + //protected virtual async Task<(List entites, List deleteEntities)> + // BuildImportDataAsync(ImportResult importResult, + // EnumImportMethod importMethod = EnumImportMethod.Update, bool isAllowPartImport = false) + //{ + // if (importResult.Data.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) + // { + // if (!isAllowPartImport) + // { + // return (null, null); + // } + // } - var details = new List(); + // var entites = new List(); - var deleteEntites = new List(); + // var details = new List(); - var entityExpression = GetEntityExpression(); + // var deleteEntites = new List(); - var groupList = importResult.Data.ToList().GroupBy(entityExpression).Distinct().ToList(); + // var entityExpression = GetEntityExpression(); - foreach (var group in groupList) - { - var input = group.FirstOrDefault(); + // var groupList = importResult.Data.ToList().GroupBy(entityExpression).Distinct().ToList(); - var inputDetails = group.ToList(); + // foreach (var group in groupList) + // { + // var input = group.FirstOrDefault(); - if (!inputDetails.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) - { - var exist = await GetEntityAsync(input).ConfigureAwait(false); + // var inputDetails = group.ToList(); - var entity = ObjectMapper.Map(input); + // if (!inputDetails.Any(t => t.ReportStatus == EnumImportReportStatus.Failed)) + // { + // var exist = await GetEntityAsync(input).ConfigureAwait(false); - await SetEntityPropertiesAsync(entity, input).ConfigureAwait(false); + // var entity = ObjectMapper.Map(input); - switch (importMethod) - { - case EnumImportMethod.Update: - entity.SetId(exist != null ? exist.Id : GuidGenerator.Create()); + // await SetEntityPropertiesAsync(entity, input).ConfigureAwait(false); - if (exist != null) - { - entity.SetId(exist.Id); - } + // switch (importMethod) + // { + // case EnumImportMethod.Update: + // entity.SetId(exist != null ? exist.Id : GuidGenerator.Create()); - break; - case EnumImportMethod.Replace: - if (exist != null) - { - deleteEntites.Add(exist); - } + // if (exist != null) + // { + // entity.SetId(exist.Id); + // } - entity.SetId(GuidGenerator.Create()); - break; - } + // break; + // case EnumImportMethod.Replace: + // if (exist != null) + // { + // deleteEntites.Add(exist); + // } - foreach (var inputDetail in inputDetails) - { - var detail = - ObjectMapper.Map(inputDetail); + // entity.SetId(GuidGenerator.Create()); + // break; + // } - detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); + // foreach (var inputDetail in inputDetails) + // { + // var detail = + // ObjectMapper.Map(inputDetail); - await SetDetailPropertiesAsync(detail, input).ConfigureAwait(false); - entity.AddDetail(detail); - } + // detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); - entites.Add(entity); - } - } + // await SetDetailPropertiesAsync(detail, input).ConfigureAwait(false); + // entity.AddDetail(detail); + // } - return (entites, deleteEntites); - } + // entites.Add(entity); + // } + // } - private async Task SetDetailPropertiesAsync(ProductReceiptRequestDetail detail, - ProductReceiptRequestImportInput input) - { - var itemBasic = await ItemBasicAclService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); + // return (entites, deleteEntites); + //} - if (itemBasic != null) - { - detail.ItemName = itemBasic.Name; - detail.ItemDesc1 = itemBasic.Desc1; - detail.ItemDesc2 = itemBasic.Desc2; - detail.Qty = input.Qty; - detail.StdPackQty = itemBasic.StdPackQty; - } - - var location = await LocationAclService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false); + //private async Task SetEntityPropertiesAsync(ProductReceiptRequest entity, ProductReceiptRequestImportInput input) + //{ + // entity.Worker = CurrentUser.GetUserName(); - if (location != null) - { - detail.LocationErpCode = location.ErpLocationCode; - detail.WarehouseCode = location.WarehouseCode; - } - } - - private async Task SetEntityPropertiesAsync(ProductReceiptRequest entity, ProductReceiptRequestImportInput input) - { - entity.Worker = CurrentUser.GetUserName(); - - await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false); - } - - #endregion + // await SetRequestAutoPropertiesAsync(entity).ConfigureAwait(false); + //} } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ProductReceiptNotes/ProductReceiptNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ProductReceiptNotes/ProductReceiptNoteManager.cs index be4733302..5b6caa107 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ProductReceiptNotes/ProductReceiptNoteManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ProductReceiptNotes/ProductReceiptNoteManager.cs @@ -12,9 +12,12 @@ public class ProductReceiptNoteManager : SfsStoreManagerBase private async Task BackFlushAsync(ProductReceiptNote productReceiptNote) { - //生成【MES】回冲接口 TODO #region 【判断】是否需要记录回冲记录 及下线结算接口 - //【判断】是否需要记录回冲记录 TODO - //【是】 完工收货时,创建回冲记录 + //【是】 完工收货时,创建回冲记录 //var isBackFlush = await SettingManager.IsTrueAsync(StoreSettings.ProductionReceipt.AutoCreateBackFlush); ; //扣原材料 //var isOffLine = await _settingProvider.IsTrueAsync(StoreSettings.ProductionReceipt.AutoCreateOfflineSettlement); ; //下线结算 + + //是否需要下线结算 - //获取所有成品的零件号 - //一次性获得所有BOM信息避免每个明细都查询一遍;false 为bom不展开,便于测试 - var totalBomList = await GetBomListAsync(productReceiptNote).ConfigureAwait(false); + if (isBackFlush || isOffLine) + { + //获取所有成品的零件号 + //一次性获得所有BOM信息避免每个明细都查询一遍;false 为bom不展开,便于测试 + var totalBomList = await GetBomListAsync(productReceiptNote); - //取不到bom信息要报错,不能进行下去 + //取不到bom信息要报错,不能进行下去 - //根据回冲记录获取成品零件种类和数量,并获取相关要消耗的原材料库存 - var productSumList = productReceiptNote.Details.GroupBy(p => new { p.ItemCode, p.RawLocationCode, p.Qty }) - .Select(s => new BackFlushInventoryTotal - { - ItemCode = s.Key.ItemCode, - RawLocationCode = s.Key.RawLocationCode, - Qty = s.Key.Qty, - TotalQty = s.Sum(n => n.Qty), - }).ToList(); - //根据父级零件汇总的数量,获取BOM子表明细原材料的数量 - var subInventoryTotalList = new List(); + //根据回冲记录获取成品零件种类和数量,并获取相关要消耗的原材料库存 + var productSumList = productReceiptNote.Details.GroupBy(p => new { p.ItemCode, p.RawLocationCode, p.Qty }) + .Select(s => new BackFlushInventoryTotal + { + ItemCode = s.Key.ItemCode, + RawLocationCode = s.Key.RawLocationCode, + Qty = s.Key.Qty, + TotalQty = s.Sum(n => n.Qty), + }).ToList(); - foreach (var productSumItem in productSumList) - { - var subBomList = totalBomList.Where(p => p.Product == productSumItem.ItemCode).ToList(); - //根据bom和父级零件总数获取子零件总数,然后将子零件总数汇总进 总零件数量 - await GetSubBackFlushInventoryList(productSumItem, subBomList, subInventoryTotalList).ConfigureAwait(false); - } + //根据父级零件汇总的数量,获取BOM子表明细原材料的数量 + var subInventoryTotalList = new List(); - await _backFlushNoteManager.CreateByProductReceiptNoteAsync(productReceiptNote, subInventoryTotalList) - .ConfigureAwait(false); + foreach (var productSumItem in productSumList) + { + var subBomList = totalBomList.Where(p => p.Product == productSumItem.ItemCode).ToList(); - //【判断】是否需要下线结算 - if (subInventoryTotalList.Any(p => p.IsOffLine == true)) - { - //【是】 创建【下线结算记录】 - await _offlineSettlementNoteManager - .CreateByProductReceiptNoteAsync(productReceiptNote, subInventoryTotalList).ConfigureAwait(false); + //根据bom和父级零件总数获取子零件总数,然后将子零件总数汇总进 总零件数量 + await GetSubBackFlushInventoryList(productSumItem, subBomList, subInventoryTotalList).ConfigureAwait(false); + } + + if (isBackFlush) + { + await _backFlushNoteManager.CreateByProductReceiptNoteAsync(productReceiptNote, subInventoryTotalList).ConfigureAwait(false); + } + //【判断】是否需要下线结算 + if (isOffLine && subInventoryTotalList.Any(p => p.IsOffLine == true)) + { + //【是】 创建【下线结算记录】 + await _offlineSettlementNoteManager.CreateByProductReceiptNoteAsync(productReceiptNote, subInventoryTotalList).ConfigureAwait(false); + + } } #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ProductReceiptRequests/ProductReceiptRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ProductReceiptRequests/ProductReceiptRequestDbContextModelCreatingExtensions.cs index 366dd9158..9e3184751 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ProductReceiptRequests/ProductReceiptRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/ProductReceiptRequests/ProductReceiptRequestDbContextModelCreatingExtensions.cs @@ -23,8 +23,8 @@ public static class ProductReceiptRequestDbContextModelCreatingExtensions b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.Shift).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.Team).HasMaxLength(SfsPropertyConst.NameLength); - b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.PlanDate); + b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); //Relations diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestDbContextModelCreatingExtensions.cs index 8178b4c88..6ee78be44 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestDbContextModelCreatingExtensions.cs @@ -24,7 +24,6 @@ public static class PurchaseReceiptRequestDbContextModelCreatingExtensions b.Property(q => q.PlanArriveDate).IsRequired(); b.Property(q => q.Number).IsRequired(); b.Property(q => q.TimeWindow).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.SupplierName).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.AsnNumber).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.RpNumber).HasMaxLength(SfsPropertyConst.NameLength); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InspectRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InspectRequestEventHandler.cs index 427044073..0855510ab 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InspectRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InspectRequestEventHandler.cs @@ -1,6 +1,7 @@ using System; 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; @@ -28,6 +29,7 @@ public class InspectRequestEventHandler : StoreEventHandlerBase /// /// /// + [UnitOfWork] public virtual async Task HandleEventAsync(SfsCancelledEntityEventData eventData) { var entity = eventData.Entity; @@ -39,6 +41,7 @@ public class InspectRequestEventHandler : StoreEventHandlerBase /// /// /// + [UnitOfWork] public virtual async Task HandleEventAsync(SfsAgreedEntityEventData eventData) { await Task.CompletedTask.ConfigureAwait(false); @@ -50,6 +53,7 @@ public class InspectRequestEventHandler : StoreEventHandlerBase /// /// /// + [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { var entity = eventData.Entity; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ProductReceiptNoteEventHandler.cs similarity index 70% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptNoteEventHandler.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ProductReceiptNoteEventHandler.cs index 27e909f60..a0af46225 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ProductReceiptNoteEventHandler.cs @@ -18,15 +18,17 @@ public class ProductReceiptNoteEventHandler { private readonly IPutawayJobAppService _putawayJobAppService; - private readonly IProductReceiptRequestAppService _productReceiptRequestApp; + //private readonly IProductReceiptRequestAppService _productReceiptRequestApp; + private readonly IProductReceiptRequestManager _productReceiptRequestManager; public ProductReceiptNoteEventHandler( IPutawayJobAppService putawayJobAppService - , IProductReceiptRequestAppService productReceiptRequestApp - ) + //, IProductReceiptRequestAppService productReceiptRequestApp + , IProductReceiptRequestManager productReceiptRequestManager) { _putawayJobAppService = putawayJobAppService; - _productReceiptRequestApp = productReceiptRequestApp; + //_productReceiptRequestApp = productReceiptRequestApp; + _productReceiptRequestManager = productReceiptRequestManager; } public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) @@ -41,7 +43,9 @@ public class ProductReceiptNoteEventHandler if (!string.IsNullOrEmpty(entity.ProductReceiptRequestNumber)) { - await _productReceiptRequestApp.CompleteByNumberAsync(entity.ProductReceiptRequestNumber).ConfigureAwait(false); + //await _productReceiptRequestApp.CompleteByNumberAsync(entity.ProductReceiptRequestNumber).ConfigureAwait(false); + var productReceiptRequest=await _productReceiptRequestManager.GetByNumberAsync(entity.ProductReceiptRequestNumber).ConfigureAwait(false); + await _productReceiptRequestManager.CompleteAsync(productReceiptRequest).ConfigureAwait(false); } } @@ -64,7 +68,9 @@ public class ProductReceiptNoteEventHandler { if (!string.IsNullOrEmpty(entity.ProductReceiptRequestNumber)) { - await _productReceiptRequestApp.CompleteByNumberAsync(entity.ProductReceiptRequestNumber).ConfigureAwait(false); + //await _productReceiptRequestApp.CompleteByNumberAsync(entity.ProductReceiptRequestNumber).ConfigureAwait(false); + var productReceiptRequest = await _productReceiptRequestManager.GetByNumberAsync(entity.ProductReceiptRequestNumber).ConfigureAwait(false); + await _productReceiptRequestManager.CompleteAsync(productReceiptRequest).ConfigureAwait(false); } } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs index 1bca59154..e59b18222 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs @@ -19,22 +19,62 @@ public class ProductReceiptRequestEventHandler : StoreEventHandlerBase , ILocalEventHandler> , ILocalEventHandler> + ,ILocalEventHandler> + , ILocalEventHandler>> { private readonly IProductReceiveJobAppService _productReceiveJobAppService; private readonly IProductionLineAppService _productionLineAppService; private readonly IProductReceiptNoteAppService _productReceiptNoteApp; + private readonly IProductReceiptRequestManager _productReceiptRequestManager; public ProductReceiptRequestEventHandler( IProductReceiveJobAppService productReceiveJobAppService , IProductionLineAppService productionLineAppService , IProductReceiptNoteAppService productReceiptNoteApp - ) + , IProductReceiptRequestManager productReceiptRequestManager) { _productReceiveJobAppService = productReceiveJobAppService; _productionLineAppService = productionLineAppService; this._productReceiptNoteApp = productReceiptNoteApp; + _productReceiptRequestManager = productReceiptRequestManager; } + /// + /// 创建后 + /// + /// Event data + [UnitOfWork] + public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _productReceiptRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 批量创建后 + /// + /// Event data + [UnitOfWork] + public async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _productReceiptRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + } + + /// + /// 审批后 + /// + /// + /// [UnitOfWork] public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) { @@ -53,6 +93,11 @@ public class ProductReceiptRequestEventHandler } } + /// + /// 取消后 + /// + /// + /// [UnitOfWork] public virtual async Task HandleEventAsync(SfsCancelledEntityEventData eventData) { @@ -60,6 +105,7 @@ public class ProductReceiptRequestEventHandler await _productReceiveJobAppService.CancelByProductionPlanAsync(entity.Number).ConfigureAwait(false); } + #region 私有 private async Task> BuildProductReceiveJobsAsync( ProductReceiptRequest productionPlan) { @@ -160,4 +206,6 @@ public class ProductReceiptRequestEventHandler return note; } + + #endregion } From 70e481048f77595297761a260e40c970a5cdad82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=B8=A4=E6=97=AD=5BIrelia=5D?= <366601522@qq.com> Date: Thu, 13 Apr 2023 01:37:55 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MessageApplicationAutoMapperProfile.cs | 1 + .../MessageTypeSubscribeAutoMapperProfile.cs | 8 ++++++++ .../NotifyMessages/NotifyMessageAutoMapperProfile.cs | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageApplicationAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageApplicationAutoMapperProfile.cs index 284277277..737aa0ae5 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageApplicationAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageApplicationAutoMapperProfile.cs @@ -13,5 +13,6 @@ public partial class MessageApplicationAutoMapperProfile : Profile UserNotifyAutoMapperProfile(); MessageTypeAutoMapperProfile(); MessageTypeSubscribesAutoMapperProfile(); + NotifyMessageAutoMapperProfileConfig(); } } diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs index d8776f6ae..7fedb3bf6 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs @@ -12,5 +12,13 @@ public partial class MessageApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() .ReverseMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x=>x.Id) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.TenantId) + .Ignore(x => x.ExtraProperties) + ; } } diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/NotifyMessages/NotifyMessageAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/NotifyMessages/NotifyMessageAutoMapperProfile.cs index 8df3f3732..cfbf6da69 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/NotifyMessages/NotifyMessageAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/NotifyMessages/NotifyMessageAutoMapperProfile.cs @@ -6,7 +6,7 @@ using Win_in.Sfs.Shared.Event; namespace Win_in.Sfs.Message.Application; -public class NotifyMessageAutoMapperProfile : Profile +public partial class MessageApplicationAutoMapperProfile : Profile { public void NotifyMessageAutoMapperProfileConfig() { @@ -30,6 +30,7 @@ public class NotifyMessageAutoMapperProfile : Profile .Ignore(x => x.LastModifierId) .Ignore(x => x.CreationTime) .Ignore(x => x.CreatorId) + .Ignore(x=>x.Id) ; } } From f0772501b19f66834bc0fed278af7f9eebb39d8d Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 13 Apr 2023 15:11:04 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Plans/IPlanRepository.cs | 6 + .../Plans/PlanManager.cs | 5 +- .../Plans/PlanEfCoreRepository.cs | 27 ++++ .../EosAgentModule.cs | 4 +- .../FawtygAutoMapperProfile.cs | 8 ++ .../Incoming/EosIncomingBackgroundWorker.cs | 28 ++--- .../Incoming/ProductConverter.cs | 1 + .../Incoming/ShipReader.cs | 3 +- .../Incoming/IssueConverter.cs | 8 +- .../Incoming/MesOutConverter.cs | 7 +- .../Incoming/PullTaskConverter.cs | 7 +- .../Incoming/ScrapConverter.cs | 9 +- .../Incoming/BackFluConverter.cs | 6 + .../Incoming/BomConverter.cs | 8 +- .../Incoming/CustomerConverter.cs | 8 ++ .../Incoming/DepartmentConverter.cs | 7 +- .../Incoming/DictConverter.cs | 7 +- .../Incoming/DictpjReader.cs | 5 + .../Incoming/InterfaceCalendarConverter.cs | 7 +- .../Incoming/ItemBasicConverter.cs | 7 +- .../Incoming/SupplierConverter.cs | 7 +- .../Incoming/TyrpIncomingBackgroundWorker.cs | 118 +++++++++--------- .../Incoming/UserConverter.cs | 7 +- .../Outgoing/TyrpOutgoingBackgroundWorker.cs | 8 +- .../TyrpAgentModule.cs | 2 +- .../AgentModule.cs | 4 +- ...IArchivedIncomingFromExternalRepository.cs | 3 +- .../IIncomingFromExternalManager.cs | 1 + .../IncomingFromExternalManager.cs | 8 ++ .../Repositories/ISfsBulkRepositoryBase.cs | 1 + .../SfsEfCoreRepositoryBase.cs | 18 +++ 31 files changed, 244 insertions(+), 101 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Plans/IPlanRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Plans/IPlanRepository.cs index 9ae8c6722..07a12a26e 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Plans/IPlanRepository.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Plans/IPlanRepository.cs @@ -1,7 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using EFCore.BulkExtensions; using Volo.Abp.Domain.Repositories; namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS; public interface IPlanRepository : IRepository { + Task BulkUpdateAsync(IList entities, BulkConfig bulkConfig = null, Action progress = null, Type type = null, CancellationToken cancellationToken = default); } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Plans/PlanManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Plans/PlanManager.cs index 5218f8d7f..eaceb8c69 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Plans/PlanManager.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Plans/PlanManager.cs @@ -1,6 +1,8 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Services; namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS; @@ -16,6 +18,7 @@ public class PlanManager : DomainService, IPlanManager public virtual async Task> GetToBeProcessedListAsync() { var plans = await _repository.GetListAsync(p => p.WmsState == 0).ConfigureAwait(false); + return plans; } @@ -29,6 +32,6 @@ public class PlanManager : DomainService, IPlanManager p.WmsState = 1; p.WmsDate = Clock.Now; }); - await _repository.UpdateManyAsync(plans).ConfigureAwait(false); + await _repository.BulkUpdateAsync(plans).ConfigureAwait(false); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Plans/PlanEfCoreRepository.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Plans/PlanEfCoreRepository.cs index bf94069f8..1de1f27a4 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Plans/PlanEfCoreRepository.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos/Plans/PlanEfCoreRepository.cs @@ -1,5 +1,12 @@ +using EFCore.BulkExtensions; +using Microsoft.EntityFrameworkCore; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Threading; +using System; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS; namespace Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Eos.EOS; @@ -9,5 +16,25 @@ public class PlanEfCoreRepository : EfCoreRepository dbContextProvider) : base(dbContextProvider) { + + } + + /// + /// 批量更新数据 + /// + /// + /// + /// + /// + /// + /// + public virtual async Task BulkUpdateAsync(IList entities, BulkConfig bulkConfig = null, Action progress = null, Type type = null, CancellationToken cancellationToken = default(CancellationToken)) + { + var context = (await GetDbContextAsync().ConfigureAwait(false)) as DbContext; + + if (entities != null && entities.Count > 0) + { + await context.BulkUpdateAsync(entities, bulkConfig, progress, type, cancellationToken).ConfigureAwait(false); + } } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs index 6dc625d8e..86d84862a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs @@ -165,8 +165,8 @@ public class EosAgentModule : AbpModule ApplicationInitializationContext context) { - //context.AddBackgroundWorkerAsync(); - context.AddBackgroundWorkerAsync(); + context.AddBackgroundWorkerAsync(); + // context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/FawtygAutoMapperProfile.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/FawtygAutoMapperProfile.cs index e8d82e3fa..5cdb32ef2 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/FawtygAutoMapperProfile.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/FawtygAutoMapperProfile.cs @@ -1,6 +1,7 @@ using AutoMapper; using Volo.Abp.AutoMapper; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Label.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.Domain; @@ -102,5 +103,12 @@ public class FawtygAutoMapperProfile : Profile .ForMember(x => x.Version, y => y.MapFrom(d => d.Remark)) .ForMember(x => x.SupplierPackQty, y => y.MapFrom(d => d.PackQty)) .ForMember(x => x.SupplierPackUom, y => y.MapFrom(d => d.PackUom)); + + + CreateMap() + .IgnoreAuditedObjectProperties() + //.ForMember(x => x.SupplierPackQty, y => y.MapFrom(d => new UomQty(d.SupplierPackUom, d.SupplierPackQty))) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.Id); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs index acb6851bf..fb385c471 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs @@ -43,21 +43,21 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase //转换Plan await planConverter.ConvertAsync(plansFromExternalList).ConfigureAwait(false); - Logger.LogInformation($"Read Ship"); - var shipHandleService = workerContext.ServiceProvider.GetRequiredService(); - var shipConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保持Ship - var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false); - //转换Ship - await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false); + // Logger.LogInformation($"Read Ship"); + // var shipHandleService = workerContext.ServiceProvider.GetRequiredService(); + // var shipConverter = workerContext.ServiceProvider.GetRequiredService(); + // //读取并保持Ship + // var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false); + // //转换Ship + // await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false); - Logger.LogInformation($"Read Product"); - var productHandleService = workerContext.ServiceProvider.GetRequiredService(); - var productConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保持Product - var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false); - //转换Product - await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false); + // Logger.LogInformation($"Read Product"); + // var productHandleService = workerContext.ServiceProvider.GetRequiredService(); + // var productConverter = workerContext.ServiceProvider.GetRequiredService(); + // //读取并保持Product + // var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false); + //// 转换Product + // await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false); Logger.LogInformation($"Completed: Handling {Incoming}"); } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ProductConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ProductConverter.cs index 945ffc6a1..3b4079e6f 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ProductConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ProductConverter.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.Logging; using Volo.Abp.Guids; using Volo.Abp.ObjectMapping; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.WMS.ItemPack; diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs index 08f4dcb13..2d022b184 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs @@ -32,8 +32,7 @@ public class ShipReader : IReader public virtual async Task> ReadAsync() { //从EOS读取待处理Ship - var aa = await _shipManager.GetToBeProcessedListAsync().ConfigureAwait(false); - var toBeProcessedShips = aa.Take(5).ToList(); + var toBeProcessedShips = await _shipManager.GetToBeProcessedListAsync().ConfigureAwait(false); if (!toBeProcessedShips.Any()) { _logger.LogInformation("no ships"); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/IssueConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/IssueConverter.cs index 12c1a7db1..0dc01d766 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/IssueConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/IssueConverter.cs @@ -14,6 +14,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; public class IssueConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IItemBasicAppService _itemBasicAppService; private readonly IObjectMapper _objectMapper; @@ -25,10 +26,12 @@ public class IssueConverter : IIncomingConverter IItemBasicAppService itemBasicAppService, IObjectMapper objectMapper, ILogger logger, - IConfiguration configuration + IConfiguration configuration, + IIncomingFromExternalManager incomingFromExternalManager ) { + _incomingFromExternalManager = incomingFromExternalManager; _incomingToWmsManager = incomingToWmsManager; _itemBasicAppService = itemBasicAppService; _objectMapper = objectMapper; @@ -44,7 +47,8 @@ public class IssueConverter : IIncomingConverter } var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(incomingToWmsDataList).ConfigureAwait(false); - + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfPurchaseOrderAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs index 42bd7e5c8..ea92dcf1d 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs @@ -16,6 +16,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent; public class MesOutConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IObjectMapper _objectMapper; private readonly IItemBasicAppService _itemBasicAppService; @@ -29,7 +30,8 @@ public class MesOutConverter : IIncomingConverter , IItemBasicAppService itemBasicAppService , ILogger logger, IConfiguration configuration, - ILocationAppService locationAppService) + ILocationAppService locationAppService, + IIncomingFromExternalManager incomingFromExternalManager) { _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; @@ -37,6 +39,7 @@ public class MesOutConverter : IIncomingConverter _logger = logger; _configuration = configuration; _locationAppService = locationAppService; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) @@ -49,6 +52,8 @@ public class MesOutConverter : IIncomingConverter var productReceiptNoteList = await BuildIncomingToWmsOfProductReceiptNoteAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(productReceiptNoteList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfProductReceiptNoteAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/PullTaskConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/PullTaskConverter.cs index 46c86ae65..9c452e010 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/PullTaskConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/PullTaskConverter.cs @@ -16,6 +16,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; public class PullTaskConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IObjectMapper _objectMapper; private readonly IItemBasicAppService _itemBasicAppService; @@ -27,13 +28,15 @@ public class PullTaskConverter : IIncomingConverter , IObjectMapper objectMapper , IItemBasicAppService itemBasicAppService , ILogger logger - , IConfiguration configuration) + , IConfiguration configuration, + IIncomingFromExternalManager incomingFromExternalManager) { _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _itemBasicAppService = itemBasicAppService; _logger = logger; _configuration = configuration; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) @@ -47,6 +50,8 @@ public class PullTaskConverter : IIncomingConverter //按Number合并MaterialRequest单据 var materialRequestList = await BuildIncomingToWmsOfMaterialRequestAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(materialRequestList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfMaterialRequestAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/ScrapConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/ScrapConverter.cs index 7f8b6a911..11d70263a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/ScrapConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/ScrapConverter.cs @@ -16,6 +16,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming; public class ScrapConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IItemBasicAppService _itemBasicAppService; private readonly IObjectMapper _objectMapper; @@ -27,6 +28,10 @@ public class ScrapConverter : IIncomingConverter IObjectMapper objectMapper, ILogger logger, IConfiguration configuration +, + IIncomingFromExternalManager incomingFromExternalManager + + ) { @@ -35,6 +40,7 @@ public class ScrapConverter : IIncomingConverter _objectMapper = objectMapper; _logger = logger; _configuration = configuration; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) { @@ -46,7 +52,8 @@ public class ScrapConverter : IIncomingConverter //按PlanBillNo合并PurchaseOrder var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(incomingToWmsDataList).ConfigureAwait(false); - + //归档 + await _incomingFromExternalManager.ArchiveManyAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfPurchaseOrderAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BackFluConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BackFluConverter.cs index 672cc23e2..8565defb2 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BackFluConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BackFluConverter.cs @@ -13,6 +13,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; public class BackFluConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IItemBasicAppService _itemBasicAppService; private readonly IObjectMapper _objectMapper; @@ -22,6 +23,8 @@ public class BackFluConverter : IIncomingConverter IItemBasicAppService itemBasicAppService, IObjectMapper objectMapper, ILogger logger +, + IIncomingFromExternalManager incomingFromExternalManager ) { @@ -29,6 +32,7 @@ public class BackFluConverter : IIncomingConverter _itemBasicAppService = itemBasicAppService; _objectMapper = objectMapper; _logger = logger; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) { @@ -39,6 +43,8 @@ public class BackFluConverter : IIncomingConverter } var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(incomingToWmsDataList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList).ConfigureAwait(false); } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BomConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BomConverter.cs index 2c4e75c32..50b34ebde 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BomConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/BomConverter.cs @@ -13,6 +13,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; public class BomConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IItemBasicAppService _itemBasicAppService; private readonly IObjectMapper _objectMapper; @@ -25,7 +26,8 @@ public class BomConverter : IIncomingConverter IObjectMapper objectMapper, ILogger logger, IGuidGenerator guidGenerator, - IConfiguration configuration) + IConfiguration configuration, + IIncomingFromExternalManager incomingFromExternalManager) { _incomingToWmsManager = incomingToWmsManager; @@ -34,6 +36,7 @@ public class BomConverter : IIncomingConverter _logger = logger; _guidGenerator = guidGenerator; _configuration = configuration; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) { @@ -44,7 +47,8 @@ public class BomConverter : IIncomingConverter } var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateBulkAsync(incomingToWmsDataList).ConfigureAwait(false); - + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfPurchaseOrderAsync(List incomingDataList) { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/CustomerConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/CustomerConverter.cs index 4326f80ee..bed551158 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/CustomerConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/CustomerConverter.cs @@ -17,17 +17,23 @@ public class CustomerConverter : IIncomingConverter private readonly IObjectMapper _objectMapper; private readonly ILogger _logger; private readonly IGuidGenerator _guidGenerator; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; + public CustomerConverter( IIncomingToWmsManager incomingToWmsManager, IObjectMapper objectMapper, ILogger logger, IGuidGenerator guidGenerator +, + IIncomingFromExternalManager incomingFromExternalManager + ) { _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _logger = logger; _guidGenerator = guidGenerator; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) { @@ -38,6 +44,8 @@ public class CustomerConverter : IIncomingConverter } var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateBulkAsync(incomingToWmsDataList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfPurchaseOrderAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DepartmentConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DepartmentConverter.cs index 519a1fb7d..364680786 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DepartmentConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DepartmentConverter.cs @@ -15,15 +15,18 @@ public class DepartmentConverter : IIncomingConverter private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IObjectMapper _objectMapper; private readonly ILogger _logger; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; public DepartmentConverter( IIncomingToWmsManager incomingToWmsManager , IObjectMapper objectMapper - , ILogger logger) + , ILogger logger, +IIncomingFromExternalManager incomingFromExternalManager) { _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _logger = logger; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) @@ -37,6 +40,8 @@ public class DepartmentConverter : IIncomingConverter //按流水号创建单据 var materialRequestList = await BuildIncomingToWmsOfDepartmentRequestAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(materialRequestList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfDepartmentRequestAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DictConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DictConverter.cs index c772be73d..be7906816 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DictConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DictConverter.cs @@ -17,17 +17,20 @@ public class DictConverter : IIncomingConverter private readonly IObjectMapper _objectMapper; private readonly ILogger _logger; private readonly IGuidGenerator _guidGenerator; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; public DictConverter( IIncomingToWmsManager incomingToWmsManager , IObjectMapper objectMapper , ILogger logger, - IGuidGenerator guidGenerator) + IGuidGenerator guidGenerator, + IIncomingFromExternalManager incomingFromExternalManager) { _guidGenerator = guidGenerator; _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _objectMapper = objectMapper; _logger = logger; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) @@ -41,6 +44,8 @@ public class DictConverter : IIncomingConverter //按流水号创建单据 var materialRequestList = await BuildIncomingToWmsOfDictRequestAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateBulkAsync(materialRequestList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfDictRequestAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DictpjReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DictpjReader.cs index 810797292..9065f9ee2 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DictpjReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/DictpjReader.cs @@ -5,6 +5,7 @@ using System.Text.Json; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; +using Volo.Abp.Guids; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Tyrp; @@ -20,13 +21,16 @@ public class DictpjReader : IReader private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly ILogger _logger; private readonly IConfiguration _configuration; + private readonly IGuidGenerator _guidGenerator; public DictpjReader( IDictpjManager dictpjManager , IIncomingFromExternalManager incomingFromExternalManager , ILogger logger , IConfiguration configuration + , IGuidGenerator guidGenerator ) { + _guidGenerator = guidGenerator; _configuration = configuration; _dictpjManager = dictpjManager; _incomingFromExternalManager = incomingFromExternalManager; @@ -55,6 +59,7 @@ public class DictpjReader : IReader var incomingData = BuildIncomingFromExternal(dict); incomingData.SetEffectiveDate(DateTime.Now); incomingData.SetSuccess(); + incomingData.SetId(_guidGenerator.Create()); try { var DictRequest = BuildDictRequestCreateInput(dict); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/InterfaceCalendarConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/InterfaceCalendarConverter.cs index 8e76c884c..d1e99dbf7 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/InterfaceCalendarConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/InterfaceCalendarConverter.cs @@ -15,15 +15,18 @@ public class InterfaceCalendarConverter : IIncomingConverter private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IObjectMapper _objectMapper; private readonly ILogger _logger; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; public InterfaceCalendarConverter( IIncomingToWmsManager incomingToWmsManager , IObjectMapper objectMapper - , ILogger logger) + , ILogger logger, + IIncomingFromExternalManager incomingFromExternalManager) { _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _logger = logger; + _incomingFromExternalManager = incomingFromExternalManager; } public virtual async Task ConvertAsync(List incomingFromExternalList) @@ -37,6 +40,8 @@ public class InterfaceCalendarConverter : IIncomingConverter //按流水号创建单据 var materialRequestList = await BuildIncomingToWmsOfInterfaceCalendarRequestAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(materialRequestList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfInterfaceCalendarRequestAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs index 299dca8ca..e489620b7 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs @@ -14,6 +14,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent.Incoming; public class ItemBasicConverter : IIncomingConverter { + private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IObjectMapper _objectMapper; private readonly ILogger _logger; @@ -25,8 +26,10 @@ public class ItemBasicConverter : IIncomingConverter , IObjectMapper objectMapper , ILogger logger, IGuidGenerator guidGenerator, - IConfiguration configuration) + IConfiguration configuration, + IIncomingFromExternalManager incomingFromExternalManager) { + _incomingFromExternalManager = incomingFromExternalManager; _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _logger = logger; @@ -45,6 +48,8 @@ public class ItemBasicConverter : IIncomingConverter //按流水号创建单据 var materialRequestList = await BuildIncomingToWmsOfItemBasicRequestAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateBulkAsync(materialRequestList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList); } private async Task> BuildIncomingToWmsOfItemBasicRequestAsync(List incomingDataList) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/SupplierConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/SupplierConverter.cs index ca1564423..49bbf2cc4 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/SupplierConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/SupplierConverter.cs @@ -17,11 +17,13 @@ public class SupplierConverter : IIncomingConverter private readonly IObjectMapper _objectMapper; private readonly ILogger _logger; private readonly IGuidGenerator _guidGenerator; + private readonly IIncomingFromExternalManager _incomingFromExternalManager; public SupplierConverter( IIncomingToWmsManager incomingToWmsManager, IObjectMapper objectMapper, ILogger logger, - IGuidGenerator guidGenerator + IGuidGenerator guidGenerator, + IIncomingFromExternalManager incomingFromExternalManage ) { @@ -39,7 +41,8 @@ public class SupplierConverter : IIncomingConverter } var incomingToWmsDataList = await BuildIncomingToWmsOfPurchaseOrderAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateBulkAsync(incomingToWmsDataList).ConfigureAwait(false); - + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfPurchaseOrderAsync(List incomingDataList) { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs index 86e20cdf5..f2b44243d 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs @@ -67,65 +67,65 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase ////转换itemBasic //await itemBasicConverter.ConvertAsync(itemBasicOutsFromExternalList).ConfigureAwait(false); - //Logger.LogInformation($"Read User");//用户和部门 - //var userReader = workerContext.ServiceProvider.GetRequiredService(); - //var userConverter = workerContext.ServiceProvider.GetRequiredService(); - //var departmentConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保存user - //var outsFromExternalList = await userReader.ReadAsync().ConfigureAwait(false); - //var userOutsFromExternalList = outsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.User.ToString()).ToList(); - //var departmentOutsFromExternalList = outsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.Department.ToString()).ToList(); - ////转换user - //await userConverter.ConvertAsync(userOutsFromExternalList).ConfigureAwait(false); - ////转换department - //await departmentConverter.ConvertAsync(departmentOutsFromExternalList).ConfigureAwait(false); - - //Logger.LogInformation($"Read InterfaceCalendar");//账期 - //var interfaceCalendarReader = workerContext.ServiceProvider.GetRequiredService(); - //var interfaceCalendarConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保存InterfaceCalendar - //var interfaceCalendarOutsFromExternalList = await interfaceCalendarReader.ReadAsync().ConfigureAwait(false); - ////转换InterfaceCalendar - //await interfaceCalendarConverter.ConvertAsync(interfaceCalendarOutsFromExternalList).ConfigureAwait(false); - - //Logger.LogInformation($"Read Dict");//系统代码 - //var dictReader = workerContext.ServiceProvider.GetRequiredService(); - //var dictConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保存Dict - //var dictOutsFromExternalList = await dictReader.ReadAsync().ConfigureAwait(false); - ////转换Dict - //await dictConverter.ConvertAsync(dictOutsFromExternalList).ConfigureAwait(false); - - Logger.LogInformation($"Read Bom"); - var BomReader = workerContext.ServiceProvider.GetRequiredService(); - var BomConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存Bom - var bomsFromExternalList = await BomReader.ReadAsync().ConfigureAwait(false); - //转换Bom - await BomConverter.ConvertAsync(bomsFromExternalList).ConfigureAwait(false); - - //Logger.LogInformation($"Read Supplier");//供应商 - //var SupplierReader = workerContext.ServiceProvider.GetRequiredService(); - //var SupplierConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保存Supplier - //var suppliersFromExternalList = await SupplierReader.ReadAsync().ConfigureAwait(false); - ////转换Supplier - //await SupplierConverter.ConvertAsync(suppliersFromExternalList).ConfigureAwait(false); - - //Logger.LogInformation($"Read Dictpj");//专案代码 - //var DictpjReader = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保存Dictpj - //var dictpjOutsFromExternalList = await DictpjReader.ReadAsync().ConfigureAwait(false); - ////转换Dictpj - //await dictConverter.ConvertAsync(dictOutsFromExternalList).ConfigureAwait(false); - - //Logger.LogInformation($"Read Customer");//客户资料 - //var CustomerReader = workerContext.ServiceProvider.GetRequiredService(); - //var CustomerConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保存Customer - //var customersFromExternalList = await CustomerReader.ReadAsync().ConfigureAwait(false); - ////转换Customer - //await CustomerConverter.ConvertAsync(customersFromExternalList).ConfigureAwait(false); + Logger.LogInformation($"Read User");//用户和部门 + var userReader = workerContext.ServiceProvider.GetRequiredService(); + var userConverter = workerContext.ServiceProvider.GetRequiredService(); + var departmentConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存user + var outsFromExternalList = await userReader.ReadAsync().ConfigureAwait(false); + var userOutsFromExternalList = outsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.User.ToString()).ToList(); + var departmentOutsFromExternalList = outsFromExternalList.Where(r => r.DataType == EnumIncomingDataType.Department.ToString()).ToList(); + //转换user + await userConverter.ConvertAsync(userOutsFromExternalList).ConfigureAwait(false); + //转换department + await departmentConverter.ConvertAsync(departmentOutsFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read InterfaceCalendar");//账期 + var interfaceCalendarReader = workerContext.ServiceProvider.GetRequiredService(); + var interfaceCalendarConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存InterfaceCalendar + var interfaceCalendarOutsFromExternalList = await interfaceCalendarReader.ReadAsync().ConfigureAwait(false); + //转换InterfaceCalendar + await interfaceCalendarConverter.ConvertAsync(interfaceCalendarOutsFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read Dict");//系统代码 + var dictReader = workerContext.ServiceProvider.GetRequiredService(); + var dictConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Dict + var dictOutsFromExternalList = await dictReader.ReadAsync().ConfigureAwait(false); + //转换Dict + await dictConverter.ConvertAsync(dictOutsFromExternalList).ConfigureAwait(false); + + //Logger.LogInformation($"Read Bom"); + //var BomReader = workerContext.ServiceProvider.GetRequiredService(); + //var BomConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存Bom + //var bomsFromExternalList = await BomReader.ReadAsync().ConfigureAwait(false); + ////转换Bom + //await BomConverter.ConvertAsync(bomsFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read Supplier");//供应商 + var SupplierReader = workerContext.ServiceProvider.GetRequiredService(); + var SupplierConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Supplier + var suppliersFromExternalList = await SupplierReader.ReadAsync().ConfigureAwait(false); + //转换Supplier + await SupplierConverter.ConvertAsync(suppliersFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read Dictpj");//专案代码 + var DictpjReader = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Dictpj + var dictpjOutsFromExternalList = await DictpjReader.ReadAsync().ConfigureAwait(false); + //转换Dictpj + await dictConverter.ConvertAsync(dictOutsFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read Customer");//客户资料 + var CustomerReader = workerContext.ServiceProvider.GetRequiredService(); + var CustomerConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Customer + var customersFromExternalList = await CustomerReader.ReadAsync().ConfigureAwait(false); + //转换Customer + await CustomerConverter.ConvertAsync(customersFromExternalList).ConfigureAwait(false); } else { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/UserConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/UserConverter.cs index cde28e652..281e72901 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/UserConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/UserConverter.cs @@ -15,12 +15,13 @@ public class UserConverter : IIncomingConverter private readonly IIncomingToWmsManager _incomingToWmsManager; private readonly IObjectMapper _objectMapper; private readonly ILogger _logger; - + private readonly IIncomingFromExternalManager _incomingFromExternalManager; public UserConverter( IIncomingToWmsManager incomingToWmsManager , IObjectMapper objectMapper - , ILogger logger) + , ILogger logger, IIncomingFromExternalManager incomingFromExternalManager) { + _incomingFromExternalManager = incomingFromExternalManager; _incomingToWmsManager = incomingToWmsManager; _objectMapper = objectMapper; _logger = logger; @@ -37,6 +38,8 @@ public class UserConverter : IIncomingConverter //按流水号创建单据 var materialRequestList = await BuildIncomingToWmsOfIdentityUserRequestAsync(incomingFromExternalList).ConfigureAwait(false); await _incomingToWmsManager.CreateManyAsync(materialRequestList).ConfigureAwait(false); + //归档 + await _incomingFromExternalManager.ArchiveBulkAsync(incomingFromExternalList).ConfigureAwait(false); } private async Task> BuildIncomingToWmsOfIdentityUserRequestAsync(List incomingDataList) 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 586a81b4c..0344a59ed 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 @@ -94,10 +94,10 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase var unplannedIssueNoteNoteList = await unplannedIssueNoteConvert.ConvertAsync().ConfigureAwait(false); await wmsoutmWriter.WriteAsync(unplannedIssueNoteNoteList).ConfigureAwait(false); - //Logger.LogInformation($"Write UnplannedReceiptNote");//非生产退料 - //var unplannedReceiptNoteConvert = workerContext.ServiceProvider.GetRequiredService(); - //var unplannedReceiptNoteList = await unplannedReceiptNoteConvert.ConvertAsync(); - //await wmsoutmWriter.WriteAsync(unplannedReceiptNoteList); + Logger.LogInformation($"Write UnplannedReceiptNote");//非生产退料 + var unplannedReceiptNoteConvert = workerContext.ServiceProvider.GetRequiredService(); + var unplannedReceiptNoteList = await unplannedReceiptNoteConvert.ConvertAsync().ConfigureAwait(false); + await wmsoutmWriter.WriteAsync(unplannedReceiptNoteList).ConfigureAwait(false); Logger.LogInformation($"Write RecycledMaterialReceiptNote");//回收料入库单 var recycledMaterialReceiptNoteConvert = workerContext.ServiceProvider.GetRequiredService(); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs index 3679cc757..7b996e278 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs @@ -173,7 +173,7 @@ public class TyrpAgentModule : AbpModule { context.AddBackgroundWorkerAsync(); - //context.AddBackgroundWorkerAsync(); + // context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs index c61e2db2d..de009e0fb 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs @@ -149,7 +149,7 @@ public class AgentModule : AbpModule public override void OnApplicationInitialization( ApplicationInitializationContext context) { - context.AddBackgroundWorkerAsync(); - // context.AddBackgroundWorkerAsync(); + // context.AddBackgroundWorkerAsync(); + context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/ArchivedIncomingFromExternal/IArchivedIncomingFromExternalRepository.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/ArchivedIncomingFromExternal/IArchivedIncomingFromExternalRepository.cs index 83377c064..469ac6216 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/ArchivedIncomingFromExternal/IArchivedIncomingFromExternalRepository.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/ArchivedIncomingFromExternal/IArchivedIncomingFromExternalRepository.cs @@ -1,7 +1,8 @@ +using System; using Win_in.Sfs.Shared.Domain; namespace Win_in.Sfs.Wms.DataExchange.Domain; -public interface IArchivedIncomingFromExternalRepository : ISfsRepositoryBase +public interface IArchivedIncomingFromExternalRepository : ISfsRepositoryBase, ISfsBulkRepositoryBase { } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/IncomingFromExternal/IIncomingFromExternalManager.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/IncomingFromExternal/IIncomingFromExternalManager.cs index 6f2898cac..c09e12920 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/IncomingFromExternal/IIncomingFromExternalManager.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/IncomingFromExternal/IIncomingFromExternalManager.cs @@ -12,4 +12,5 @@ public interface IIncomingFromExternalManager : IDomainService Task ArchiveManyAsync(List entities); Task> CreateBulkAsync(List entities); Task GetDataByMaxEffectiveDate(string dataType); + Task ArchiveBulkAsync(List entities); } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/IncomingFromExternal/IncomingFromExternalManager.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/IncomingFromExternal/IncomingFromExternalManager.cs index df210ec60..dcd54ef5c 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/IncomingFromExternal/IncomingFromExternalManager.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Domain/IncomingFromExternal/IncomingFromExternalManager.cs @@ -62,7 +62,15 @@ public class IncomingFromExternalManager : DomainService, IIncomingFromExternalM await _historyRepository.InsertAsync(archivedEntity).ConfigureAwait(false); } + [UnitOfWork] + public virtual async Task ArchiveBulkAsync(List entities) + { + await _repository.BulkDeleteAsync(entities).ConfigureAwait(false); + var archivedEntities = _objectMapper.Map, List>(entities); + + await _historyRepository.BulkInsertAsync(archivedEntities).ConfigureAwait(false); + } [UnitOfWork] public virtual async Task ArchiveManyAsync(List entities) { diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Repositories/ISfsBulkRepositoryBase.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Repositories/ISfsBulkRepositoryBase.cs index 75fe0bb4a..e431626f3 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Repositories/ISfsBulkRepositoryBase.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Repositories/ISfsBulkRepositoryBase.cs @@ -43,4 +43,5 @@ public interface ISfsBulkRepositoryBase /// Task BulkInsertAsync(IList details, BulkConfig bulkConfig = null, Action progress = null, Type type = null, CancellationToken cancellationToken = default(CancellationToken)) where TDetail : class, new(); + Task BulkUpdateAsync(IList entities, BulkConfig bulkConfig = null, Action progress = null, Type type = null, CancellationToken cancellationToken = default); } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.EntityFrameworkCore/SfsEfCoreRepositoryBase.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.EntityFrameworkCore/SfsEfCoreRepositoryBase.cs index 39bbfe624..589fd5744 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.EntityFrameworkCore/SfsEfCoreRepositoryBase.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.EntityFrameworkCore/SfsEfCoreRepositoryBase.cs @@ -76,4 +76,22 @@ public abstract class SfsEfCoreRepositoryBase await context.BulkDeleteAsync(entities, bulkConfig, progress, type, cancellationToken).ConfigureAwait(false); } } + /// + /// 批量更新数据 + /// + /// + /// + /// + /// + /// + /// + public virtual async Task BulkUpdateAsync(IList entities, BulkConfig bulkConfig = null, Action progress = null, Type type = null, CancellationToken cancellationToken = default(CancellationToken)) + { + var context = (await GetDbContextAsync().ConfigureAwait(false)) as DbContext; + + if (entities != null && entities.Count > 0) + { + await context.BulkUpdateAsync(entities, bulkConfig, progress, type, cancellationToken).ConfigureAwait(false); + } + } } From ddc03472ff7b5e04e7f492bbeb3bd238e796bc17 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Thu, 13 Apr 2023 19:10:28 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=8F=91=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductionReturnNoteAutoMapperProfile.cs | 8 + .../Requests/IssueNoteEventHandler.cs | 78 ------ .../Requests/MaterialRequestEventHandler.cs | 5 +- .../Requests/Note/IssueNoteEventHandler.cs | 82 ++++++ .../Requests/Note/ScrapNoteEventHandler.cs | 6 - .../Transactions/IssueNoteEventHandler.cs | 264 ++++++++---------- 6 files changed, 212 insertions(+), 231 deletions(-) delete mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAutoMapperProfile.cs index 313efa987..497df3542 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAutoMapperProfile.cs @@ -20,5 +20,13 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .Ignore(x=>x.Remark) + .Ignore(x=>x.ExtraProperties) + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs deleted file mode 100644 index 5305923a6..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs +++ /dev/null @@ -1,78 +0,0 @@ -//using System.Collections.Generic; -//using System.Linq; -//using System.Threading.Tasks; -//using Volo.Abp.EventBus; -//using Volo.Abp.Uow; -//using Win_in.Sfs.Shared.Event; -//using Win_in.Sfs.Wms.Store.Domain; - -//namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; - -//public class IssueNoteEventHandler -// : StoreEventHandlerBase -// , ILocalEventHandler> -// , ILocalEventHandler>> -// , ILocalEventHandler> -//{ -// private readonly IMaterialRequestManager _materialRequestManager; - -// public IssueNoteEventHandler( -// IMaterialRequestManager materialRequestManager -// ) -// { -// _materialRequestManager = materialRequestManager; -// } - -// [UnitOfWork] -// public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) -// { -// var entity = eventData.Entity; - -// await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); -// } - -// private async Task UpdateReceivedQtyMaterialRequestAsync(IssueNote entity) -// { -// var receiveQtyGroup = entity.Details -// .GroupBy(p => new { p.ItemCode, p.ToLocationCode }) -// .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) }) -// .ToList(); - -// var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); - -// //更新叫料请求的已收数量 -// foreach (var materialRequestDetail in materialRequest.Details) -// { -// var receiveQty = receiveQtyGroup.FirstOrDefault(p => -// p.ItemCode == materialRequestDetail.ItemCode && -// p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty; -// if (receiveQty != null) -// { -// materialRequestDetail.ReceivedQty += receiveQty.Value; -// } -// } - -// await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); -// } - -// [UnitOfWork] -// public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) -// { -// var entity = eventData.Entity; -// if (!entity.UseOnTheWayLocation) -// { -// await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); -// } - -// } - -// [UnitOfWork] -// public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) -// { -// var entities = eventData.Entity; -// foreach (var entity in entities.Where(entity => !entity.UseOnTheWayLocation)) -// { -// await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); -// } -// } -//} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs index 830bba2b0..897d7af99 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs @@ -110,7 +110,8 @@ public class MaterialRequestEventHandler await Task.CompletedTask.ConfigureAwait(false); } - private async Task> BuildIssueJobAsync(MaterialRequest materialRequest) + private async Task> BuildIssueJobAsync + (MaterialRequest materialRequest) { var jobs = new List(); @@ -239,6 +240,8 @@ public class MaterialRequestEventHandler detail.RecommendFromLocationErpCode= balance.LocationErpCode; detail.RecommendFromLocationGroup= balance.LocationGroup; detail.RecommendFromWarehouseCode= balance.WarehouseCode; + detail.RecommendQty = balance.Qty; + detail.Uom = balance.Uom; detail.ToLocationCode = materialRequestDetail.ToLocationCode; detail.ToLocationErpCode = materialRequestDetail.ToLocationErpCode; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs new file mode 100644 index 000000000..8d28b137e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs @@ -0,0 +1,82 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class IssueNoteEventHandler + : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> + , ILocalEventHandler> +{ + private readonly IMaterialRequestManager _materialRequestManager; + + public IssueNoteEventHandler( + IMaterialRequestManager materialRequestManager + ) + { + _materialRequestManager = materialRequestManager; + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) + { + var entity = eventData.Entity; + + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + + private async Task UpdateReceivedQtyMaterialRequestAsync(IssueNote entity) + { + var receiveQtyGroup = entity.Details + .GroupBy(p => new { p.ItemCode, p.ToLocationCode }) + .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) }) + .ToList(); + + var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); + + if (entity.RequestType != EnumMaterialRequestType.Direct_Issue.ToString()) + { + //更新叫料请求的已收数量 + foreach (var materialRequestDetail in materialRequest.Details) + { + var receiveQty = receiveQtyGroup.FirstOrDefault(p => + p.ItemCode == materialRequestDetail.ItemCode && + p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty; + if (receiveQty != null) + { + materialRequestDetail.ReceivedQty += receiveQty.Value; + } + } + + await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); + } + } + + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (!entity.UseOnTheWayLocation) + { + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entities = eventData.Entity; + foreach (var entity in entities.Where(entity => !entity.UseOnTheWayLocation)) + { + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs index f9270b9be..6b4ed7381 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs @@ -1,15 +1,9 @@ -using System; using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; using Volo.Abp.EventBus; using Volo.Abp.Uow; -using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; -using Win_in.Sfs.Wms.Inventory.Application.Contracts; -using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; -using Win_in.Sfs.Wms.Store.Domain.Shared; using Win_in.Sfs.Wms.Store.Event.Transaction; namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs index f43b6e406..1ec0f954a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs @@ -4,156 +4,128 @@ using System.Linq; using System.Threading.Tasks; using Volo.Abp.EventBus; using Volo.Abp.Uow; -using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Inventory.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; -using Win_in.Sfs.Wms.Store.Event.Transactions; +using Win_in.Sfs.Wms.Store.Event.Transaction; -namespace Win_in.Sfs.Wms.Store.Event.BusinessNote +namespace Win_in.Sfs.Wms.Store.Event.Transactions; + +public class IssueNoteEventHandler + : StoreInventoryEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> + , ILocalEventHandler> { - //public class IssueNoteEventHandler - // : StoreEventHandlerBase - // , ILocalEventHandler> - // , ILocalEventHandler>> - // , ILocalEventHandler> - //{ - // private const EnumTransType TransType = EnumTransType.Issue; - // private readonly Itranlog - - - // [UnitOfWork] - // public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) - // { - // var entity = eventData.Entity; - // var transferLogs = new List(); - // var route = entity.UseOnTheWayLocation - // ? EnumTransferRoute.SourceToOnTheWay - // : EnumTransferRoute.SourceToDestination; - - // //如果是mes拉动 先发到在途 - // if (entity.RequestType == EnumMaterialRequestType.Issue_WIP.ToString()) - // { - // route = EnumTransferRoute.SourceToOnTheWay; - // } - - // transferLogs.AddRange(await BuildTransferLogsAsync(entity, route)); - - // await TransferLogAppService.AddManyAsync(transferLogs); - // } - - - // [UnitOfWork] - // public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) - // { - // var entities = eventData.Entity; - // var transferLogs = new List(); - // //如果要做库存事务汇总,可以修改此处 - // foreach (var issueNote in entities) - // { - // var route = issueNote.UseOnTheWayLocation - // ? EnumTransferRoute.SourceToOnTheWay - // : EnumTransferRoute.SourceToDestination; - // transferLogs.AddRange(await BuildTransferLogsAsync(issueNote, route)); - // } - - // await TransferLogAppService.AddManyAsync(transferLogs); - // } - - - // [UnitOfWork] - - // public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) - // { - // var entity = eventData.Entity; - - // var inputList = await BuildTransferLogsAsync(entity, EnumTransferRoute.OnTheWayToDestination); - // await AddTransferLogsAsync(inputList); - // } - - // private async Task AddTransferLogsAsync(List inputList) - // { - // var transferLogs = new List(); - - // transferLogs.AddRange(inputList); - - // await TransferLogAppService.AddManyAsync(transferLogs); - - // } - - // private async Task> BuildTransferLogsAsync(IssueNote issueNote, EnumTransferRoute route) - // { - // var transferLogs = new List(); - // foreach (var detail in issueNote.Details.Where(detail => detail.Qty.Qty != 0)) - // { - // var transferLog = ObjectMapper.Map(detail); - - // LocationDTO fromLocationDTO = null; - // LocationDTO toLocationDTO = null; - - // if (issueNote.UseOnTheWayLocation) - // { - // var location = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); - // switch (route) - // { - // case EnumTransferRoute.SourceToOnTheWay: - // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.FromLocationCode); - - // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); - // break; - // case EnumTransferRoute.OnTheWayToDestination: - // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); - - // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.ToLocationCode); - - // await RemovePackingCodeAndContainerCodeAndLotAsync(transferLog); - // break; - // case EnumTransferRoute.SourceToDestination: - // default: - // throw new ArgumentOutOfRangeException(nameof(route), route, null); - // } - // } - // else - // { - // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.FromLocationCode); - // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.ToLocationCode); - // } - - // transferLog.FromLocationCode = fromLocationDTO.Code; - // transferLog.FromLocationArea = fromLocationDTO.AreaCode; - // transferLog.FromLocationErpCode = fromLocationDTO.ErpLocationCode; - // transferLog.FromLocationGroup = fromLocationDTO.LocationGroupCode; - - // transferLog.ToLocationCode = toLocationDTO.Code; - // transferLog.ToLocationArea = toLocationDTO.AreaCode; - // transferLog.ToLocationErpCode = toLocationDTO.ErpLocationCode; - // transferLog.ToLocationGroup = toLocationDTO.LocationGroupCode; - - // transferLog.TransType = TransType; - // transferLog.TransSubType = Enum.Parse(issueNote.RequestType); - // transferLog.Company = issueNote.Company; - // transferLog.Worker = issueNote.Worker; - // transferLog.DocNumber = issueNote.Number; - // transferLog.JobNumber = issueNote.JobNumber; - - // transferLogs.Add(transferLog); - // } - - // return transferLogs; - // } - // private async Task RemovePackingCodeAndContainerCodeAndLotAsync(TransferLogCreateInput transferLogCreateInput) - // { - // transferLogCreateInput.ToPackingCode = ""; - // transferLogCreateInput.ToLot = ""; - // transferLogCreateInput.ToContainerCode = ""; - - // transferLogCreateInput.FromPackingCode = ""; - // transferLogCreateInput.FromLot = ""; - // transferLogCreateInput.FromContainerCode = ""; - - - // } - //} + private const EnumTransType TransType = EnumTransType.Issue; + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + var transferLogs = new List(); + var route = entity.UseOnTheWayLocation + ? EnumTransferRoute.SourceToOnTheWay + : EnumTransferRoute.SourceToDestination; + transferLogs.AddRange(await BuildTransferLogsAsync(entity, route).ConfigureAwait(false)); + + //如果是mes拉动 先发到在途 + if (entity.RequestType == EnumMaterialRequestType.Issue_WIP.ToString()) + { + route = EnumTransferRoute.SourceToOnTheWay; + } + + await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entities = eventData.Entity; + var transferLogs = new List(); + //如果要做库存事务汇总,可以修改此处 + foreach (var issueNote in entities) + { + var route = issueNote.UseOnTheWayLocation + ? EnumTransferRoute.SourceToOnTheWay + : EnumTransferRoute.SourceToDestination; + transferLogs.AddRange(await BuildTransferLogsAsync(issueNote, route).ConfigureAwait(false)); + } + + await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); + } + + [UnitOfWork] + + public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) + { + var entity = eventData.Entity; + + var inputList = await BuildTransferLogsAsync(entity, EnumTransferRoute.OnTheWayToDestination).ConfigureAwait(false); + await AddTransferLogsAsync(inputList).ConfigureAwait(false); + } + + private async Task AddTransferLogsAsync(List inputList) + { + var transferLogs = new List(); + + transferLogs.AddRange(inputList); + + await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); + + } + + private async Task> BuildTransferLogsAsync(IssueNote issueNote, EnumTransferRoute route) + { + var transferLogs = new List(); + foreach (var detail in issueNote.Details.Where(detail => detail.Qty != 0)) + { + var transferLog = ObjectMapper.Map(detail); + + if (issueNote.UseOnTheWayLocation) + { + var location = await LocationAclService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false); + switch (route) + { + case EnumTransferRoute.SourceToOnTheWay: + detail.ToLocationCode = detail.OnTheWayLocationCode; + detail.ToLocationErpCode = location.ErpLocationCode; + detail.ToWarehouseCode = location.WarehouseCode; + detail.ToLocationArea = location.AreaCode; + break; + case EnumTransferRoute.OnTheWayToDestination: + detail.FromLocationCode = detail.OnTheWayLocationCode; + detail.FromLocationErpCode = location.ErpLocationCode; + detail.FromWarehouseCode = location.WarehouseCode; + detail.FromLocationArea = location.AreaCode; + break; + case EnumTransferRoute.SourceToDestination: + default: + throw new ArgumentOutOfRangeException(nameof(route), route, null); + } + } + + if (issueNote.UseOnTheWayLocation) + { + transferLog.FromLocationCode = detail.OnTheWayLocationCode; + var location = await LocationAclService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false); + transferLog.FromLocationGroup = location.LocationGroupCode; + transferLog.FromLocationArea = location.AreaCode; + transferLog.FromLocationErpCode = location.ErpLocationCode; + transferLog.FromWarehouseCode=location.WarehouseCode; + } + + transferLog.TransType = TransType; + transferLog.TransSubType = Enum.Parse(issueNote.RequestType); + transferLog.Worker = issueNote.Worker; + transferLog.DocNumber = issueNote.Number; + transferLog.JobNumber = issueNote.JobNumber; + + transferLogs.Add(transferLog); + } + + return transferLogs; + } + } From ea9632d8b54cf00231ef166d7ae7b6d6e004f474 Mon Sep 17 00:00:00 2001 From: "rongguo.jia" Date: Fri, 14 Apr 2023 09:33:44 +0800 Subject: [PATCH 09/12] =?UTF-8?q?[fix]=E4=B8=BA=E8=BF=9C=E7=A8=8B=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?try,catch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Win_in.Sfs.Shared.Host/HostBuilderExtensions.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Host/HostBuilderExtensions.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Host/HostBuilderExtensions.cs index 5319f16a2..189e69c1d 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Host/HostBuilderExtensions.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Host/HostBuilderExtensions.cs @@ -45,6 +45,7 @@ public static class HostBuilderExtensions AddJsonByUrl(cb, $"{configUrl}appsettings.{builder.Environment.EnvironmentName}.json"); if (builder.Environment.IsDevelopment()) { + cb.AddJsonFile(Path.Combine(Directory.GetCurrentDirectory(), "appsettings.json")); cb.AddJsonFile(Path.Combine(Directory.GetCurrentDirectory(), $"appsettings.{builder.Environment.EnvironmentName}.json")); } }); @@ -79,7 +80,14 @@ public static class HostBuilderExtensions private static void AddJsonByUrl(IConfigurationBuilder configurationBuilder, string url) { Console.WriteLine($"load config form:{url}"); - var stream = new HttpClient().GetStreamAsync(url).Result; - configurationBuilder.AddJsonStream(stream); + try + { + var stream = new HttpClient().GetStreamAsync(url).Result; + configurationBuilder.AddJsonStream(stream); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } } } From b789f7df1164979838d08af5842e3758d42d7050 Mon Sep 17 00:00:00 2001 From: "rongguo.jia" Date: Fri, 14 Apr 2023 09:34:26 +0800 Subject: [PATCH 10/12] =?UTF-8?q?[fix]Job,Label=E5=9F=BA=E7=B1=BB=E4=B8=AD?= =?UTF-8?q?=E7=9A=84GetByCode,GetByCodes=E4=B8=8D=E5=86=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Bases/SfsLabelAppServiceWithCodeBase.cs | 39 +++++++++++-------- .../Bases/SfsJobWithCodeAppServiceBase.cs | 39 +++++++++++-------- 2 files changed, 46 insertions(+), 32 deletions(-) diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/Bases/SfsLabelAppServiceWithCodeBase.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/Bases/SfsLabelAppServiceWithCodeBase.cs index 312404b9c..033bb43b3 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/Bases/SfsLabelAppServiceWithCodeBase.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/Bases/SfsLabelAppServiceWithCodeBase.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -38,10 +39,12 @@ public class SfsLabelAppServiceWithCodeBase GetByCodeAsync(string code) { - var dto = await Cache.GetOrAddItemAsync( - $"{typeof(TEntityDto).Name}:{code}".ToString(), - async () => await GetFromRepositoryAsync(code).ConfigureAwait(false), - SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + // var dto = await Cache.GetOrAddItemAsync( + // $"{typeof(TEntityDto).Name}:{code}".ToString(), + // async () => await GetFromRepositoryAsync(code).ConfigureAwait(false), + // SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + + var dto = await GetFromRepositoryAsync(code).ConfigureAwait(false); return dto; } @@ -50,18 +53,22 @@ public class SfsLabelAppServiceWithCodeBase> GetByCodesAsync(IEnumerable codes) { - var dtoList = new List(); - foreach (var code in codes) - { - var dto = await Cache.GetOrAddItemAsync( - $"{typeof(TEntityDto).Name}:{code}".ToString(), - async () => await GetFromRepositoryAsync(code).ConfigureAwait(false), - SfsCacheConst.SeveralMinutes).ConfigureAwait(false); - if (dto != null) - { - dtoList.Add(dto); - } - } + // var dtoList = new List(); + // foreach (var code in codes) + // { + // var dto = await Cache.GetOrAddItemAsync( + // $"{typeof(TEntityDto).Name}:{code}".ToString(), + // async () => await GetFromRepositoryAsync(code).ConfigureAwait(false), + // SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + // if (dto != null) + // { + // dtoList.Add(dto); + // } + // } + // return dtoList; + + var entities = await _repository.GetListAsync(p => codes.Contains(p.Code)).ConfigureAwait(false); + var dtoList = ObjectMapper.Map, List>(entities); return dtoList; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobWithCodeAppServiceBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobWithCodeAppServiceBase.cs index d1493e856..6102ed5d2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobWithCodeAppServiceBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobWithCodeAppServiceBase.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; @@ -37,10 +38,12 @@ public abstract class SfsJobWithCodeAppServiceBase GetByCodeAsync(string code) { - var dto = await Cache.GetOrAddItemAsync( - $"{typeof(TEntityDto).Name}:{code}".ToString(), - async () => await GetFromRepositoryAsync(code).ConfigureAwait(false), - SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + // var dto = await Cache.GetOrAddItemAsync( + // $"{typeof(TEntityDto).Name}:{code}".ToString(), + // async () => await GetFromRepositoryAsync(code).ConfigureAwait(false), + // SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + + var dto = await GetFromRepositoryAsync(code).ConfigureAwait(false); return dto; @@ -51,18 +54,22 @@ public abstract class SfsJobWithCodeAppServiceBase> GetByCodesAsync(IEnumerable codes) { - var dtoList = new List(); - foreach (var code in codes) - { - var dto = await Cache.GetOrAddItemAsync( - $"{typeof(TEntityDto).Name}:{code}".ToString(), - async () => await GetFromRepositoryAsync(code).ConfigureAwait(false), - SfsCacheConst.SeveralMinutes).ConfigureAwait(false); - if (dto != null) - { - dtoList.Add(dto); - } - } + // var dtoList = new List(); + // foreach (var code in codes) + // { + // var dto = await Cache.GetOrAddItemAsync( + // $"{typeof(TEntityDto).Name}:{code}".ToString(), + // async () => await GetFromRepositoryAsync(code).ConfigureAwait(false), + // SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + // if (dto != null) + // { + // dtoList.Add(dto); + // } + // } + // return dtoList; + + var entities = await _repository.GetListAsync(p => codes.Contains(p.Code)).ConfigureAwait(false); + var dtoList = ObjectMapper.Map, List>(entities); return dtoList; } From eec72826155eae44b235538bd9b3e6e367bb52cf Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Fri, 14 Apr 2023 09:42:32 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=AB=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MaterialRequestAppService.cs | 12 ++++++++++++ .../Requests/MaterialRequestEventHandler.cs | 11 ++++++++--- .../Requests/Note/IssueNoteEventHandler.cs | 16 +++++++++++++++- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs index 6f80a9d45..d7f3a3545 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs @@ -5,14 +5,19 @@ using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; +using IdentityModel; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -91,6 +96,13 @@ public class MaterialRequestAppService : SfsStoreRequestAppServiceBase HandleAsync(Guid id) + { + var entity=await _repository.GetAsync(id).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false).ConfigureAwait(false); + return ObjectMapper.Map(entity); + } + #endregion [HttpPost("")] diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs index 897d7af99..89d439cfb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs @@ -68,6 +68,10 @@ public class MaterialRequestEventHandler { await _materialRequestManager.SubmitAsync(entity).ConfigureAwait(false); } + if (entity.Type == EnumMaterialRequestType.Issue_WIP.ToString()) + { + await _materialRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } } } @@ -110,6 +114,8 @@ public class MaterialRequestEventHandler await Task.CompletedTask.ConfigureAwait(false); } + #region 私有 + private async Task> BuildIssueJobAsync (MaterialRequest materialRequest) { @@ -119,7 +125,7 @@ public class MaterialRequestEventHandler var toLocationCodes = materialRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList(); var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false); - foreach (var materialRequestDetail in materialRequest.Details.Where(p => p.ToBeIssuedQty > 0)) + foreach (var materialRequestDetail in materialRequest.Details.Where(p => p.ToBeIssuedQty > 0))//如果有还有剩余未叫料的数量 则创建新的任务 { var toLocation = toLocations.FirstOrDefault(p => p.Code == materialRequestDetail.ToLocationCode); Check.NotNull(toLocation, "库位代码", $"库位 {materialRequestDetail.ToLocationCode} 不存在"); @@ -240,7 +246,6 @@ public class MaterialRequestEventHandler detail.RecommendFromLocationErpCode= balance.LocationErpCode; detail.RecommendFromLocationGroup= balance.LocationGroup; detail.RecommendFromWarehouseCode= balance.WarehouseCode; - detail.RecommendQty = balance.Qty; detail.Uom = balance.Uom; detail.ToLocationCode = materialRequestDetail.ToLocationCode; @@ -279,5 +284,5 @@ public class MaterialRequestEventHandler } - + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs index 8d28b137e..e113d92e4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs @@ -24,6 +24,11 @@ public class IssueNoteEventHandler _materialRequestManager = materialRequestManager; } + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// [UnitOfWork] public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) { @@ -59,7 +64,11 @@ public class IssueNoteEventHandler } } - + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { @@ -70,6 +79,11 @@ public class IssueNoteEventHandler } } + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { From ff167a94d7a06d66f7c97d29271699b30528d803 Mon Sep 17 00:00:00 2001 From: "rongguo.jia" Date: Fri, 14 Apr 2023 10:24:44 +0800 Subject: [PATCH 12/12] =?UTF-8?q?[fix]=E8=A1=A5=E5=85=A8=E9=83=A8=E5=88=86?= =?UTF-8?q?=20EditInput=20->=20Entity=E7=9A=84Mapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Bases/DTOs/SfsStoreRequestDTOBase.cs | 4 ++-- .../Bases/Inputs/SfsStoreCreateOrUpdateInputBase.cs | 2 +- .../Bases/Inputs/SfsStoreDetailWithFromToInputBase.cs | 2 +- .../Bases/Inputs/SfsStoreImportInputBase.cs | 4 ++-- .../SfsStoreRecommendFromDetailWithFromToInputBase.cs | 2 +- .../Inputs/SfsStoreRecommendToDetailWithFromToInputBase.cs | 2 +- .../Bases/Inputs/SfsStoreRequestCreateOrUpdateInputBase.cs | 4 ++-- .../Inputs/ProductionReturnRequestDetailInput.cs | 6 ++++++ .../Inputs/ProductionReturnRequestEditInput.cs | 2 +- .../Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs | 2 ++ .../ProductionReturnJobAutoMapperProfile.cs | 2 ++ .../ProductReceiptNoteAutoMapperProfile.cs | 2 ++ .../ProductRecycleNoteAutoMapperProfile.cs | 3 +++ .../ProductionReturnNoteAutoMapperProfile.cs | 2 ++ .../DeliverRequests/DeliverRequestAutoMapperProfile.cs | 3 +++ .../ProductReceiptRequestAutoMapperProfile.cs | 3 +++ .../ProductRecycleRequestAutoMapperProfile.cs | 3 +++ .../ProductionReturnRequestAutoMapperProfile.cs | 4 +++- 18 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductionReturnRequests/Inputs/ProductionReturnRequestDetailInput.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/DTOs/SfsStoreRequestDTOBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/DTOs/SfsStoreRequestDTOBase.cs index b0b98b116..ef7d69ea2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/DTOs/SfsStoreRequestDTOBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/DTOs/SfsStoreRequestDTOBase.cs @@ -3,7 +3,7 @@ using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application.Contracts; -public class SfsStoreRequestDTOBase : SfsStoreDTOBase +public abstract class SfsStoreRequestDTOBase : SfsStoreDTOBase { /// /// 自动提交审批 @@ -18,7 +18,7 @@ public class SfsStoreRequestDTOBase : SfsStoreDTOBase public bool AutoAgree { get; set; } /// - /// 自动执行 + /// 自动执行 /// [Display(Name = "自动执行")] public bool AutoHandle { get; set; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreCreateOrUpdateInputBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreCreateOrUpdateInputBase.cs index b2d51a740..6e5d4644f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreCreateOrUpdateInputBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreCreateOrUpdateInputBase.cs @@ -5,7 +5,7 @@ using Win_in.Sfs.Shared.Domain; namespace Win_in.Sfs.Wms.Store.Application.Contracts; -public class SfsStoreCreateOrUpdateInputBase : SfsCreateOrUpdateInputBase +public abstract class SfsStoreCreateOrUpdateInputBase : SfsCreateOrUpdateInputBase { /// /// 操作员 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreDetailWithFromToInputBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreDetailWithFromToInputBase.cs index 2fac6fbd8..0994791e5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreDetailWithFromToInputBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreDetailWithFromToInputBase.cs @@ -5,7 +5,7 @@ using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application.Contracts; -public class SfsStoreDetailWithFromToInputBase +public abstract class SfsStoreDetailWithFromToInputBase : SfsStoreDetailWithQtyInputBase , IHasFromToPacking , IHasFromToLot diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreImportInputBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreImportInputBase.cs index 5773575ac..4918540e4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreImportInputBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreImportInputBase.cs @@ -3,7 +3,7 @@ using Win_in.Sfs.Shared.Application.Contracts; namespace Win_in.Sfs.Wms.Store.Application.Contracts; -public class SfsStoreImportInputBase : SfsImportInputBase +public abstract class SfsStoreImportInputBase : SfsImportInputBase { //[Display(Name = "单号")] @@ -35,7 +35,7 @@ public class SfsStoreImportInputBase : SfsImportInputBase public bool AutoAgree { get; set; } = true; /// - /// 自动执行 + /// 自动执行 /// [Display(Name = "自动执行")] [ImporterHeader(IsIgnore = true)] diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRecommendFromDetailWithFromToInputBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRecommendFromDetailWithFromToInputBase.cs index 9f0990c48..7c0a2e9f0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRecommendFromDetailWithFromToInputBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRecommendFromDetailWithFromToInputBase.cs @@ -4,7 +4,7 @@ using Win_in.Sfs.Shared.Domain; namespace Win_in.Sfs.Wms.Store.Application.Contracts; -public class SfsStoreRecommendFromDetailWithFromToInputBase : SfsStoreDetailWithFromToInputBase, IHasRecommendAndHandledFrom +public abstract class SfsStoreRecommendFromDetailWithFromToInputBase : SfsStoreDetailWithFromToInputBase, IHasRecommendAndHandledFrom { #region IHasRecommendFrom /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRecommendToDetailWithFromToInputBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRecommendToDetailWithFromToInputBase.cs index fe80cb038..b3e0870be 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRecommendToDetailWithFromToInputBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRecommendToDetailWithFromToInputBase.cs @@ -4,7 +4,7 @@ using Win_in.Sfs.Shared.Domain; namespace Win_in.Sfs.Wms.Store.Application.Contracts; -public class SfsStoreRecommendToDetailWithFromToInputBase : SfsStoreDetailWithFromToInputBase, IHasRecommendAndHandledTo +public abstract class SfsStoreRecommendToDetailWithFromToInputBase : SfsStoreDetailWithFromToInputBase, IHasRecommendAndHandledTo { #region IHasRecommendTo /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRequestCreateOrUpdateInputBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRequestCreateOrUpdateInputBase.cs index 19703dfd1..264637389 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRequestCreateOrUpdateInputBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Bases/Inputs/SfsStoreRequestCreateOrUpdateInputBase.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; namespace Win_in.Sfs.Wms.Store.Application.Contracts; -public class SfsStoreRequestCreateOrUpdateInputBase : SfsStoreCreateOrUpdateInputBase +public abstract class SfsStoreRequestCreateOrUpdateInputBase : SfsStoreCreateOrUpdateInputBase { /// /// 自动提交审批 @@ -17,7 +17,7 @@ public class SfsStoreRequestCreateOrUpdateInputBase : SfsStoreCreateOrUpdateInpu public bool AutoAgree { get; set; } = true; /// - /// 自动执行 + /// 自动执行 /// [Display(Name = "自动执行")] public bool AutoHandle { get; set; } = true; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductionReturnRequests/Inputs/ProductionReturnRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductionReturnRequests/Inputs/ProductionReturnRequestDetailInput.cs new file mode 100644 index 000000000..d2919af98 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductionReturnRequests/Inputs/ProductionReturnRequestDetailInput.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class ProductionReturnRequestDetailInput : SfsStoreDetailWithFromToInputBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductionReturnRequests/Inputs/ProductionReturnRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductionReturnRequests/Inputs/ProductionReturnRequestEditInput.cs index eb1000854..e2151cd8e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductionReturnRequests/Inputs/ProductionReturnRequestEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ProductionReturnRequests/Inputs/ProductionReturnRequestEditInput.cs @@ -24,6 +24,6 @@ public class ProductionReturnRequestEditInput : SfsStoreRequestCreateOrUpdateInp /// 明细列表 /// [Display(Name = "明细列表")] - public List Details { get; set; } = new List(); + public List Details { get; set; } = new List(); #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs index 8457dfc62..f8bccdeb5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs @@ -18,6 +18,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties(); + CreateMap(); + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductionReturnJobs/ProductionReturnJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductionReturnJobs/ProductionReturnJobAutoMapperProfile.cs index a0a6528a9..6eead08ba 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductionReturnJobs/ProductionReturnJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductionReturnJobs/ProductionReturnJobAutoMapperProfile.cs @@ -16,6 +16,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile .IgnoreAuditedObjectProperties() ; + CreateMap(); + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs index 9cd37feef..63469e1e2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs @@ -17,6 +17,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.ProdLine) .ReverseMap(); + CreateMap(); + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductRecycleNotes/ProductRecycleNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductRecycleNotes/ProductRecycleNoteAutoMapperProfile.cs index a0f5bbb51..bed3ee5c7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductRecycleNotes/ProductRecycleNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductRecycleNotes/ProductRecycleNoteAutoMapperProfile.cs @@ -13,6 +13,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.NoteAndBackFlushDetails) .ReverseMap(); + CreateMap(); + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) @@ -26,6 +28,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ForMember(x => x.ProductItemDesc2, y => y.MapFrom(d => d.ItemDesc2)) .ReverseMap(); + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAutoMapperProfile.cs index 497df3542..c6731932e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAutoMapperProfile.cs @@ -14,6 +14,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap(); + CreateMap(); + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs index 63ee8239c..4b0e04202 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAutoMapperProfile.cs @@ -17,6 +17,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .ReverseMap(); + CreateMap(); + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) @@ -24,6 +26,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.Number) .Ignore(x => x.Id); + CreateMap() .ForMember(x => x.DeliverRequestType, y => y.MapFrom(t => EnumDeliverRequestType.Normal)) .Ignore(x => x.CustomerAddressCode) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAutoMapperProfile.cs index 1aa818d21..c68a16c19 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductReceiptRequests/ProductReceiptRequestAutoMapperProfile.cs @@ -15,6 +15,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .ReverseMap(); + CreateMap(); + + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductRecycleRequests/ProductRecycleRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductRecycleRequests/ProductRecycleRequestAutoMapperProfile.cs index 35735aaff..5f5d91fbe 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductRecycleRequests/ProductRecycleRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductRecycleRequests/ProductRecycleRequestAutoMapperProfile.cs @@ -23,6 +23,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.Number) .Ignore(x => x.Id); + CreateMap(); + + CreateMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductionReturnRequests/ProductionReturnRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductionReturnRequests/ProductionReturnRequestAutoMapperProfile.cs index 8f26ca256..1f074962d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductionReturnRequests/ProductionReturnRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductionReturnRequests/ProductionReturnRequestAutoMapperProfile.cs @@ -16,7 +16,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile .IgnoreAuditedObjectProperties() .ReverseMap(); - CreateMap() + CreateMap(); + + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.ToWarehouseCode) .Ignore(x => x.MasterID)