From a07e4702be045efa9b04b49a561463875dd28e0a Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期六, 04 一月 2025 16:18:33 +0800
Subject: [PATCH] 更新配置文件和事件总线逻辑,修复任务处理逻辑

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs
index 6dffe4e..ee18736 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs
@@ -105,7 +105,7 @@
                     LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
                     if (expressionType == LinqExpressionType.Equal)
                     {
-                        where += $"{searchParametersList[i].Name} = '{results[j].Item3}'";
+                        where += $"{searchParametersList[i].Name} like '%{results[j].Item3}%'";
                     }
                     else
                     {
@@ -286,7 +286,7 @@
 
                 List<TDetail> list = detailDics.DicToIEnumerable<TDetail>();
 
-                ((SqlSugarClient)BaseDal.Db).BeginTran();
+                ((SqlSugarScope)BaseDal.Db).BeginTran();
 
                 int id = BaseDal.Db.Insertable(entity).ExecuteReturnIdentity();
 
@@ -298,13 +298,13 @@
 
                 BaseDal.Db.Insertable(list).ExecuteCommand();
 
-                ((SqlSugarClient)BaseDal.Db).CommitTran();
+                ((SqlSugarScope)BaseDal.Db).CommitTran();
 
                 content = WebResponseContent.Instance.OK();
             }
             catch (Exception ex)
             {
-                ((SqlSugarClient)BaseDal.Db).RollbackTran();
+                ((SqlSugarScope)BaseDal.Db).RollbackTran();
                 content = WebResponseContent.Instance.Error(ex.Message);
             }
             return content;
@@ -457,7 +457,7 @@
                 object mainId = typeof(TEntity).GetPropertyValue(entity, typeof(TEntity).GetKeyName());
                 if (mainId != null)
                 {
-                    ((SqlSugarClient)BaseDal.Db).BeginTran();
+                    ((SqlSugarScope)BaseDal.Db).BeginTran();
 
                     if (dynamicDelKeys.Count > 0)
                         BaseDal.Db.Deleteable<object>().AS(detailType.Name).Where($"{detailType.GetKeyName()} in (@id)", new { id = dynamicDelKeys.ToArray() }).ExecuteCommandHasChange();
@@ -474,7 +474,7 @@
 
                     BaseDal.Db.Insertable(addRows).ExecuteCommand();
 
-                    ((SqlSugarClient)BaseDal.Db).CommitTran();
+                    ((SqlSugarScope)BaseDal.Db).CommitTran();
 
                     content = WebResponseContent.Instance.OK();
                 }
@@ -486,7 +486,7 @@
             }
             catch (Exception ex)
             {
-                ((SqlSugarClient)BaseDal.Db).RollbackTran();
+                ((SqlSugarScope)BaseDal.Db).RollbackTran();
                 content = WebResponseContent.Instance.Error(ex.Message);
             }
             return content;
@@ -532,14 +532,14 @@
                         {
                             dynamicDelKeys.Add(keys[i]);
                         }
-                        ((SqlSugarClient)BaseDal.Db).BeginTran();
+                        ((SqlSugarScope)BaseDal.Db).BeginTran();
 
                         if (dynamicDelKeys.Count > 0)
                             BaseDal.Db.Deleteable<object>().AS(detailType.Name).Where($"{name} in (@id)", new { id = dynamicDelKeys.ToArray() }).ExecuteCommandHasChange();
 
                         BaseDal.DeleteDataByIds(keys);
 
-                        ((SqlSugarClient)BaseDal.Db).CommitTran();
+                        ((SqlSugarScope)BaseDal.Db).CommitTran();
 
                         return WebResponseContent.Instance.OK();
                     }
@@ -551,7 +551,7 @@
             }
             catch (Exception ex)
             {
-                ((SqlSugarClient)BaseDal.Db).RollbackTran();
+                ((SqlSugarScope)BaseDal.Db).RollbackTran();
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }

--
Gitblit v1.9.3