| | |
| | | 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 |
| | |
| | | Depottype = depots.FStockProperty, |
| | | IsNg = depots.FForbidStatus, |
| | | Zuid = depots.FGroup, |
| | | CreateOrg= Convert.ToDecimal(depots.FCreateOrgId), |
| | | UseOrg= Convert.ToDecimal(depots.FUseOrgId), |
| | | CreateOrg = Convert.ToDecimal(depots.FCreateOrgId), |
| | | UseOrg = Convert.ToDecimal(depots.FUseOrgId), |
| | | CreateDate = DateTime.Now, |
| | | Company = "1000", |
| | | Factory = "1000" |
| | |
| | | } |
| | | |
| | | // 批量更新仓库状态的方法 |
| | | 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(); |