This commit is contained in:
zpc 2025-09-26 20:04:37 +08:00
parent 37eb297841
commit 662e207bd3
3 changed files with 46 additions and 20 deletions

View File

@ -1,20 +1,27 @@
using Microsoft.AspNetCore.Mvc;
using ZR.Model.Business.Dto;
using ZR.Model.Business;
using ZR.Service.Business.IBusinessService;
using MiniExcelLibs;
using ZR.Service.Business;
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;
using System.Linq;
using ZR.Model.System.Dto;
using Microsoft.AspNetCore.Connections.Features;
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Tokens;
using MiniExcelLibs;
using SqlSugar;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using ZR.Model.Business;
using ZR.Model.Business.Dto;
using ZR.Model.System.Dto;
using ZR.Repository;
using ZR.Service.Business;
using ZR.Service.Business.IBusinessService;
using static SKIT.FlurlHttpClient.Wechat.Api.Models.WxaBusinessGetLiveInfoResponse.Types;
//创建时间2025-08-05
namespace ZR.Admin.WebApi.Controllers.Business
@ -380,11 +387,9 @@ namespace ZR.Admin.WebApi.Controllers.Business
port.OpticalAttenuation = parm.OpticalAttenuation;
port.UpdatedAt = DateTime.Now;
port.OpticalCableOffRemarks = parm.OpticalCableOffRemarks;
if (port.Status == 0)
{
port.Remarks = "";
port.OpticalCableOffRemarks = "";
}
else
{
@ -644,7 +649,28 @@ namespace ZR.Admin.WebApi.Controllers.Business
}
//添加端口
var port = _OdfPortsService.AsQueryable().Where(it => it.FrameId == frame.Id && it.RowNumber == excelItem.RowNumber && it.PortNumber == excelItem.PortNumber).First();
string remarks = $"{excelItem.YeWuMingCheng.Trim()} {excelItem.EquipmentModel.Trim()} {excelItem.BusinessType.Trim()} {excelItem.one}/{excelItem.two.Trim()}/{excelItem.three.Trim()}";
string remarks = "";
if (!string.IsNullOrEmpty(excelItem.Remarks))
{
remarks = excelItem.Remarks;
if (string.IsNullOrEmpty(excelItem.BusinessType))
{
var t = remarks.Split(" ");
if (t.Length > 2)
{
excelItem.BusinessType = t[2];
}
}
else
{
excelItem.BusinessType = remarks.Substring(0, 1);
}
}
else
{
remarks = $"{excelItem.YeWuMingCheng?.Trim()} {excelItem.EquipmentModel?.Trim()} {excelItem.BusinessType?.Trim()} {(!string.IsNullOrEmpty(excelItem.one) ? excelItem?.one + "/" : "")}{(!string.IsNullOrEmpty(excelItem.two?.Trim()) ? excelItem.two?.Trim() + "/" : "")}{excelItem.three?.Trim()}";
remarks = remarks.Trim();
}
if (port == null)
{
port = new OdfPorts()

View File

@ -417,9 +417,9 @@ namespace ZR.Model.Business.Dto
[ExcelColumnName("连接状态0断开1连接")]
public int Status { get; set; }
//[ExcelColumn(Name = "备注")]
//[ExcelColumnName("备注")]
//public string Remarks { get; set; }
[ExcelColumn(Name = "备注")]
[ExcelColumnName("备注")]
public string Remarks { get; set; }
[ExcelColumn(Name = "光衰值dB")]
[ExcelColumnName("光衰值dB")]