This commit is contained in:
jiahao 2023-07-04 17:21:55 +08:00
commit ecf97b5a23
8 changed files with 1078 additions and 18 deletions

View File

@ -21,9 +21,8 @@
//"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome //"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel //"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office //"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
//"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //mcut "Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //mcut
//"Database": "2U+9jYGy0dCbMzLaguBXow==", //tpe_dome_mall //"Database": "2U+9jYGy0dCbMzLaguBXow==", //tpe_dome_mall
"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==",
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==", "Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
"Password": "FVAPxztxpY4gJJKQ/se4bQ==" "Password": "FVAPxztxpY4gJJKQ/se4bQ=="
}, },

View File

@ -921,6 +921,7 @@
]; ];
historyTable = new YourTeam.JqDataTables.getTableByStatic(tag, data, columns, column_defs, null, null, null, null, "tpi"); historyTable = new YourTeam.JqDataTables.getTableByStatic(tag, data, columns, column_defs, null, null, null, null, "tpi");
$('#alertTable').DataTable().order([ 5, 'desc']);
$(loadEle).Loading("close"); $(loadEle).Loading("close");
} }

File diff suppressed because it is too large Load Diff

View File

@ -212,7 +212,7 @@ namespace FrontendWebApi.ApiControllers
join userinfo c on c.role_guid = a.role_guid join userinfo c on c.role_guid = a.role_guid
join variable v2 on b.ShowView = v2.id and v2.system_type = @sub_system_type join variable v2 on b.ShowView = v2.id and v2.system_type = @sub_system_type
join variable v1 on v1.id = v2.system_parent_id and v1.system_type = @main_system_type join variable v1 on v1.id = v2.system_parent_id and v1.system_type = @main_system_type
join device d on v1.system_value = d.device_system_tag and v2.system_value = d.device_name_tag and d.deleted = 0 and d.visible = 1 join device d on v1.system_value = d.device_system_tag and v2.system_value = d.device_name_tag and d.deleted = 0 and d.visible = 1 and d.is_link = 1
join device_item di on d.device_system_tag=di.device_system_tag and d.device_name_tag=di.device_name_tag join device_item di on d.device_system_tag=di.device_system_tag and d.device_name_tag=di.device_name_tag
and di.is_link = 1 and di.is_show_history = 1 and di.is_link = 1 and di.is_show_history = 1
where c.account = @account where c.account = @account

View File

@ -146,21 +146,22 @@ namespace FrontendWebApi.ApiControllers
if (tag_quantity == "5") if (tag_quantity == "5")
{ {
list = rawData list = rawData
.GroupBy(x => new { building_tag = x.device_number.Split("_")[0], floor_tag = x.device_number.Split("_")[2], device_serial_tag = x.device_number.Split("_")[4] }) .GroupBy(x => new { building_tag = x.device_number.Split("_")[0], floor_tag = x.device_number.Split("_")[2], device_serial_tag = x.device_number.Split("_")[4], device_number = x.device_number })
.Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag }) .Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag, device_number = x.Key.device_number })
.ToList(); .ToList();
} }
else else
{ {
list = rawData list = rawData
.GroupBy(x => new { building_tag = x.device_number.Split("_")[1], floor_tag = x.device_number.Split("_")[4], device_serial_tag = x.device_number.Split("_")[7] }) .GroupBy(x => new { building_tag = x.device_number.Split("_")[1], floor_tag = x.device_number.Split("_")[4], device_master = x.device_number.Split("_")[5], device_serial_tag = x.device_number.Split("_")[7], device_number = x.device_number })
.Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag }) .Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag, device_master = x.Key.device_master, device_number = x.Key.device_number })
.ToList(); .ToList();
} }
foreach (var l in list) foreach (var l in list)
{ {
l.rawData = new List<HydroMeterRawDataOutput>(); l.rawData = new List<HydroMeterRawDataOutput>();
l.device_full_name = await backendRepository.GetOneAsync<string>($"select full_name from device where device_number = '{l.device_number}' and deleted = 0");
if (tag_quantity == "5") if (tag_quantity == "5")
{ {
l.rawData.AddRange( l.rawData.AddRange(
@ -170,7 +171,7 @@ namespace FrontendWebApi.ApiControllers
else else
{ {
l.rawData.AddRange( l.rawData.AddRange(
rawData.Where(x => x.device_number.Split("_")[1] == l.building_tag && x.device_number.Split("_")[4] == l.floor_tag && x.device_number.Split("_")[7] == l.device_serial_tag) rawData.Where(x => x.device_number.Split("_")[1] == l.building_tag && x.device_number.Split("_")[4] == l.floor_tag && x.device_number.Split("_")[5] == l.device_master && x.device_number.Split("_")[7] == l.device_serial_tag )
); );
} }
l.building_name = await backendRepository.GetOneAsync<string>("select full_name from building where building_tag = @building_tag and deleted = 0", l.building_name = await backendRepository.GetOneAsync<string>("select full_name from building where building_tag = @building_tag and deleted = 0",
@ -318,21 +319,22 @@ namespace FrontendWebApi.ApiControllers
if (tag_quantity == "5") if (tag_quantity == "5")
{ {
list = rawData list = rawData
.GroupBy(x => new { building_tag = x.device_number.Split("_")[0], floor_tag = x.device_number.Split("_")[2], device_serial_tag = x.device_number.Split("_")[4] }) .GroupBy(x => new { building_tag = x.device_number.Split("_")[0], floor_tag = x.device_number.Split("_")[2], device_serial_tag = x.device_number.Split("_")[4], device_number = x.device_number })
.Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag }) .Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag, device_number = x.Key.device_number })
.ToList(); .ToList();
} }
else else
{ {
list = rawData list = rawData
.GroupBy(x => new { building_tag = x.device_number.Split("_")[1], floor_tag = x.device_number.Split("_")[4], device_serial_tag = x.device_number.Split("_")[7] }) .GroupBy(x => new { building_tag = x.device_number.Split("_")[1], floor_tag = x.device_number.Split("_")[4], device_master = x.device_number.Split("_")[5], device_serial_tag = x.device_number.Split("_")[7], device_number = x.device_number })
.Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag }) .Select(x => new HydroMeterOutput { building_tag = x.Key.building_tag, floor_tag = x.Key.floor_tag, device_serial_tag = x.Key.device_serial_tag, device_master = x.Key.device_master, device_number = x.Key.device_number })
.ToList(); .ToList();
} }
foreach (var l in list) foreach (var l in list)
{ {
l.rawData = new List<HydroMeterRawDataOutput>(); l.rawData = new List<HydroMeterRawDataOutput>();
l.device_full_name = await backendRepository.GetOneAsync<string>($"select full_name from device where device_number = '{l.device_number}' and deleted = 0");
if (tag_quantity == "5") if (tag_quantity == "5")
{ {
l.rawData.AddRange( l.rawData.AddRange(
@ -342,7 +344,7 @@ namespace FrontendWebApi.ApiControllers
else else
{ {
l.rawData.AddRange( l.rawData.AddRange(
rawData.Where(x => x.device_number.Split("_")[1] == l.building_tag && x.device_number.Split("_")[4] == l.floor_tag && x.device_number.Split("_")[7] == l.device_serial_tag) rawData.Where(x => x.device_number.Split("_")[1] == l.building_tag && x.device_number.Split("_")[4] == l.floor_tag && x.device_number.Split("_")[5] == l.device_master && x.device_number.Split("_")[7] == l.device_serial_tag)
); );
} }
l.building_name = await backendRepository.GetOneAsync<string>("select full_name from building where building_tag = @building_tag and deleted = 0", l.building_name = await backendRepository.GetOneAsync<string>("select full_name from building where building_tag = @building_tag and deleted = 0",
@ -506,7 +508,7 @@ namespace FrontendWebApi.ApiControllers
} }
if (j == 2) if (j == 2)
{ {
cell.SetCellValue(r.device_serial_tag); cell.SetCellValue(r.device_full_name);
} }
if (j == 3) if (j == 3)

View File

@ -24,6 +24,9 @@ namespace FrontendWebApi.Models
public string building_tag { get; set; } public string building_tag { get; set; }
public string floor_tag { get; set; } public string floor_tag { get; set; }
public string device_serial_tag { get; set; } public string device_serial_tag { get; set; }
public string device_master { get; set; }
public string device_number { get; set; }
public string device_full_name { get; set; }
public string total { get; set; } public string total { get; set; }
public string price { get; set; } public string price { get; set; }
public string total_price { get; set; } public string total_price { get; set; }

View File

@ -18,10 +18,10 @@
"Port": "js2LutKe+rdjzdxMPQUrvQ==", "Port": "js2LutKe+rdjzdxMPQUrvQ==",
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30 //"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome //"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel //"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office //"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
//"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT "Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==", "Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
"Password": "FVAPxztxpY4gJJKQ/se4bQ==" "Password": "FVAPxztxpY4gJJKQ/se4bQ=="
} }

View File

@ -24,8 +24,8 @@
"Port": "js2LutKe+rdjzdxMPQUrvQ==", "Port": "js2LutKe+rdjzdxMPQUrvQ==",
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", // //"Database": "VJB2XC+lAtzuHObDGMVOAA==", //
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
//"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT "Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome //"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel //"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office //"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==", "Root": "SzdxEgaJJ7tcTCrUl2zKsA==",