diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs
index 5aca0cd43..adac8c3b4 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs
@@ -234,6 +234,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
///
[Column("AUTOUPDATETIME")]
public DateTime? AutoUpdateTime { get; set; }
+ ///
+ /// 删除标识
+ ///
+ [Column("F_DELETEMARK")]
+ public int? F_DeleteMark { get; set; }
#endregion
#region 扩展操作
@@ -246,6 +251,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
this.CreateTime = DateTime.Now;
this.CreateUserId = LoginUserInfo.Get().userId;
this.Status = 0;
+ this.F_DeleteMark = 0;
}
///
/// 编辑调用
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs
index 6408badce..4062b9d80 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs
@@ -40,7 +40,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM Ass_FixAssets t ");
- strSql.Append(" WHERE 1=1 ");
+ strSql.Append(" WHERE 1=1 and (t.F_DeleteMark is null or t.F_DeleteMark != 1) ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
@@ -230,7 +230,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
try
{
- this.BaseRepository().Delete(t => keyValue.Contains(t.FAId));
+ //this.BaseRepository().Delete(t => keyValue.Contains(t.FAId));
+
+ //改为逻辑删除
+ var kv = string.Join("','", keyValue.Split(','));
+ this.BaseRepository().ExecuteBySql($"update Ass_FixAssets set FACode=('delete_'+FACode),F_DeleteMark=1,ModifyTime='{DateTime.Now}',ModifyUserId='{LoginUserInfo.Get().userId}' where FAId in ('{kv}')", null);
}
catch (Exception ex)
{