From 47181c5a0df83783c0d05807a797941e28eb9889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Fri, 23 May 2025 15:36:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=A7=BB=E4=BA=A4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DroneSsnydManage/DroneSsnyApp.cs | 8 ++++- .../Request/ProjectHandoverReq.cs | 29 ++++++++++++++++++ .../ServiceControllers/DroneSsnyController.cs | 30 ++++++++++++++++--- 3 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 OpenAuth.App/ServiceApp/DroneSsnydManage/Request/ProjectHandoverReq.cs diff --git a/OpenAuth.App/ServiceApp/DroneSsnydManage/DroneSsnyApp.cs b/OpenAuth.App/ServiceApp/DroneSsnydManage/DroneSsnyApp.cs index 8c0f7c7..e719849 100644 --- a/OpenAuth.App/ServiceApp/DroneSsnydManage/DroneSsnyApp.cs +++ b/OpenAuth.App/ServiceApp/DroneSsnydManage/DroneSsnyApp.cs @@ -483,12 +483,18 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage { throw new Exception("项目不存在"); } + project.RcjgList = Repository .ChangeRepository>().AsQueryable() .Where(c => c.ssnyd_id == id) .ToList(); - return project; } + + public async Task ProjectHandover(ProjectHandoverReq req) + { + var project = req.MapTo(); + await Repository.AsUpdateable(project).IgnoreNullColumns().ExecuteCommandAsync(); + } } } \ No newline at end of file diff --git a/OpenAuth.App/ServiceApp/DroneSsnydManage/Request/ProjectHandoverReq.cs b/OpenAuth.App/ServiceApp/DroneSsnydManage/Request/ProjectHandoverReq.cs new file mode 100644 index 0000000..b9dfb2d --- /dev/null +++ b/OpenAuth.App/ServiceApp/DroneSsnydManage/Request/ProjectHandoverReq.cs @@ -0,0 +1,29 @@ +namespace OpenAuth.App.ServiceApp.DroneSsnydManage.Request; + +public class ProjectHandoverReq +{ + /// + /// 项目id + /// + public string Id { get; set; } + + /// + /// 移交部门 + /// + public string yijiaobumen { get; set; } + + /// + /// 移交原因 + /// + public string yijiaoyuanyin { get; set; } + + /// + /// 移交人员 + /// + public string yijiaorenyuan { get; set; } + + /// + /// 移交时间 + /// + public DateTime yijiaoshijian { get; set; } +} \ No newline at end of file diff --git a/OpenAuth.WebApi/Controllers/ServiceControllers/DroneSsnyController.cs b/OpenAuth.WebApi/Controllers/ServiceControllers/DroneSsnyController.cs index 1281161..3d9e517 100644 --- a/OpenAuth.WebApi/Controllers/ServiceControllers/DroneSsnyController.cs +++ b/OpenAuth.WebApi/Controllers/ServiceControllers/DroneSsnyController.cs @@ -130,7 +130,6 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers /// /// [HttpPost] - public async Task> MaintainNumber(string id, string newXiangmuNo) { var response = new Response(); @@ -218,9 +217,32 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers return response; } - - // 项目移交 项目详情 - + + // 项目移交 + /// + /// 项目移交 + /// + /// + /// + /// + [HttpPost] + public async Task> ProjectHandover(ProjectHandoverReq req) + { + var response = new Response(); + try + { + await droneSsnyApp.ProjectHandover(req); + response.Result = true; + } + catch (Exception ex) + { + response.Code = 500; + response.Message = ex.InnerException?.Message ?? ex.Message; + } + + return response; + } + /// /// 项目详情 ///