From 80c7e78e0d52f9005df5e2c1c73a38aec128eb36 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期日, 07 四月 2024 15:35:35 +0800 Subject: [PATCH] 供水页面及api修改 --- WebApi/Controllers/AnaPrjController.cs | 46 ++-------------------------------------------- 1 files changed, 2 insertions(+), 44 deletions(-) diff --git a/WebApi/Controllers/AnaPrjController.cs b/WebApi/Controllers/AnaPrjController.cs index 89a71b5..eb81f0f 100644 --- a/WebApi/Controllers/AnaPrjController.cs +++ b/WebApi/Controllers/AnaPrjController.cs @@ -31,8 +31,7 @@ [Route("Debug")] [HttpGet] public IStation.Dto.ApiResult Debug(string info) - { - + { IStation.LogHelper.Info("debug:"+ info); @@ -129,7 +128,7 @@ if (request.isSubmit) { - string error = await ZyConnectHelper.SubmitPrj(request.prj);//, (id) => { IStation.LogHelper.Info("SavePrj success id=" + id); }, (info) => { IStation.LogHelper.Info("SavePrj failse info:" + info); });//.Result; + string error = await ZyProjectHelper.SubmitPrj(request.prj);//, (id) => { IStation.LogHelper.Info("SavePrj success id=" + id); }, (info) => { IStation.LogHelper.Info("SavePrj failse info:" + info); });//.Result; @@ -151,48 +150,7 @@ - /// <summary> - /// - /// </summary> - /// <param name="request"></param> - /// <returns></returns> - [Route("CalcPrj")] - [HttpPost] - public async Task<IStation.Dto.ApiResult> CalcPrj([FromBody] SavePrjRequest request) - { - if (request == null ) - { - return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "day null" }; - } - if (request.prj == null) - { - return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "prj null" }; - } - var ret = Common.HistoryAnaPrjFileHelper.SavePrj( request.settting, request.requestBase, request.prj); - - if (request.isSubmit) - { - string error = await ZyConnectHelper.SubmitPrj(request.prj);//, (id) => { IStation.LogHelper.Info("SavePrj success id=" + id); }, (info) => { IStation.LogHelper.Info("SavePrj failse info:" + info); });//.Result; - - - - - if (!string.IsNullOrEmpty(error)) - { - IStation.LogHelper.Info("Submit prj finish (fail) day:" + request.requestBase.StartTime + ",error:" + error); - return new IStation.Dto.ApiResult<string>(error) { Code = ApiResultCode.Error }; - } - else - { - IStation.LogHelper.Info("Submit prj finish (success) day:" + request.requestBase.StartTime); - } - } - - - return new IStation.Dto.ApiResult<bool>(ret) { Code = ApiResultCode.Success }; - } - } -- Gitblit v1.9.3