diff --git a/.gitignore b/.gitignore
index 50a123b0..93439c4d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -81,3 +81,5 @@ LinkAttach
/ds-wms-service/DS.WMS.MainApi/wwwroot/LinkAttach/1800840199861833728.png
/ds-wms-service/DS.WMS.MainApi/wwwroot/LinkAttach/1800846562843299840.txt
/ds-wms-service/DS.WMS.CheckApi/Logs/internal-nlog.txt
+/ds-wms-service/DS.WMS.FinanceApi/.config/dotnet-tools.json
+/ds-wms-service/DS.WMS.FinanceApi/Properties/PublishProfiles/FolderProfile.pubxml
diff --git a/ds-wms-service/DS.WMS.FinanceApi/Properties/PublishProfiles/FolderProfile.pubxml b/ds-wms-service/DS.WMS.FinanceApi/Properties/PublishProfiles/FolderProfile.pubxml
deleted file mode 100644
index 8375cdcc..00000000
--- a/ds-wms-service/DS.WMS.FinanceApi/Properties/PublishProfiles/FolderProfile.pubxml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- false
- false
- true
- Release
- Any CPU
- FileSystem
- D:\Code\PublishCopy\ds8-financeapi
- FileSystem
- <_TargetId>Folder
-
-
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.PrintApi/DS.WMS.PrintApi.csproj b/ds-wms-service/DS.WMS.PrintApi/DS.WMS.PrintApi.csproj
index 93f10824..abdbb723 100644
--- a/ds-wms-service/DS.WMS.PrintApi/DS.WMS.PrintApi.csproj
+++ b/ds-wms-service/DS.WMS.PrintApi/DS.WMS.PrintApi.csproj
@@ -18,7 +18,7 @@
-
+
diff --git a/ds-wms-service/DS.WMS.PrintApi/Middleware/SaasDbService.cs b/ds-wms-service/DS.WMS.PrintApi/Middleware/SaasDbService.cs
index 222c0b2c..22587c99 100644
--- a/ds-wms-service/DS.WMS.PrintApi/Middleware/SaasDbService.cs
+++ b/ds-wms-service/DS.WMS.PrintApi/Middleware/SaasDbService.cs
@@ -88,23 +88,7 @@ namespace DS.WMS.PrintApi.Middleware
Console.WriteLine("configId:" + Environment.NewLine + configId);
//sqlStr = sqlStr.Replace('[', ' ').Replace(']', ' ');
Console.WriteLine("执行的SQL:" + Environment.NewLine + sqlStr);
- };
- //数据处理事件
- dbProvider.Aop.OnExecutingChangeSql = (sql, pars) => //可以修改SQL和参数的值
- {
- //sql = sql.Replace('[', ' ').Replace(']', ' ');
- //sql=newsql
- foreach (var p in pars) //修改
- {
- if (p.Value.ToString().Contains("["))
- {
- var temp = JsonConvert.DeserializeObject>(p.Value.ToString());
- p.Value = string.Join(", ", temp);
- }
- //p.Value = p.Value.ToString().Replace('[', ' ').Replace(']', ' ').Replace('&', ',');
- }
- return new KeyValuePair(sql, pars);
- };
+ };
//数据处理事件
dbProvider.Aop.DataExecuting = (oldValue, entityInfo) =>
{
@@ -113,9 +97,7 @@ namespace DS.WMS.PrintApi.Middleware
dbProvider.Aop.OnLogExecuted = (sql, pars) =>
{
//执行完了可以输出SQL执行时间 (OnLogExecutedDelegate)
- Console.Write("time:" + db.Ado.SqlExecutionTime.ToString());
- Console.Write("time:" + db.Ado.Connection.ConnectionString);
- Console.Write("time:" + db.Ado.SqlStackTrace.SugarStackTraceList);
+ Console.Write("time:" + db.Ado.SqlExecutionTime.ToString());
};
dbProvider.Aop.OnDiffLogEvent = it =>
{
diff --git a/ds-wms-service/DS.WMS.PrintApi/Service/OpenPrintService.cs b/ds-wms-service/DS.WMS.PrintApi/Service/OpenPrintService.cs
index 6926d17d..5e5f1b5e 100644
--- a/ds-wms-service/DS.WMS.PrintApi/Service/OpenPrintService.cs
+++ b/ds-wms-service/DS.WMS.PrintApi/Service/OpenPrintService.cs
@@ -16,6 +16,9 @@ using Microsoft.Extensions.DependencyInjection;
using DS.WMS.PrintApi.Middleware;
using Newtonsoft.Json.Schema;
using Microsoft.AspNetCore.Mvc;
+using System.Linq;
+using System.Data;
+using System.Dynamic;
namespace DS.WMS.PrintApi.Service
{
@@ -346,8 +349,18 @@ namespace DS.WMS.PrintApi.Service
{
var param = JsonHelper.Instance.Deserialize>(req.ParamJsonStr);
foreach (var p in param)
- {
- sugarParams.Add(new SugarParameter($"@{p.Key}", p.Value));
+ {
+ if (p.Key == "ids")
+ {
+ var temp = JsonConvert.DeserializeObject>(p.Value.ToString());
+
+ sugarParams.Add(new SugarParameter($"@{p.Key}", temp.ToArray()));
+ }
+ else
+ {
+ sugarParams.Add(new SugarParameter($"@{p.Key}", p.Value));
+ }
+
}
}
@@ -361,7 +374,7 @@ namespace DS.WMS.PrintApi.Service
if (!string.IsNullOrEmpty(sqlArr[i]))
{
- var temp = tenantDb.Ado.SqlQuery(sqlArr[i], sugarParams);
+ var temp = tenantDb.Ado.SqlQuery(sqlArr[i], sugarParams);
data.Add("sql" + i, temp);
}
}
@@ -487,7 +500,7 @@ namespace DS.WMS.PrintApi.Service
//Logger.Warn(ex, "方法: GetOpenJsonPrintInfo");
return await Task.FromResult(PrintDataResult.Failed(ex.Message));
}
- }
+ }
///
/// 下载sql打印frx文件
@@ -547,7 +560,17 @@ namespace DS.WMS.PrintApi.Service
var param = JsonHelper.Instance.Deserialize>(req.ParamJsonStr);
foreach (var p in param)
{
- sugarParams.Add(new SugarParameter($"@{p.Key}", p.Value));
+ //sugarParams.Add(new SugarParameter($"@{p.Key}", p.Value));
+ if (p.Key == "ids")
+ {
+ var temp = JsonConvert.DeserializeObject>(p.Value.ToString());
+
+ sugarParams.Add(new SugarParameter($"@{p.Key}", temp.ToArray()));
+ }
+ else
+ {
+ sugarParams.Add(new SugarParameter($"@{p.Key}", p.Value));
+ }
}
}