diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs
index c4bf115..5161106 100644
--- a/FrontendWebApi/ApiControllers/DeviceManageController.cs
+++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs
@@ -259,19 +259,20 @@ namespace FrontendWebApi.ApiControllers
///
///
///
- [HttpPost]
+ [HttpGet]
[Route("api/Device/GetOpeDevice")]
- public async Task>>> GetOpeDevice([FromBody] FindDevice fd)
+ public async Task>>> GetOpeDevice([FromQuery] string device_guid)
{
ApiResult> apiResult = new ApiResult>();
try
{
- string sql = $@"select orr.work_type, orr.fix_do, ui.full_name as work_person_name, finish_time, created_at
+ string sql = $@"select orr.work_type, orr.fix_do, ui.full_name as work_person_name, orr.finish_time, orr.created_at, dn.device_node_guid, dn.full_name as device_node_name
from device d
join operation_record orr on d.device_number = orr.fix_do_code and orr.deleted = 0
left join userinfo ui on orr.work_person_id = ui.userinfo_guid
+ left join device_node dn on d.device_guid = dn.device_guid
where d.deleted = 0 and d.device_guid = @device_guid";
- object param = new { @device_guid = fd.device_guid };
+ object param = new { @device_guid = device_guid };
var device = await backendRepository.GetAllAsync(sql, param);
if (device.Count == 0)
diff --git a/FrontendWebApi/Models/Device.cs b/FrontendWebApi/Models/Device.cs
index d35bbec..f671d5c 100644
--- a/FrontendWebApi/Models/Device.cs
+++ b/FrontendWebApi/Models/Device.cs
@@ -110,5 +110,7 @@ namespace FrontendWebApi.Models
return Convert.ToDateTime(finish_time).ToString("yyyy-MM-dd HH:mm:ss");
}
} //結束時間
+ public string device_node_guid { get; set; }
+ public string device_node_name { get; set; }
}
}