修改api需求
This commit is contained in:
parent
799d3ddd6c
commit
3e149a2cd9
@ -682,7 +682,13 @@ namespace FrontendWebApi.ApiControllers
|
||||
{
|
||||
foreach (var p in post)
|
||||
{
|
||||
var d = await backendRepository.GetOneAsync<DevForCor>($@"select * from device where deleted = 0 and device_number = @device_number and device_floor_tag = @device_floor_tag", new { @device_number = p.device_number, @device_floor_tag = p.device_floor_tag });
|
||||
var param = new { @device_area_tag = p.device_area_tag, @device_building_tag = p.device_building_tag, @device_system_tag = p.device_system_tag, @device_name_tag = p.device_name_tag,
|
||||
@device_floor_tag = p.device_floor_tag };
|
||||
var d = await backendRepository.GetOneAsync<DevForCor>($@"select * from device where deleted = 0 and select * from device
|
||||
where deleted = 0 and device_area_tag = @device_area_tag and device_building_tag = @device_building_tag
|
||||
and device_system_tag = @device_system_tag and device_name_tag = @device_name_tag
|
||||
and device_floor_tag = ifnull(@device_floor_tag, device_floor_tag) "
|
||||
, param);
|
||||
if (d != null)
|
||||
device.Add(d);
|
||||
}
|
||||
|
@ -156,6 +156,7 @@ namespace FrontendWebApi.Models
|
||||
public string device_master_full_name { get; set; }
|
||||
public string device_master_icon { get; set; }
|
||||
public string device_model { get; set; }
|
||||
public string device_area_tag { get; set; }
|
||||
public string device_building_tag { get; set; }
|
||||
public string device_system_tag { get; set; }
|
||||
public string device_floor_tag { get; set; }
|
||||
|
@ -125,6 +125,7 @@ namespace FrontendWebApi.Models
|
||||
{
|
||||
public string device_guid { get; set; }
|
||||
public string device_number { get; set; }
|
||||
public string device_floor_tag { get; set; }
|
||||
public string device_coordinate_3d { get; set; }
|
||||
public int forge_dbid { get; set; }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user