浏览代码

【修改】固定资产:删除改为逻辑删除;

塔里木分支
dyy 9 个月前
父节点
当前提交
9e85ae88fa
共有 2 个文件被更改,包括 12 次插入2 次删除
  1. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs
  2. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs

+ 6
- 0
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
/// </summary>
[Column("AUTOUPDATETIME")]
public DateTime? AutoUpdateTime { get; set; }
/// <summary>
/// 删除标识
/// </summary>
[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;
}
/// <summary>
/// 编辑调用


+ 6
- 2
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<Ass_FixAssetsEntity>(t => keyValue.Contains(t.FAId));
//this.BaseRepository().Delete<Ass_FixAssetsEntity>(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)
{


正在加载...
取消
保存