通道配置修改
This commit is contained in:
+7
-1
@@ -27,6 +27,12 @@
|
|||||||
/LargeSquareOne/bin/Debug
|
/LargeSquareOne/bin/Debug
|
||||||
/LargeSquareOne/obj/Debug
|
/LargeSquareOne/obj/Debug
|
||||||
/packages
|
/packages
|
||||||
/.vs
|
.vs/
|
||||||
[Dd]ebug/
|
[Dd]ebug/
|
||||||
|
|
||||||
|
/.vs/LargeSquareOne/CopilotIndices/17.14.1431.25910/SemanticSymbols.db-shm
|
||||||
|
/.vs/LargeSquareOne/CopilotIndices/17.14.1431.25910/SemanticSymbols.db-wal
|
||||||
|
/.vs/LargeSquareOne/CopilotIndices/17.14.1431.25910/SemanticSymbols.db
|
||||||
|
/.vs/LargeSquareOne/CopilotIndices/17.14.1431.25910/CodeChunks.db-wal
|
||||||
|
/.vs/LargeSquareOne/CopilotIndices/17.14.1431.25910/CodeChunks.db-shm
|
||||||
|
/.vs/LargeSquareOne/CopilotIndices/17.14.1431.25910/CodeChunks.db
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2005,7 +2005,9 @@ namespace JinYuan.ControlCenters
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// MES分档查询
|
// MES分档查询
|
||||||
var channel = channels.FirstOrDefault(it => it.Gears.Contains(mesResType[0]));
|
|
||||||
|
string[] mesChannels = mesResType[0].Split(',');
|
||||||
|
var channel = channels.FirstOrDefault(it => StrUtil.IsExist(it.Gears, mesChannels));
|
||||||
|
|
||||||
if (channel != null)
|
if (channel != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -158,6 +158,7 @@
|
|||||||
<Compile Include="SendDateMQTT.cs" />
|
<Compile Include="SendDateMQTT.cs" />
|
||||||
<Compile Include="StreamIOHelper.cs" />
|
<Compile Include="StreamIOHelper.cs" />
|
||||||
<Compile Include="StringSecurityHelper.cs" />
|
<Compile Include="StringSecurityHelper.cs" />
|
||||||
|
<Compile Include="StrUtil.cs" />
|
||||||
<Compile Include="TimerReset.cs" />
|
<Compile Include="TimerReset.cs" />
|
||||||
<Compile Include="TxtHelper.cs" />
|
<Compile Include="TxtHelper.cs" />
|
||||||
<Compile Include="XmlHelper.cs" />
|
<Compile Include="XmlHelper.cs" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectView>ShowAllFiles</ProjectView>
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace JinYuan.Helper
|
||||||
|
{
|
||||||
|
public class StrUtil
|
||||||
|
{
|
||||||
|
public static bool IsExist(List<string> searchList, string[] desArr)
|
||||||
|
{
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
foreach (string str in searchList)
|
||||||
|
{
|
||||||
|
if (desArr.Contains(str))
|
||||||
|
{
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -93,22 +93,22 @@
|
|||||||
<Compile Include="ElectricEnergy.cs" />
|
<Compile Include="ElectricEnergy.cs" />
|
||||||
<Compile Include="Hourprod.cs" />
|
<Compile Include="Hourprod.cs" />
|
||||||
<Compile Include="BGearEntity.cs" />
|
<Compile Include="BGearEntity.cs" />
|
||||||
<Compile Include="SysConfig\ChallengeCode.cs" />
|
<Compile Include="SysCfg\ChallengeCode.cs" />
|
||||||
<Compile Include="SysConfig\ChannelConfig.cs" />
|
<Compile Include="SysCfg\ChannelConfig.cs" />
|
||||||
<Compile Include="SysConfig\Device.cs" />
|
<Compile Include="SysCfg\Device.cs" />
|
||||||
<Compile Include="CPKModel.cs" />
|
<Compile Include="CPKModel.cs" />
|
||||||
<Compile Include="DeviceOEE.cs" />
|
<Compile Include="DeviceOEE.cs" />
|
||||||
<Compile Include="SysConfig\Enum.cs" />
|
<Compile Include="SysCfg\Enum.cs" />
|
||||||
<Compile Include="SysConfig\Group.cs" />
|
<Compile Include="SysCfg\Group.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="SysConfig\ParamBase.cs" />
|
<Compile Include="SysCfg\ParamBase.cs" />
|
||||||
<Compile Include="SysConfig\ParamList.cs" />
|
<Compile Include="SysCfg\ParamList.cs" />
|
||||||
<Compile Include="SysConfig\ProductModel.cs" />
|
<Compile Include="SysCfg\ProductModel.cs" />
|
||||||
<Compile Include="SysConfig\ProductModelParam.cs" />
|
<Compile Include="SysCfg\ProductModelParam.cs" />
|
||||||
<Compile Include="SysConfig\Variable.cs" />
|
<Compile Include="SysCfg\Variable.cs" />
|
||||||
<Compile Include="SysConfig\SysAdmin.cs" />
|
<Compile Include="SysCfg\SysAdmin.cs" />
|
||||||
<Compile Include="SysConfig\SysConfig.cs" />
|
<Compile Include="SysCfg\SysConfig.cs" />
|
||||||
<Compile Include="SysConfig\SysLog.cs" />
|
<Compile Include="SysCfg\SysLog.cs" />
|
||||||
<Compile Include="DataTurnover.cs" />
|
<Compile Include="DataTurnover.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace JinYuan.Models.SysConfig
|
namespace JinYuan.Models.SysCfg
|
||||||
{
|
{
|
||||||
public class ChannelConfig
|
public class ChannelConfig
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace JinYuan.Models.SysConfig
|
namespace JinYuan.Models.SysCfg
|
||||||
{
|
{
|
||||||
public class SysConfig
|
public class SysConfig
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@ using JinYuan.DAL;
|
|||||||
using JinYuan.Helper;
|
using JinYuan.Helper;
|
||||||
using JinYuan.MES;
|
using JinYuan.MES;
|
||||||
using JinYuan.Models;
|
using JinYuan.Models;
|
||||||
using JinYuan.Models.SysConfig;
|
using JinYuan.Models.SysCfg;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -403,6 +403,11 @@ namespace JinYuan.VirtualDataLibrary
|
|||||||
MESGradingSet[i] = (short)channels[i].DefaultValue;
|
MESGradingSet[i] = (short)channels[i].DefaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For Test
|
||||||
|
//string testStr = "E63y,F63y";
|
||||||
|
//string[] mesChannels = testStr.Split(',');
|
||||||
|
//var channel = channels.FirstOrDefault(it => StrUtil.IsExist(it.Gears, mesChannels));
|
||||||
|
|
||||||
var isWrite1 = PlcLink.WriteValue("D2600", MESGradingSet[0], Data_Type.Short);
|
var isWrite1 = PlcLink.WriteValue("D2600", MESGradingSet[0], Data_Type.Short);
|
||||||
var isWrite2 = PlcLink.WriteValue("D2601", MESGradingSet[1], Data_Type.Short);
|
var isWrite2 = PlcLink.WriteValue("D2601", MESGradingSet[1], Data_Type.Short);
|
||||||
var isWrite3 = PlcLink.WriteValue("D2602", MESGradingSet[2], Data_Type.Short);
|
var isWrite3 = PlcLink.WriteValue("D2602", MESGradingSet[2], Data_Type.Short);
|
||||||
@@ -534,10 +539,10 @@ namespace JinYuan.VirtualDataLibrary
|
|||||||
public static string iniFilePath = Path.Combine(System.Windows.Forms.Application.StartupPath, "ini\\Configure.ini");
|
public static string iniFilePath = Path.Combine(System.Windows.Forms.Application.StartupPath, "ini\\Configure.ini");
|
||||||
|
|
||||||
|
|
||||||
public static string ChannelPath = Path.Combine(System.Windows.Forms.Application.StartupPath, "Config\\settings.json");
|
public static string ChannelPath = Path.Combine(System.Windows.Forms.Application.StartupPath, "Config\\Channel.json");
|
||||||
|
|
||||||
#region 读取json配置
|
#region 读取json配置
|
||||||
public static Models.SysConfig.ChannelConfig LoadFromJson(string filePath)
|
public static Models.SysCfg.ChannelConfig LoadFromJson(string filePath)
|
||||||
{
|
{
|
||||||
var json = File.ReadAllText(filePath);
|
var json = File.ReadAllText(filePath);
|
||||||
return JsonConvert.DeserializeObject<ChannelConfig>(json);
|
return JsonConvert.DeserializeObject<ChannelConfig>(json);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using JinYuan.Models.SysConfig;
|
using JinYuan.Models.SysCfg;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace JinYuan.VirtualDataLibrary
|
namespace JinYuan.VirtualDataLibrary
|
||||||
@@ -143,7 +143,7 @@ namespace JinYuan.VirtualDataLibrary
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通道档位设置
|
/// 通道档位设置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Models.SysConfig.ChannelConfig ChannelConfig = new ChannelConfig();
|
public Models.SysCfg.ChannelConfig ChannelConfig = new ChannelConfig();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备状态
|
/// 设备状态
|
||||||
|
|||||||
@@ -2,32 +2,32 @@
|
|||||||
"channels": [
|
"channels": [
|
||||||
{
|
{
|
||||||
"channelId": 1,
|
"channelId": 1,
|
||||||
"default": 21,
|
"defaultValue": 21,
|
||||||
"gears": [ "E63y", "F63y" ]
|
"gears": [ "E63y", "F63y" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"channelId": 2,
|
"channelId": 2,
|
||||||
"default": 31,
|
"defaultValue": 31,
|
||||||
"gears": [ "E63yG", "F63yG" ]
|
"gears": [ "E63yG", "F63yG" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"channelId": 3,
|
"channelId": 3,
|
||||||
"default": 98,
|
"defaultValue": 98,
|
||||||
"gears": [ "NG" ]
|
"gears": [ "NG" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"channelId": 4,
|
"channelId": 4,
|
||||||
"default": 97,
|
"defaultValue": 97,
|
||||||
"gears": [ "拦截" ]
|
"gears": [ "拦截" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"channelId": 5,
|
"channelId": 5,
|
||||||
"default": 97,
|
"defaultValue": 97,
|
||||||
"gears": [ "拦截" ]
|
"gears": [ "拦截" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"channelId": 6,
|
"channelId": 6,
|
||||||
"default": 97,
|
"defaultValue": 97,
|
||||||
"gears": [ "拦截" ]
|
"gears": [ "拦截" ]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ Grading6=
|
|||||||
风速仪=https://iot.eveportal.com:9470/eve_api/ems/iot/upload_device_collect_data
|
风速仪=https://iot.eveportal.com:9470/eve_api/ems/iot/upload_device_collect_data
|
||||||
分档参数=http://10.22.160.2/core/api/public/eve/pm/eqm/auto/grading
|
分档参数=http://10.22.160.2/core/api/public/eve/pm/eqm/auto/grading
|
||||||
安全设备状态=http://10.22.161.62:804/device-status
|
安全设备状态=http://10.22.161.62:804/device-status
|
||||||
guid=181b2396-2ddb-49c5-9a88-74da4875e094
|
guid=8bd808da-0398-4a7d-ac92-bcea41869c03
|
||||||
DeviceState=3
|
DeviceState=1
|
||||||
run_AlarmMark=1
|
run_AlarmMark=0
|
||||||
run_IdleMark=0
|
run_IdleMark=0
|
||||||
|
|
||||||
[统计计数]
|
[统计计数]
|
||||||
|
|||||||
Reference in New Issue
Block a user