From f1a841f056fe4d7be16f39d6fe169667f743d00a Mon Sep 17 00:00:00 2001 From: yanjinhui <3306209981@qq.com> Date: 星期二, 27 五月 2025 17:29:56 +0800 Subject: [PATCH] 重新修改/开始检修/结束检修/检修记录等接口 --- project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Telescopic/MaintenanceController.cs | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 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 34cdb72..af1a3ff 100644 --- a/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Telescopic/MaintenanceController.cs +++ b/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Telescopic/MaintenanceController.cs @@ -4,6 +4,7 @@ using System; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseController; +using WIDESEAWCS_Core.Helper; using WIDESEAWCS_DTO.Telescopic; using WIDESEAWCS_ITelescopicService; using WIDESEAWCS_IWMSPart; @@ -15,16 +16,17 @@ [ApiController] public class MaintenanceController : ApiBaseController<IMaintenanceService, Dt_Maintenance> { + public MaintenanceController(IMaintenanceService service) : base(service) { - + } /// <summary> /// 鏌ョ湅妫�淇鐞� /// </summary> /// <returns></returns> - [HttpPost,Route("ShowMaintence"),AllowAnonymous] + [HttpPost, Route("ShowMaintence"), AllowAnonymous] public WebResponseContent ShowMaintence([FromBody] PaginationDTO pagination) { return Service.ShowMaintence(pagination); @@ -46,10 +48,11 @@ /// </summary> /// <param name="id"></param> /// <returns></returns> - [HttpPost,Route("RunOperation"), AllowAnonymous] + [HttpPost, Route("RunOperation"), AllowAnonymous] public WebResponseContent RunOperation(int id, string ispossible) { - return Service.RunOperation(id,ispossible); + // + return Service.RunOperation(id, ispossible); } /// <summary> @@ -71,6 +74,7 @@ [HttpPost, Route("MaintenanceOperationRecord"), AllowAnonymous] public WebResponseContent MaintenanceOperationRecord([FromBody] PaginationDTO pagination) { + return Service.MaintenanceOperationRecord(pagination); } @@ -83,10 +87,11 @@ [HttpPost, Route("MaintenanceTasksOfTheDay"), AllowAnonymous] public WebResponseContent MaintenanceTasksOfTheDay(string account) { + return Service.MaintenanceTasksOfTheDay(account); } - + /// <summary> /// 寮�濮嬫淇� @@ -96,7 +101,9 @@ [HttpPost, Route("StartMaintenceTask"), AllowAnonymous] public WebResponseContent StartMaintenceTask(string account) { - return Service.StartMaintenceTask(account); + var userIp = HttpContext.GetUserIp();//鐢ㄦ埛鐢佃剳ip + var reslut = userIp.Replace("::ffff:", " "); + return Service.StartMaintenceTask(account, reslut); } -- Gitblit v1.9.3