333
This commit is contained in:
parent
6941b6c1f8
commit
5ec128e753
|
|
@ -8,6 +8,8 @@ using System.Collections.Generic;
|
|||
using SqlSugar;
|
||||
using static SKIT.FlurlHttpClient.Wechat.Api.Models.WxaBusinessGetLiveInfoResponse.Types;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Repository;
|
||||
using Aliyun.OSS;
|
||||
|
||||
//创建时间:2025-08-05
|
||||
namespace ZR.Admin.WebApi.Controllers.Business
|
||||
|
|
@ -107,6 +109,28 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询端口详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("search")]
|
||||
[ActionPermissionFilter(Permission = "odfports:query")]
|
||||
public async Task<IActionResult> GetOdfPortsInfo([FromQuery] OdfPortsSearchDto dto)
|
||||
{
|
||||
var key = dto.Key;
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
return SUCCESS(new List<OdfPortsQuDto>());
|
||||
}
|
||||
var predicate = Expressionable.Create<OdfPorts>();
|
||||
var list = _OdfPortsService.AsQueryable().Where(it => it.Name.Contains(key) || it.Remarks.Contains(key) || it.HistoryRemarks.Contains(key) || it.OpticalAttenuation.Contains(key)).ToPage<OdfPorts, OdfPortsQuDto>(dto);
|
||||
|
||||
return SUCCESS(list);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改端口
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -58,6 +58,11 @@ namespace ZR.Model.Business.Dto
|
|||
public string Name { get; set; }
|
||||
public List<OdfPortsMDto> odfPortsList { get; set; } = new List<OdfPortsMDto>();
|
||||
}
|
||||
|
||||
public class OdfPortsSearchDto : PagerInfo
|
||||
{
|
||||
public string Key { get; set; }
|
||||
}
|
||||
public class OdfPortsMDto
|
||||
{
|
||||
|
||||
|
|
@ -164,6 +169,84 @@ namespace ZR.Model.Business.Dto
|
|||
public string DeptName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 端口输入输出对象
|
||||
/// </summary>
|
||||
public class OdfPortsQuDto
|
||||
{
|
||||
[Required(ErrorMessage = "Id不能为空")]
|
||||
[ExcelColumn(Name = "Id")]
|
||||
[ExcelColumnName("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "端口名称不能为空")]
|
||||
[ExcelColumn(Name = "端口名称")]
|
||||
[ExcelColumnName("端口名称")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "机房ID不能为空")]
|
||||
[ExcelColumn(Name = "机房ID")]
|
||||
[ExcelColumnName("机房ID")]
|
||||
public int RoomId { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "机房名称不能为空")]
|
||||
[ExcelColumn(Name = "机房名称")]
|
||||
[ExcelColumnName("机房名称")]
|
||||
public string RoomName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "机架ID不能为空")]
|
||||
[ExcelColumn(Name = "机架ID")]
|
||||
[ExcelColumnName("机架ID")]
|
||||
public int RackId { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "机架名称不能为空")]
|
||||
[ExcelColumn(Name = "机架名称")]
|
||||
[ExcelColumnName("机架名称")]
|
||||
public string RackName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "框ID不能为空")]
|
||||
[ExcelColumn(Name = "框ID")]
|
||||
[ExcelColumnName("框ID")]
|
||||
public int FrameId { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "框名称不能为空")]
|
||||
[ExcelColumn(Name = "框名称")]
|
||||
[ExcelColumnName("框名称")]
|
||||
public string FrameName { get; set; }
|
||||
|
||||
|
||||
|
||||
[Required(ErrorMessage = "行号(1-6)不能为空")]
|
||||
[ExcelColumn(Name = "行号(1-6)")]
|
||||
[ExcelColumnName("行号(1-6)")]
|
||||
public int RowNumber { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "端口号(1-12)不能为空")]
|
||||
[ExcelColumn(Name = "端口号(1-12)")]
|
||||
[ExcelColumnName("端口号(1-12)")]
|
||||
public int PortNumber { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "连接状态,0正常,1断开不能为空")]
|
||||
[ExcelColumn(Name = "连接状态,0正常,1断开")]
|
||||
[ExcelColumnName("连接状态,0正常,1断开")]
|
||||
public int Status { get; set; }
|
||||
|
||||
[ExcelColumn(Name = "备注")]
|
||||
[ExcelColumnName("备注")]
|
||||
public string Remarks { get; set; }
|
||||
|
||||
[ExcelColumn(Name = "光衰值(dB)")]
|
||||
[ExcelColumnName("光衰值(dB)")]
|
||||
public string OpticalAttenuation { get; set; }
|
||||
|
||||
[ExcelColumn(Name = "历史故障表")]
|
||||
[ExcelColumnName("历史故障表")]
|
||||
public string HistoryRemarks { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 端口输入输出对象
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user