1. 项目变更列表接口

2. 历史项目变更接口
dev
陈伟 2025-05-21 14:09:24 +08:00
parent bb228d2969
commit 3adbb19c6b
4 changed files with 112 additions and 13 deletions

View File

@ -52,7 +52,6 @@
<Folder Include="BaseApp\Permission\" />
<Folder Include="BaseApp\WFTask\Response\新文件夹\" />
<Folder Include="ServiceApp\DroneCaseInfoTaskManage\Response\" />
<Folder Include="ServiceApp\DroneSsnydManage\Request\" />
</ItemGroup>
</Project>

View File

@ -1,14 +1,10 @@
using OpenAuth.App.BaseApp.Base;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Infrastructure;
using OpenAuth.App.BaseApp.Base;
using OpenAuth.App.Interface;
using OpenAuth.App.ServiceApp.DroneSsnydManage.Request;
using OpenAuth.Repository;
using OpenAuth.Repository.Domain;
using SqlSugar;
using Infrastructure;
namespace OpenAuth.App.ServiceApp.DroneSsnydManage
{
@ -64,5 +60,48 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage
Total = totalCount
};
}
/// <summary>
/// 历史项目
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public PageInfo<List<DroneSsnyd>> HistoryProject(DroneSnnyAppPageReq req)
{
var totalCount = 0;
var list = Repository.AsQueryable()
.Where(a => a.handle_status_id == 99)
.WhereIF(!string.IsNullOrEmpty(req.xiangmu_no), a => a.xiangmu_no.Contains(req.xiangmu_no))
.WhereIF(!string.IsNullOrEmpty(req.xiangmumc), a => a.xiangmumc.Contains(req.xiangmumc))
.OrderBy(a => a.end_time, OrderByType.Desc)
.ToPageList(req.page, req.limit, ref totalCount);
return new PageInfo<List<DroneSsnyd>>
{
Items = list,
Total = totalCount
};
}
/// <summary>
/// 项目变更
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public PageInfo<List<DroneSsnyd>> ProjectChange(DroneSnnyAppPageReq req)
{
var totalCount = 0;
var list = Repository.AsQueryable()
.Where(a => a.handle_status_id != 99)
.WhereIF(!string.IsNullOrEmpty(req.xiangmu_no), a => a.xiangmu_no.Contains(req.xiangmu_no))
.WhereIF(!string.IsNullOrEmpty(req.xiangmumc), a => a.xiangmumc.Contains(req.xiangmumc))
.OrderBy(a => a.end_time, OrderByType.Desc)
.ToPageList(req.page, req.limit, ref totalCount);
return new PageInfo<List<DroneSsnyd>>
{
Items = list,
Total = totalCount
};
}
}
}

View File

@ -0,0 +1,15 @@
using OpenAuth.App.Request;
namespace OpenAuth.App.ServiceApp.DroneSsnydManage.Request;
public class DroneSnnyAppPageReq : PageReq
{
/// <summary>
/// 项目名称
/// </summary>
public string xiangmumc { get; set; }
/// <summary>
/// 项目编号
/// </summary>
public string xiangmu_no { get; set; }
}

View File

@ -1,8 +1,7 @@
using Infrastructure;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OpenAuth.App;
using OpenAuth.App.ServiceApp.DroneSsnydManage;
using OpenAuth.App.ServiceApp.DroneSsnydManage.Request;
using OpenAuth.Repository.Domain;
namespace OpenAuth.WebApi.Controllers.ServiceControllers
@ -15,6 +14,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
public class DroneSsnyController : ControllerBase
{
DroneSsnyApp droneSsnyApp;
public DroneSsnyController(DroneSsnyApp droneSsnyApp)
{
this.droneSsnyApp = droneSsnyApp;
@ -39,6 +39,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
@ -61,7 +62,52 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
/// <summary>
/// 历史项目
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpGet]
public Response<PageInfo<List<DroneSsnyd>>> HistoryProject(DroneSnnyAppPageReq req)
{
var response = new Response<PageInfo<List<DroneSsnyd>>>();
try
{
response.Result = droneSsnyApp.HistoryProject(req);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
/// <summary>
/// 项目变更列表
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpGet]
public Response<PageInfo<List<DroneSsnyd>>> ProjectChange(DroneSnnyAppPageReq req)
{
var response = new Response<PageInfo<List<DroneSsnyd>>>();
try
{
response.Result = droneSsnyApp.ProjectChange(req);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
}
}
}