From 69b4b758498b839aedbd82f7d4dee9d879ba65fe Mon Sep 17 00:00:00 2001 From: yanjinhui <3306209981@qq.com> Date: 星期四, 12 六月 2025 09:17:53 +0800 Subject: [PATCH] 修改开始检修和查看检修人员接口 --- project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Telescopic/MaintenanceController.cs | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Telescopic/MaintenanceController.cs b/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Telescopic/MaintenanceController.cs index 1a89567..49807d5 100644 --- a/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Telescopic/MaintenanceController.cs +++ b/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Telescopic/MaintenanceController.cs @@ -44,15 +44,16 @@ /// <summary> - /// 鏇存敼鐘舵�侊紝杩愯杩涘叆妫�淇� + /// 鏇存敼鐘舵�侊紝寮哄埗涓嬬嚎 /// </summary> /// <param name="id"></param> /// <returns></returns> [HttpPost, Route("RunOperation"), AllowAnonymous] - public WebResponseContent RunOperation(int id, string ispossible) + public WebResponseContent RunOperation(int id, string account, string LocalIP) { - // - return Service.RunOperation(id, ispossible); + var userIp = HttpContext.GetUserIp();//鐢ㄦ埛鐢佃剳ip + var reslut = userIp.Replace("::ffff:", ""); + return Service.RunOperation(id,account, LocalIP); } /// <summary> @@ -102,8 +103,8 @@ public WebResponseContent StartMaintenceTask(string account) { var userIp = HttpContext.GetUserIp();//鐢ㄦ埛鐢佃剳ip - var reslut = userIp.Replace("::ffff:", " "); - return Service.StartMaintenceTask(account, reslut); + var reslut = userIp.Replace("::ffff:", ""); + return Service.StartMaintenceTask(account, userIp); } @@ -115,7 +116,9 @@ [HttpPost, Route("StopMaintenanceTask")] public WebResponseContent StopMaintenanceTask(string account) { - return Service.StopMaintenanceTask(account); + var userIp = HttpContext.GetUserIp();//鐢ㄦ埛鐢佃剳ip + var reslut = userIp.Replace("::ffff:", ""); + return Service.StopMaintenanceTask(account, userIp); } -- Gitblit v1.9.3