From aa3fb3beaec720f52362099ccfd30435d7603149 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Thu, 10 Aug 2023 10:05:05 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=84=E5=94=AE=E5=BA=93=E4=BA=BA?=
=?UTF-8?q?=E5=B7=A5=E8=B0=83=E6=95=B4=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SettleAccount.Application/Entities/BQ/VmiAppService.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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 32a037a0..2eb091e0 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
@@ -311,7 +311,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
var log = new VmiLog
{
LogType = logType,
- ChangedType = VmiType.In,
+ ChangedType = VmiType.Out,
ChangedNumber = changedNumber,
ChangedTime = DateTime.Now,
ChangedBy = _currentUser.UserName,
@@ -529,12 +529,17 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
{
if (log.Qty >= decimal.Zero)
{
+ log.LogType = VmiLogType.Type500;
+ log.ChangedType = VmiType.In;
var data = new VmiBalance();
data.InjectFrom(log);
await In(VmiLogType.Type500, null, data).ConfigureAwait(false);
}
else
{
+ log.LogType = VmiLogType.Type600;
+ log.ChangedType = VmiType.Out;
+ log.Qty=-log.Qty;
await this.Out(VmiLogType.Type600, null, log).ConfigureAwait(false);
}
}
From 0c33b7a5060150f9fd7f0f1b10178bf555e92fab Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Thu, 10 Aug 2023 10:35:17 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=AF=84=E5=94=AE=E5=BA=93=E8=A1=A5?=
=?UTF-8?q?=E8=B4=A7=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=87=BA=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/BQ/VmiAppService.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 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 2eb091e0..1fbedb52 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
@@ -423,10 +423,18 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
return fileName;
}
- [HttpGet]
- public void VmiLogInsertTest()
+ ///
+ /// 补货数据导出
+ ///
+ [HttpPost]
+ public async Task ReplenishedExportAsync(RequestDto input)
{
- new InfluxHelper(_cfg).Insert(new VmiLog(GuidGenerator.Create()));
+ var entities = await _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda())
+ .ToListAsync().ConfigureAwait(false);
+ var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
+ var content = this.GetContent(entities, "补货数据_");
+ await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
+ return fileName;
}
///