This commit is contained in:
2023-08-01 17:20:20 +08:00
parent c0f52a88d9
commit abe7edb936

View File

@@ -632,38 +632,38 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
if (dictionary.TryGetValue("roweqp", out var value)) if (dictionary.TryGetValue("roweqp", out var value))
{ {
List<EqpEquipment> eqpEquipments = JsonConvert.DeserializeObject<List<EqpEquipment>>(JsonConvert.SerializeObject(value)); List<EqpEquipment> eqpEquipments = JsonConvert.DeserializeObject<List<EqpEquipment>>(JsonConvert.SerializeObject(value));
return new AuthResponse(200, "", new Dictionary<string,object>() return new Dictionary<string, object>()
{ {
["list"] = eqpEquipments.Select(x=>new ["list"] = eqpEquipments.Select(x => new
{ {
id = x.id, id = x.id,
code = x.code, code = x.code,
name = x.name name = x.name
}).ToList(), }).ToList(),
}); };
} }
} }
else else
{ {
if (dictionary.TryGetValue("rowprocess", out var value)) if (dictionary.TryGetValue("rowprocess", out var value))
{ {
List<BasProcess> eqpEquipments = JsonConvert.DeserializeObject<List<BasProcess>>(JsonConvert.SerializeObject(value)); List<BasProcess> processes = JsonConvert.DeserializeObject<List<BasProcess>>(JsonConvert.SerializeObject(value));
return new AuthResponse(200, "", new Dictionary<string,object>() return new Dictionary<string,object>()
{ {
["list"] = eqpEquipments.Select(x=>new ["list"] = processes.Select(x=>new
{ {
id = x.id, id = x.id,
code = x.process_code, code = x.process_code,
name = x.process_name name = x.process_name
}).ToList(), }).ToList(),
}); };
} }
} }
} }
return new AuthResponse(200, "", new Dictionary<string,object>() return new Dictionary<string,object>()
{ {
["list"] = Enumerable.Empty<int>() ["list"] = Enumerable.Empty<int>()
}); };
} }
#endregion #endregion