From 4da6ef31a13bde8e0e4fd96355100e6b04d30010 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Thu, 4 Jan 2024 09:43:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?BBAC=E5=92=8CHPBO=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=E9=95=BF=E5=BA=A6=E4=BF=AE=E6=94=B9=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs | 8 ++++++++ .../Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs index d20a5bfc..f1a78c77 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs @@ -189,6 +189,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs { t.Version = int.Parse(t.BillTime?.ToString("yyyyMM")); } + if (t.ErpToLoc != null) + { + if (t.ErpToLoc.Length == 4) + { + t.BusinessType = EnumBusinessType.MaiDanJianBBAC; + } + } + t.CreateTime = dateTimeNow; t.CreationTime = dateTimeNow; }); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs index 095f0ecb..a98d982d 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs @@ -190,6 +190,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs { t.Version = int.Parse(t.BillTime?.ToString("yyyyMM")); } + if(t.ErpToLoc!=null) + { + if (t.ErpToLoc.Length == 4) + { + t.BusinessType = EnumBusinessType.MaiDanJianHBPO; + } + } + t.CreateTime = dateTimeNow; t.CreationTime = dateTimeNow; }); From 44ad4095c7c285f4d0652af1a5189cb8699258f8 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Thu, 4 Jan 2024 11:23:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=AF=84=E5=94=AE?= =?UTF-8?q?=E5=BA=93=E5=AF=BC=E5=85=A5=E7=B1=BB=E5=9E=8B=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/VmiAppService.cs | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs index 313b49ee..ddd0f643 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs @@ -639,15 +639,29 @@ namespace Win.Sfs.SettleAccount.Entities.BQ log.ChangedTime = log.Id.ToDateTime().Value.ToLocalTime(); if (log.ChangedQty >= decimal.Zero) { - log.Qty = log.ChangedQty; - log.LogType = VmiLogType.Type500; - log.ChangedType = VmiType.In; + if(log.LogType != VmiLogType.Type100) + { + log.Qty = log.ChangedQty; + log.LogType = VmiLogType.Type500; + log.ChangedType = VmiType.In; + } + else + { + log.Qty = log.ChangedQty; + log.ChangedType = VmiType.In; + } + } else { - log.Qty = -log.Qty; - log.LogType = VmiLogType.Type600; - log.ChangedType = VmiType.Out; + if(log.LogType != VmiLogType.Type100) + { + log.Qty = -log.Qty; + log.LogType = VmiLogType.Type600; + log.ChangedType = VmiType.Out; + } + + } log.ChangedBy = this._currentUser.UserName; } @@ -796,7 +810,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ } var logList = tupleList.Select(o => o.Item1).ToList(); logList.AsParallel().ForEach(Update); - var messageList = logList.Select(log => new VmiMessage { Message = JsonSerializer.Serialize(log) }).ToList(); + //var messageList = logList.Select(log => new VmiMessage { Message = JsonSerializer.Serialize(log) }).ToList(); var connectionString = this._serviceProvider.GetRequiredService().GetConnectionString("SettleAccountService"); var options = new DbContextOptionsBuilder().UseSqlServer(connectionString).Options; using var context = new SettleAccountDbContext(options); @@ -816,7 +830,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ await context.BulkInsertAsync(logList).ConfigureAwait(false); - await context.BulkInsertAsync(messageList).ConfigureAwait(false); + //await context.BulkInsertAsync(messageList).ConfigureAwait(false); transaction.Commit(); } catch (Exception ex) From a7d94ff8a30432c9675c39e921476bdc18380aa3 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Thu, 4 Jan 2024 13:11:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E6=94=B9=E6=88=90?= =?UTF-8?q?=E9=87=8D=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/models/settle/commerce.js | 2 +- .../src/SettleAccount.Application/Entities/BQ/VmiAppService.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js index 2bf187ef..170e7d2d 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js @@ -56,7 +56,7 @@ const schema = { input: "tabs", options: [ { value: 1, label: "正常" }, - { value: 2, label: "报废" }, + { value: 2, label: "重开" }, { value: 3, label: "提交" }, ], }, diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs index ddd0f643..22979fe9 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs @@ -789,6 +789,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ await file.OpenReadStream().CopyToAsync(ms).ConfigureAwait(false); var data = ms.ToArray(); var tupleList = this.ImportInternal(data); + if (tupleList.Any(o => o.Item2.Count > 0)) { using var workbook = new XLWorkbook(new MemoryStream(data));