From b646b9bee3991eb91fb916a290e5efb33eb5f68c Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期五, 18 四月 2025 19:13:40 +0800 Subject: [PATCH] 代码提交 --- StandardPda/MES.Service/service/BasicData/MesStaffManager.cs | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/StandardPda/MES.Service/service/BasicData/MesStaffManager.cs b/StandardPda/MES.Service/service/BasicData/MesStaffManager.cs index 075b229..1dfeaf9 100644 --- a/StandardPda/MES.Service/service/BasicData/MesStaffManager.cs +++ b/StandardPda/MES.Service/service/BasicData/MesStaffManager.cs @@ -62,11 +62,8 @@ MesStaff entity) { var exists = db.Queryable<SysUser>().Any(u => u.Sid == sysUser.Sid); - if (!exists) - { - db.Insertable(sysUser).ExecuteCommand(); - } - + if (!exists) db.Insertable(sysUser).ExecuteCommand(); + db.Deleteable<MesStaff>() .Where(s => s.Id == entity.Id) .ExecuteCommand(); @@ -78,12 +75,12 @@ } /// <summary> - /// "鍒犻櫎鍛樺伐鐨勬柟娉�"璋冩暣锛氳皟鏁翠紶鍏ュ弬鏁帮紝灏唅d鏀逛负MesStaff绫伙紝鍒犻櫎浣跨敤id鍜孭ositionCode浣滀负鍒ゆ柇渚濇嵁 + /// "鍒犻櫎鍛樺伐鐨勬柟娉�"璋冩暣锛氳皟鏁翠紶鍏ュ弬鏁帮紝灏唅d鏀逛负MesStaff绫伙紝鍒犻櫎浣跨敤id鍜孭ositionCode浣滀负鍒ゆ柇渚濇嵁 /// </summary> /// <remarks> - /// 淇敼浜猴細姹犲崡楠� - /// 淇敼鏃ユ湡锛�2024-12-30 - /// 淇敼璇存槑锛歚 + /// 淇敼浜猴細姹犲崡楠� + /// 淇敼鏃ユ湡锛�2024-12-30 + /// 淇敼璇存槑锛歚 /// </remarks> private bool DeleteStaff(SqlSugarScope db, SysUser sysUser, MesStaff entity) { -- Gitblit v1.9.3