| | |
| | | var exists = db.Queryable<MesDepots>().Any(e => e.DepotId == entity.DepotId); |
| | | if (exists) |
| | | { |
| | | var result = db.Updateable<MesDepots>().ExecuteCommand(); |
| | | var result = db.Updateable(entity).ExecuteCommand(); |
| | | return true; |
| | | } |
| | | else |
| | |
| | | } |
| | | |
| | | // 批量更新仓库状态的方法 |
| | | private bool UpdateDepotStatusBatch(SqlSugarScope db, |
| | | List<MesDepots> depotList, string status) |
| | | private bool UpdateDepotStatusBatch(SqlSugarScope db,List<MesDepots> depotList, string status) |
| | | { |
| | | var ids = depotList.Select(it => it.DepotId).ToArray(); |
| | | var result = db.Updateable<MesDepots>().SetColumns(s => s.IsNg == status).Where(s => ids.Contains(s.DepotId)).ExecuteCommand(); |