通道配置修改
This commit is contained in:
+7
-1
@@ -27,6 +27,12 @@
|
||||
/LargeSquareOne/bin/Debug
|
||||
/LargeSquareOne/obj/Debug
|
||||
/packages
|
||||
/.vs
|
||||
.vs/
|
||||
[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
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
<Compile Include="SendDateMQTT.cs" />
|
||||
<Compile Include="StreamIOHelper.cs" />
|
||||
<Compile Include="StringSecurityHelper.cs" />
|
||||
<Compile Include="StrUtil.cs" />
|
||||
<Compile Include="TimerReset.cs" />
|
||||
<Compile Include="TxtHelper.cs" />
|
||||
<Compile Include="XmlHelper.cs" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</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="Hourprod.cs" />
|
||||
<Compile Include="BGearEntity.cs" />
|
||||
<Compile Include="SysConfig\ChallengeCode.cs" />
|
||||
<Compile Include="SysConfig\ChannelConfig.cs" />
|
||||
<Compile Include="SysConfig\Device.cs" />
|
||||
<Compile Include="SysCfg\ChallengeCode.cs" />
|
||||
<Compile Include="SysCfg\ChannelConfig.cs" />
|
||||
<Compile Include="SysCfg\Device.cs" />
|
||||
<Compile Include="CPKModel.cs" />
|
||||
<Compile Include="DeviceOEE.cs" />
|
||||
<Compile Include="SysConfig\Enum.cs" />
|
||||
<Compile Include="SysConfig\Group.cs" />
|
||||
<Compile Include="SysCfg\Enum.cs" />
|
||||
<Compile Include="SysCfg\Group.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SysConfig\ParamBase.cs" />
|
||||
<Compile Include="SysConfig\ParamList.cs" />
|
||||
<Compile Include="SysConfig\ProductModel.cs" />
|
||||
<Compile Include="SysConfig\ProductModelParam.cs" />
|
||||
<Compile Include="SysConfig\Variable.cs" />
|
||||
<Compile Include="SysConfig\SysAdmin.cs" />
|
||||
<Compile Include="SysConfig\SysConfig.cs" />
|
||||
<Compile Include="SysConfig\SysLog.cs" />
|
||||
<Compile Include="SysCfg\ParamBase.cs" />
|
||||
<Compile Include="SysCfg\ParamList.cs" />
|
||||
<Compile Include="SysCfg\ProductModel.cs" />
|
||||
<Compile Include="SysCfg\ProductModelParam.cs" />
|
||||
<Compile Include="SysCfg\Variable.cs" />
|
||||
<Compile Include="SysCfg\SysAdmin.cs" />
|
||||
<Compile Include="SysCfg\SysConfig.cs" />
|
||||
<Compile Include="SysCfg\SysLog.cs" />
|
||||
<Compile Include="DataTurnover.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models.SysConfig
|
||||
namespace JinYuan.Models.SysCfg
|
||||
{
|
||||
public class ChannelConfig
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace JinYuan.Models.SysConfig
|
||||
namespace JinYuan.Models.SysCfg
|
||||
{
|
||||
public class SysConfig
|
||||
{
|
||||
@@ -5,7 +5,7 @@ using JinYuan.DAL;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.Models.SysConfig;
|
||||
using JinYuan.Models.SysCfg;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -403,6 +403,11 @@ namespace JinYuan.VirtualDataLibrary
|
||||
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 isWrite2 = PlcLink.WriteValue("D2601", MESGradingSet[1], 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 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配置
|
||||
public static Models.SysConfig.ChannelConfig LoadFromJson(string filePath)
|
||||
public static Models.SysCfg.ChannelConfig LoadFromJson(string filePath)
|
||||
{
|
||||
var json = File.ReadAllText(filePath);
|
||||
return JsonConvert.DeserializeObject<ChannelConfig>(json);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using JinYuan.Models.SysConfig;
|
||||
using JinYuan.Models.SysCfg;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
@@ -143,7 +143,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
/// <summary>
|
||||
/// 通道档位设置
|
||||
/// </summary>
|
||||
public Models.SysConfig.ChannelConfig ChannelConfig = new ChannelConfig();
|
||||
public Models.SysCfg.ChannelConfig ChannelConfig = new ChannelConfig();
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态
|
||||
|
||||
@@ -2,32 +2,32 @@
|
||||
"channels": [
|
||||
{
|
||||
"channelId": 1,
|
||||
"default": 21,
|
||||
"defaultValue": 21,
|
||||
"gears": [ "E63y", "F63y" ]
|
||||
},
|
||||
{
|
||||
"channelId": 2,
|
||||
"default": 31,
|
||||
"defaultValue": 31,
|
||||
"gears": [ "E63yG", "F63yG" ]
|
||||
},
|
||||
{
|
||||
"channelId": 3,
|
||||
"default": 98,
|
||||
"defaultValue": 98,
|
||||
"gears": [ "NG" ]
|
||||
},
|
||||
{
|
||||
"channelId": 4,
|
||||
"default": 97,
|
||||
"defaultValue": 97,
|
||||
"gears": [ "拦截" ]
|
||||
},
|
||||
{
|
||||
"channelId": 5,
|
||||
"default": 97,
|
||||
"defaultValue": 97,
|
||||
"gears": [ "拦截" ]
|
||||
},
|
||||
{
|
||||
"channelId": 6,
|
||||
"default": 97,
|
||||
"defaultValue": 97,
|
||||
"gears": [ "拦截" ]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -43,9 +43,9 @@ Grading6=
|
||||
风速仪=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.161.62:804/device-status
|
||||
guid=181b2396-2ddb-49c5-9a88-74da4875e094
|
||||
DeviceState=3
|
||||
run_AlarmMark=1
|
||||
guid=8bd808da-0398-4a7d-ac92-bcea41869c03
|
||||
DeviceState=1
|
||||
run_AlarmMark=0
|
||||
run_IdleMark=0
|
||||
|
||||
[统计计数]
|
||||
|
||||
Reference in New Issue
Block a user