chore: initial commit
This commit is contained in:
114
MisDataFun/MisDataFun/App.config
Normal file
114
MisDataFun/MisDataFun/App.config
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<!--配置信号表的模板表路径-->
|
||||
<add key="BasicDataTableFile" value="SIGNAL_MODEL.xlsx" />
|
||||
<!--变量模拟测试开关1为开启-->
|
||||
<add key="IsDemoMesServer" value="1" />
|
||||
<!--是启用写监控报错日志-->
|
||||
<add key="IsWriteMonitorLog" value="1" />
|
||||
<!--是启用保存监控变量到数据库-->
|
||||
<add key="IsRecordTagStatus" value="1" />
|
||||
<!--数据库连接-->
|
||||
<add key="ConnectionString_MES" value="server=.,1333;User ID=sa;Password=126.com;database=MESBasicDB_XD_ZZ;Connection Reset=FALSE" />
|
||||
<!--MQTT参数配置-->
|
||||
<!--<add key="MqttUrl" value="172.16.1.5:1883,WEB/InstantMessaging/XD_GLKG/MisServer" />-->
|
||||
<add key="MqttUrl" value="127.0.0.1:1883,WEB/InstantMessaging/XD_ZZ/MisServer" />
|
||||
<add key="TopicList" value="PLC/InstantMessaging/XD_ZZ/+,PLC|WEB/InstantMessaging/XD_ZZ/MisServer,WEB" />
|
||||
<add key="MqttTargetTopic" value="MES/InstantMessaging/XD_ZZ" />
|
||||
<!--电阻仪地址-->
|
||||
<add key="ResistorDeviceIP_AC0901" value="192.168.10.59" />
|
||||
<add key="ResistorDeviceIP_AC0906" value="192.168.10.109" />
|
||||
<add key="ResistorDeviceIP_AC0909" value="192.168.10.14" />
|
||||
<add key="ResistorDeviceIP_AC2401" value="10.112.111.14" />
|
||||
<add key="ResistorDeviceIP_AC0601" value="192.168.10.8" />
|
||||
|
||||
<add key="ResistorDevicePort" value="8088" />
|
||||
<!--实时监控MES在线状态-->
|
||||
<add key="Webapi_MesIP" value="10.112.254.40" />
|
||||
<!--API端口号-->
|
||||
<add key="WebSvrPort" value="9982" />
|
||||
<add key="upload_Interval" value="10000" />
|
||||
<add key="upload_Interval_error" value="20000" />
|
||||
|
||||
<add key="WebapiPostHeader_Tenant" value="10000" />
|
||||
<add key="WebapiPostHeader_Language" value="zh-CHS" />
|
||||
<add key="WebapiPostHeader_Authorization" value="Bearer c4a965c1-84e4-764e-9108-7fe66c239b54" />
|
||||
|
||||
<!--MES_ZHDQ_126GLKG MES_ZHDQ_126DLQ MES_ZHDQ_126ZZ-->
|
||||
<add key="WebapiPostHeader_Systemcode" value="MES_ZHDQ_126ZZ" />
|
||||
|
||||
<!--工厂AGV部分-->
|
||||
<add key="AGV_BaseUrl" value="http://10.107.68.36:8181" />
|
||||
|
||||
<!--_物料配送上传接口-->
|
||||
<!--<add key="CallWebApiUrl_CallMaterial" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/materials/distribution" />-->
|
||||
<add key="CallWebApiUrl_CallMaterial" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/materials/distribution" />
|
||||
<!--_器具信息查询接口-->
|
||||
<!--<add key="CallWebApiUrl_DeviceInfoQuery" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/wmsdeliveryinfo/view" />-->
|
||||
<add key="CallWebApiUrl_DeviceInfoQuery" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/wmsdeliveryinfo/view" />
|
||||
<!--_物料信息确认接口-->
|
||||
<!--<add key="callwebapiurl_materialinfoconfirm" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/materialsdistribution/confirm" />-->
|
||||
<add key="CallWebApiUrl_MaterialInfoConfirm" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/materialsdistribution/confirm" />
|
||||
<!--任务开工上传接口-->
|
||||
<!--<add key="CallWebApiUrl_ProcessJobStart" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/dispatchWorkStart" />-->
|
||||
<add key="CallWebApiUrl_ProcessJobStart" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/dispatchWorkStart" />
|
||||
<!--产线报警上传接口-->
|
||||
<!--<add key="CallWebApiUrl_AlarmInfoUpload" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/giveAlarm" />-->
|
||||
<add key="CallWebApiUrl_AlarmInfoUpload" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/giveAlarm" />
|
||||
<!--工序完工上传接口-->
|
||||
<!--<add key="CallWebApiUrl_ProcessJobFinish" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/task/finish" />-->
|
||||
<add key="CallWebApiUrl_ProcessJobFinish" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/task/finish" />
|
||||
<!--任务完工与工时汇报上传接口-->
|
||||
<!--<add key="CallWebApiUrl_TaskFinishedReport" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/XDProductionLineMesService/psorder/finish" />-->
|
||||
<add key="CallWebApiUrl_TaskFinishedReport" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/psorder/finish" />
|
||||
<!--工序转序点对点接口-->
|
||||
<!--<add key="CallWebApiUrl_MaterialTransfer" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/XDAGVInterfaceService/materials/reorder" />-->
|
||||
<add key="CallWebApiUrl_MaterialTransfer" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/XDAGVInterfaceService/materials/reorder" />
|
||||
<!--点检结果上传接口-->
|
||||
<add key="CallWebApiUrl_SpotCheckRecordCreate" value="http://10.112.254.40:5200/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/spotcheckRecord/create" />
|
||||
<!--<add key="CallWebApiUrl_SpotCheckRecordCreate" value="http://mes.xkyx.com.cn/api/xkyxmes/xkmesex/v1.0/XDProductionLinemesService/spotcheckRecord/create" />-->
|
||||
<!--缓存位置查询接口-->
|
||||
<add key="materialPositionUr" value="http://10.112.254.40:5200/reportUpload" />
|
||||
<!--REST服务-->
|
||||
<add key="Url_WebApi" value="http://localhost:9983" />
|
||||
<!-- 检测图片上传根目录 -->
|
||||
<add key="XD_CheckImageRootPath" value="D:\XDCheckImages" />
|
||||
<!--检测数据上传接口-->
|
||||
<add key="OnlineCheckDataUrl" value="http://127.0.0.1:9983/OnlineCheckData" />
|
||||
<!--PrintURL-->
|
||||
<add key="PrintURL" value="172.16.1.111:9100" />
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
</appSettings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.web>
|
||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||
<providers>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
|
||||
</providers>
|
||||
</membership>
|
||||
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
</configuration>
|
||||
BIN
MisDataFun/MisDataFun/Mes32X32.ico
Normal file
BIN
MisDataFun/MisDataFun/Mes32X32.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
1952
MisDataFun/MisDataFun/MisDataFun.Designer.cs
generated
Normal file
1952
MisDataFun/MisDataFun/MisDataFun.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
1585
MisDataFun/MisDataFun/MisDataFun.cs
Normal file
1585
MisDataFun/MisDataFun/MisDataFun.cs
Normal file
File diff suppressed because it is too large
Load Diff
261
MisDataFun/MisDataFun/MisDataFun.csproj
Normal file
261
MisDataFun/MisDataFun/MisDataFun.csproj
Normal file
@@ -0,0 +1,261 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{DD9131C7-BF40-45B0-827A-C5E46FC8A89E}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>MisDataFun</RootNamespace>
|
||||
<AssemblyName>MisDataFun</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\MisDataFun_Exe\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Mes32X32.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="mes_signal_conf\MES_CONF.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="mes_signal_conf\MES_CONF.Designer.cs">
|
||||
<DependentUpon>MES_CONF.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="mes_signal_conf\SqlOperation.cs" />
|
||||
<Compile Include="MisDataFun.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MisDataFun.Designer.cs">
|
||||
<DependentUpon>MisDataFun.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="webApi\Analysis_MOM_Msg.cs" />
|
||||
<Compile Include="webApi\Controller\ipcControll.cs" />
|
||||
<Compile Include="webApi\InitServer.cs" />
|
||||
<Compile Include="webApi\msgResHeader.cs" />
|
||||
<Compile Include="webApi\OnlineCheckData.cs" />
|
||||
<EmbeddedResource Include="mes_signal_conf\MES_CONF.resx">
|
||||
<DependentUpon>MES_CONF.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MisDataFun.resx">
|
||||
<DependentUpon>MisDataFun.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.manifest" />
|
||||
<None Include="jsconfig1.json" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BasicData">
|
||||
<HintPath>..\..\dll_common\BasicData.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BouncyCastle.Crypto">
|
||||
<HintPath>..\..\dll_common\BouncyCastle.Crypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ConLink, Version=7.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_common\ConLink.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ConLink19">
|
||||
<HintPath>..\..\dll_common\ConLink19.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DataLinkMesWork">
|
||||
<HintPath>..\..\dll_common\DataLinkMesWork.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=1.2.0.7, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_common\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MesControl">
|
||||
<HintPath>..\..\dll_common\MesControl.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MesWork.DeviceDriver">
|
||||
<HintPath>..\..\dll_common\MesWork.DeviceDriver.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Owin, Version=4.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.4.2.2\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Monitor.MesWork">
|
||||
<HintPath>..\..\dll_common\Monitor.MesWork.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MQTTnet">
|
||||
<HintPath>..\..\dll_common\MQTTnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MQTTnet.Extensions.ManagedClient">
|
||||
<HintPath>..\..\dll_common\MQTTnet.Extensions.ManagedClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\dll_common\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI, Version=2.4.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_common\NPOI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OOXML, Version=2.4.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_common\NPOI.OOXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXml4Net, Version=2.4.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_common\NPOI.OpenXml4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXmlFormats, Version=2.4.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_common\NPOI.OpenXmlFormats.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Opc.Ua.Client">
|
||||
<HintPath>..\..\dll_common\Opc.Ua.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Opc.Ua.Configuration">
|
||||
<HintPath>..\..\dll_common\Opc.Ua.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Opc.Ua.Core">
|
||||
<HintPath>..\..\dll_common\Opc.Ua.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OpcUaHelper">
|
||||
<HintPath>..\..\dll_common\OpcUaHelper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_common\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_fun\System.Net.Security.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.WebSockets, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_fun\System.Net.WebSockets.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.WebSockets.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_fun\System.Net.WebSockets.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_fun\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_fun\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_fun\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_fun\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Cors">
|
||||
<HintPath>..\..\dll_common\System.Web.Cors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Http">
|
||||
<HintPath>..\..\dll_common\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.Cors">
|
||||
<HintPath>..\..\dll_common\System.Web.Http.Cors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.SelfHost">
|
||||
<HintPath>..\..\dll_common\System.Web.Http.SelfHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\09MesDataFunction\MesDataFunction\01-MesDataFunction.csproj">
|
||||
<Project>{90e76fb4-646d-45e2-95db-0b8ab4e465d6}</Project>
|
||||
<Name>01-MesDataFunction</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\MyLog4Net\00_MyLog4Net.csproj">
|
||||
<Project>{1dc48c83-1842-4de8-acaf-26e1e7f7c58f}</Project>
|
||||
<Name>00_MyLog4Net</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Interface_WebAPI\SlMesDbIterface\ExternalDataSync.csproj">
|
||||
<Project>{2f33d79d-1dff-4cda-b357-fcd5221cab9a}</Project>
|
||||
<Name>ExternalDataSync</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\MisDataFunction\Function1051\Function1051.csproj">
|
||||
<Project>{b5a0baa3-c1a7-4aab-9486-2e650adaca7e}</Project>
|
||||
<Name>Function1051</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\MisDataFunction\Function1052\Function1052.csproj">
|
||||
<Project>{5fee5c91-8419-49ff-b2c2-47476f0b8c68}</Project>
|
||||
<Name>Function1052</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\MisDataFunction\Function1053\Function1053.csproj">
|
||||
<Project>{ca8a12c5-7bf0-4489-93fa-180b1c492bba}</Project>
|
||||
<Name>Function1053</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\MisDataFunction\Function1054\Function1054.csproj">
|
||||
<Project>{cc45d613-11b9-48af-b073-6523d6273525}</Project>
|
||||
<Name>Function1054</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Mes32X32.ico" />
|
||||
<None Include="Resources\连接状态.png" />
|
||||
<None Include="Resources\断开状态.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
230
MisDataFun/MisDataFun/MisDataFun.resx
Normal file
230
MisDataFun/MisDataFun/MisDataFun.resx
Normal file
@@ -0,0 +1,230 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>22, 12</value>
|
||||
</metadata>
|
||||
<metadata name="选择.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="工位号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OpCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OpName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="MesDll.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PLC.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PLC代码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="timer_Status.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>267, 7</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>137, 15</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>36</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQIyAKEgMgChczIA
|
||||
occyAKHqMgChmTIAoTwyAKEJMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQQyAKEvMgChdzIA
|
||||
odYyAKH7MgCh/zIAof8yAKH/MgCh6jIAoacyAKFJMgChEjIAoQAyAKEAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChADIAoQoyAKE+MgChkTIA
|
||||
oeoyAKH+MgCh+TIAoe0yAKH+MgCh/zIAofwyAKH3MgCh/jIAofgyAKHBMgChZDIAoR4yAKEBMgChAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChATIAoRUyAKFcMgChujIA
|
||||
ofEyAKH/MgCh9DIAobcyAKFPMgChfjIAof8yAKH/MgCh5TIAoVUyAKGLMgCh4jIAofwyAKH9MgCh2TIA
|
||||
oYcyAKEoMgChBTIAoQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChAjIAoSYyAKF2MgCh0DIA
|
||||
ofcyAKH+MgCh8zIAof8yAKGjMgChDTIAoQAyAKFpMgCh/zIAof8yAKHhMgChHjIAoQIyAKEiMgChbjIA
|
||||
ocoyAKH3MgCh/jIAoeUyAKGfMgChQTIAoQsyAKEAAAAAAAAAAAAAAAAAMgChCDIAoUEyAKGXMgCh4jIA
|
||||
of4yAKH/MgChzzIAoW0yAKFoMgCh+zIAoZcyAKEAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChADIA
|
||||
oQAyAKEBMgChETIAoVAyAKGiMgCh8DIAof8yAKH0MgChuTIAoW0yAKEVMgChADIAoQAyAKG2MgCh7TIA
|
||||
of8yAKHvMgCh7jIAofgyAKFLMgChADIAoTcyAKH1MgChlzIAoQAyAKEAMgChaTIAof8yAKH/MgCh4TIA
|
||||
oR4yAKEAAAAAAAAAAAAAAAAAMgChADIAoQcyAKE4MgChijIAod8yAKH9MgCh+zIAoc4yAKFdMgChADIA
|
||||
of8yAKHlMgChlDIAoToyAKGgMgCh7jIAoSwyAKEAMgChFzIAodgyAKGZMgChADIAoQAyAKFpMgCh/zIA
|
||||
of8yAKHxMgChfDIAoSkyAKEBMgChAAAAAAAAAAAAAAAAADIAoQAyAKECMgChITIAoW8yAKG/MgCh/zIA
|
||||
oZYyAKEAMgCh/zIAoZoyAKEBMgChADIAoZkyAKHSMgChEjIAoQAyAKEGMgChujIAoZoyAKEAMgChADIA
|
||||
oWkyAKH/MgCh/zIAof0yAKH+MgCh4TIAoZIyAKFEMgChDjIAoQAyAKEAAAAAAAAAAAAAAAAAMgChADIA
|
||||
oUIyAKH7MgChlzIAoQAyAKH/MgChlzIAoQAyAKEAMgChmjIAobMyAKEEMgChADIAoQAyAKGcMgChmzIA
|
||||
oQAyAKEAMgChaTIAof8yAKH/MgCh4zIAoZYyAKHRMgCh+zIAofQyAKHDMgChZDIAoSIyAKEBMgChAAAA
|
||||
AAAyAKEAMgChPzIAofsyAKGXMgChADIAof8yAKGXMgChADIAoQAyAKGaMgChiDIAoQAAAAAAMgChADIA
|
||||
oYgyAKGaMgChADIAoQAyAKFpMgCh/zIAof8yAKHhMgChIDIAoRIyAKFeMgChqzIAoe0yAKH+MgCh3jIA
|
||||
oYYyAKEqMgChADIAoQAyAKE/MgCh+zIAoZcyAKEAMgCh/zIAoZcyAKEAMgChADIAoZgyAKFtMgChAAAA
|
||||
AAAyAKEAMgChXDIAoZQyAKEAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChADIAoQAyAKEGMgChMDIA
|
||||
oX8yAKHTMgCh+jIAoWkyAKEAMgChADIAoT8yAKH7MgChlzIAoQAyAKH/MgChlzIAoQAyAKEAMgChlTIA
|
||||
oWMyAKEAAAAAADIAoQAyAKE2MgChhTIAoQAyAKEAMgChaTIAof8yAKH/MgCh4TIAoR4yAKEAAAAAAAAA
|
||||
AAAyAKEAMgChATIAoRUyAKFYMgChQDIAoQAyAKEAMgChPzIAofsyAKGXMgChADIAof8yAKGXMgChADIA
|
||||
oQAyAKGLMgChQTIAoQAyAKEFMgChADIAoSMyAKF4MgChADIAoQAyAKFpMgCh/zIAof8yAKHhMgChHjIA
|
||||
oQAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQAyAKEBMgChADIAoQAyAKE/MgCh+zIAoZcyAKEAMgCh/zIA
|
||||
oZcyAKEAMgChADIAoXcyAKEkMgChBzIAoUIyAKEBMgChFjIAoWUyAKEBMgChADIAoWkyAKH/MgCh/zIA
|
||||
oeEyAKEeMgChADIAoQAyAKE5MgChSTIAoQ8yAKEBMgChAAAAAAAAAAAAMgChADIAoT8yAKH7MgChlzIA
|
||||
oQAyAKH/MgChlzIAoQAyAKECMgChWzIAoQ8yAKEVMgChhTIAoQoyAKEHMgChMzIAoQEyAKEAMgChaTIA
|
||||
of8yAKH/MgCh4TIAoR4yAKEAMgChADIAoWkyAKH1MgChyzIAoX8yAKE4MgChBTIAoQAyAKEAMgChPzIA
|
||||
ofsyAKGXMgChADIAof8yAKGXMgChADIAoQMyAKFZMgChCzIAoS4yAKHDMgChGjIAoQAAAAAAAAAAADIA
|
||||
oQAyAKFpMgCh/zIAof8yAKHhMgChHjIAoQAyAKEAMgChLDIAoaEyAKHkMgCh/DIAoe8yAKGrMgChUzIA
|
||||
oREyAKFBMgCh+zIAoZcyAKEAMgCh/zIAoZcyAKEAMgChBzIAoVAyAKEEMgChQTIAodoyAKEjMgChAAAA
|
||||
AAAAAAAAMgChADIAoWkyAKH/MgCh/zIAoeEyAKEeMgChAAAAAAAyAKEAMgChBjIAoSAyAKFyMgChwjIA
|
||||
ofMyAKH4MgCh0zIAobMyAKH9MgChljIAoQAyAKH/MgChlzIAoQAyAKEBMgChBDIAoQAyAKFKMgCh7jIA
|
||||
oT0yAKEAAAAAADIAoQAyAKEAMgChbDIAof8yAKH/MgCh4TIAoR8yAKEAAAAAAAAAAAAAAAAAMgChADIA
|
||||
oQEyAKELMgChRzIAoZYyAKHeMgCh/TIAof8yAKGWMgChADIAof8yAKGXMgChAAAAAAAAAAAAMgChADIA
|
||||
oW0yAKH/MgChZDIAoQAyAKEEMgChHDIAoWAyAKHPMgCh/zIAof8yAKH3MgChkTIAoS8yAKELMgChADIA
|
||||
oQAAAAAAAAAAAAAAAAAyAKEAMgChATIAoSAyAKF2MgCh/zIAoZYyAKEAMgCh/zIAoZcyAKEAAAAAADIA
|
||||
oQAyAKEAMgChljIAof8yAKGeMgChOTIAoZEyAKHcMgCh+TIAof8yAKH/MgCh/zIAof8yAKH+MgCh6jIA
|
||||
obgyAKFXMgChITIAoQEyAKEAAAAAAAAAAAAAAAAAMgChADIAoT8yAKH7MgChlzIAoQAyAKH/MgChlzIA
|
||||
oQAAAAAAMgChADIAoQwyAKG9MgCh/zIAofMyAKHyMgCh/jIAof8yAKH/MgCh/zIAofoyAKH3MgCh/jIA
|
||||
of8yAKH/MgCh/zIAofsyAKHbMgChmzIAoUwyAKENMgChATIAoQAyAKEAMgChPzIAofsyAKGXMgChADIA
|
||||
of8yAKGXMgChATIAoRkyAKFbMgChsTIAofAyAKH/MgCh/zIAof8yAKH/MgCh/DIAoeYyAKGxMgChVTIA
|
||||
oUIyAKGFMgCh1TIAofUyAKH/MgCh/zIAof8yAKH/MgCh9DIAocUyAKGDMgChMDIAoQYyAKE/MgCh+zIA
|
||||
oZcyAKEAMgCh/zIAocEyAKGOMgCh2TIAofcyAKH/MgCh/zIAof8yAKH/MgCh7jIAobMyAKFwMgChJjIA
|
||||
oQoyAKEAMgChADIAoQEyAKEXMgChTTIAoZsyAKHYMgCh/TIAof8yAKH/MgCh/zIAof4yAKHqMgChszIA
|
||||
oZgyAKH+MgChljIAoQAyAKH/MgCh/zIAof8yAKH/MgCh/zIAof8yAKH0MgChyTIAoYEyAKE/MgChBzIA
|
||||
oQAAAAAAMgChADIAoSIyAKF2MgChQjIAoRIyAKEAMgChATIAoR4yAKFjMgChrjIAoecyAKH9MgCh/zIA
|
||||
of8yAKH/MgCh/zIAof8yAKGWMgChADIAof8yAKH/MgCh/zIAofkyAKHWMgChmjIAoUIyAKERMgChATIA
|
||||
oQAyAKEGMgChFTIAoQMyAKEAMgChKDIAoZUyAKHHMgChxjIAoXcyAKE3MgChBzIAoQAyAKEGMgChKTIA
|
||||
oXYyAKHDMgCh7jIAof4yAKH/MgCh/zIAoZYyAKEAMgChrjIAoeYyAKH+MgCh0zIAoVcyAKELMgChADIA
|
||||
oQAyAKEAMgChADIAoVUyAKHAMgChkjIAoVYyAKEUMgChATIAoRYyAKFhMgChqzIAodUyAKGmMgChZTIA
|
||||
oR8yAKEDMgChBDIAoS0yAKGiMgCh9DIAofUyAKHGMgChWTIAoQAyAKEGMgChKjIAoWsyAKHBMgCh3DIA
|
||||
ocEyAKFwMgChJTIAoQYyAKEAMgChDDIAoTgyAKF/MgChyjIAocMyAKGUMgChMzIAoQsyAKEEMgChJjIA
|
||||
oWUyAKG/MgCh0TIAoaYyAKGoMgCh1TIAodYyAKGNMgChQTIAoRAyAKEAMgChAAAAAAAyAKEAMgChADIA
|
||||
oQ8yAKE8MgChkDIAoc8yAKHfMgChpDIAoVIyAKEcMgChADIAoQEyAKETMgChRzIAoZ8yAKHGMgChvzIA
|
||||
oWQyAKEtMgChMzIAoY8yAKHvMgCh5zIAoa8yAKFcMgChHDIAoQMyAKEAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAADIAoQAyAKECMgChFTIAoVcyAKGaMgCh3DIAodEyAKGaMgChSDIAoQsyAKEAMgChATIA
|
||||
oSUyAKGGMgCh6TIAofEyAKHhMgChtzIAoXAyAKErMgChBTIAoQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMgChADIAoQIyAKElMgChXTIAobgyAKHbMgChxTIA
|
||||
oYUyAKFbMgChqzIAodEyAKHLMgChhDIAoTsyAKELMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAKEAMgChCzIA
|
||||
oTcyAKGTMgCh0zIAofAyAKG2MgChWjIAoRcyAKEBMgChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA/+Af//+AB//8AAD/8AAAP8AIAA8AGDABARg+AQEYD4ERGAPxMZgAcTOY
|
||||
ADEzmDAxM5g8MTKIPzEgCDDxIAgwMSB4MAEgeDgBJHg+ATxAD8E8AAHxOAAAMQAAAAEAAwABABwgAQBE
|
||||
BAEBwAABAEAAA+AAAA/4AAB//wAD///gD/8=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
36
MisDataFun/MisDataFun/Properties/AssemblyInfo.cs
Normal file
36
MisDataFun/MisDataFun/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("MisDataSaveDate")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("大连迈思信息技术有限公司")]
|
||||
[assembly: AssemblyProduct("MisDataSaveDate")]
|
||||
[assembly: AssemblyCopyright("Copyright © 大连迈思信息技术有限公司 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("9aede061-8490-436a-b38b-9495dc908f19")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
83
MisDataFun/MisDataFun/Properties/Resources.Designer.cs
generated
Normal file
83
MisDataFun/MisDataFun/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,83 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MisDataFun.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MisDataFun.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 断开状态 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("断开状态", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 连接状态 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("连接状态", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
127
MisDataFun/MisDataFun/Properties/Resources.resx
Normal file
127
MisDataFun/MisDataFun/Properties/Resources.resx
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="断开状态" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\断开状态.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="连接状态" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\连接状态.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
26
MisDataFun/MisDataFun/Properties/Settings.Designer.cs
generated
Normal file
26
MisDataFun/MisDataFun/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MesServerMisDataFun.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
MisDataFun/MisDataFun/Properties/Settings.settings
Normal file
7
MisDataFun/MisDataFun/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
BIN
MisDataFun/MisDataFun/Resources/断开状态.png
Normal file
BIN
MisDataFun/MisDataFun/Resources/断开状态.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
BIN
MisDataFun/MisDataFun/Resources/连接状态.png
Normal file
BIN
MisDataFun/MisDataFun/Resources/连接状态.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
79
MisDataFun/MisDataFun/app.manifest
Normal file
79
MisDataFun/MisDataFun/app.manifest
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- UAC 清单选项
|
||||
如果想要更改 Windows 用户帐户控制级别,请使用
|
||||
以下节点之一替换 requestedExecutionLevel 节点。
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
|
||||
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
|
||||
元素。
|
||||
-->
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
||||
Windows 版本的列表。取消评论适当的元素,
|
||||
Windows 将自动选择最兼容的环境。 -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
||||
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
||||
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
|
||||
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
|
||||
|
||||
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
|
||||
<!--
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
-->
|
||||
|
||||
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
</assembly>
|
||||
10
MisDataFun/MisDataFun/jsconfig1.json
Normal file
10
MisDataFun/MisDataFun/jsconfig1.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"exclude": [
|
||||
"**/bin",
|
||||
"**/bower_components",
|
||||
"**/jspm_packages",
|
||||
"**/node_modules",
|
||||
"**/obj",
|
||||
"**/platforms"
|
||||
]
|
||||
}
|
||||
113
MisDataFun/MisDataFun/mes_signal_conf/MES_CONF.Designer.cs
generated
Normal file
113
MisDataFun/MisDataFun/mes_signal_conf/MES_CONF.Designer.cs
generated
Normal file
@@ -0,0 +1,113 @@
|
||||
namespace MES_SIGNAL_CONF
|
||||
{
|
||||
partial class MES_CONF
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows 窗体设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btn_ConfigToSql = new System.Windows.Forms.Button();
|
||||
this.label_ReadExcel = new System.Windows.Forms.Label();
|
||||
this.label_WriteSql = new System.Windows.Forms.Label();
|
||||
this.txt_Msg = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btn_ConfigToSql
|
||||
//
|
||||
this.btn_ConfigToSql.Location = new System.Drawing.Point(487, 74);
|
||||
this.btn_ConfigToSql.Name = "btn_ConfigToSql";
|
||||
this.btn_ConfigToSql.Size = new System.Drawing.Size(161, 36);
|
||||
this.btn_ConfigToSql.TabIndex = 0;
|
||||
this.btn_ConfigToSql.Text = "重新将配置写入数据库";
|
||||
this.btn_ConfigToSql.UseVisualStyleBackColor = true;
|
||||
this.btn_ConfigToSql.Click += new System.EventHandler(this.btn_ConfigToSql_Click);
|
||||
//
|
||||
// label_ReadExcel
|
||||
//
|
||||
this.label_ReadExcel.AutoSize = true;
|
||||
this.label_ReadExcel.Location = new System.Drawing.Point(12, 16);
|
||||
this.label_ReadExcel.Name = "label_ReadExcel";
|
||||
this.label_ReadExcel.Size = new System.Drawing.Size(95, 12);
|
||||
this.label_ReadExcel.TabIndex = 1;
|
||||
this.label_ReadExcel.Text = "label_ReadExcel";
|
||||
//
|
||||
// label_WriteSql
|
||||
//
|
||||
this.label_WriteSql.AutoSize = true;
|
||||
this.label_WriteSql.Location = new System.Drawing.Point(12, 42);
|
||||
this.label_WriteSql.Name = "label_WriteSql";
|
||||
this.label_WriteSql.Size = new System.Drawing.Size(89, 12);
|
||||
this.label_WriteSql.TabIndex = 1;
|
||||
this.label_WriteSql.Text = "label_WriteSql";
|
||||
//
|
||||
// txt_Msg
|
||||
//
|
||||
this.txt_Msg.Location = new System.Drawing.Point(14, 116);
|
||||
this.txt_Msg.Multiline = true;
|
||||
this.txt_Msg.Name = "txt_Msg";
|
||||
this.txt_Msg.Size = new System.Drawing.Size(634, 316);
|
||||
this.txt_Msg.TabIndex = 2;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 70);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(335, 36);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "使用到数据库的表:\r\n读取:MES_计划BOM_工位与名称([是否启用MES] = 1)\r\n写入:MES_基本变量_原始数据、MES_基本变量设备类型对应表";
|
||||
this.label1.Click += new System.EventHandler(this.label1_Click);
|
||||
//
|
||||
// MES_CONF
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(660, 437);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.txt_Msg);
|
||||
this.Controls.Add(this.label_WriteSql);
|
||||
this.Controls.Add(this.label_ReadExcel);
|
||||
this.Controls.Add(this.btn_ConfigToSql);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "MES_CONF";
|
||||
this.ShowIcon = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "MES监控系统信号配置";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btn_ConfigToSql;
|
||||
private System.Windows.Forms.Label label_ReadExcel;
|
||||
private System.Windows.Forms.Label label_WriteSql;
|
||||
private System.Windows.Forms.TextBox txt_Msg;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
|
||||
248
MisDataFun/MisDataFun/mes_signal_conf/MES_CONF.cs
Normal file
248
MisDataFun/MisDataFun/mes_signal_conf/MES_CONF.cs
Normal file
@@ -0,0 +1,248 @@
|
||||
using SlMesDbIterface;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using static System.Configuration.ConfigurationManager;
|
||||
|
||||
namespace MES_SIGNAL_CONF
|
||||
{
|
||||
public partial class MES_CONF : Form
|
||||
{
|
||||
|
||||
|
||||
public MES_CONF()
|
||||
{
|
||||
InitializeComponent();
|
||||
label_ReadExcel.Text = $"读取位置:{MisDataSaveDate.MesServerMisDataFun.BasicDataTableFile}";
|
||||
label_WriteSql.Text = $"写入位置:{MisDataSaveDate.MesServerMisDataFun.ConnectionString_MES}";
|
||||
}
|
||||
|
||||
private void btn_ConfigToSql_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadOpcData();
|
||||
WriteLog("");
|
||||
}
|
||||
|
||||
public void WriteLog(string msg)
|
||||
{
|
||||
txt_Msg.Text = txt_Msg.Text + $"[{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}]{msg}\r\n";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线体类型枚举定义
|
||||
/// 1 = 普通工位(默认)
|
||||
/// 2 = 库位
|
||||
/// 3 = 磨合库位
|
||||
/// 4 = 总装断路器接驳库位
|
||||
/// </summary>
|
||||
private enum LineType
|
||||
{
|
||||
Normal = 1, // 普通工位 - 使用 MES_信号表模板
|
||||
Storage = 2, // 库位 - 使用 MES_信号表模板(库位)
|
||||
RunInStorage = 3, // 磨合库位 - 使用 MES_信号表模板(磨合库位)
|
||||
BreakerDockStorage = 4 // 总装断路器接驳库位 - 使用 MES_信号表模板(总装断路器接驳库位)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 线体类型与信号表模板的映射配置
|
||||
/// Key: 线体类型枚举
|
||||
/// Value: Excel中的模板Sheet名称
|
||||
/// </summary>
|
||||
private static readonly System.Collections.Generic.Dictionary<LineType, string> LineTypeTemplateMapping =
|
||||
new System.Collections.Generic.Dictionary<LineType, string>
|
||||
{
|
||||
{ LineType.Normal, "MES_信号表模板" },
|
||||
{ LineType.Storage, "MES_信号表模板(库位)" },
|
||||
{ LineType.RunInStorage, "MES_信号表模板(磨合库位)" },
|
||||
{ LineType.BreakerDockStorage, "MES_信号表模板(总装断路器接驳库位)" }
|
||||
};
|
||||
|
||||
private void LoadOpcData()
|
||||
{
|
||||
DataTable dt_Tag = null;
|
||||
|
||||
Select_Station(out DataTable dt_Station);
|
||||
DataTable dt_Tag_Mes = new DataTable();
|
||||
if (NPOITest.ExeclHelper.ExcelToDataTable(MisDataSaveDate.MesServerMisDataFun.BasicDataTableFile, "MES_基本变量原始数据", true).Select($"是否启用='1'").Length > 0)
|
||||
{
|
||||
dt_Tag_Mes = NPOITest.ExeclHelper.ExcelToDataTable(MisDataSaveDate.MesServerMisDataFun.BasicDataTableFile, "MES_基本变量原始数据", true).Select($"是否启用='1'").CopyToDataTable();
|
||||
}
|
||||
|
||||
// 加载各类型信号表模板
|
||||
var templateCache = new System.Collections.Generic.Dictionary<LineType, DataTable>();
|
||||
foreach (var mapping in LineTypeTemplateMapping)
|
||||
{
|
||||
try
|
||||
{
|
||||
var templateData = NPOITest.ExeclHelper.ExcelToDataTable(
|
||||
MisDataSaveDate.MesServerMisDataFun.BasicDataTableFile,
|
||||
mapping.Value,
|
||||
true);
|
||||
var enabledRows = templateData.Select($"是否启用='1'");
|
||||
if (enabledRows.Length > 0)
|
||||
{
|
||||
templateCache[mapping.Key] = enabledRows.CopyToDataTable();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
WriteLog($"加载模板 [{mapping.Value}] 失败: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
var dt_Device = NPOITest.ExeclHelper.ExcelToDataTable(MisDataSaveDate.MesServerMisDataFun.BasicDataTableFile, "设备类型对应表", true).Select($"是否启用='1'").CopyToDataTable();
|
||||
|
||||
// 使用默认模板结构初始化结果表
|
||||
dt_Tag = templateCache.ContainsKey(LineType.Normal)
|
||||
? templateCache[LineType.Normal].Clone()
|
||||
: new DataTable();
|
||||
|
||||
// 按线体类型分组处理工位
|
||||
foreach (var lineTypeEntry in LineTypeTemplateMapping)
|
||||
{
|
||||
var lineTypeValue = ((int)lineTypeEntry.Key).ToString();
|
||||
DataRow[] stationRows;
|
||||
|
||||
if (lineTypeEntry.Key == LineType.Normal)
|
||||
{
|
||||
// 普通工位:线体类型=1 或 NULL 或 空值,同时排除所有特殊类型(2, 3, ...)
|
||||
// 构建排除条件:(线体类型 IS NULL OR 线体类型 = '' OR 线体类型 = '1' OR (线体类型 <> '2' AND 线体类型 <> '3' ...))
|
||||
var specialTypeValues = LineTypeTemplateMapping.Keys
|
||||
.Where(lt => lt != LineType.Normal)
|
||||
.Select(lt => (int)lt)
|
||||
.ToList();
|
||||
|
||||
// 筛选出所有非特殊类型的工位
|
||||
stationRows = dt_Station.AsEnumerable()
|
||||
.Where(row =>
|
||||
{
|
||||
var lineTypeVal = row["线体类型"]?.ToString()?.Trim() ?? "";
|
||||
// 空值或NULL视为普通工位
|
||||
if (string.IsNullOrEmpty(lineTypeVal)) return true;
|
||||
// 尝试解析为数字
|
||||
if (int.TryParse(lineTypeVal, out int lineTypeInt))
|
||||
{
|
||||
// 不是特殊类型则为普通工位
|
||||
return !specialTypeValues.Contains(lineTypeInt);
|
||||
}
|
||||
// 无法解析为数字,视为普通工位
|
||||
return true;
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 特殊类型:精确匹配
|
||||
stationRows = dt_Station.Select($"线体类型 = '{lineTypeValue}'");
|
||||
}
|
||||
|
||||
if (stationRows.Length == 0) continue;
|
||||
if (!templateCache.ContainsKey(lineTypeEntry.Key))
|
||||
{
|
||||
WriteLog($"警告: 线体类型 [{lineTypeEntry.Key}] 的模板未加载,跳过 {stationRows.Length} 个工位");
|
||||
continue;
|
||||
}
|
||||
|
||||
var templateTable = templateCache[lineTypeEntry.Key];
|
||||
|
||||
foreach (DataRow stationRow in stationRows)
|
||||
{
|
||||
var 工位代码 = stationRow["工位代码"].ToString();
|
||||
var 工位名称 = stationRow["工位名称"].ToString();
|
||||
var PLC = stationRow["PLC"].ToString();
|
||||
var stationName = stationRow["工位号"].ToString();
|
||||
var PLC代码 = stationRow["PLC代码"].ToString();
|
||||
|
||||
var dt_Tag_Model_Copy = templateTable.Copy();
|
||||
UpdateOpTable(dt_Tag_Model_Copy, 工位代码, stationName, 工位名称, PLC, PLC代码);
|
||||
dt_Tag.Merge(dt_Tag_Model_Copy);
|
||||
}
|
||||
}
|
||||
|
||||
dt_Tag.Merge(dt_Tag_Mes);
|
||||
dt_Tag.TableName = "MES_基本变量_原始数据";
|
||||
SqlOperation.ExecuteSql($"truncate table {dt_Tag.TableName}", out string err1);
|
||||
if (err1 != "") WriteLog($"truncate table {dt_Tag.TableName}:{err1}");
|
||||
WriteLog($"清空了数据库表:{dt_Tag.TableName}");
|
||||
SqlOperation.SqlbulkcopyInsert(dt_Tag, out string err2);
|
||||
if (err2 != "") WriteLog($"写入数据库表 {dt_Tag.TableName}:{err2}");
|
||||
WriteLog($"写入数据库表:{dt_Tag.TableName}");
|
||||
|
||||
// 调用存储过程:根据 XD_产线报警定义 + 工位表 自动生成报警点位
|
||||
WriteLog("开始生成报警点位...");
|
||||
SqlOperation.ExecuteSql("EXEC MES_基本变量_原始数据_报警数据_增加", out DataTable dtAlarmResult, out string errAlarm);
|
||||
if (errAlarm != "")
|
||||
{
|
||||
WriteLog($"生成报警点位失败:{errAlarm}");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dtAlarmResult != null && dtAlarmResult.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow row in dtAlarmResult.Rows)
|
||||
{
|
||||
WriteLog($" {row["工位号"]}:生成 {row["生成数量"]} 条报警变量");
|
||||
}
|
||||
}
|
||||
WriteLog("报警点位生成完成!");
|
||||
}
|
||||
|
||||
dt_Device.TableName = "MES_基本变量设备类型对应表";
|
||||
SqlOperation.ExecuteSql($"truncate table {dt_Device.TableName}", out string err11);
|
||||
if (err11 != "") WriteLog($"truncate table {dt_Device.TableName}:{err11}");
|
||||
|
||||
WriteLog($"清空了数据库表:{dt_Device.TableName}");
|
||||
SqlOperation.SqlbulkcopyInsert(dt_Device, out string err22);
|
||||
if (err22 != "") WriteLog($"清空了数据库表 {dt_Device.TableName}:{err22}");
|
||||
WriteLog($"写入数据库表:{dt_Device.TableName}");
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void UpdateOpTable(DataTable dt, string 工位代码, string opName, string opNameName, string ip, string dbName)
|
||||
{
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
//TagID TagName 工位号 数据来源 IP DbName 变量特点 变量类型代码
|
||||
|
||||
var TagID = row["TagID"].ToString();
|
||||
|
||||
row["TagID"] = TagID.Replace("****", 工位代码.PadLeft(4, '0'));
|
||||
//row["TagID"] = Guid.NewGuid().ToString ().ToUpper ();
|
||||
row["工位号"] = opName;
|
||||
row["数据来源"] = opNameName;
|
||||
row["IP"] = ip;
|
||||
row["DbName"] = dbName;
|
||||
|
||||
row["监控组"] = $"{row["监控组"].ToString()}_{opName}";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void Select_Station(out DataTable dt)
|
||||
{
|
||||
var sql =
|
||||
$" SELECT *" +
|
||||
$" FROM [MES_计划BOM_工位与名称] WHERE [是否启用MES] = 1" +
|
||||
$" ORDER BY [工位号]";
|
||||
SqlOperation.ExecuteSql(sql, out dt, out string error);
|
||||
}
|
||||
|
||||
public static void Select_OpTable_Alarm(out DataTable dt)
|
||||
{
|
||||
var sql =
|
||||
$" SELECT *" +
|
||||
$" FROM [MES_基本变量_原始数据] WHERE [type] = 9" +
|
||||
$" ORDER BY [TagID]";
|
||||
SqlOperation.ExecuteSql(sql, out dt, out string error);
|
||||
}
|
||||
|
||||
|
||||
private void label1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
120
MisDataFun/MisDataFun/mes_signal_conf/MES_CONF.resx
Normal file
120
MisDataFun/MisDataFun/mes_signal_conf/MES_CONF.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
68
MisDataFun/MisDataFun/mes_signal_conf/SqlOperation.cs
Normal file
68
MisDataFun/MisDataFun/mes_signal_conf/SqlOperation.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace SlMesDbIterface
|
||||
{
|
||||
public class SqlOperation
|
||||
{
|
||||
public static bool ExecuteStoredProcedure(string name, SqlParameter[] sqlParameters, out string errorMessage)
|
||||
{
|
||||
return DataLinkMesWork.SQLCommon.ExecuteStoredProcedure(name, MisDataSaveDate.MesServerMisDataFun.ConnectionString_MES, ref sqlParameters, out errorMessage);
|
||||
}
|
||||
public static bool ExecuteStoredProcedure(string name, SqlParameter[] sqlParameters, out DataTable dt, out string errorMessage)
|
||||
{
|
||||
return DataLinkMesWork.SQLCommon.ExecuteStoredProcedure(name, MisDataSaveDate.MesServerMisDataFun.ConnectionString_MES, ref sqlParameters, out dt, out errorMessage);
|
||||
}
|
||||
public static bool ExecuteStoredProcedure(string name, SqlParameter[] sqlParameters, out DataSet ds, out string errorMessage)
|
||||
{
|
||||
return DataLinkMesWork.SQLCommon.ExecuteStoredProcedure(name, MisDataSaveDate.MesServerMisDataFun.ConnectionString_MES, ref sqlParameters, out ds, out errorMessage);
|
||||
}
|
||||
public static bool ExecuteSql(string sql, out DataTable dt, out string errorMessage)
|
||||
{
|
||||
return DataLinkMesWork.SQLCommon.ExecuteSql(sql, MisDataSaveDate.MesServerMisDataFun.ConnectionString_MES, out dt, out errorMessage);
|
||||
}
|
||||
|
||||
public static bool ExecuteSql(string sql, out DataSet ds, out string errorMessage)
|
||||
{
|
||||
return DataLinkMesWork.SQLCommon.ExecuteDataset(sql, MisDataSaveDate.MesServerMisDataFun.ConnectionString_MES, out ds, out errorMessage);
|
||||
}
|
||||
|
||||
public static bool ExecuteSql(string sql, out string errorMessage)
|
||||
{
|
||||
return DataLinkMesWork.SQLCommon.ExecuteSql(sql, MisDataSaveDate.MesServerMisDataFun.ConnectionString_MES, out errorMessage);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 通过SqlBulkCopy复制table数据到数据库
|
||||
/// </summary>
|
||||
/// <param name="dataset"></param>
|
||||
public static bool SqlbulkcopyInsert(DataTable dt,out string ErrMsg)
|
||||
{
|
||||
bool success = false;
|
||||
ErrMsg = "";
|
||||
try
|
||||
{
|
||||
// SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(connectString, SqlBulkCopyOptions.KeepIdentity);//删除自增ID插入原始数据
|
||||
SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(MisDataSaveDate.MesServerMisDataFun.ConnectionString_MES, SqlBulkCopyOptions.UseInternalTransaction);//批量事务处理
|
||||
sqlbulkcopy.DestinationTableName = dt.TableName;//数据库中的表名
|
||||
for (int i = 0; i < dt.Columns.Count; i++)
|
||||
{
|
||||
var columnName = dt.Columns[i].ColumnName.ToString();
|
||||
sqlbulkcopy.ColumnMappings.Add(columnName, columnName);
|
||||
}
|
||||
sqlbulkcopy.WriteToServer(dt);
|
||||
success = true;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
ErrMsg=err.Message;
|
||||
}
|
||||
return success;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
386
MisDataFun/MisDataFun/webApi/Analysis_MOM_Msg.cs
Normal file
386
MisDataFun/MisDataFun/webApi/Analysis_MOM_Msg.cs
Normal file
@@ -0,0 +1,386 @@
|
||||
using DataLinkMesWork1;
|
||||
using MesServerWork;
|
||||
using MisDataFunDll;
|
||||
using MyLog4Net;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection.Emit;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
public class Analysis_MOM_Msg
|
||||
{
|
||||
/// <summary>
|
||||
/// UUID生成
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string UuidUtil()
|
||||
{
|
||||
string result = Guid.NewGuid().ToString();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取时间戳
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Int64 GetTimeStamp()
|
||||
{
|
||||
TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
return Convert.ToInt64(ts.TotalSeconds);
|
||||
}
|
||||
/// <summary>
|
||||
/// 接收检测数据
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string OnlineCheckData(string url, [FromBody] JObject jobj)
|
||||
{
|
||||
var result = new msgResHeader();
|
||||
result.MsgId = "";
|
||||
result.Message = "";
|
||||
result.Code = "200";
|
||||
result.Data = "";
|
||||
|
||||
string errorMessage = "";
|
||||
string parentID = "";
|
||||
int AID = -1;
|
||||
|
||||
if (jobj == null)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = "参数格式不正确!";
|
||||
string retString1 = JsonConvert.SerializeObject(result);
|
||||
MyLogHelper.Info("接收检测数据_res", retString1);
|
||||
return retString1;
|
||||
}
|
||||
int isError = 0;
|
||||
string str = jobj.ToString();
|
||||
try
|
||||
{
|
||||
//存储日志
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var param = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",url),
|
||||
new SqlParameter("@接口类型",2), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",str),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork1.DataAccess.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", ref param, out DataTable dt, out errorMessage);
|
||||
|
||||
// 解析订单内容,存储数据库,根据实际业务来写
|
||||
OnlineCheckData onlineCheckData = JsonConvert.DeserializeObject<OnlineCheckData>(str);
|
||||
if (onlineCheckData.MsgId == "")
|
||||
{
|
||||
throw new Exception("参数MsgId为空!");
|
||||
}
|
||||
result.MsgId = onlineCheckData.MsgId;
|
||||
if (onlineCheckData.OpCode == "")
|
||||
{
|
||||
throw new Exception("参数OpCode为空!");
|
||||
}
|
||||
if (onlineCheckData.ProductionCode == "")
|
||||
{
|
||||
throw new Exception("参数ProductionCode为空!");
|
||||
}
|
||||
string OpName = onlineCheckData.OpCode;
|
||||
int Id_tagCF = 0;
|
||||
SqlParameter[] param1 = new SqlParameter[6];
|
||||
param1[0] = new SqlParameter("@EngineID", onlineCheckData.ProductionCode);
|
||||
param1[1] = new SqlParameter("@工位号", OpName);
|
||||
param1[2] = new SqlParameter("@操作者工号", onlineCheckData.CheckPerson);
|
||||
param1[3] = new SqlParameter("@扫码时间", onlineCheckData.ScanTime);
|
||||
param1[4] = new SqlParameter("@合格标志", onlineCheckData.QualityMark);
|
||||
param1[5] = new SqlParameter("@Id_tagCF", Id_tagCF);
|
||||
param1[5].Direction = ParameterDirection.Output;
|
||||
DataAccess.ExecuteStoredProcedure("测量数据合格索引_增加_测试设备", ref param1, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception(errorMessage);
|
||||
}
|
||||
Id_tagCF = Convert.ToInt32(param1[5].Value.ToString());
|
||||
|
||||
List<OnlineCheckData_CheckData> onlineCheckData_CheckDataList = onlineCheckData.CheckData;
|
||||
|
||||
for (int i = 0; i < onlineCheckData_CheckDataList.Count; i++)
|
||||
{
|
||||
OnlineCheckData_CheckData onlineCheckData_CheckData = onlineCheckData_CheckDataList[i];
|
||||
|
||||
var param2 = new SqlParameter[] {
|
||||
new SqlParameter("@Id_tagCF", Id_tagCF),
|
||||
new SqlParameter("@EngineID", onlineCheckData.ProductionCode),
|
||||
new SqlParameter("@TagID",onlineCheckData_CheckData.CheckCode),
|
||||
new SqlParameter("@TagValue",onlineCheckData_CheckData.CheckValue),
|
||||
new SqlParameter("@IsGoodBad",onlineCheckData_CheckData.QualityMark),
|
||||
new SqlParameter("@工位号",OpName),
|
||||
new SqlParameter("@理论值",onlineCheckData_CheckData.StandardValue),
|
||||
new SqlParameter("@上限值",onlineCheckData_CheckData.MaxValue),
|
||||
new SqlParameter("@下限值",onlineCheckData_CheckData.MinValue),
|
||||
new SqlParameter("@测量项目",onlineCheckData_CheckData.CheckName),
|
||||
new SqlParameter("@测量单位",onlineCheckData_CheckData.Unit),
|
||||
};
|
||||
DataAccess.ExecuteStoredProcedure("测量数据合格_增加_测试设备", ref param2, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception(errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// 查询PLC是否传递机型,保证工位有件,可以写保存完成和工作完成
|
||||
MIS_BASE.Read_EngineGetOver_PLC(OpName, out bool tagValue);
|
||||
if (tagValue)
|
||||
{
|
||||
// 电芯段OP040流程比较特殊,无PLC保存数据的流程,可以直接写完成。
|
||||
if (OpName == "OP040")
|
||||
{
|
||||
//通知PLC,MES保存完成
|
||||
MIS_BASE.Write_MesReadOver(OpName, true);
|
||||
//通知PLC,MES工作完成
|
||||
MIS_BASE.Write_MesWorkFinish(OpName, true);
|
||||
MisDataFunDll.MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
||||
MisDataFunDll.MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
||||
}
|
||||
else
|
||||
{
|
||||
// 查看PLC是否完成流程,如果完成的话流程结束,否则的话要等PLC完成流程(即允许保存)
|
||||
DataTable dt2 = MisDataFunDll.MisDataFun.CheckAllFinish(OpName, onlineCheckData.ProductionCode, 2);
|
||||
string msg1 = "查询PLC流程出错";
|
||||
if (dt2 != null && dt2.Rows.Count > 0)
|
||||
{
|
||||
string result1 = dt2.Rows[0]["result"].ToString();
|
||||
msg1 = dt2.Rows[0]["msg"].ToString();
|
||||
|
||||
if (result1 == "1") //已完成
|
||||
{
|
||||
//通知PLC,MES保存完成
|
||||
MIS_BASE.Write_MesReadOver(OpName, true);
|
||||
//通知PLC,MES工作完成
|
||||
MIS_BASE.Write_MesWorkFinish(OpName, true);
|
||||
MisDataFunDll. MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", msg1);
|
||||
MisDataFunDll. MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES保存数据完成!");
|
||||
MisDataFunDll.MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", "MES工作完成!");
|
||||
}
|
||||
else
|
||||
{
|
||||
MisDataFunDll.MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", msg1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MisDataFunDll.MisDataFun.LogRecording_OP(OpName, "INFO", "MIS", msg1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = err.Message;
|
||||
MisDataFunDll.MisDataFun.LogRecording_OP("All", "ERROR", "MIS", err.Message);
|
||||
}
|
||||
string retString = JsonConvert.SerializeObject(result);
|
||||
MyLogHelper.Info("接收检测数据_res", retString);
|
||||
|
||||
return retString;
|
||||
}
|
||||
/// <summary>
|
||||
/// 接收查询检测次数
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string OnlineCheckDataCount(string url, [FromBody] JObject jobj)
|
||||
{
|
||||
var result = new msgResHeader2();
|
||||
result.MsgId = "";
|
||||
result.Message = "";
|
||||
result.Code = "200";
|
||||
result.Data = new checkCountData();
|
||||
result.Data.CheckCountOk = 0;
|
||||
result.Data.CheckCountNg = 0;
|
||||
string errorMessage = "";
|
||||
string parentID = "";
|
||||
int AID = -1;
|
||||
|
||||
if (jobj == null)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = "参数格式不正确!";
|
||||
string retString1 = JsonConvert.SerializeObject(result);
|
||||
MyLogHelper.Info("接收查询检测次数_res", retString1);
|
||||
return retString1;
|
||||
}
|
||||
int isError = 0;
|
||||
string str = jobj.ToString();
|
||||
try
|
||||
{
|
||||
//存储日志
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var param = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",url),
|
||||
new SqlParameter("@接口类型",2), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",str),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork1.DataAccess.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", ref param, out DataTable dt, out errorMessage);
|
||||
|
||||
// 解析订单内容,存储数据库,根据实际业务来写
|
||||
OnlineCheckData onlineCheckData = JsonConvert.DeserializeObject<OnlineCheckData>(str);
|
||||
if (onlineCheckData.MsgId == "")
|
||||
{
|
||||
throw new Exception("参数MsgId为空!");
|
||||
}
|
||||
result.MsgId = onlineCheckData.MsgId;
|
||||
if (onlineCheckData.OpCode == "")
|
||||
{
|
||||
throw new Exception("参数OpCode为空!");
|
||||
}
|
||||
if (onlineCheckData.ProductionCode == "")
|
||||
{
|
||||
throw new Exception("参数ProductionCode为空!");
|
||||
}
|
||||
|
||||
SqlParameter[] param1 = new SqlParameter[2];
|
||||
param1[0] = new SqlParameter("@EngineID", onlineCheckData.ProductionCode);
|
||||
param1[1] = new SqlParameter("@工位号", onlineCheckData.OpCode);
|
||||
DataLinkMesWork1.DataAccess.ExecuteStoredProcedure("CATL_测量数据合格_查询测试次数_测试设备", ref param1, out DataTable dt1, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception(errorMessage);
|
||||
}
|
||||
|
||||
if (dt1 != null && dt1.Rows.Count > 0)
|
||||
{
|
||||
result.Data.CheckCountOk = Convert.ToInt32(dt1.Rows[0]["OK"]);
|
||||
result.Data.CheckCountNg = Convert.ToInt32(dt1.Rows[0]["NG"]);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = err.Message;
|
||||
}
|
||||
string retString = JsonConvert.SerializeObject(result);
|
||||
MyLogHelper.Info("接收查询检测次数_res", retString);
|
||||
return retString;
|
||||
}
|
||||
/// <summary>
|
||||
/// 接收打印任务
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string ReceivePrintTask(string url, [FromBody] JObject jobj)
|
||||
{
|
||||
var result = new msgResHeader();
|
||||
result.MsgId = "";
|
||||
result.Message = "";
|
||||
result.Code = "200";
|
||||
result.Data = "";
|
||||
|
||||
string errorMessage = "";
|
||||
string parentID = "";
|
||||
int AID = -1;
|
||||
|
||||
if (jobj == null)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = "参数格式不正确!";
|
||||
string retString1 = JsonConvert.SerializeObject(result);
|
||||
MyLogHelper.Info("接收打印任务_res", retString1);
|
||||
return retString1;
|
||||
}
|
||||
|
||||
string str = jobj.ToString();
|
||||
try
|
||||
{
|
||||
//存储日志
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var param = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",url),
|
||||
new SqlParameter("@接口类型",2), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",str),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork1.DataAccess.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", ref param, out DataTable dt, out errorMessage);
|
||||
|
||||
// 解析订单内容,存储数据库,根据实际业务来写
|
||||
PrintTaskData printTaskData = JsonConvert.DeserializeObject<PrintTaskData>(str);
|
||||
if (printTaskData.printTemplete == "")
|
||||
{
|
||||
throw new Exception("参数printTemplete为空!");
|
||||
}
|
||||
|
||||
if (printTaskData.productCode == "")
|
||||
{
|
||||
throw new Exception("参数productCode为空!");
|
||||
}
|
||||
if (printTaskData.printDate == "")
|
||||
{
|
||||
throw new Exception("参数printDate为空!");
|
||||
}
|
||||
string msg = $"MARK|{printTaskData.printTemplete}|{printTaskData.productCode},{printTaskData.printDate}";
|
||||
|
||||
// 连接打印机
|
||||
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
try
|
||||
{
|
||||
//socket.Connect(MesWorkForm.MarkingMachine_Ip, int.Parse(MesWorkForm.MarkingMachine_Port));
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
throw new Exception("连接打印机失败:" + err.Message);
|
||||
}
|
||||
// 发送数据
|
||||
try
|
||||
{
|
||||
if (socket.Connected)
|
||||
{
|
||||
byte[] decBytes = System.Text.Encoding.UTF8.GetBytes(msg);
|
||||
//socket.Send(decBytes);
|
||||
socket.Send(decBytes, 0, decBytes.Length, SocketFlags.None);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("连接打印机失败");
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
throw new Exception("发送打印数据失败:" + err.Message);
|
||||
}
|
||||
// 关闭
|
||||
try
|
||||
{
|
||||
if (socket.Connected)
|
||||
{
|
||||
socket.Shutdown(SocketShutdown.Both);
|
||||
socket.Close(100);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = err.Message;
|
||||
}
|
||||
string retString = JsonConvert.SerializeObject(result);
|
||||
MyLogHelper.Info("接收打印任务_res", retString);
|
||||
return retString;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
54
MisDataFun/MisDataFun/webApi/Controller/ipcControll.cs
Normal file
54
MisDataFun/MisDataFun/webApi/Controller/ipcControll.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Collections.Concurrent;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
|
||||
public class IpcController : ApiController
|
||||
{
|
||||
readonly string headUrl = "Project/";
|
||||
|
||||
[HttpPost]
|
||||
[Route("OnlineCheckData")]
|
||||
public HttpResponseMessage ReceiveMomPlanData([FromBody] JObject jobj)
|
||||
{
|
||||
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(Analysis_MOM_Msg.OnlineCheckData(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
|
||||
};
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("OnlineCheckDataCount")]
|
||||
public HttpResponseMessage OnlineCheckDataCount([FromBody] JObject jobj)
|
||||
{
|
||||
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(Analysis_MOM_Msg.OnlineCheckDataCount(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
|
||||
};
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("ReceivePrintTask")]
|
||||
public HttpResponseMessage ReceivePrintTask([FromBody] JObject jobj)
|
||||
{
|
||||
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(Analysis_MOM_Msg.ReceivePrintTask(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
66
MisDataFun/MisDataFun/webApi/InitServer.cs
Normal file
66
MisDataFun/MisDataFun/webApi/InitServer.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Cors;
|
||||
using System.Web.Http.SelfHost;
|
||||
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
public class InitServer
|
||||
{
|
||||
HttpSelfHostConfiguration config = null;
|
||||
HttpSelfHostServer server = null;
|
||||
public InitServer(string Url_WebApi)
|
||||
{
|
||||
// var Url_WebApi = System.Configuration.ConfigurationManager.AppSettings["Url_WebApi"];
|
||||
Init(Url_WebApi);
|
||||
}
|
||||
public void Init(string url)
|
||||
{
|
||||
config = new HttpSelfHostConfiguration(url);
|
||||
|
||||
// 启用跨域
|
||||
config.EnableCors(new EnableCorsAttribute("*", "*", "*"));
|
||||
// 启用特性路由
|
||||
config.MapHttpAttributeRoutes();
|
||||
|
||||
//config.Routes.MapHttpRoute(
|
||||
// name: "DefaultApi",
|
||||
// routeTemplate: "api/{controller}/{id}",
|
||||
// defaults: new { id = RouteParameter.Optional }
|
||||
//);
|
||||
|
||||
// 自定义路由匹配到action
|
||||
config.Routes.MapHttpRoute(
|
||||
name: "API Default",
|
||||
routeTemplate: "api/{controller}/{action}/{id}",
|
||||
defaults: new { id = RouteParameter.Optional }
|
||||
);
|
||||
|
||||
|
||||
|
||||
server = new HttpSelfHostServer(config);
|
||||
|
||||
server.OpenAsync().Wait();
|
||||
|
||||
|
||||
}
|
||||
public class JsonContentNegotiator : IContentNegotiator
|
||||
{
|
||||
private readonly JsonMediaTypeFormatter _jsonFormatter;
|
||||
|
||||
public JsonContentNegotiator(JsonMediaTypeFormatter formatter)
|
||||
{
|
||||
_jsonFormatter = formatter;
|
||||
}
|
||||
public ContentNegotiationResult Negotiate(Type type, HttpRequestMessage request, IEnumerable<MediaTypeFormatter> formatters)
|
||||
{
|
||||
var result = new ContentNegotiationResult(_jsonFormatter, new MediaTypeHeaderValue("application/json"));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
98
MisDataFun/MisDataFun/webApi/OnlineCheckData.cs
Normal file
98
MisDataFun/MisDataFun/webApi/OnlineCheckData.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
/// <summary>
|
||||
/// OnlineCheckData
|
||||
/// </summary>
|
||||
|
||||
public class OnlineCheckData
|
||||
{
|
||||
/// <summary>
|
||||
/// MsgId
|
||||
/// </summary>
|
||||
public string MsgId { get; set; } = "";
|
||||
/// <summary>
|
||||
/// OpCode
|
||||
/// </summary>
|
||||
public string OpCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// ProductionCode
|
||||
/// </summary>
|
||||
public string ProductionCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// CheckTime
|
||||
/// </summary>
|
||||
public string ScanTime { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// CheckPerson
|
||||
/// </summary>
|
||||
public string CheckPerson { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// QualityMark
|
||||
/// </summary>
|
||||
public int QualityMark { get; set; } = 1;
|
||||
|
||||
public List<OnlineCheckData_CheckData> CheckData { get; set; } = new List<OnlineCheckData_CheckData>();
|
||||
}
|
||||
|
||||
public class OnlineCheckData_CheckData
|
||||
{
|
||||
/// <summary>
|
||||
/// CheckCode
|
||||
/// </summary>
|
||||
public string CheckCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// CheckName
|
||||
/// </summary>
|
||||
public string CheckName { get; set; } = "";
|
||||
/// <summary>
|
||||
/// ProductionCode
|
||||
/// </summary>
|
||||
public string Unit { get; set; }
|
||||
/// <summary>
|
||||
/// StandardValue
|
||||
/// </summary>
|
||||
public string StandardValue { get; set; } = "";
|
||||
/// <summary>
|
||||
/// MinValue
|
||||
/// </summary>
|
||||
public string MinValue { get; set; } = "";
|
||||
/// <summary>
|
||||
/// MaxValue
|
||||
/// </summary>
|
||||
public string MaxValue { get; set; } = "";
|
||||
/// <summary>
|
||||
/// CheckValue
|
||||
/// </summary>
|
||||
public string CheckValue { get; set; } = "";
|
||||
/// <summary>
|
||||
/// QualityMark
|
||||
/// </summary>
|
||||
public int QualityMark { get; set; } = 1;
|
||||
}
|
||||
public class PrintTaskData
|
||||
{
|
||||
/// string msg = $"MARK|{printTemplete}|{productCode},{printDate}";
|
||||
|
||||
/// <summary>
|
||||
/// printTemplete
|
||||
/// </summary>
|
||||
public string printTemplete { get; set; } = "";
|
||||
/// <summary>
|
||||
/// productCode
|
||||
/// </summary>
|
||||
public string productCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// printDate
|
||||
/// </summary>
|
||||
public string printDate { get; set; } = "";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
100
MisDataFun/MisDataFun/webApi/msgResHeader.cs
Normal file
100
MisDataFun/MisDataFun/webApi/msgResHeader.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MisDataSaveDate
|
||||
{
|
||||
public class msgResHeader
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string MsgId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 返回结果
|
||||
/// </summary>
|
||||
public string Code
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 返回消息
|
||||
/// </summary>
|
||||
public string Message
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 返回数据
|
||||
/// </summary>
|
||||
public string Data
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
public class msgResHeader2
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string MsgId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 返回结果
|
||||
/// </summary>
|
||||
public string Code
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 返回消息
|
||||
/// </summary>
|
||||
public string Message
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 返回数据
|
||||
/// </summary>
|
||||
public checkCountData Data
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
public class checkCountData
|
||||
{
|
||||
/// <summary>
|
||||
/// 检测次数
|
||||
/// </summary>
|
||||
public int CheckCountOk
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 检测次数
|
||||
/// </summary>
|
||||
public int CheckCountNg
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user