sjz
3 天以前 302054e253f1550ee64430882786ec9a3920ec92
MES.Service/service/BasicData/MesDepotsManager.cs
@@ -56,7 +56,7 @@
        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
@@ -109,8 +109,8 @@
            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"
@@ -156,8 +156,7 @@
    }
    // 批量更新仓库状态的方法
    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();