717 lines
25 KiB
C#
717 lines
25 KiB
C#
//using AutoMapper;
|
||
using Newtonsoft.Json;
|
||
using System;
|
||
using System.Collections;
|
||
using System.Net.Http;
|
||
using System.Net.Http.Headers;
|
||
using System.Threading.Tasks;
|
||
using UnityEngine;
|
||
using UnityEngine.Networking;
|
||
using UnityEngine.UI;
|
||
using static GameManager;
|
||
|
||
/// <summary>
|
||
/// 设备-编辑
|
||
/// </summary>
|
||
public class RedactDevice : MonoBehaviour
|
||
{
|
||
public Body mybody = new Body();
|
||
public Root URlreturn = new Root();
|
||
DeviceQuery.DeviceList device = null;
|
||
|
||
///// <summary>
|
||
///// 类型
|
||
///// </summary>
|
||
//public Dropdown type;
|
||
/// <summary>
|
||
/// 设备类型
|
||
/// </summary>
|
||
[Header("设备类型")]
|
||
public Dropdown deviceTypeCode;
|
||
/// <summary>
|
||
/// 设施类型
|
||
/// </summary>
|
||
[Header("设施类型")]
|
||
public Dropdown deviceType;
|
||
/// <summary>
|
||
/// 网络等级(1国网;2华东网;3省网;4地区网)
|
||
/// </summary>
|
||
[Header("网络等级")]
|
||
public Dropdown networkLevel;
|
||
/// <summary>
|
||
/// 板卡类型
|
||
/// </summary>
|
||
[Header("板卡类型")]
|
||
public Dropdown cardType;
|
||
/// <summary>
|
||
/// 名称
|
||
/// </summary>
|
||
[Header("名称")]
|
||
public InputField deviceName;
|
||
/// <summary>
|
||
/// 编号
|
||
/// </summary>
|
||
[Header("编号")]
|
||
public InputField deviceCode;
|
||
/// <summary>
|
||
/// 板卡槽位
|
||
/// </summary>
|
||
[Header("板卡槽位")]
|
||
public InputField devicePosition;
|
||
/// <summary>
|
||
/// 状态
|
||
/// </summary>
|
||
[Header("状态")]
|
||
public Dropdown status;
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
public Dropdown rackType;
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
public Dropdown openFlag;
|
||
|
||
#region 机柜的
|
||
/// <summary>
|
||
/// 机柜型号
|
||
/// </summary>
|
||
[Header("机柜型号")]
|
||
public InputField machineModel;
|
||
/// <summary>
|
||
/// 功能说明
|
||
/// </summary>
|
||
[Header("功能说明")]
|
||
public InputField functionDescription;
|
||
/// <summary>
|
||
/// 生产厂家
|
||
/// </summary>
|
||
[Header("生产厂家")]
|
||
public InputField manufacturer;
|
||
#endregion
|
||
/// <summary>
|
||
/// 设备主任
|
||
/// </summary>
|
||
[Header("设备主任")]
|
||
public InputField directorName;
|
||
/// <summary>
|
||
/// 电话
|
||
/// </summary>
|
||
[Header("电话")]
|
||
public InputField phone;
|
||
|
||
public Button save_bt;
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
[Header("模型编号")]
|
||
public Text modelNum;
|
||
/// <summary>
|
||
/// 投运时间
|
||
/// </summary>
|
||
[Header("投运时间")]
|
||
public InputField operationTime;
|
||
/// <summary>
|
||
/// 板卡功能
|
||
/// </summary>
|
||
[Header("板卡功能")]
|
||
public InputField cardFunction;
|
||
public Button close_bt;
|
||
/// <summary>
|
||
/// 控制大小
|
||
/// </summary>
|
||
public GameObject contentSizeFitter;
|
||
//MapperConfiguration config;
|
||
//IMapper mapper;
|
||
public void OnEnable()
|
||
{
|
||
//Debug.Log("版本号 1.1.1");
|
||
mybody = new Body();
|
||
//config = new MapperConfiguration(cfg =>
|
||
//{
|
||
// cfg.CreateMap<RedactDevice.Body, DeviceQuery.DeviceList>();
|
||
// cfg.CreateMap<DeviceQuery.DeviceList, RedactDevice.Body>();
|
||
//});
|
||
//mapper = config.CreateMapper();
|
||
init();
|
||
try
|
||
{
|
||
if (!string.IsNullOrEmpty(GameManager.Inst.nowDeviceID))
|
||
{
|
||
for (int i = 0; i < GameManager.Inst.root_AllDevice.data.Count; i++)
|
||
{
|
||
if (GameManager.Inst.root_AllDevice.data[i].id == GameManager.Inst.nowDeviceID)
|
||
{
|
||
device = GameManager.Inst.root_AllDevice.data[i];
|
||
break;
|
||
}
|
||
}
|
||
//mybody = mapper.Map<RedactDevice.Body>(device);
|
||
if (device != null)
|
||
{
|
||
mybody.id = device.id;
|
||
mybody.deviceName = device.deviceName;
|
||
mybody.deviceCode = device.deviceCode;
|
||
mybody.type = device.type;
|
||
mybody.typeStr = device.typeStr;
|
||
mybody.deviceType = device.deviceType;
|
||
mybody.deviceTypeCode = device.deviceTypeCode;
|
||
mybody.functionDescription = device.functionDescription;
|
||
mybody.deviceTypeStr = device.deviceTypeStr;
|
||
mybody.rackId = device.rackId;
|
||
mybody.shelfId = device.shelfId;
|
||
mybody.slotId = device.slotId;
|
||
mybody.devicePosition = device.devicePosition;
|
||
mybody.machineModel = device.machineModel;
|
||
mybody.status = device.status;
|
||
mybody.conDeviceName = device.conDeviceName;
|
||
mybody.rackType = device.rackType;
|
||
mybody.openFlag = device.openFlag;
|
||
mybody.backDoorFlag = device.backDoorFlag;
|
||
mybody.modelNum = device.modelNum;
|
||
mybody.occupyNum = device.occupyNum;
|
||
mybody.residueNum = device.residueNum;
|
||
mybody.operationTime = device.operationTime;
|
||
mybody.directorName = device.directorName;
|
||
mybody.phone = CombineJSON.Decrypt(device.phone);
|
||
mybody.manufacturer = device.manufacturer;
|
||
mybody.powerProperties = device.powerProperties;
|
||
mybody.maintenanceUnit = device.maintenanceUnit;
|
||
mybody.machineFrameHigh = device.machineFrameHigh;
|
||
mybody.machineFrameWide = device.machineFrameWide;
|
||
mybody.machineFrameThick = device.machineFrameThick;
|
||
mybody.slotNum = device.slotNum;
|
||
mybody.slotSort = device.slotSort;
|
||
mybody.installMethod = device.installMethod;
|
||
mybody.affiliationFrame = device.affiliationFrame;
|
||
mybody.parentSlotName = device.parentSlotName;
|
||
mybody.slotType = device.slotType;
|
||
mybody.occupyStatus = device.occupyStatus;
|
||
mybody.affiliationSlot = device.affiliationSlot;
|
||
mybody.portNum = device.portNum;
|
||
mybody.cardFunction = device.cardFunction;
|
||
mybody.cardType = device.cardType;
|
||
mybody.runStatus = device.runStatus;
|
||
mybody.networkLevel = device.networkLevel;
|
||
}
|
||
}
|
||
}
|
||
catch (Exception e)
|
||
{
|
||
Debug.Log(e.StackTrace + "**********" + e.Message);
|
||
}
|
||
|
||
|
||
if (deviceTypeCode) deviceTypeCode.value = int.Parse(String.IsNullOrEmpty(mybody.type) ? "0" : mybody.type);
|
||
if (deviceType) deviceType.value = String.IsNullOrEmpty(mybody.deviceType) ? 0 : int.Parse(mybody.deviceType);
|
||
if (cardType) cardType.value = String.IsNullOrEmpty(mybody.cardType) ? 0 : int.Parse(mybody.cardType);
|
||
if (networkLevel) networkLevel.value = String.IsNullOrEmpty(mybody.networkLevel) ? 0 : int.Parse(mybody.networkLevel);
|
||
if (deviceName) deviceName.text = mybody.deviceName;
|
||
if (deviceCode) deviceCode.text = mybody.deviceCode;
|
||
if (devicePosition) devicePosition.text = mybody.devicePosition;
|
||
if (machineModel) machineModel.text = mybody.machineModel;
|
||
if (functionDescription) functionDescription.text = mybody.functionDescription;
|
||
if (status) status.value = int.Parse(String.IsNullOrEmpty(mybody.status) ? "2" : mybody.status);
|
||
if (rackType) rackType.value = String.IsNullOrEmpty(mybody.rackType) ? 0 : int.Parse(mybody.rackType);
|
||
if (openFlag) openFlag.value = String.IsNullOrEmpty(mybody.openFlag) ? 0 : int.Parse(mybody.openFlag);
|
||
if (manufacturer) manufacturer.text = mybody.manufacturer;
|
||
if (directorName) directorName.text = mybody.directorName;
|
||
if (phone) phone.text = mybody.phone;
|
||
if (operationTime) operationTime.text = mybody.operationTime;
|
||
if (cardFunction) cardFunction.text = mybody.cardFunction;
|
||
|
||
|
||
|
||
if (GameManager.Inst.nowDevice.GetComponent<DeviceQuery>().deviceList.deviceType == "1")
|
||
{
|
||
var part = GameManager.Inst.FindParent(GameManager.Inst.nowDevice, GameManager.Inst.IsDesiredParent);
|
||
mybody.rackId = part.GetComponent<DeviceQuery>().deviceList.id;
|
||
mybody.devicePosition = GameManager.Inst.nowDevice.transform.parent.name;
|
||
if (devicePosition) devicePosition.text = mybody.devicePosition;
|
||
}
|
||
else if (GameManager.Inst.nowDevice.GetComponent<DeviceQuery>().deviceList.deviceType == "3")
|
||
{
|
||
var cabinet = GameManager.Inst.FindParent(GameManager.Inst.nowDevice, GameManager.Inst.IsDesiredParent);
|
||
var shelf = GameManager.Inst.FindParent(GameManager.Inst.nowDevice, GameManager.Inst.IsFindRacks_go);
|
||
if (shelf) mybody.shelfId = shelf.GetComponent<DeviceQuery>().deviceList.id;
|
||
mybody.devicePosition = GameManager.Inst.nowDevice.transform.parent.name;
|
||
if (cabinet) mybody.rackId = cabinet.GetComponent<DeviceQuery>().deviceList.id;
|
||
}
|
||
|
||
if (!string.IsNullOrEmpty(mybody.modelNum))
|
||
modelNum.text = mybody.modelNum;
|
||
else
|
||
modelNum.text = null;
|
||
//Debug.Log("版本号 1.1.1");
|
||
|
||
UIShow(mybody.deviceType == "3");
|
||
}
|
||
|
||
public void init()
|
||
{
|
||
if (deviceTypeCode) findIndex(deviceTypeCode, "");
|
||
if (deviceType) findIndex(deviceType, "");
|
||
if (networkLevel) findIndex(networkLevel, "");
|
||
if (cardType) findIndex(cardType, "");
|
||
if (deviceName) deviceName.text = null;
|
||
if (deviceCode) deviceCode.text = null;
|
||
if (devicePosition) devicePosition.text = null;
|
||
if (machineModel) machineModel.text = null;
|
||
if (functionDescription) functionDescription.text = null;
|
||
if (status) findIndex(status, "");
|
||
if (manufacturer) manufacturer.text = null;
|
||
if (directorName) directorName.text = null;
|
||
if (phone) phone.text = null;
|
||
if (operationTime) operationTime.text = null;
|
||
if (cardFunction) cardFunction.text = null;
|
||
mybody.rackId = null;
|
||
mybody.devicePosition = null;
|
||
mybody.shelfId = null;
|
||
}
|
||
|
||
private void Start()
|
||
{
|
||
save_bt.onClick.AddListener(() =>
|
||
{
|
||
GameManager.Inst.editorMenu.gameObject.SetActive(false);
|
||
StartCoroutine(SaveJsonCoroutine());
|
||
});
|
||
|
||
close_bt.onClick.AddListener(() =>
|
||
{
|
||
gameObject.SetActive(false);
|
||
if (CabinetUIManager.Instance.current_menu == Menu.M_数字机房_场景管理)
|
||
{
|
||
GameManager.Inst.objectToShow_add.SetActive(true);
|
||
GameManager.Inst.search_box.SetActive(true);
|
||
}
|
||
});
|
||
}
|
||
|
||
/// <summary>
|
||
/// 寻找下拉菜单选项
|
||
/// </summary>
|
||
/// <param name="_dro"></param>
|
||
/// <param name="_name"></param>
|
||
public string findIndex(Dropdown _dro, string _name)
|
||
{
|
||
int index = _dro.options.FindIndex(x => x.text == _name);
|
||
if (index != -1)
|
||
{
|
||
_dro.captionText.text = _dro.options[index].text;
|
||
_dro.value = index;
|
||
return index.ToString();
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private IEnumerator SaveJsonCoroutine()
|
||
{
|
||
yield return StartCoroutine(saveJson((y) =>
|
||
{
|
||
if (string.IsNullOrEmpty(y))
|
||
{
|
||
Debug.Log("编辑设备失败");
|
||
SecondConfirmPanel.DeleteConform(null, string.IsNullOrEmpty(URlreturn.message) ? "编辑设备失败" : URlreturn.message);
|
||
refurbish();
|
||
}
|
||
else if (y == "reFillIn")
|
||
{
|
||
Debug.Log(URlreturn.message);
|
||
SecondConfirmPanel.DeleteConform(null, URlreturn.message);
|
||
}
|
||
else
|
||
{
|
||
if (URlreturn != null && URlreturn.message == "操作成功")
|
||
{
|
||
|
||
StartCoroutine(Succeed((x) =>
|
||
{
|
||
if (x)
|
||
{
|
||
refurbish();
|
||
}
|
||
else
|
||
{
|
||
SecondConfirmPanel.DeleteConform(null, "更新场景失败");
|
||
Debug.Log("接口获取数据失败(编辑设备-初始化失败)");
|
||
}
|
||
}));
|
||
|
||
}
|
||
else
|
||
{
|
||
Debug.Log("编辑设备失败: " + URlreturn.message);
|
||
SecondConfirmPanel.DeleteConform(null, string.IsNullOrEmpty(URlreturn.message) ? "编辑设备失败" : URlreturn.message);
|
||
refurbish();
|
||
}
|
||
}
|
||
}));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 刷新
|
||
/// </summary>
|
||
public void refurbish()
|
||
{
|
||
Array.ForEach(GameManager.Inst.pop_ups.ToArray(), (itme) =>
|
||
{
|
||
itme.gameObject.SetActive(false);
|
||
});
|
||
GameManager.Inst.objectToShow_add.gameObject.SetActive(true);
|
||
GameManager.Inst.search_box.SetActive(true);
|
||
var SN1 = GameManager.Inst.objectToShow_add.GetComponent<SearchName1>();
|
||
SN1.hide_menu();
|
||
}
|
||
|
||
public IEnumerator Succeed(Action<bool> callback)
|
||
{
|
||
Array.ForEach(GameObject.FindObjectsOfType<UPosItem>(), (item) =>
|
||
{
|
||
item.isOccupied = false;
|
||
});
|
||
GameManager.Inst.isLoading = false;
|
||
|
||
//TransparentGlowManage.Inst.addScript();
|
||
|
||
//yield return StartCoroutine(GameManager.Inst.init_Device());
|
||
|
||
//yield return StartCoroutine(GameManager.Inst.init_Port());
|
||
|
||
|
||
//yield return StartCoroutine(LineQuery.Inst.getJsonCoroutine());
|
||
|
||
//GameManager.Inst.LoadScene();
|
||
//callback.Invoke(true);
|
||
yield return null;
|
||
StartCoroutine(GameManager.Inst.Initialize((x) =>
|
||
{
|
||
if (!string.IsNullOrEmpty(x))
|
||
callback.Invoke(true);
|
||
else
|
||
callback.Invoke(false);
|
||
}, true));
|
||
}
|
||
|
||
|
||
private void Update()
|
||
{
|
||
|
||
}
|
||
|
||
//类型:1-机柜;2-设备
|
||
//private String type;
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
/// <param name="isType">是否是机柜</param>
|
||
private void UIShow(bool isType)
|
||
{
|
||
//机柜显示
|
||
|
||
deviceCode.transform.parent.gameObject.SetActive(!isType);
|
||
deviceTypeCode.transform.parent.gameObject.SetActive(!isType);
|
||
networkLevel.transform.parent.gameObject.SetActive(!isType);
|
||
functionDescription.transform.parent.gameObject.SetActive(!isType);
|
||
operationTime.transform.parent.gameObject.SetActive(!isType);
|
||
manufacturer.transform.parent.gameObject.SetActive(!isType);
|
||
directorName.transform.parent.gameObject.SetActive(!isType);
|
||
phone.transform.parent.gameObject.SetActive(!isType);
|
||
|
||
//设备显示
|
||
devicePosition.transform.parent.gameObject.SetActive(isType);
|
||
cardType.transform.parent.gameObject.SetActive(isType);
|
||
cardFunction.transform.parent.gameObject.SetActive(isType);
|
||
|
||
|
||
//都显示
|
||
deviceName.transform.parent.gameObject.SetActive(true);
|
||
machineModel.transform.parent.gameObject.SetActive(true);
|
||
status.transform.parent.gameObject.SetActive(true);
|
||
deviceName.transform.parent.GetComponent<Text>().text = isType ? "板卡名称:" : "设备名称:";//gameObject.SetActive(isType);
|
||
machineModel.transform.parent.GetComponent<Text>().text = isType ? "板卡型号:" : "设备型号:";
|
||
status.transform.parent.GetComponent<Text>().text = isType ? "板卡状态:" : "运行状态:";
|
||
contentSizeFitter.SetActive(true);
|
||
Invoke("Add", 0.5f);
|
||
}
|
||
|
||
void Add()
|
||
{
|
||
contentSizeFitter.SetActive(false);
|
||
}
|
||
|
||
public IEnumerator saveJson(Action<string> callback)
|
||
{
|
||
// 回调为 reFillIn 时为重新填写不关闭弹窗
|
||
//if (deviceTypeCode.value == 0 || deviceType.value == 0 || status.value > 1) yield break;
|
||
if (string.IsNullOrEmpty(mybody.id)) yield break;
|
||
|
||
try
|
||
{
|
||
if (deviceTypeCode) mybody.deviceTypeCode = deviceTypeCode.value.ToString();
|
||
if (networkLevel) mybody.networkLevel = networkLevel.value.ToString();
|
||
if (deviceType) mybody.deviceType = deviceType.value == 0 ? null : deviceType.value.ToString();
|
||
if (cardType) mybody.cardType = cardType.value == 0 ? null : cardType.value.ToString();
|
||
if (deviceName) mybody.deviceName = deviceName.text;
|
||
if (string.IsNullOrWhiteSpace(deviceName.text))
|
||
{
|
||
URlreturn.message = "设备名不允许为空";
|
||
callback?.Invoke("reFillIn");
|
||
yield break;
|
||
}
|
||
if (deviceCode) mybody.deviceCode = deviceCode.text;
|
||
if (devicePosition) mybody.devicePosition = devicePosition.text;
|
||
if (machineModel) mybody.machineModel = machineModel.text;
|
||
if (functionDescription) mybody.functionDescription = functionDescription.text;
|
||
if (status) mybody.status = status.value.ToString();
|
||
if (rackType) mybody.rackType = rackType.value == 0 ? null : rackType.value.ToString();
|
||
if (openFlag) mybody.openFlag = openFlag.value == 0 ? null : openFlag.value.ToString();
|
||
if (manufacturer) mybody.manufacturer = manufacturer.text;
|
||
if (directorName) mybody.directorName = directorName.text;
|
||
if (phone) mybody.phone = phone.text;
|
||
if (operationTime) mybody.operationTime = operationTime.text;
|
||
if (cardFunction) mybody.cardFunction = cardFunction.text;
|
||
}
|
||
catch (Exception e)
|
||
{
|
||
Debug.Log("修改设备错误:" + e.Message);
|
||
//gameObject.SetActive(false);
|
||
callback.Invoke(null);
|
||
yield break;
|
||
}
|
||
|
||
|
||
string newData = JsonConvert.SerializeObject(mybody);
|
||
Debug.Log("保存数据:" + newData);
|
||
yield return StartCoroutine(
|
||
CombineJSON.UpdateJson_POST(GameManager.Inst.Jk_URL.sb_bj, GameManager.Inst.arguments.token, newData, (jsonResult) =>
|
||
{
|
||
try
|
||
{
|
||
URlreturn = JsonConvert.DeserializeObject<Root>(jsonResult);
|
||
callback?.Invoke(jsonResult);
|
||
}
|
||
catch (Exception e)
|
||
{
|
||
Debug.Log("修改设备接口错误:" + e.Message);
|
||
callback.Invoke(null);
|
||
}
|
||
}
|
||
));
|
||
}
|
||
|
||
#region JSON
|
||
[System.Serializable]
|
||
public class Body
|
||
{
|
||
/// <summary>
|
||
/// id
|
||
/// </summary>
|
||
public string id;
|
||
/// <summary>
|
||
/// 名称
|
||
/// </summary>
|
||
public string deviceName;
|
||
/// <summary>
|
||
/// 类型:1-机柜;2-设备(废旧)
|
||
/// </summary>
|
||
public string type;
|
||
/// <summary>
|
||
/// (设备类型:1-传输设备;2-交换设备;3-电源设备;4-综合数据网设备;5-光纤配线设备;6-数字配线设备;7-音频配线设备)
|
||
/// </summary>
|
||
public string deviceTypeCode;
|
||
/// <summary>
|
||
/// 投运时间
|
||
/// </summary>
|
||
public string operationTime;
|
||
/// <summary>
|
||
/// 是否启用:1-正常;0-禁用
|
||
/// </summary>
|
||
public string status;
|
||
/// <summary>
|
||
/// 负责人
|
||
/// </summary>
|
||
public string directorName;
|
||
/// <summary>
|
||
/// 联系电话
|
||
/// </summary>
|
||
public string phone;
|
||
/// <summary>
|
||
/// 机柜型号
|
||
/// </summary>
|
||
public string machineModel;
|
||
/// <summary>
|
||
/// 网络等级(1国网;2华东网;3省网;4地区网)
|
||
/// </summary>
|
||
public string networkLevel;
|
||
/// <summary>
|
||
/// 机柜位置
|
||
/// </summary>
|
||
public string machinePosition;
|
||
/// <summary>
|
||
/// 机柜位置
|
||
/// </summary>
|
||
public string functionDescription;
|
||
|
||
/// <summary>
|
||
/// 编号
|
||
/// </summary>
|
||
[Tooltip("编号")] public string deviceCode;
|
||
/// <summary>
|
||
/// 类型:1-机柜;2-设备
|
||
/// </summary>
|
||
[Tooltip("类型:1-机柜;2-设备")] public string typeStr;
|
||
/// <summary>
|
||
/// (板卡类型:1-处理板;2-交叉板;3-光口板;4-线路板;5-主控板;6-以太网板)
|
||
/// </summary>
|
||
[Tooltip("设备类型:1-机框;2-机槽;3-板卡")] public string deviceType;
|
||
/// <summary>
|
||
/// 设备类型:1-机框;2-机槽;3-板卡
|
||
/// </summary>
|
||
[Tooltip("设备类型:1-机框;2-机槽;3-板卡")] public string deviceTypeStr;
|
||
/// <summary>
|
||
/// 所属机柜id
|
||
/// </summary>
|
||
[Tooltip("所属机柜id")] public string rackId;
|
||
/// <summary>
|
||
/// 所属机框id
|
||
/// </summary>
|
||
[Tooltip("所属机框id")] public string shelfId;
|
||
/// <summary>
|
||
/// 所属机槽id
|
||
/// </summary>
|
||
[Tooltip("所属机槽id")] public string slotId;
|
||
/// <summary>
|
||
/// 设备位置
|
||
/// </summary>
|
||
[Tooltip("设备位置")] public string devicePosition;
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
[Tooltip("")] public string conDeviceName;
|
||
/// <summary>
|
||
/// 机柜类型:1-通信机柜;2-非通信机柜
|
||
/// </summary>
|
||
[Tooltip("机柜类型:1-通信机柜;2-非通信机柜")] public string rackType;
|
||
/// <summary>
|
||
/// 柜门是否打开:1-开;0-关
|
||
/// </summary>
|
||
[Tooltip("柜门是否打开:1-开;0-关")] public string openFlag;
|
||
/// <summary>
|
||
/// 后柜门是否打开:1-开;0-关
|
||
/// </summary>
|
||
[Tooltip("后柜门是否打开:1-开;0-关")] public string backDoorFlag;
|
||
/// <summary>
|
||
/// 模型编号
|
||
/// </summary>
|
||
[Tooltip("模型编号")] public string modelNum;
|
||
/// <summary>
|
||
/// U位占用数量
|
||
/// </summary>
|
||
[Tooltip("U位占用数量")] public string occupyNum;
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
[Tooltip("")] public string residueNum;
|
||
/// <summary>
|
||
/// 生产厂家
|
||
/// </summary>
|
||
[Tooltip("生产厂家")] public string manufacturer;
|
||
/// <summary>
|
||
/// 电源属性
|
||
/// </summary>
|
||
[Tooltip("电源属性")] public string powerProperties;
|
||
/// <summary>
|
||
/// 维护单位
|
||
/// </summary>
|
||
[Tooltip("维护单位")] public string maintenanceUnit;
|
||
/// <summary>
|
||
/// 机框高度
|
||
/// </summary>
|
||
[Tooltip("机框高度")] public string machineFrameHigh;
|
||
/// <summary>
|
||
/// 机框宽度
|
||
/// </summary>
|
||
[Tooltip("机框宽度")] public string machineFrameWide;
|
||
/// <summary>
|
||
/// 机框厚度
|
||
/// </summary>
|
||
[Tooltip("机框厚度")] public string machineFrameThick;
|
||
/// <summary>
|
||
/// 插槽数量
|
||
/// </summary>
|
||
[Tooltip("插槽数量")] public string slotNum;
|
||
/// <summary>
|
||
/// 插槽排列方式
|
||
/// </summary>
|
||
[Tooltip("插槽排列方式")] public string slotSort;
|
||
/// <summary>
|
||
/// 安装方式
|
||
/// </summary>
|
||
[Tooltip("安装方式")] public string installMethod;
|
||
/// <summary>
|
||
/// 所属机框
|
||
/// </summary>
|
||
[Tooltip("所属机框")] public string affiliationFrame;
|
||
/// <summary>
|
||
/// 父插槽名称
|
||
/// </summary>
|
||
[Tooltip("父插槽名称")] public string parentSlotName;
|
||
/// <summary>
|
||
/// 插槽类型
|
||
/// </summary>
|
||
[Tooltip("插槽类型")] public string slotType;
|
||
/// <summary>
|
||
/// 占用状态
|
||
/// </summary>
|
||
[Tooltip("占用状态")] public string occupyStatus;
|
||
/// <summary>
|
||
/// 所属机槽名称
|
||
/// </summary>
|
||
[Tooltip("所属机槽名称")] public string affiliationSlot;
|
||
/// <summary>
|
||
/// 端口数量
|
||
/// </summary>
|
||
[Tooltip("端口数量")] public string portNum;
|
||
/// <summary>
|
||
/// 板卡功能
|
||
/// </summary>
|
||
[Tooltip("板卡功能")] public string cardFunction;
|
||
/// <summary>
|
||
/// 板卡类型
|
||
/// </summary>
|
||
[Tooltip("板卡类型")] public string cardType;
|
||
/// <summary>
|
||
/// 运行状态
|
||
/// </summary>
|
||
[Tooltip("运行状态")] public string runStatus;
|
||
/// <summary>
|
||
/// 备注
|
||
/// </summary>
|
||
[Tooltip("备注")] public string remark;
|
||
}
|
||
|
||
[System.Serializable]
|
||
public class Root
|
||
{
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
public string code;
|
||
/// <summary>
|
||
/// 反馈结果
|
||
/// </summary>
|
||
public string message;
|
||
/// <summary>
|
||
/// 返回内容
|
||
/// </summary>
|
||
public string data;
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
public string serverTime;
|
||
}
|
||
#endregion
|
||
|
||
}
|