321
This commit is contained in:
parent
37eb297841
commit
662e207bd3
|
|
@ -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 Aliyun.OSS;
|
||||||
using System.Linq;
|
|
||||||
using ZR.Model.System.Dto;
|
|
||||||
using Microsoft.AspNetCore.Connections.Features;
|
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;
|
||||||
|
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
|
//创建时间:2025-08-05
|
||||||
namespace ZR.Admin.WebApi.Controllers.Business
|
namespace ZR.Admin.WebApi.Controllers.Business
|
||||||
|
|
@ -380,11 +387,9 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
||||||
port.OpticalAttenuation = parm.OpticalAttenuation;
|
port.OpticalAttenuation = parm.OpticalAttenuation;
|
||||||
port.UpdatedAt = DateTime.Now;
|
port.UpdatedAt = DateTime.Now;
|
||||||
port.OpticalCableOffRemarks = parm.OpticalCableOffRemarks;
|
port.OpticalCableOffRemarks = parm.OpticalCableOffRemarks;
|
||||||
|
|
||||||
if (port.Status == 0)
|
if (port.Status == 0)
|
||||||
{
|
{
|
||||||
port.Remarks = "";
|
port.Remarks = "";
|
||||||
port.OpticalCableOffRemarks = "";
|
|
||||||
}
|
}
|
||||||
else
|
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();
|
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)
|
if (port == null)
|
||||||
{
|
{
|
||||||
port = new OdfPorts()
|
port = new OdfPorts()
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -417,9 +417,9 @@ namespace ZR.Model.Business.Dto
|
||||||
[ExcelColumnName("连接状态,0断开,1连接")]
|
[ExcelColumnName("连接状态,0断开,1连接")]
|
||||||
public int Status { get; set; }
|
public int Status { get; set; }
|
||||||
|
|
||||||
//[ExcelColumn(Name = "备注")]
|
[ExcelColumn(Name = "备注")]
|
||||||
//[ExcelColumnName("备注")]
|
[ExcelColumnName("备注")]
|
||||||
//public string Remarks { get; set; }
|
public string Remarks { get; set; }
|
||||||
|
|
||||||
[ExcelColumn(Name = "光衰值(dB)")]
|
[ExcelColumn(Name = "光衰值(dB)")]
|
||||||
[ExcelColumnName("光衰值(dB)")]
|
[ExcelColumnName("光衰值(dB)")]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user