添加制粉喷煤选择框
This commit is contained in:
@ -24,13 +24,35 @@ namespace HT.Cloud.Service.ChartsManage
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<string> GetDriverGroupList()
|
||||
{
|
||||
var list_group = _context.Queryable<MetaGroupEntity>().ToList();
|
||||
return list_group.ToJson();
|
||||
}
|
||||
public async Task<string> GetDriverGroupList()
|
||||
{
|
||||
List<GroupNameList> subsystems = new List<GroupNameList>();
|
||||
var list_group = _context.Queryable<MetaGroupEntity>().ToList();
|
||||
int i = 0;
|
||||
foreach (var group in list_group)
|
||||
{
|
||||
subsystems.Add(new GroupNameList() { Lable = "a" + i, Value = group.GroupDescription });
|
||||
i++;
|
||||
}
|
||||
return subsystems.ToJson();
|
||||
}
|
||||
|
||||
public async Task<string> GetAllSubsystemTag()
|
||||
public async Task<string> GetGroupSubsystemTag(string groupDescription)
|
||||
{
|
||||
List<SubsysytemNameList> subsystems = new List<SubsysytemNameList>();
|
||||
var groupId = _context.Queryable<MetaGroupEntity>().Where(x => x.GroupDescription == groupDescription).First().GroupID;
|
||||
var grouped = _context.Queryable<MetaTagEntity>().ToList().Where(x=>x.GroupID==groupId);
|
||||
List<string> list_name_two = grouped.Select(t => t.Subsystem).GroupBy(c => c).Select(c => c.First()).ToList();
|
||||
int i = 0;
|
||||
foreach (var Meta_Tag in list_name_two)
|
||||
{
|
||||
subsystems.Add(new SubsysytemNameList() { Lable = "a" + i, Value = Meta_Tag });
|
||||
i++;
|
||||
}
|
||||
return subsystems.ToJson();
|
||||
}
|
||||
|
||||
public async Task<string> GetAllSubsystemTag()
|
||||
{
|
||||
List<SubsysytemNameList> subsystems = new List<SubsysytemNameList>();
|
||||
var grouped = _context.Queryable<MetaTagEntity>().ToList();
|
||||
@ -44,11 +66,12 @@ namespace HT.Cloud.Service.ChartsManage
|
||||
return subsystems.ToJson();
|
||||
}
|
||||
|
||||
public async Task<string> GetSubsystemAllTag(string subsysytemName)
|
||||
public async Task<string> GetSubsystemAllTag(string subsysytemName,string groupDescription)
|
||||
{
|
||||
|
||||
var subsysname = subsysytemName;
|
||||
var response = _context.Queryable<MetaTagEntity>().Where(x => x.Subsystem == subsysname).Select(x => new { x.TagID, x.Description, x.Units }).ToList();
|
||||
var groupId = _context.Queryable<MetaGroupEntity>().Where(x => x.GroupDescription == groupDescription).First().GroupID;
|
||||
var response = _context.Queryable<MetaTagEntity>().Where(x => x.Subsystem == subsysname&&x.GroupID == groupId).Select(x => new { x.TagID, x.Description, x.Units }).ToList();
|
||||
var reList = new List<SubAllTagReturn>();
|
||||
foreach (var subsystem in response)
|
||||
{
|
||||
@ -95,8 +118,12 @@ namespace HT.Cloud.Service.ChartsManage
|
||||
public string Lable { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class SubAllTagReturn
|
||||
private class GroupNameList
|
||||
{
|
||||
public string Lable { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
public class SubAllTagReturn
|
||||
{
|
||||
//x.TagID, x.Description, x.Units
|
||||
public short TagID { get; set; }
|
||||
|
Reference in New Issue
Block a user