using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace HH.WCS.NongFuChaYuan.OtherService
|
{
|
public class Settings
|
{
|
#region 项目流程配置区域
|
|
#region ProjectName
|
private static string _ProjectName = "";
|
public static string ProjectName
|
{
|
get
|
{
|
if (_ProjectName == "")
|
{
|
_ProjectName = XmlHelper.GetElementValue("ProjectName");
|
}
|
return _ProjectName;
|
}
|
}
|
#endregion
|
|
#region TableProType
|
private static string _TableProType = "";
|
public static string TableProType
|
{
|
get
|
{
|
if (_TableProType == "")
|
{
|
_TableProType = XmlHelper.GetElementValue("TableProType");
|
}
|
return _TableProType;
|
}
|
}
|
#endregion
|
|
#region TableName
|
private static string _TableName = "";
|
private static string TableNameList
|
{
|
get
|
{
|
if (_TableName == "")
|
{
|
_TableName = XmlHelper.GetElementValue("TableName");
|
}
|
return _TableName;
|
}
|
}
|
|
private static List<TableNameModel> TableNames = new List<TableNameModel>();
|
public static List<TableNameModel> GetTableNameList()
|
{
|
if (TableNames.Count == 0 && TableNameList != "")
|
{
|
TableNames = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TableNameModel>>(TableNameList);
|
}
|
return TableNames;
|
}
|
|
public class TableNameModel
|
{
|
/// <summary>
|
/// 表名标识:便于实施观看
|
/// </summary>
|
public string TableSignNo { get; set; }
|
/// <summary>
|
/// 泛意表名
|
/// </summary>
|
public string TableName { get; set; }
|
/// <summary>
|
/// 数据库实际表名
|
/// </summary>
|
public string TableSqlName { get; set; }
|
/// <summary>
|
/// 项目表类型
|
/// </summary>
|
public string TableProType { get; set; }
|
/// <summary>
|
/// 是否启用
|
/// </summary>
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#region FactoryCode
|
private static string _FactoryCode = "";
|
public static string FactoryCode
|
{
|
get
|
{
|
if (_FactoryCode == "")
|
{
|
_FactoryCode = XmlHelper.GetElementValue("FactoryCode");
|
}
|
return _FactoryCode;
|
}
|
}
|
#endregion
|
|
#region FactoryName
|
private static string _FactoryName = "";
|
public static string FactoryName
|
{
|
get
|
{
|
if (_FactoryName == "")
|
{
|
_FactoryName = XmlHelper.GetElementValue("FactoryName");
|
}
|
return _FactoryName;
|
}
|
}
|
#endregion
|
|
#region OneSign
|
private static string _OneSign = "";
|
public static string OneSign
|
{
|
get
|
{
|
if (_OneSign == "")
|
{
|
_OneSign = XmlHelper.GetElementValue("OneSign");
|
}
|
return _OneSign;
|
}
|
}
|
#endregion
|
|
#endregion
|
|
#region URL配置区域
|
|
#region HostToAgvServerUrl
|
private static string _hostToAgvServerUrl = "";
|
public static string HostToAgvServerUrl
|
{
|
get
|
{
|
if (_hostToAgvServerUrl == "")
|
{
|
_hostToAgvServerUrl = XmlHelper.GetElementValue("HostToAgvServerUrl");
|
}
|
return _hostToAgvServerUrl;
|
}
|
}
|
#endregion
|
|
#region OITcpServerUrl
|
private static string _OITcpServerUrl = "";
|
public static string OITcpSeverUrl
|
{
|
get
|
{
|
if (_OITcpServerUrl == "")
|
{
|
_OITcpServerUrl = XmlHelper.GetElementValue("OITcpServerUrl");
|
}
|
return _OITcpServerUrl;
|
}
|
}
|
#endregion
|
|
#region HttpUrlPort
|
private static string _HttpUrlPort = "";
|
public static string HttpUrlPort
|
{
|
get
|
{
|
if (_HttpUrlPort == "")
|
{
|
_HttpUrlPort = XmlHelper.GetElementValue("HttpUrlPort");
|
}
|
return _HttpUrlPort;
|
}
|
}
|
#endregion
|
|
#region TcpPort
|
private static string _TcpPort = "";
|
public static string TcpPort
|
{
|
get
|
{
|
if (_TcpPort == "")
|
{
|
_TcpPort = XmlHelper.GetElementValue("TcpPort");
|
}
|
return _TcpPort;
|
}
|
}
|
#endregion
|
|
#region SqlServer
|
private static string _SqlServer = "";
|
public static string SqlServer
|
{
|
get
|
{
|
if (_SqlServer == "")
|
{
|
_SqlServer = XmlHelper.GetElementValue("SqlServer");
|
}
|
return _SqlServer;
|
}
|
}
|
#endregion
|
|
#region ThirdPartyUrl
|
private static string _ThirdPartyUrl = "";
|
private static string ThirdPartyUrlList
|
{
|
get
|
{
|
if (_ThirdPartyUrl == "")
|
{
|
_ThirdPartyUrl = XmlHelper.GetElementValue("ThirdPartyUrl");
|
}
|
return _ThirdPartyUrl;
|
}
|
}
|
|
private static List<ThirdPartyUrlModel> ThirdPartyUrls = new List<ThirdPartyUrlModel>();
|
public static List<ThirdPartyUrlModel> GetThirdPartyUrlList()
|
{
|
if (ThirdPartyUrls.Count == 0 && ThirdPartyUrlList != "")
|
{
|
ThirdPartyUrls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ThirdPartyUrlModel>>(ThirdPartyUrlList);
|
}
|
return ThirdPartyUrls;
|
}
|
|
public class ThirdPartyUrlModel
|
{
|
/// <summary>
|
/// URL编号-唯一
|
/// </summary>
|
public string UrlNo { get; set; }
|
/// <summary>
|
/// URL标识名
|
/// </summary>
|
public string UrlName { get; set; }
|
/// <summary>
|
/// URL路径
|
/// </summary>
|
public string Url { get; set; }
|
/// <summary>
|
/// 是否启用
|
/// </summary>
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#region HttpApiVerify
|
private static string _HttpApiVerify = "";
|
private static string HttpApiVerifyList
|
{
|
get
|
{
|
if (_HttpApiVerify == "")
|
{
|
_HttpApiVerify = XmlHelper.GetElementValue("HttpApiVerify");
|
}
|
return _HttpApiVerify;
|
}
|
}
|
|
private static List<HttpApiVerifyModel> HttpApiVerifys = new List<HttpApiVerifyModel>();
|
public static List<HttpApiVerifyModel> GetHttpApiVerifyList()
|
{
|
if (HttpApiVerifys.Count == 0 && HttpApiVerifyList != "")
|
{
|
HttpApiVerifys = Newtonsoft.Json.JsonConvert.DeserializeObject<List<HttpApiVerifyModel>>(HttpApiVerifyList);
|
}
|
return HttpApiVerifys;
|
}
|
|
public class HttpApiVerifyModel
|
{
|
/// <summary>
|
/// 验证编码
|
/// </summary>
|
public string VerifyNo { get; set; }
|
/// <summary>
|
/// 项目编码
|
/// </summary>
|
public string Project { get; set; }
|
/// <summary>
|
/// 扩展编码
|
/// </summary>
|
public string[] Extend { get; set; }
|
/// <summary>
|
/// 是否启用
|
/// </summary>
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#endregion
|
|
#region 设备协议配置区域
|
|
#region DeviceInfo
|
private static string _deviceInfo = "";
|
private static string deviceInfoList
|
{
|
get
|
{
|
if (_deviceInfo == "")
|
{
|
_deviceInfo = XmlHelper.GetElementValue("deviceInfo");
|
}
|
return _deviceInfo;
|
}
|
}
|
|
private static List<deviceInfo> deviceInfos = new List<deviceInfo>();
|
public static List<deviceInfo> GetDeviceInfoList()
|
{
|
if (deviceInfos.Count == 0 && deviceInfoList != "")
|
{
|
deviceInfos = Newtonsoft.Json.JsonConvert.DeserializeObject<List<deviceInfo>>(deviceInfoList);
|
}
|
return deviceInfos;
|
}
|
|
public class deviceInfo
|
{
|
public string address { get; set; }
|
public string deviceName { get; set; }
|
public string[] deviceNo { get; set; }
|
public string[] location { get; set; }
|
/// <summary>
|
/// deviceType=1 自动门;deviceType=2 瓶盖机-无菌盖;deviceType=3 瓶盖机-水盖;deviceType=4 翻斗机(水盖);
|
/// deviceType=5 翻斗机(无菌盖 v1/v2);deviceType=6 翻斗机(无菌盖 v6);deviceType=7 翻斗机(无菌盖 v8)
|
/// </summary>
|
public int deviceType { get; set; }
|
public int enable { get; set; }
|
}
|
#endregion
|
|
#region ModBusTcpPlc
|
private static string _ModBusTcpPlc = "";
|
private static string ModBusTcpPlc
|
{
|
get
|
{
|
if (_ModBusTcpPlc == "")
|
{
|
_ModBusTcpPlc = XmlHelper.GetElementValue("ModBusTcpPlc");
|
}
|
return _ModBusTcpPlc;
|
}
|
}
|
public static List<ModBusTcpPlcModel> GetModBusTcpPlc()
|
{
|
return JsonConvert.DeserializeObject<List<ModBusTcpPlcModel>>(ModBusTcpPlc);
|
}
|
public class ModBusTcpPlcModel
|
{
|
public string device { get; set; }
|
public string deviceType { get; set; }
|
public string ip { get; set; }
|
public int readAddr { get; set; }
|
public int writeAddr { get; set; }
|
public string location { get; set; }
|
public int enable { get; set; }
|
public int port { get; set; }
|
}
|
#endregion
|
|
#region ChargingPile
|
|
#region BatteryTime
|
private static string _BatteryTime = "";
|
public static string BatteryTime
|
{
|
get
|
{
|
if (_BatteryTime == "")
|
{
|
_BatteryTime = XmlHelper.GetElementValue("BatteryTime");
|
}
|
return _BatteryTime;
|
}
|
}
|
#endregion
|
|
#region BatteryTimeEnd
|
private static string _BatteryTimeEnd = "";
|
public static string BatteryTimeEnd
|
{
|
get
|
{
|
if (_BatteryTimeEnd == "")
|
{
|
_BatteryTimeEnd = XmlHelper.GetElementValue("BatteryTimeEnd");
|
}
|
return _BatteryTimeEnd;
|
}
|
}
|
#endregion
|
|
#region 充电桩信息
|
private static string _ChargingPile = "";
|
private static string ChargingPile
|
{
|
get
|
{
|
if (_ChargingPile == "")
|
{
|
_ChargingPile = XmlHelper.GetElementValue("ChargingPile");
|
}
|
return _ChargingPile;
|
}
|
}
|
public static List<ChargingPileInfo> GetChargingPile()
|
{
|
return JsonConvert.DeserializeObject<List<ChargingPileInfo>>(ChargingPile);
|
}
|
public class ChargingPileInfo
|
{
|
public string agvNo { get; set; }
|
public string agvType { get; set; }
|
public string charginGroup { get; set; }
|
public string charginIP { get; set; }
|
public string agvBit { get; set; }
|
public string enable { get; set; }
|
}
|
#endregion
|
|
#endregion
|
|
#endregion
|
|
#region 特殊流程配置区域
|
|
#region 江苏西门子配置区域
|
|
#region 江苏西门子-特殊点位配置获取
|
private static string _SpecialPoint = "";
|
private static string SpecialPoint
|
{
|
get
|
{
|
if (_SpecialPoint == "")
|
{
|
_SpecialPoint = XmlHelper.GetElementValue("XiMenZiSpecialPoint");
|
}
|
return _SpecialPoint;
|
}
|
}
|
private static List<SpecialPointModel> SpecialPointList = new List<SpecialPointModel>();
|
public static List<SpecialPointModel> GetSpecialPointList()
|
{
|
if (SpecialPointList.Count == 0 && SpecialPoint != "")
|
{
|
SpecialPointList = JsonConvert.DeserializeObject<List<SpecialPointModel>>(SpecialPoint);
|
}
|
return SpecialPointList;
|
}
|
public class SpecialPointModel
|
{
|
/// <summary>
|
/// 货位编码
|
/// </summary>
|
public string Location { get; set; }
|
/// <summary>
|
/// AGV站点号
|
/// </summary>
|
public string AgvCode { get; set; }
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#endregion
|
|
#region 农夫均州配置区域
|
|
#region _elevatorIP
|
private static string _elevatorIP = "";
|
public static string ElevatorIP
|
{
|
get
|
{
|
if (_elevatorIP == "")
|
{
|
_elevatorIP = XmlHelper.GetElementValue("elevatorIP");
|
}
|
return _elevatorIP;
|
}
|
}
|
#endregion
|
|
#region _elevatorWaitMinute
|
private static int _elevatorWaitMinute = 0;
|
public static int ElevatorWaitMinute
|
{
|
get
|
{
|
if (_elevatorWaitMinute == 0)
|
{
|
_elevatorWaitMinute = int.Parse(XmlHelper.GetElementValue("elevatorWaitMinute"));
|
}
|
return _elevatorWaitMinute;
|
}
|
}
|
#endregion
|
|
#region elevatorCacheBit
|
private static string _elevatorCacheBit = "";
|
private static string elevatorCacheList
|
{
|
get
|
{
|
if (_elevatorCacheBit == "")
|
{
|
_elevatorCacheBit = XmlHelper.GetElementValue("elevatorCacheBit");
|
}
|
return _elevatorCacheBit;
|
}
|
}
|
|
private static List<elevatorCacheBit> elevatorCacheBits = new List<elevatorCacheBit>();
|
public static List<elevatorCacheBit> GetElevatorCacheBits()
|
{
|
//Console.WriteLine("elevatorCacheList =" + elevatorCacheList);
|
if (elevatorCacheBits.Count == 0 && elevatorCacheList != "")
|
{
|
elevatorCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<elevatorCacheBit>>(elevatorCacheList);
|
}
|
return elevatorCacheBits;
|
}
|
/// <summary>
|
/// {"location":"内部货位","order":0,"agvBits":[100,101]},
|
/// </summary>
|
public class elevatorCacheBit
|
{
|
|
public string location { get; set; }
|
|
public int order { get; set; }
|
public int[] agvBits { get; set; }
|
|
}
|
#endregion
|
|
#region elevatorDoor
|
private static string _elevatorDoor = "";
|
public static string elevatorDoorList
|
{
|
get
|
{
|
if (_elevatorDoor == "")
|
{
|
_elevatorDoor = XmlHelper.GetElementValue("elevatorDoor");
|
}
|
return _elevatorDoor;
|
}
|
}
|
|
private static List<elevatorDoor> elevatorDoors = new List<elevatorDoor>();
|
public static List<elevatorDoor> GetelEvatorDoorList()
|
{
|
if (elevatorDoors.Count == 0 && elevatorDoorList != "")
|
{
|
elevatorDoors = Newtonsoft.Json.JsonConvert.DeserializeObject<List<elevatorDoor>>(elevatorDoorList);
|
}
|
return elevatorDoors;
|
}
|
|
public class elevatorDoor
|
{
|
public string door { get; set; }
|
public int floor { get; set; }
|
public int addr { get; set; }
|
|
|
}
|
#endregion
|
|
#region tipperCacheBit
|
private static string _tipperCacheBit = "";
|
private static string tipperCacheBitList
|
{
|
get
|
{
|
if (_tipperCacheBit == "")
|
{
|
_tipperCacheBit = XmlHelper.GetElementValue("tipperCacheBit");
|
}
|
return _tipperCacheBit;
|
}
|
}
|
|
private static List<TipperCacheBit> tipperCacheBits = new List<TipperCacheBit>();
|
public static List<TipperCacheBit> GetTipperCacheList()
|
{
|
if (tipperCacheBits.Count == 0 && tipperCacheBitList != "")
|
{
|
tipperCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TipperCacheBit>>(tipperCacheBitList);
|
}
|
return tipperCacheBits;
|
}
|
|
public class TipperCacheBit
|
{
|
public string deviceName { get; set; }
|
public string[] location { get; set; }
|
/// <summary>
|
///locationType=11 满托位 locationType=12 空铁筐 locationType=13 空塑料筐
|
/// </summary>
|
public int locationType { get; set; }
|
|
}
|
#endregion
|
|
#region outStockCacheBit
|
private static string _outStockCacheBit = "";
|
private static string outStockCacheBitList
|
{
|
get
|
{
|
if (_outStockCacheBit == "")
|
{
|
_outStockCacheBit = XmlHelper.GetElementValue("outStockCacheBit");
|
}
|
return _outStockCacheBit;
|
}
|
}
|
|
private static List<outStockCacheBit> outStockCacheBits = new List<outStockCacheBit>();
|
public static List<outStockCacheBit> GetOutStockCacheList()
|
{
|
if (outStockCacheBits.Count == 0 && outStockCacheBitList != "")
|
{
|
outStockCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<outStockCacheBit>>(outStockCacheBitList);
|
}
|
return outStockCacheBits;
|
}
|
|
public class outStockCacheBit
|
{
|
public string areaName { get; set; }
|
public string[] location { get; set; }
|
/// <summary>
|
///locationType=1 无菌盖满(row=0专门给V6) locationType=2 水盖满
|
///locationType=3 铁空2层 loationType = 4 塑料空2层
|
///locationType = 4 v8满 locationType = 5 v8铁空 locationType = 6 v8塑料空
|
/// </summary>
|
public int locationType { get; set; }
|
public int row { get; set; }
|
|
}
|
#endregion
|
|
#region rawMaterialCacheBit
|
private static string _rawMaterialCacheBit = "";
|
private static string rawMaterialCacheBitList
|
{
|
get
|
{
|
if (_rawMaterialCacheBit == "")
|
{
|
_rawMaterialCacheBit = XmlHelper.GetElementValue("rawMaterialCacheBit");
|
}
|
return _rawMaterialCacheBit;
|
}
|
}
|
|
private static List<RawMaterialCacheBit> rawMaterialCacheBits = new List<RawMaterialCacheBit>();
|
public static List<RawMaterialCacheBit> GetRawMaterialCacheList()
|
{
|
if (rawMaterialCacheBits.Count == 0 && rawMaterialCacheBitList != "")
|
{
|
rawMaterialCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RawMaterialCacheBit>>(rawMaterialCacheBitList);
|
}
|
return rawMaterialCacheBits;
|
}
|
|
public class RawMaterialCacheBit
|
{
|
public string[] location { get; set; }
|
public int locationType { get; set; }
|
public int row { get; set; }
|
|
}
|
#endregion
|
|
#region outStockCacheBit
|
private static string _outgoCacheBit = "";
|
private static string outgoCacheBitList
|
{
|
get
|
{
|
if (_outgoCacheBit == "")
|
{
|
_outgoCacheBit = XmlHelper.GetElementValue("outgoCacheBit");
|
}
|
return _outgoCacheBit;
|
}
|
}
|
|
private static List<OutgoCacheBit> outgoCacheBits = new List<OutgoCacheBit>();
|
public static List<OutgoCacheBit> GetOutgoCacheList()
|
{
|
if (outgoCacheBits.Count == 0 && outgoCacheBitList != "")
|
{
|
outgoCacheBits = Newtonsoft.Json.JsonConvert.DeserializeObject<List<OutgoCacheBit>>(outgoCacheBitList);
|
}
|
return outgoCacheBits;
|
}
|
|
public class OutgoCacheBit
|
{
|
public string[] location { get; set; }
|
public int locationType { get; set; }
|
public int row { get; set; }
|
|
}
|
#endregion
|
|
#endregion
|
|
#region 农夫淳安配置区域
|
|
#region 农夫淳安-生产产线优先库区获取
|
private static string _ChunAnPriProLine = "";
|
private static string ChunAnPriProLine
|
{
|
get
|
{
|
if (_ChunAnPriProLine == "")
|
{
|
_ChunAnPriProLine = XmlHelper.GetElementValue("ChunAnPriProLine");
|
}
|
return _ChunAnPriProLine;
|
}
|
}
|
private static List<ChunAnPriProLineModel> ChunAnPriProLineList = new List<ChunAnPriProLineModel>();
|
public static List<ChunAnPriProLineModel> GetChunAnPriProLineList()
|
{
|
if (ChunAnPriProLineList.Count == 0 && ChunAnPriProLine != "")
|
{
|
ChunAnPriProLineList = JsonConvert.DeserializeObject<List<ChunAnPriProLineModel>>(ChunAnPriProLine);
|
}
|
return ChunAnPriProLineList;
|
}
|
public class ChunAnPriProLineModel
|
{
|
public string ItemName { get; set; }
|
public string ItemTrayType { get; set; }
|
public string AgvItemLayer { get; set; }
|
public string[] ProductArea { get; set; }
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#region 农夫淳安-特殊库区编码配置
|
private static string _ChunAnExtendArea = "";
|
private static string ChunAnExtendArea
|
{
|
get
|
{
|
if (_ChunAnExtendArea == "")
|
{
|
_ChunAnExtendArea = XmlHelper.GetElementValue("ChunAnExtendArea");
|
}
|
return _ChunAnExtendArea;
|
}
|
}
|
private static List<ChunAnExtendAreaModel> ChunAnExtendAreaList = new List<ChunAnExtendAreaModel>();
|
public static List<ChunAnExtendAreaModel> GetChunAnExtendAreaList()
|
{
|
if (ChunAnExtendAreaList.Count == 0 && ChunAnExtendArea != "")
|
{
|
ChunAnExtendAreaList = JsonConvert.DeserializeObject<List<ChunAnExtendAreaModel>>(ChunAnExtendArea);
|
}
|
return ChunAnExtendAreaList;
|
}
|
public class ChunAnExtendAreaModel
|
{
|
public string AreaName { get; set; }
|
/// <summary>
|
/// AGV参数4
|
/// </summary>
|
public string AgvTRow4 { get; set; }
|
public string[] AreaNo { get; set; }
|
public string[] ExtendNo { get; set; }
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#endregion
|
|
#region 农夫大明山配置区域
|
|
#region 瓶坯区域上下线指定库区
|
private static string _DaMingShanPriProLine = "";
|
private static string DaMingShanPriProLine
|
{
|
get
|
{
|
if (_DaMingShanPriProLine == "")
|
{
|
_DaMingShanPriProLine = XmlHelper.GetElementValue("DaMingShanPriProLine");
|
}
|
return _DaMingShanPriProLine;
|
}
|
}
|
private static List<DaMingShanPriProLineModel> DaMingShanPriProLineList = new List<DaMingShanPriProLineModel>();
|
public static List<DaMingShanPriProLineModel> GetDaMingShanPriProLineList()
|
{
|
if (DaMingShanPriProLineList.Count == 0 && DaMingShanPriProLine != "")
|
{
|
DaMingShanPriProLineList = JsonConvert.DeserializeObject<List<DaMingShanPriProLineModel>>(DaMingShanPriProLine);
|
}
|
return DaMingShanPriProLineList;
|
}
|
public class DaMingShanPriProLineModel
|
{
|
public string deviceName { get; set; }
|
public string ItemName { get; set; }
|
public string ItemTrayType { get; set; }
|
public string[] ProductLocation { get; set; }
|
public string[] ProductArea { get; set; }
|
/// <summary>
|
/// 密集型 0 1
|
/// </summary>
|
public int IsDense { get; set; } = 0;
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#region 物料编码对应配置
|
private static string _DaMingShanItemName = "";
|
private static string DaMingShanItemName
|
{
|
get
|
{
|
if (_DaMingShanItemName == "")
|
{
|
_DaMingShanItemName = XmlHelper.GetElementValue("DaMingShanItemName");
|
}
|
return _DaMingShanItemName;
|
}
|
}
|
private static List<DaMingShanItemNameModel> DaMingShanItemNameList = new List<DaMingShanItemNameModel>();
|
public static List<DaMingShanItemNameModel> GetDaMingShanItemNameList()
|
{
|
if (DaMingShanItemNameList.Count == 0 && DaMingShanItemName != "")
|
{
|
DaMingShanItemNameList = JsonConvert.DeserializeObject<List<DaMingShanItemNameModel>>(DaMingShanItemName);
|
}
|
return DaMingShanItemNameList;
|
}
|
public class DaMingShanItemNameModel
|
{
|
/// <summary>
|
/// 物料编码
|
/// </summary>
|
public string ItemName { get; set; }
|
/// <summary>
|
/// 规格
|
/// </summary>
|
public string Specifications { get; set; }
|
/// <summary>
|
/// 品相
|
/// </summary>
|
public string Condition { get; set; }
|
/// <summary>
|
/// 包装
|
/// </summary>
|
public string Package { get; set; }
|
/// <summary>
|
/// 物料层数
|
/// </summary>
|
public string Layers { get; set; }
|
/// <summary>
|
/// 传给TS层数
|
/// </summary>
|
public string TSlayers { get; set; }
|
/// <summary>
|
/// 配置开关
|
/// </summary>
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#region 瓶坯区域上下线指定库区
|
private static string _inStockCacheBit = "";
|
private static string inStockCacheBit
|
{
|
get
|
{
|
if (_inStockCacheBit == "")
|
{
|
_inStockCacheBit = XmlHelper.GetElementValue("inStockCacheBit");
|
}
|
return _inStockCacheBit;
|
}
|
}
|
private static List<inStockCacheBitModel> inStockCacheBitList = new List<inStockCacheBitModel>();
|
public static List<inStockCacheBitModel> GetinStockCacheBitList()
|
{
|
if (inStockCacheBitList.Count == 0 && inStockCacheBit != "")
|
{
|
inStockCacheBitList = JsonConvert.DeserializeObject<List<inStockCacheBitModel>>(inStockCacheBit);
|
}
|
return inStockCacheBitList;
|
}
|
public class inStockCacheBitModel
|
{
|
/// <summary>
|
/// 瓶盖区域出入库缓存点
|
/// </summary>
|
public string location { get; set; }
|
/// <summary>
|
/// 空/满
|
/// </summary>
|
public string ItemTrayType { get; set; }
|
/// <summary>
|
/// 设备类型 1:瓶盖机 2:瓶盖翻斗机
|
/// </summary>
|
public int deviceType { get; set; }
|
/// <summary>
|
/// 对应库区
|
/// </summary>
|
public string[] ProductArea { get; set; }
|
/// <summary>
|
/// 是否启用
|
/// </summary>
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#region 瓶坯区域上下线指定库区
|
private static string _updateCacheBit = "";
|
private static string updateCacheBit
|
{
|
get
|
{
|
if (_updateCacheBit == "")
|
{
|
_updateCacheBit = XmlHelper.GetElementValue("updateCacheBit");
|
}
|
return _updateCacheBit;
|
}
|
}
|
private static List<updateCacheBitModel> updateCacheBitList = new List<updateCacheBitModel>();
|
public static List<updateCacheBitModel> GetupdateCacheBitList()
|
{
|
if (updateCacheBitList.Count == 0 && updateCacheBit != "")
|
{
|
updateCacheBitList = JsonConvert.DeserializeObject<List<updateCacheBitModel>>(updateCacheBit);
|
}
|
return updateCacheBitList;
|
}
|
public class updateCacheBitModel
|
{
|
/// <summary>
|
/// 瓶盖区域出入库缓存点
|
/// </summary>
|
public string location { get; set; }
|
/// <summary>
|
/// 空/满
|
/// </summary>
|
public string AGVlocation { get; set; }
|
|
}
|
#endregion
|
|
#region 盘库实时更新库存
|
private static string _PanKu = "";
|
public static string PanKuList
|
{
|
get
|
{
|
if (_PanKu == "")
|
{
|
_PanKu = XmlHelper.GetElementValue("PanKu");
|
}
|
return _PanKu;
|
}
|
}
|
|
private static List<string> PanKu = new List<string>();
|
public static List<string> GetPanKuList()
|
{
|
if (PanKu.Count == 0 && PanKuList != "")
|
{
|
PanKu = JsonConvert.DeserializeObject<List<string>>(PanKuList);
|
}
|
return PanKu;
|
}
|
#endregion
|
|
#region 柔性线段
|
private static string _flexibility = "";
|
public static string flexibilityList
|
{
|
get
|
{
|
if (_flexibility == "")
|
{
|
_flexibility = XmlHelper.GetElementValue("flexibility");
|
}
|
return _flexibility;
|
}
|
}
|
|
private static List<flexibilitymodel> flexibility = new List<flexibilitymodel>();
|
public static List<flexibilitymodel> GetflexibilityList()
|
{
|
if (flexibility.Count == 0 && flexibilityList != "")
|
{
|
flexibility = JsonConvert.DeserializeObject<List<flexibilitymodel>>(flexibilityList);
|
}
|
return flexibility;
|
}
|
|
public class flexibilitymodel
|
{
|
public string AGVbit { get; set; }
|
public List<int> col { get; set; } = new List<int>();
|
public string row { get; set; }
|
public string area { get; set; }
|
}
|
#endregion
|
|
#region flexibilityenable
|
private static string _flexibilityenable = "";
|
public static string flexibilityenable
|
{
|
get
|
{
|
if (_flexibilityenable == "")
|
{
|
_flexibilityenable = XmlHelper.GetElementValue("flexibilityenable");
|
}
|
return _flexibilityenable;
|
}
|
}
|
#endregion
|
|
#region FULEenable
|
private static string _FULEenable = "";
|
public static string FULEenable
|
{
|
get
|
{
|
if (_FULEenable == "")
|
{
|
_FULEenable = XmlHelper.GetElementValue("FULEenable");
|
}
|
return _FULEenable;
|
}
|
}
|
#endregion
|
|
#region 成品库区分类
|
private static string _AreaType = "";
|
private static string AreaType
|
{
|
get
|
{
|
if (_AreaType == "")
|
{
|
_AreaType = XmlHelper.GetElementValue("AreaType");
|
}
|
return _AreaType;
|
}
|
}
|
private static List<AreaTypeModel> AreaTypeList = new List<AreaTypeModel>();
|
public static List<AreaTypeModel> GetAreaTypeList()
|
{
|
if (AreaTypeList.Count == 0 && DaMingShanPriProLine != "")
|
{
|
AreaTypeList = JsonConvert.DeserializeObject<List<AreaTypeModel>>(AreaType);
|
}
|
return AreaTypeList;
|
}
|
|
public class AreaTypeModel
|
{
|
public string AreaName { get; set; }
|
public string[] AreaCode { get; set; }
|
public string AreaType { get; set; }
|
}
|
#endregion
|
|
#endregion
|
|
#region 自动转运流程配置
|
private static string _inStockCacheArea = "";
|
private static string inStockCacheArea
|
{
|
get
|
{
|
if (_inStockCacheArea == "")
|
{
|
_inStockCacheArea = XmlHelper.GetElementValue("inStockCacheArea");
|
}
|
return _inStockCacheArea;
|
}
|
}
|
private static List<inStockCacheAreaModel> inStockCacheAreaList = new List<inStockCacheAreaModel>();
|
public static List<inStockCacheAreaModel> GetinStockCacheAreaList()
|
{
|
if (inStockCacheAreaList.Count == 0 && inStockCacheArea != "")
|
{
|
inStockCacheAreaList = JsonConvert.DeserializeObject<List<inStockCacheAreaModel>>(inStockCacheArea);
|
}
|
return inStockCacheAreaList;
|
}
|
public class inStockCacheAreaModel
|
{
|
public string deviceName { get; set; }
|
/// <summary>
|
/// 空满筐缓存区
|
/// </summary>
|
public string CacheAreaNo { get; set; }
|
/// <summary>
|
/// 对应库区
|
/// </summary>
|
public string ProductArea { get; set; }
|
public string CacheAreaNoLock { get; set; }
|
public int Priority { get; set; }
|
public string ProductAreaLock { get; set; }
|
public int CntrCount { get; set; }
|
public string TaskType { get; set; }
|
/// <summary>
|
/// 是否启用
|
/// </summary>
|
public string Enable { get; set; }
|
}
|
#endregion
|
|
#region 根据物料不同自动选择终点库区配置
|
private static string _ItemCacheArea = "";
|
private static string ItemCacheArea
|
{
|
get
|
{
|
if (_ItemCacheArea == "")
|
{
|
_ItemCacheArea = XmlHelper.GetElementValue("ItemCacheArea");
|
}
|
return _ItemCacheArea;
|
}
|
}
|
private static List<ItemCacheAreaModel> ItemCacheAreaList = new List<ItemCacheAreaModel>();
|
public static List<ItemCacheAreaModel> GetItemCacheAreaList()
|
{
|
if (ItemCacheAreaList.Count == 0 && inStockCacheArea != "")
|
{
|
ItemCacheAreaList = JsonConvert.DeserializeObject<List<ItemCacheAreaModel>>(ItemCacheArea);
|
}
|
return ItemCacheAreaList;
|
}
|
public class ItemCacheAreaModel
|
{
|
public string ItemCode { get; set; }
|
public string AreaCode { get; set; }
|
}
|
#endregion
|
#endregion
|
}
|
}
|